-
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
bgp attribute cleaning misc #12890
bgp attribute cleaning misc #12890
Conversation
The attr pointer has been interned during the process of the function, but has to be uninterned at the end. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
As remind, the attr attribute is a structure that contains the attributes for a given BGP update. In order to avoid too much memory consumption, the attr structure is stored in a hash table. As consequence, other BGP updates may reuse the same attr. The storage in the hash table is done when calling bgp_attr_intern(), and a key is calculated based on all the attributes values of the structure. In BGP EVPN, when modifying the attributes of the attr structure after having interned it, this means that some BGP updates will want to use the old reference, whereas a new attr value is used. Because in BGP EVPN, the modifications are done on a per BGP update basis, a new attr entry specific to that BGP update should be created. This is why a local_attr structure is done, modified, then later interned. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Now that an additional attribute has been added, clang format has to be applied. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
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-PULLREQ2-9882/ This is a comment from an automated CI system. |
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.
LGTM
@pguibert6WIND regarding bgpd: attr evpn attributes should be modified before interning attr commit, do you observe any issue with BGP EVPN update in absence of this fix? |
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.
looks good
Did Phillippe ever respond to Chirag's question? Was this ready? |
some misc cleaning related withBGP attr structure