[fpmsyncd] Implement pending route suppression feature#2551
[fpmsyncd] Implement pending route suppression feature#2551StormLiangMS merged 29 commits intosonic-net:masterfrom
Conversation
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
fpmsyncd/routesync.cpp
Outdated
| struct nl_addr *daddr; | ||
| char destaddr[MAX_ADDR_SIZE + 1] = {0}; | ||
|
|
||
| sendOffloadReply(route_obj); |
There was a problem hiding this comment.
Hope you have a test case to test this MPLS label route.
There was a problem hiding this comment.
I don't add additional flows for MPLS route handling. So it should be covered by existing MPLS route tests.
| // If field "protocol" is present in the field values then | ||
| // it is a SET operation. This field is absent only if we are | ||
| // processing DEL operation. | ||
| isSetOperation = true; |
There was a problem hiding this comment.
Dont we get Del operation in the event? why should we assume this?
There was a problem hiding this comment.
If we get a response for a delete operation we don't get original FVs. We use this knowledge to filter out DEL events we are not interested in.
ResponsePublisher for reference: https://github.com/sonic-net/sonic-swss/blob/master/orchagent/response_publisher.cpp#L106
| // Mark route as OFFLOAD | ||
| rtnl_route_set_flags(routeObject.get(), flags); | ||
|
|
||
| if (!sendOffloadReply(routeObject.get())) |
There was a problem hiding this comment.
When there are multiple route updates for the given route, how do we make sure that the response to sent for the right route-update?
There was a problem hiding this comment.
The constructed RTM_NEWROUTE message contains prefix + vrf + protocol of the route
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
This reverts commit b38772d.
… and later creation there might be an old name<->ifindex mapping entry Signed-off-by: Stepan Blyschak <[email protected]>
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@StormLiangMS , could you help review? |
|
@stepanblyschak , can you please test for backward compatibility? |
|
@prsunny It can be merged without sonic-net/sonic-buildimage#12853. BGP facts and FIB test passed on T1-64-LAG with this change. Please note, that I had to mark VS tests with |
fpmsyncd/fpmlink.cpp
Outdated
|
|
||
| if (len > m_bufSize) | ||
| { | ||
| SWSS_LOG_THROW("Message length %zu is greater then the send buffer size %d", len, m_bufSize); |
There was a problem hiding this comment.
wording issue, then -> than
There was a problem hiding this comment.
Thanks, fixed
|
@jcaiMR could you help to review? |
|
|
||
| NetDispatcher::getInstance().registerMessageHandler(RTM_NEWROUTE, &sync); | ||
| NetDispatcher::getInstance().registerMessageHandler(RTM_DELROUTE, &sync); | ||
| NetDispatcher::getInstance().registerMessageHandler(RTM_NEWLINK, &sync); |
There was a problem hiding this comment.
@stepanblyschak what's the usage for RTM_NETLINK?
There was a problem hiding this comment.
I listen for newlink/dellink events to refill link cache - https://github.com/sonic-net/sonic-swss/pull/2551/files#diff-0555c0a4f1e207c410ac8ab7d4a44f48a0925da2ed14c57499a4e9175223be57R607.
E.g, we need link cache to map VRF linux interface name to VRF if_index to pass to FRR. In case VRF linux interface is removed and then re-created with the same name the link cache will have an invalid entry. So I refill the cache on newlink/dellink events.
Signed-off-by: Stepan Blyschak <[email protected]>
…led -> disabled Signed-off-by: Stepan Blyschak <[email protected]>
|
@StormLiangMS , are we good to merge this? Can you please sign-off if no further comments? |
|
@prsunny this looks good to me. |
|
@stepanblyschak could you also have the testcase in sonic-mgmt to cover this FIB suppress feature? and pls involve Jcai and me for the code review. |
|
@StormLiangMS @jcaiMR BGP suppress FIB pending test cases are already available in PRs - test plan + implementation: |
- What I did I added requires "protocol" field due to fpmsyncd reconcile logic (WarmRestartHelper class) requires old fvs keys to match new fvs. - How I did it Add "protocol" field in db migration. - How to verify it Upgrade from older branch to new image with supported FIB pending. The field was added by sonic-net/sonic-swss#2551. Signed-off-by: Stepan Blyschak <[email protected]>
…#2766) - What I did I added requires "protocol" field due to fpmsyncd reconcile logic (WarmRestartHelper class) requires old fvs keys to match new fvs. - How I did it Add "protocol" field in db migration. - How to verify it Upgrade from older branch to new image with supported FIB pending. The field was added by sonic-net/sonic-swss#2551. Signed-off-by: Stepan Blyschak <[email protected]>
…-net#2551)" This reverts commit 840fe1d.
…-net#2551)" This reverts commit 840fe1d.
* Revert "[RouteOrch] Record ROUTE_TABLE entry programming status to APPL_STATE_DB (#2512)" This reverts commit 35385ad. * Revert "[fpmsyncd] Implement pending route suppression feature (#2551)" This reverts commit 840fe1d. * Get back gMockResponsePublisher as it is used by other tests Signed-off-by: Stepan Blyschak <[email protected]> --------- Signed-off-by: Stepan Blyschak <[email protected]> Co-authored-by: Ying Xie <[email protected]>
…-net#2551)" This reverts commit 840fe1d.
DEPENDS: sonic-net#2512 What I did I implemented support to enable pending routes suppression feature. When this feature is enabled, fpmsyncd will wait for reply from orchagent before sending offload status message to zebra. Why I did it This is done to not announce routes which aren't yet offloaded in HW. How I verified it UT and manual tests.
DEPENDS: #2512
What I did
I implemented support to enable pending routes suppression feature. When this feature is enabled, fpmsyncd will wait for reply from orchagent before sending offload status message to zebra.
Why I did it
This is done to not announce routes which aren't yet offloaded in HW.
How I verified it
UT and manual tests.
Details if related