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

Introduce a SONiC-specific communication channel between FRR and SONiC #18715

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

cscarpitta
Copy link
Contributor

@cscarpitta cscarpitta commented Apr 18, 2024

Why I did it

Introduce a SONiC-specific communication channel between FRR and SONiC.
HLD: sonic-net/SONiC#1620

How I did it

Introduce a SONiC-specific communication channel between FRR and SONiC (FPM SONiC module).

How to verify it

By switching to the new FPM SONiC module, all existing test cases for all features are successfully passed.

Description for the changelog

  • Add new FPM SONiC module
  • Add a patch file "build-dplane-fpm-sonic-module.patch" to compile FRR with the new FPM SONiC module
  • Change supervisord.conf.j2 of the docker-fpm-frr container to load the new FPM SONiC module on FRR startup

@cscarpitta cscarpitta requested a review from lguohan as a code owner April 18, 2024 15:53
@mssonicbld
Copy link
Collaborator

@StormLiangMS,@liushilongbuaa PR: #18715 is conflict with MS internal repo
Please push fix commit to sonicbld/precheck/head/18715 and approve
https://msazure.visualstudio.com/One/_git/Networking-acs-buildimage/pullrequest/9922845
After ms PR is merged, comment "/azpw ms_conflict" to rerun PR checker.

@liushilongbuaa
Copy link
Contributor

/azpw ms_conflict

@cscarpitta cscarpitta force-pushed the dplane_fpm_sonic_master branch from dc29b17 to f098a94 Compare April 24, 2024 16:32
@cscarpitta cscarpitta changed the title Enhance communication channel between FRR and SONiC Introduce new FRR-SONiC communication channel (FPM SONiC module) Apr 24, 2024
@cscarpitta cscarpitta changed the title Introduce new FRR-SONiC communication channel (FPM SONiC module) Introduce SONiC-specific communication channel between FRR and SONiC Apr 24, 2024
@cscarpitta cscarpitta changed the title Introduce SONiC-specific communication channel between FRR and SONiC Introduce a SONiC-specific communication channel between FRR and SONiC Apr 24, 2024
@cscarpitta cscarpitta force-pushed the dplane_fpm_sonic_master branch from f098a94 to 4fff266 Compare April 25, 2024 16:33
@liushilongbuaa
Copy link
Contributor

/azpw ms_conflict

@cscarpitta cscarpitta force-pushed the dplane_fpm_sonic_master branch from 4fff266 to 318ee37 Compare May 4, 2024 05:16
@@ -164,7 +164,7 @@ environment=ASAN_OPTIONS="log_path=/var/log/asan/teammgrd-asan.log{{ asan_extra_
{% endif %}

[program:zebra]
command=/usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M dplane_fpm_nl --asic-offload=notify_on_offload
command=/usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M dplane_fpm_sonic --asic-offload=notify_on_offload
Copy link
Collaborator

Choose a reason for hiding this comment

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

it is better if we do not change it by default, it is better to first introduce this as option and then wait till it becomes stable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @lguohan

Many thanks for the review.

I added a compile-time option ENABLE_DPLANE_FPM_SONIC.

When this option is set, SONiC uses the new FPM module.
When this option is not set, SONiC uses the old FPM module and behaves exactly as it does today.

By default, this option is not set.

Copy link
Collaborator

Choose a reason for hiding this comment

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

i am fine that we build them into image by default, but do not enable it by default. if you can do it at runtime, it will be easier for you, and i am fine with that.

does this dplane_fpm_sonic support all features as dplane_fpm_nl?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lguohan

Yes, the dplane_fpm_sonic supports all features as dplane_fpm_nl. It is a copy of the old dplane_fpm_nl.

Indeed, it is easier to compile this by default and keep the old dplane_fpm_nl running by default.
I reverted the compile option and changed the supervisord config file to keep dplane_fpm_nl as default.

@cscarpitta cscarpitta force-pushed the dplane_fpm_sonic_master branch from 318ee37 to 8575a45 Compare May 15, 2024 17:52
@cscarpitta cscarpitta force-pushed the dplane_fpm_sonic_master branch 3 times, most recently from ce8dd1f to 4831515 Compare May 17, 2024 06:40
@lguohan
Copy link
Collaborator

lguohan commented May 18, 2024

@cscarpitta , have we sync with frr community to see if we can add this plugin into frr repo and get maintainer there? I think this can be facilitated by the routing group? @kperumalbfn , and @eddieruan-alibaba ?

if we cannot get into frr repo, for this plugin, can we maintain as a patch format to fpm_nl? so that we can still keep track of upstream changes. What if there is some new changes to dplane_fpm_nl and we need those changes into dplane_fpm_sonic?

@eddieruan-alibaba
Copy link
Collaborator

@cscarpitta , have we sync with frr community to see if we can add this plugin into frr repo and get maintainer there? I think this can be facilitated by the routing group? @kperumalbfn , and @eddieruan-alibaba ?

if we cannot get into frr repo, for this plugin, can we maintain as a patch format to fpm_nl? so that we can still keep track of upstream changes. What if there is some new changes to dplane_fpm_nl and we need those changes into dplane_fpm_sonic?

Discussed this with Donald Sharp in Routing WG. The conclusion was that Donald didn't want to take it into FRR community since it is SONiC specific. This proposal was proposed via Mark Stepp from Cisco who worked in FRR fpm before and supported by Donald who owns FRR. The discussion meeting minutes could be found in https://lists.sonicfoundation.dev/g/sonic-wg-routing/wiki/36598.

The basic idea is to let SONiC team own sonic fpm. The zebra/fpm apis have already been changed with versioning by Mark S. Since we own sonic fpm, I feel it is simple to keep dplane_fpm_sonic.c as a file instead of as a diff.

@cscarpitta
Copy link
Contributor Author

@cscarpitta , have we sync with frr community to see if we can add this plugin into frr repo and get maintainer there? I think this can be facilitated by the routing group? @kperumalbfn , and @eddieruan-alibaba ?

if we cannot get into frr repo, for this plugin, can we maintain as a patch format to fpm_nl? so that we can still keep track of upstream changes. What if there is some new changes to dplane_fpm_nl and we need those changes into dplane_fpm_sonic?

@lguohan As Eddie mentioned, the option of adding the new changes as a patch was discussed in the Routing WG. However there were some concerns on this approach and the consensus was that this will be maintained as a separate module under the sonic-buildimage repository

Regarding the second point, in case of new features or bug fixes or improvements of dplane_fpm_nl, as part of the FRR upgrade process we will make sure that all the changes will be reflected in the dplane_fpm_sonic.

@eddieruan-alibaba
Copy link
Collaborator

For the platform which wants to use dplane_fpm_sonic.so, how does this .so get picked up? Do you want to add a README file for that?

@cscarpitta cscarpitta force-pushed the dplane_fpm_sonic_master branch 2 times, most recently from d79ee30 to 2590bc9 Compare May 29, 2024 15:14
@cscarpitta
Copy link
Contributor Author

For the platform which wants to use dplane_fpm_sonic.so, how does this .so get picked up? Do you want to add a README file for that?

Hi @eddieruan-alibaba Many thanks for the review.

I added a README file to explain how to enable the dplane_fpm_sonic module.

@cscarpitta
Copy link
Contributor Author

/azpw ms_conflict

@cscarpitta
Copy link
Contributor Author

@liushilongbuaa @StormLiangMS Can you please help fix the ms_conflict?

@cscarpitta
Copy link
Contributor Author

@lguohan

The HLD for this feature has been merged: sonic-net/SONiC#1620

We addressed all comments on this PR. Can you please take a look again and help merge?

@liushilongbuaa
Copy link
Contributor

/azpw ms_conflict -f

@eddieruan-alibaba
Copy link
Collaborator

For the platform which wants to use dplane_fpm_sonic.so, how does this .so get picked up? Do you want to add a README file for that?

Hi @eddieruan-alibaba Many thanks for the review.

I added a README file to explain how to enable the dplane_fpm_sonic module.

Thanks Carmine. The readme explains the changes needed. As part of Phoenix wing project, we could change the .j2 based on the supported platform type.

@eddieruan-alibaba
Copy link
Collaborator

@lguohan currently, he just commit the changes needed as infra. It would not be enabled on the current platforms. As part of phoenix wing project, we could enable them on the platforms verified in that project.

@ysj-alibaba
Copy link

@cscarpitta I don't understand what does DPLAINE_OP_STARTUP_STAGE mean and it seems that there is no definition about this flag. Thanks.

@eddieruan-alibaba
Copy link
Collaborator

This PR's changes are cherry picked to Phoenixwing Repro and get validated.

@cscarpitta cscarpitta force-pushed the dplane_fpm_sonic_master branch 2 times, most recently from 1861641 to 8cac5df Compare September 15, 2024 17:05
@kperumalbfn
Copy link
Contributor

@cscarpitta could you check the buildimage failures and VS test failurs?

@cscarpitta cscarpitta force-pushed the dplane_fpm_sonic_master branch from 8cac5df to 293af24 Compare September 21, 2024 11:45
@kperumalbfn
Copy link
Contributor

/azpw ms_conflict -f

Copy link
Contributor

@kperumalbfn kperumalbfn left a comment

Choose a reason for hiding this comment

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

LGTM. Will merge after resolving the conflict.

@kperumalbfn
Copy link
Contributor

@liushilongbuaa Could you check the conflict and trigger ms_conflict check

@liushilongbuaa
Copy link
Contributor

/azpw ms_checker

@liushilongbuaa
Copy link
Contributor

/azpw ms_conflict

@ahsalam
Copy link

ahsalam commented Sep 28, 2024

@kperumalbfn could you please check again? the PR passed all tests. Thanks!

@kperumalbfn kperumalbfn merged commit 23136e5 into sonic-net:master Sep 30, 2024
23 checks passed
saksarav-nokia pushed a commit to saksarav-nokia/sonic-buildimage that referenced this pull request Oct 9, 2024
…nic-net#18715)

[FRR FPM] Introduce new FRR-SONiC communication channel (FPM SONiC module).

Signed-off-by: Carmine Scarpitta <[email protected]>
sschlafman pushed a commit to sschlafman/sonic-buildimage that referenced this pull request Oct 15, 2024
…nic-net#18715)

[FRR FPM] Introduce new FRR-SONiC communication channel (FPM SONiC module).

Signed-off-by: Carmine Scarpitta <[email protected]>
lguohan pushed a commit that referenced this pull request Oct 25, 2024
This PR fixes the SRv6 SID uninstall introduced in this PR: #18715
This fix has been already merged in the FRR mainline: FRRouting/frr#16835

Signed-off-by: Carmine Scarpitta <[email protected]>
@sudhanshukumar22
Copy link
Contributor

Hi, is it possible to know that which of dplane_fpm_sonic or dplane_fpm_nl is running in the system loaded with sonic image ?

@sudhanshukumar22
Copy link
Contributor

root@sonic:/# ps -aux | grep zebra
frr 39 0.0 0.3 647216 24488 pts/0 Sl 08:42 0:00 /usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M dplane_fpm_sonic -M snmp --asic-offload=notify_on_offload
root 299 0.0 0.0 3324 1388 pts/1 S+ 09:05 0:00 grep zebra
Does this mean that dplane_fpm_sonic is running in the system ?

@ahsalam
Copy link

ahsalam commented Nov 9, 2024

@sudhanshukumar22 dplane_fpm_sonic is running in the system.

rkavitha-hcl pushed a commit to rkavitha-hcl/sonic-buildimage that referenced this pull request Nov 15, 2024
This PR fixes the SRv6 SID uninstall introduced in this PR: sonic-net#18715
This fix has been already merged in the FRR mainline: FRRouting/frr#16835

Signed-off-by: Carmine Scarpitta <[email protected]>
aidan-gallagher pushed a commit to aidan-gallagher/sonic-buildimage that referenced this pull request Nov 16, 2024
…nic-net#18715)

[FRR FPM] Introduce new FRR-SONiC communication channel (FPM SONiC module).

Signed-off-by: Carmine Scarpitta <[email protected]>
aidan-gallagher pushed a commit to aidan-gallagher/sonic-buildimage that referenced this pull request Nov 16, 2024
This PR fixes the SRv6 SID uninstall introduced in this PR: sonic-net#18715
This fix has been already merged in the FRR mainline: FRRouting/frr#16835

Signed-off-by: Carmine Scarpitta <[email protected]>
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.

10 participants