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

add SAI_FDB_ENTRY_ATTR_STATE attribute to sai_fdb_entry #1723

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

daiwei1983
Copy link

Summary:
This SAI change adds a new sai_fdb_entry attribute “SAI_FDB_ENTRY_ATTR_STATE”. This state specified whether fdb entry is unknown, validated, pending or not installed. Unknown means the fdb entry state information is not available. Validated means the fdb entry already took effect and is forwarding packets based on mac + vlan. Pending means the fdb entry did not take effect, the packets to mac + vlan are still flooded and subsequent packets with the same source MAC+vlan will not result in further callbacks. Not installed means the fdb entry is not installed in hardware.

This “SAI_FDB_ENTRY_ATTR_STATE” attribute could be used in below two example workflows:

  1. After receiving fdb callbacks, NOS will query this fdb entry attribute to get the state info and decide any additional operations on this fdb entry.
  2. NOS CLI query will call get fdb entry attributes and list all fdb entry states

Example of query API:
sai_attribute_t get_attr_list[1];
get_attr_list[0].id = SAI_FDB_ENTRY_ATTR_STATE;
sai_fdb_api_table->get_fdb_entry_attribute((const sai_fdb_entry_t*)&fdb_entry, 1, get_attr_list));
sai_fdb_entry_state_t state = get_attr_list[0].value.s32

Signed-off-by: Wei Dai <[email protected]>
Signed-off-by: Shrikrishna Khare <[email protected]>
Signed-off-by: daiweix <[email protected]>
* @brief Specify FDB entry state
*
* @type sai_fdb_entry_state_t
* @flags CREATE_AND_SET
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be READ_ONLY ?
Still not sure about a real use case for this attribute.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daiwei1983 , is there a case when an application may try to set this attribute?

@kcudnik
Copy link
Collaborator

kcudnik commented Jun 29, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants