-
Notifications
You must be signed in to change notification settings - Fork 270
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
Layer 2 Forwarding Enhancements #510
Conversation
…d access from different threads syncd main thread was doing g_redisClient->hget without acquiring g_mutex, thereby causing either syncd main thread or notification thread to block indefinitely on redisBufferRead().
This reverts commit f009491.
This reverts commit 03fc996.
This reverts commit e840a6b.
Layer 2 Forwarding Enhancements
@anilkpandey , thanks for the enhancement. can you provide full description of the change? |
moved sai redis fdb event processing back to notification thread
uncomment meta_sai_on_fdb_event() to update local SAIDB
Added support for handling per port, per vlan and per port-vlan flush event from SAI. Also, doing ASIC_DB flsh in lua script
of course this needs to be build/checked again after swss-common lua fix |
retest this please |
build passed. please merge. |
please remove .DS_Store |
Done. |
@anilkpandey Hey, since you worked on this PR i want to ask about special case, since we are moving forward with supporting syncd multiple switch instances in the same process, then for example there can be possibility that we do a flush with no attributes, just for a single switch, then we want all fdb entries to be removed from that single switch, this is the case when port=0 and bv_id = 0, but your script (the one in swss-common fdb_flush.lua) will remove all the fdb entries from possible all switches. |
Yes, I will create a PR for this change. |
thanks ! |
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.
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.
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.