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

[Portsorch]: Add lag-name and oid map to counter table COUNTERS_PORT_NAME_MAP #510

Closed
wants to merge 10 commits into from

Conversation

leoli-nps
Copy link
Contributor

What I did
Add the lag name and oid mapping to the counter table after the lag is created.
Why I did it
Can not obtain the name of lag by oid when using port_util.get_interface_oid_map(). Causes abnormal display when using show mac command after PortChannel0001 learns mac.
How I verified it
Use redis-cli as below:
127.0.0.1:6379[2]> HGET COUNTERS_PORT_NAME_MAP PortChannel0001
"oid:0x200000000060f"
127.0.0.1:6379[2]>
Details if related

FieldValueTuple tuple(lag_alias, sai_serialize_object_id(lag_id));
vector<FieldValueTuple> fields;
fields.push_back(tuple);
m_counterTable->set("", fields);
Copy link
Contributor

Choose a reason for hiding this comment

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

we need the remove part as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The modification has been uploaded, please take a moment to review it. I want to continue uploading code here(sonic-swss), thanks.

Copy link
Contributor

@lguohan lguohan left a comment

Choose a reason for hiding this comment

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

please also do the remove part.

@leoli-nps
Copy link
Contributor Author

The remove part is added, please review!

@leoli-nps
Copy link
Contributor Author

Hi stcheng, please take a moment to review this pull request, we need this pfc-wd function; look forward to your reply, be grateful.
@stcheng

@shine4chen
Copy link
Contributor

@lguohan @pavel-shirshov

@lguohan
Copy link
Contributor

lguohan commented Mar 15, 2019

the pfc wd code is not relavant is the PR. can you create a separate PR for the pfcwd support and for this PR only limit change to COUNTERS_PORT_NAME_MAP.

Copy link
Contributor

@lguohan lguohan left a comment

Choose a reason for hiding this comment

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

pfcwd changes is not relavant to the PR. can you separate the pfcwd changes into a different PR?

@leoli-nps
Copy link
Contributor Author

Hi lguohan, I removed the pfc-wd code based on your suggestion. Now there is only COUNTERS_PORT_NAME_MAP related operation in this PR, please take a moment to deal with it, thanks.
@lguohan

@leoli-nps
Copy link
Contributor Author

@lguohan Please help review this PR, thanks.

@leoli-nps
Copy link
Contributor Author

Same as PR#808 and PR#885

This PR can be closed based on that changes.

@leoli-nps leoli-nps closed this May 23, 2019
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…t#510)

* [fast/warm reboot] carve out variable setup code to a function

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [fast/warm reboot] reorder code so that we have a clear main start point

- Parse option before checking privilege so all users could get help information.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [fast/warm reboot] add some reboot pre-checks

- Make sure that /host has enough space and write-able.
- Make sure the next image is available.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* fix error message
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
Added code changes related to Layer 2 Forwarding Enhancement:

As part of L2 enhancements, per port, per vlan and per port-vlan fdb flush support has been added. The fdb flush response from SAI comes as individual mac delete as mentioned in the HLD. The change here is to follow the same way for VS as well.

Regarding SAI_FDB_EVENT_FLUSHED, it is handled in sync only for 'flush all' case and handling SAI_FDB_EVENT_FLUSHED for per port and per port-vlan will require hgetall on all fdb keys. So, individual mac delete response is preferred.

Another change is to move fdb handling to fdborch. As the fdb reference count is now maintained in fdborch as well, need to move the sai redis fdb handling also there to avoid the reference counts to go out of sync between the two.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants