-
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
bgpd: move labels from extra to attr structure #13740
Conversation
Why not continue on #12631? Now we have two PRs for the same with different histories of comments, suggestions, etc. |
this is a draft version. |
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedAddresssanitizer topotests part 4: Failed (click for details)
Addresssanitizer topotests part 4: Unknown Log Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-ASANP4-12142/test Topology Tests failed for Addresssanitizer topotests part 4 Topotests debian 10 amd64 part 9: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO9DEB10AMD64-12142/test Topology Tests failed for Topotests debian 10 amd64 part 9 Topotests Ubuntu 18.04 i386 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6U18I386-12142/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 6 Topotests Ubuntu 18.04 arm8 part 6: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 6: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO6U18ARM8/TopotestDetails/ Topotests Ubuntu 18.04 arm8 part 6: No useful log foundTopotests debian 10 amd64 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6DEB10AMD64-12142/test Topology Tests failed for Topotests debian 10 amd64 part 6 Topotests Ubuntu 18.04 amd64 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6U18AMD64-12142/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 6 Successful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsAddresssanitizer topotests part 4: Failed (click for details)
Addresssanitizer topotests part 4: Unknown Log Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-ASANP4-12142/test Topology Tests failed for Addresssanitizer topotests part 4 Topotests debian 10 amd64 part 9: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO9DEB10AMD64-12142/test Topology Tests failed for Topotests debian 10 amd64 part 9 Topotests Ubuntu 18.04 i386 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6U18I386-12142/test Topology Tests failed for Topotests Ubuntu 18.04 i386 part 6 Topotests Ubuntu 18.04 arm8 part 6: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 6: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO6U18ARM8/TopotestDetails/ Topotests Ubuntu 18.04 arm8 part 6: No useful log foundTopotests debian 10 amd64 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6DEB10AMD64-12142/test Topology Tests failed for Topotests debian 10 amd64 part 6 Topotests Ubuntu 18.04 amd64 part 6: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO6U18AMD64-12142/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 6
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This PR is stale because it has been open 180 days with no activity. Comment or remove the |
85f39d8
to
5a31395
Compare
5a31395
to
ca85d3e
Compare
7dff018
to
e9a8df2
Compare
83e53c0
to
aecb0b6
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
aecb0b6
to
f4084ab
Compare
ce567a7
to
bcb63f4
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
extra->num_labels is the number of utilized labels in extra->label[]. extra->label[0] cannot be trusted if extra->num_labels is 0. Set num_labels each time values are set in extra->label[] and check extra->num_labels before getting the label from extra->label[0]. Signed-off-by: Louis Scalbert <[email protected]>
No need to init labels at extra allocation. num_labels is the number of set labels in label[] and is initialized to 0 by default. Signed-off-by: Louis Scalbert <[email protected]>
Clarify bgp_vpnv4_ebgp Signed-off-by: Louis Scalbert <[email protected]>
This test ensures that when r1 changes the label value, then the new value is automatically propagated to remote peer. This demonstrates that the ADJ-RIB-OUT to r2 has been correctly updated. Signed-off-by: Philippe Guibert <[email protected]> (cherry picked from commit ec96b06) Signed-off-by: Louis Scalbert <[email protected]>
The test is done on r2. A BGP update is received on r2, and is filtered on r2. The RIB of r2 does not have the BGP update stored, but the ADJ-RIB-IN is yet present. To demonstrate this, if the inbound route-map is removed, then the BGP update should be copied from the the ADJ-RIB-IN and added to the RIB with the label value. Signed-off-by: Philippe Guibert <[email protected]> (cherry picked from commit 0602156) Signed-off-by: Louis Scalbert <[email protected]>
Move the BGP_MAX_LABEL value in a better place. Signed-off-by: Philippe Guibert <[email protected]>
The new attributes are added, but not yet removed from the extra structure. Signed-off-by: Philippe Guibert <[email protected]> Signed-off-by: Louis Scalbert <[email protected]>
Move labels from extra to attr by replacing expressions: > cd bgpd > git grep 'extra->num_labels' | cut -f1 -d\: | uniq | xargs -L1 sed -e 's|extra->num_labels|attr->num_labels|g' -i > git grep 'extra->label' | cut -f1 -d\: | uniq | xargs -L1 sed -e 's|extra->label|attr->label_tbl|g' -i > git grep 'extra.label' | cut -f1 -d\: | uniq | xargs -L1 sed -e 's|extra.label|attr.label_tbl|g' -i > git grep 'extra.num_labels' | cut -f1 -d\: | uniq | xargs -L1 sed -e 's|extra.num_labels|attr.num_labels|g' -i Some adjustments are done in bgp_input_modifier() and setlabels() This allows compilation, but is not yet valid, as attr members cannot be modified without using bgp_attr_unintern() and bgp_attr_intern(). Signed-off-by: Louis Scalbert <[email protected]>
Do not check the presence of extra pointer in the path_info structure. Note that the attr pointer is always valid in the path_info structure. Signed-off-by: Louis Scalbert <[email protected]>
attr members cannot be modified when attr is already interned. Modify a local attr structure before interning it. Signed-off-by: Louis Scalbert <[email protected]>
attr members cannot be modified when attr is already interned. Modify a local attr structure before interning it and before using attrhash_cmp() to compare local attr with the current path_info. Signed-off-by: Louis Scalbert <[email protected]>
attr members cannot be modified when attr is already interned. Modify a local attr structure before interning it and before using attrhash_cmp() to compare local attr with the current path_info. Signed-off-by: Philippe Guibert <[email protected]> Signed-off-by: Louis Scalbert <[email protected]>
attr members cannot be modified when attr is already interned. Modify a local attr structure before interning it and before using attrhash_cmp() to compare local attr with the current path_info. Signed-off-by: Louis Scalbert <[email protected]>
Use label info from attr in bgp_update. attr labels will be set in the next commit. Signed-off-by: Louis Scalbert <[email protected]>
Remove label arguments from bgp_input_modifier. It is already set in attr. Signed-off-by: Louis Scalbert <[email protected]>
No need to have two kinds of labels attr members in memory. Signed-off-by: Louis Scalbert <[email protected]>
bcb63f4
to
abd7822
Compare
abd7822
to
285551d
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
We are not going to move labels from extra to attr. See waste of memory concern : |
Continuation of #12631
in order to solve:
crashes with soft-reconfiguration inbound after a prefix is re-accepted after a route-map change
label vpn export value change