-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
base: master
Are you sure you want to change the base?
Conversation
7230e64
to
da6eb11
Compare
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, |
There was a problem hiding this comment.
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?
struct in6_addr src; | ||
struct ipv6_sr_hdr srh[0]; |
There was a problem hiding this comment.
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))) |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Signed-off-by: guozhongfeng.gzf <[email protected]>
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