Skip to content

[storm-control] utilities and SAI define are different. #3897

@wait2035

Description

@wait2035

Hi All,

I just found some miss-leading between utilities cli and saiport.h.

in utilties cli, there are
@click.argument('storm_type',metavar='<storm_type>', required=True, type=click.Choice(["broadcast", "unknown-unicast", "unknown-multicast"]))

but in saiport.h, it's defined as following:

    /**
     * @brief Enable flood (unknown unicast or unknown multicast)
     * storm control policer on port.
     *
     * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
     *
     * @type sai_object_id_t
     * @flags CREATE_AND_SET
     * @objects SAI_OBJECT_TYPE_POLICER
     * @allownull true
     * @default SAI_NULL_OBJECT_ID
     */
    SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID,

    /**
     * @brief Enable broadcast storm control policer on port.
     *
     * Set Policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
     *
     * @type sai_object_id_t
     * @flags CREATE_AND_SET
     * @objects SAI_OBJECT_TYPE_POLICER
     * @allownull true
     * @default SAI_NULL_OBJECT_ID
     */
    SAI_PORT_ATTR_BROADCAST_STORM_CONTROL_POLICER_ID,

    /**
     * @brief Enable multicast storm control policer on port.
     *
     * Set policer id = #SAI_NULL_OBJECT_ID to disable policer on port.
     *
     * @type sai_object_id_t
     * @flags CREATE_AND_SET
     * @objects SAI_OBJECT_TYPE_POLICER
     * @allownull true
     * @default SAI_NULL_OBJECT_ID
     */
    SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID,

as I learned from saiport.h:

  • SAI_PORT_ATTR_FLOOD_STORM_CONTROL_POLICER_ID including unknown-unicast/unknown-multicast.

  • SAI_PORT_ATTR_MULTICAST_STORM_CONTROL_POLICER_ID is only used for registered multicast.

  • And there are no single attr for unknown-multicast.

Is it?

If i'm wrong, is there anyone can tell me how to understand this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions