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

[RouteOrch] Record ROUTE_TABLE entry programming status to APPL_STATE_DB #2512

Merged
merged 8 commits into from
Feb 14, 2023

Conversation

stepanblyschak
Copy link
Contributor

Signed-off-by: Stepan Blyschak stepanb@nvidia.com

DEPENDS ON #2511

What I did

I added ROUTE_TABLE entry programming status recording to APPL_STATE_DB. I made a ResponsePublisher work in buffered mode to be more optimized for route bulk processing.

I always publish a route entry with return code SAI_STATUS_SUCCESS because orchagent immidiatelly exits on any error.

Why I did it

I did it to support route supression in BGP. Orchagent has to sends route programming feedback back to fpmsyncd which communicates with zebra.

How I verified it

I wrote UT, also on the switch, you can run:

admin@sonic:~$ redis-cli -n 14 keys '*ROUTE*'

Details if related

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@stepanblyschak stepanblyschak force-pushed the routeorch-response-channel branch from a4b7a55 to e9feb5e Compare November 17, 2022 19:18
@@ -630,6 +632,11 @@ void RouteOrch::doTask(Consumer& consumer)

if (fvField(i) == "seg_src")
srv6_source = fvValue(i);

if (fvField(i) == "protocol")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we have to introduce this field?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

/* If the operation type is "DEL" then ctx.protocol is empty and fvs is left empty.
* An empty fvs makes ResponsePublisher::publish() remove the state entry from APPL_STATE_DB
*/
if (!ctx.protocol.empty())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why introduce this field for identifying operation? I'm not sure if i understand the logic here. Can you please explaing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not the motivation for introducing this field. The context does not carry operation type, however, if the protocol is left empty that means it is a delete operation, since the delete update does not carry FVS (including protocol)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@prsunny Replaced with a flag saved in the context object, please check.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
prsunny
prsunny previously approved these changes Jan 12, 2023
Copy link
Collaborator

@prsunny prsunny left a comment

Choose a reason for hiding this comment

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

lgtm,

@prsunny prsunny requested a review from qiluo-msft January 12, 2023 21:58
This is needed in case DEL/SET consolidation by ConsumerStateTable

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@prsunny
Copy link
Collaborator

prsunny commented Feb 9, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -165,7 +165,7 @@ tests_intfmgrd_INCLUDES = $(tests_INCLUDES) -I$(top_srcdir)/cfgmgr -I$(top_srcdi
tests_intfmgrd_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_GTEST) $(CFLAGS_SAI)
tests_intfmgrd_CPPFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_GTEST) $(CFLAGS_SAI) $(tests_intfmgrd_INCLUDES)
tests_intfmgrd_LDADD = $(LDADD_GTEST) $(LDADD_SAI) -lnl-genl-3 -lhiredis -lhiredis \
-lswsscommon -lswsscommon -lgtest -lgtest_main -lzmq -lnl-3 -lnl-route-3 -lpthread
-lswsscommon -lswsscommon -lgtest -lgtest_main -lzmq -lnl-3 -lnl-route-3 -lpthread -lgmock -lgmock_main
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we need this change in intfmgrd?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@prsunny tests/mock_tests/fake_response_publisher.cpp tests_intfmgrd depends on is using google mock

@stepanblyschak
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny merged commit 35385ad into sonic-net:master Feb 14, 2023
AntonHryshchuk added a commit to AntonHryshchuk/sonic-buildimage that referenced this pull request Feb 22, 2023
Update sonic-swss submodule pointer to include the following:
* f66abed Support for tc-dot1p and tc-dscp qosmap ([sonic-net#2559](sonic-net/sonic-swss#2559))
* 35385ad [RouteOrch] Record ROUTE_TABLE entry programming status to APPL_STATE_DB ([sonic-net#2512](sonic-net/sonic-swss#2512))
* 0704f78 [Workaround] EvpnRemoteVnip2pOrch warmboot check failure ([sonic-net#2626](sonic-net/sonic-swss#2626))
* 4df5cab [ResponsePublisher] add pipeline support  ([sonic-net#2511](sonic-net/sonic-swss#2511))

Signed-off-by: AntonHryshchuk <antonh@nvidia.com>
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Feb 23, 2023
Update sonic-swss submodule pointer to include the following:
* baa302e Do not allow to add port to .1Q bridge while router port deletion is not completed  ([sonic-net#2669](sonic-net/sonic-swss#2669))
* f66abed Support for tc-dot1p and tc-dscp qosmap ([sonic-net#2559](sonic-net/sonic-swss#2559))
* 35385ad [RouteOrch] Record ROUTE_TABLE entry programming status to APPL_STATE_DB ([sonic-net#2512](sonic-net/sonic-swss#2512))
* 0704f78 [Workaround] EvpnRemoteVnip2pOrch warmboot check failure ([sonic-net#2626](sonic-net/sonic-swss#2626))
* 4df5cab [ResponsePublisher] add pipeline support  ([sonic-net#2511](sonic-net/sonic-swss#2511))

Signed-off-by: dprital <drorp@nvidia.com>
prsunny pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Feb 23, 2023
Update sonic-swss submodule pointer to include the following:
* baa302e Do not allow to add port to .1Q bridge while router port deletion is not completed  ([#2669](sonic-net/sonic-swss#2669))
* f66abed Support for tc-dot1p and tc-dscp qosmap ([#2559](sonic-net/sonic-swss#2559))
* 35385ad [RouteOrch] Record ROUTE_TABLE entry programming status to APPL_STATE_DB ([#2512](sonic-net/sonic-swss#2512))
* 0704f78 [Workaround] EvpnRemoteVnip2pOrch warmboot check failure ([#2626](sonic-net/sonic-swss#2626))
* 4df5cab [ResponsePublisher] add pipeline support  ([#2511](sonic-net/sonic-swss#2511))
StormLiangMS pushed a commit that referenced this pull request Mar 19, 2023
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.
stepanblyschak added a commit to stepanblyschak/sonic-swss that referenced this pull request Dec 19, 2023
stepanblyschak added a commit to stepanblyschak/sonic-swss that referenced this pull request Dec 20, 2023
yxieca added a commit that referenced this pull request Jan 25, 2024
* 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 <stepanb@nvidia.com>

---------

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Co-authored-by: Ying Xie <yxieca@users.noreply.github.com>
stepanblyschak added a commit to stepanblyschak/sonic-swss that referenced this pull request May 17, 2024
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