-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
zebra: Send RMAC along with Type-5 prefix #7852
base: master
Are you sure you want to change the base?
Conversation
Send RMAC along with VNI to FPM for EVPN Type-5 routes Signed-off-by: Kishore Kunal <kishorekunal01@broadcom.com>
Raise this new PR, since in the old PR #7469 I was not able to modify the comment in the commit and due to that polychaeta was giving error again and again(tried git rebase -i <>, old commit has some conflict and was not able to resolve). Hence created this new PR. |
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-16441/ This is a comment from an automated CI system. Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
|
Since you are modifying the heavily used lib/nexthop struct, I would like this to be two commits. One for the addition of this information in the encap on lib/nexthop. Also, I think any changes to the older fpm_netlink interface should also be done in the newer fpm_dplane_netlink interface. So if we are gonna start sending an encapped rmac in the old one, it should also happen in the new one. I think @donaldsharp had some unresolved comments in the old PR about whether this data should even be included in the nexthop so I will let him speak to that. |
Thanks for the review, Sure I am make the suggested changes.
|
@@ -134,7 +139,7 @@ struct nexthop { | |||
/* Encapsulation information. */ | |||
enum nh_encap_type nh_encap_type; | |||
union { | |||
vni_t vni; | |||
struct vxlan_nh_encap encap_data; |
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 a union that is just a single struct - why not just use an instance of the struct directly?
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.
This is done for future use, based on the nh_encap_type we can have different data to store.
@@ -134,7 +139,7 @@ struct nexthop { | |||
/* Encapsulation information. */ | |||
enum nh_encap_type nh_encap_type; | |||
union { |
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.
Is this info exclusive with anything else in the nexthop struct - the label info, for example? if so, we should consider creating a union so that we don't increase the overall size.
@@ -65,6 +65,11 @@ enum nh_encap_type { | |||
/* Backup index value is limited */ | |||
#define NEXTHOP_BACKUP_IDX_MAX 255 | |||
|
|||
struct vxlan_nh_encap { |
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.
is mac info completely vxlan-specific - is there a more general evpn use for mac info, for example?
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 don't understand how a rmac is a property of the nexthop. It's a property of the l2 information not the nexthop. Why are we storing it in the nexthop? If the answer if convenience
then double triple boo
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.
this should be a mapping in a different data structure. I also believe we should move vni's out of nexthops as well.
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.
This changes is done based on the current code flow where nexthop store the VNI information. Hence RMAC is also added in the similar lines.
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 reread we should move vni's out of nexthops as well
. it's not the right data abstraction. continuing down a wrong line does us no good.
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.
Sorry our message crossed, so did see your earlier response before my reply.
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.
all nexthops need relevant l2 information in order for it to work properly. Yet we don't carry that information in the nexthop.
A nexthop is L3 reachability. VNI's RMACS are l2 reachability. If we stuff this together we are going to have fun with nexthops when a L3 reachability stays live but the l2 changes underneath. If we need to pass on l2 reachability to lower levels than that needs to be a separate action controlled by seperate data structures in the zebra code. This is the reason they are separate things.
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.
@donaldsharp I have one more question. Is it ok to extract the RMAC information in the function netlink_route_info_add_nh using API zl3vni_nh_lookup(zl3vni, nexthop) and send the RMAC along with prefix via FPM channel.
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 this merits an actual discussion on how to properly do this in FRR. I am not sure I have an off the cuff answer here. I also think that what you proposing is not the right thing to do. Let me get together w/ Mark/Vivek/Anuradha and figure it out.
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.
Thanks for your response
@kishorekunal01 What timezone are you in? I'd like to setup a meeting where we can discuss the api we want between the master pthread of zebra and the dplane pthread for handling this. |
Sure, I am in PST timezone. Thanks |
I haven't see the code changes here. However, @sworleys pointed me to this PR today and I have a couple of comments. The VNI that comes with the route has to looked at as a 'label' for all practical purposes. A route can have multipath/ECMP, and each of those next-hops/sources could have announced a different label (VNI) for the route. So, the VNI has to be installed from bgpd down to zebra per zapi_nexthop and then maintained just like the label in zebra. The bgpd->zebra part is not there yet AFAIK since we have only dealt with global VNIs. We are currently working on downstream (remote) allocated VNIs, so this will come in soon and will probably need some zebra/lib changes also, unless everything seamless fits into the 'label' fields. One could extend the above to say that it is the (VNI, RMAC) that needs to be per zapi_nexthop. The same next hop could not only announce different VNIs for different routes, but also different RMACs. In fact, the RMAC is currently being passed down from bgpd->zebra as part of the zapi_nexthop. It is not stored as part of the nexthop in zebra which has given rise to a few bugs. However, while a RMAC per route/nexthop combination is theoretically possible, practically it is a single RMAC announced by a remote device for all its routes across all VRFs. For EVPN-MH, the bgpd->zebra code has been reworked by @AnuradhaKaruppiah to install the nexthop->RMAC directly, separate from the route install; the changes are possibly in the queue or waiting to be merged with EVPN changes by others. I plan to extend this interface for non MH also. This means that the RMAC will be handled separately from the route. This is also one of the option specified in the type-5 standards. With this option, there shouldn't be a need to maintain the RMAC with the nexthop. We should discuss this though some more. FYI, here is an example of a route and neighbor addition into the kernel that illustrates the above. Look closely at the VRF and VNI in use.
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Send RMAC along with VNI to FPM for EVPN Type-5 routes
When Zebra receive EVPN Type-5 prefix it create nexthop, adding code to copy RMAC as well in the nexthop. So that when prefix is encoded to send to the FPM, it encode RMAC as well.
In current system RMAC can be retrieved from RMAC send to FPM, It requires lot of processing in FPM, if RMAC for the tunnel changes from MAC1 to MAC2. This is overhead in FPM, we can optimize this by send RMAC as well with the prefix.
Signed-off-by: Kishore Kunal kishorekunal01@broadcom.com