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

SONiC-FRR communication channel support srv6 vpn #20883

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guoguojia2021
Copy link

Why I did it

Add SIDLIST and VPN routes install fpmsyncd with SONIC-FRR communication channel.

How I did it

Add SIDLIST and VPN routes install fpmsyncd with SONIC-FRR communication channel.

How to verify it

Switch to this communication channel, SRv6 vpn routes and sidlist install OK.

Description for the changelog

Add SIDLIST install.
Add SRv6 VPN routes install

Comment on lines 117 to 120
FPM_ROUTE_ENCAP_SRV6_PIC_ID = 3,
FPM_ROUTE_ENCAP_SRV6_NH_ID = 4,
FPM_ROUTE_ENCAP_SRV6_ENCAP_SIDLIST_NAME = 5,
FPM_ROUTE_ENCAP_SRV6_ENCAP_SIDLIST_LEN = 6,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please fix the indentation?

Comment on lines +236 to +237
struct in6_addr src;
struct ipv6_sr_hdr srh[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

Please fix the indentation

memcpy(sidlist_name, sidlist->sidlist_name_, sizeof(sidlist_name));
if (!nl_attr_put(
&req->n, datalen, FPM_ROUTE_ENCAP_SRV6_ENCAP_SIDLIST_NAME,
sidlist_name, SRV6_SEGMENTLIST_NAME_MAX_LENGTH * sizeof(*sidlist_name)))
Copy link
Contributor

Choose a reason for hiding this comment

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

why SRV6_SEGMENTLIST_NAME_MAX_LENGTH * sizeof(*sidlist_name)?

Can't we just allocate the memory needed to encode sidlist_name?

if (!nest)
return 0;

switch (nh->nh_srv6->seg6local_action) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also support uN, uA, uDX*, uDT* here?

Copy link
Author

Choose a reason for hiding this comment

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

We only support uN,uA,End.DT4/End.DT6/End.DT46, the others will be supported later.

static ssize_t netlink_vpn_route_msg_encode(int cmd,
struct zebra_dplane_ctx *ctx,
uint8_t *data, size_t datalen,
bool fpm, bool force_nhg)
Copy link
Contributor

Choose a reason for hiding this comment

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

We already know that we are in the FPM module, right?
Why do we need this fpm parameter? Please remove this fpm parameter if not needed.

*/
static ssize_t netlink_pic_context_msg_encode(uint16_t cmd,
const struct zebra_dplane_ctx *ctx,
void *buf, size_t buflen, bool fpm)
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto.

Is this fpm parameter needed? Please remove it if not needed.

Copy link
Author

Choose a reason for hiding this comment

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

I think should remove it, but I see that 'netlink_srv6_vpn_route_msg_encode' has it, so keep it there. I will remove it.

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.

2 participants