Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAI_POLICER_ATTR_METER_TYPE meta_generic_validation_set error #583

Open
jipanyang opened this issue Aug 18, 2018 · 3 comments
Open

SAI_POLICER_ATTR_METER_TYPE meta_generic_validation_set error #583

jipanyang opened this issue Aug 18, 2018 · 3 comments

Comments

@jipanyang
Copy link
Contributor

Attribute SAI_POLICER_ATTR_METER_TYPE is create only, while CoppOrch::processCoppRule() provided set interface for it.

https://github.com/Azure/sonic-swss/blob/136621b497d8a51577c7a33e67c7d0fb68a04f2d/orchagent/copporch.cpp#L379

Aug 17 21:10:39.473234 sonic ERR swss/orchagent: :- meta_generic_validation_set: SAI_POLICER_ATTR_METER_TYPE:SAI_ATTR_VALUE_TYPE_INT32 attr is create only and cannot be modified
Aug 17 21:10:39.473345 sonic ERR swss/orchagent: :- processCoppRule: Failed to apply attribute[2].id=0 to policer for trap group:default, error:-5
Aug 17 21:10:39.473345 sonic ERR swss/orchagent: :- doTask: Processing copp task item failed, exiting. 
    /**
     * @brief Policer Meter Type
     *
     * @type sai_meter_type_t
     * @flags MANDATORY_ON_CREATE | CREATE_ONLY
     */
    SAI_POLICER_ATTR_METER_TYPE = SAI_POLICER_ATTR_START,
@lguohan
Copy link
Contributor

lguohan commented Aug 24, 2018

does it make sense to change the type?

@jipanyang
Copy link
Contributor Author

It will be if possible. Actually there are few other create only attributes in saipolicer.h
We either make them create and set, or update SONiC code logic to handle them properly.

    /**
     * @brief Policer Meter Type
     *
     * @type sai_meter_type_t
     * @flags MANDATORY_ON_CREATE | CREATE_ONLY
     */
    SAI_POLICER_ATTR_METER_TYPE = SAI_POLICER_ATTR_START,

    /**
     * @brief Policer mode
     *
     * @type sai_policer_mode_t
     * @flags MANDATORY_ON_CREATE | CREATE_ONLY
     */
    SAI_POLICER_ATTR_MODE = 0x00000001,

    /**
     * @brief Policer Color Source
     *
     * @type sai_policer_color_source_t
     * @flags CREATE_ONLY
     * @default SAI_POLICER_COLOR_SOURCE_AWARE
     */
    SAI_POLICER_ATTR_COLOR_SOURCE = 0x00000002,

@stcheng
Copy link
Contributor

stcheng commented Jul 10, 2019

before the discussion in SAI resolves this issue, we could first block the route to 'set' in SONiC

EdenGri pushed a commit to EdenGri/sonic-swss that referenced this issue Feb 28, 2022
* Changed debug command for FRR

* Update undebug

* Add ipv6 support to generate_dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants