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

bgpd: move labels from extra to attr structure #13740

Closed
wants to merge 16 commits into from

Conversation

louis-6wind
Copy link
Contributor

@louis-6wind louis-6wind commented Jun 8, 2023

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

@louis-6wind louis-6wind marked this pull request as draft June 8, 2023 16:11
@ton31337
Copy link
Member

ton31337 commented Jun 8, 2023

Why not continue on #12631? Now we have two PRs for the same with different histories of comments, suggestions, etc.

@pguibert6WIND
Copy link
Member

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.

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Failed

Addresssanitizer topotests part 4: Failed (click for details)
## Error: SEGV

### AddressSanitizer error in topotest `ltemplate.py`, test `teardown_module`, router `r3`

    ERROR: AddressSanitizer: SEGV on unknown address 0x0000000018a6 (pc 0x7f8f4c1903a6 bp 0x0000000003fd sp 0x7ffdc3afa7c0 T0)
        #0 0x7f8f4c1903a5  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2a3a5)
        #1 0x7f8f4c191443  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2b443)
        #2 0x7f8f4c244772 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde772)
        #3 0x565339bcafdf in qfree lib/memory.c:130
        #4 0x565339a9df81 in zebra_nhg_free zebra/zebra_nhg.c:1636
        #5 0x565339a77ff5 in mpls_ftn_uninstall_all zebra/zebra_mpls.c:3484
        #6 0x565339a78c3a in zebra_mpls_cleanup_zclient_labels zebra/zebra_mpls.c:2526
        #7 0x565339b38459 in hook_call_zserv_client_close zebra/zserv.c:561
        #8 0x565339b38459 in zserv_client_free zebra/zserv.c:580
        #9 0x565339b38459 in zserv_close_client zebra/zserv.c:701
        #10 0x5653399dd8e0 in sigint zebra/main.c:156
        #11 0x565339c3aa44 in frr_sigevent_process lib/sigevent.c:115
        #12 0x565339c656ff in event_fetch lib/event.c:1761
        #13 0x565339bad882 in frr_run lib/libfrr.c:1212
        #14 0x5653399de1b4 in main zebra/main.c:467
        #15 0x7f8f4aaa0c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
        #16 0x5653399aab09 in _start (/usr/lib/frr/zebra+0x2f7b09)
    
    AddressSanitizer can not provide additional info.
    SUMMARY: AddressSanitizer: SEGV (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2a3a5) 

---------------
## Error: SEGV

### AddressSanitizer error in topotest `ltemplate.py`, test `teardown_module`, router `ce1`

    ERROR: AddressSanitizer: SEGV on unknown address 0x00000000198f (pc 0x7f4e065623a6 bp 0x0000000002c4 sp 0x7ffe2b24ee70 T0)
        #0 0x7f4e065623a5  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2a3a5)
        #1 0x7f4e06563443  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2b443)
        #2 0x7f4e06616772 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde772)
        #3 0x55bf8b9affdf in qfree lib/memory.c:130
        #4 0x55bf8b882f81 in zebra_nhg_free zebra/zebra_nhg.c:1636
        #5 0x55bf8b85cff5 in mpls_ftn_uninstall_all zebra/zebra_mpls.c:3484
        #6 0x55bf8b85dc3a in zebra_mpls_cleanup_zclient_labels zebra/zebra_mpls.c:2526
        #7 0x55bf8b91d459 in hook_call_zserv_client_close zebra/zserv.c:561
        #8 0x55bf8b91d459 in zserv_client_free zebra/zserv.c:580
        #9 0x55bf8b91d459 in zserv_close_client zebra/zserv.c:701
        #10 0x55bf8b7c28e0 in sigint zebra/main.c:156
        #11 0x55bf8ba1fa44 in frr_sigevent_process lib/sigevent.c:115
        #12 0x55bf8ba4a6ff in event_fetch lib/event.c:1761
        #13 0x55bf8b992882 in frr_run lib/libfrr.c:1212
        #14 0x55bf8b7c31b4 in main zebra/main.c:467
        #15 0x7f4e04e72c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
        #16 0x55bf8b78fb09 in _start (/usr/lib/frr/zebra+0x2f7b09)
    
    AddressSanitizer can not provide additional info.
    SUMMARY: AddressSanitizer: SEGV (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2a3a5) 

---------------
## Error: SEGV

### AddressSanitizer error in topotest `ltemplate.py`, test `teardown_module`, router `ce2`

    ERROR: AddressSanitizer: SEGV on unknown address 0x000000001a33 (pc 0x7f787b2b35f0 bp 0x6190006a2c80 sp 0x7ffe55e8e358 T0)
        #0 0x7f787b2b35ef  (/lib/x86_64-linux-gnu/libc.so.6+0xbb5ef)
        #1 0x7f787c906080  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x27080)
        #2 0x7f787c9bdcf0 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdecf0)
        #3 0x55e852ab164b in qcalloc lib/memory.c:105
        #4 0x55e85291959a in dplane_ctx_alloc zebra/zebra_dplane.c:651
        #5 0x55e8529232e3 in dplane_route_update_internal zebra/zebra_dplane.c:3676
        #6 0x55e852923b11 in dplane_route_delete zebra/zebra_dplane.c:3992
        #7 0x55e85299f266 in rib_uninstall_kernel zebra/zebra_rib.c:741
        #8 0x55e8529adf7b in rib_close_table zebra/zebra_rib.c:4668
        #9 0x55e8529c6f8b in zebra_vrf_disable zebra/zebra_vrf.c:192
        #10 0x55e852b55e7d in vrf_disable lib/vrf.c:325
        #11 0x55e852b56380 in vrf_terminate_single lib/vrf.c:512
        #12 0x55e852b56bc3 in vrf_terminate lib/vrf.c:543
        #13 0x55e8528c4ac2 in zebra_finalize zebra/main.c:207
        #14 0x55e852b4eb08 in event_call lib/event.c:1995
        #15 0x55e852a94877 in frr_run lib/libfrr.c:1213
        #16 0x55e8528c51b4 in main zebra/main.c:467
        #17 0x7f787b219c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
        #18 0x55e852891b09 in _start (/usr/lib/frr/zebra+0x2f7b09)
    
    AddressSanitizer can not provide additional info.
    SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0xbb5ef) 

---------------

Addresssanitizer topotests part 4: Unknown Log
URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/ASANP4/TopotestDetails/

Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-ASANP4-12142/test

Topology Tests failed for Addresssanitizer topotests part 4
see full log at https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/ASANP4/Topotest-Logs/log_topotests.txt

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
see full log at https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO9DEB10AMD64/TopotestLogs/log_topotests.txt
Topotests debian 10 amd64 part 9: Unknown Log
URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO9DEB10AMD64/TopotestDetails/

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
see full log at https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO6U18I386/TopotestLogs/log_topotests.txt
Topotests Ubuntu 18.04 i386 part 6: Unknown Log
URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO6U18I386/TopotestDetails/

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 found
Topotests 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
see full log at https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO6DEB10AMD64/TopotestLogs/log_topotests.txt
Topotests debian 10 amd64 part 6: Unknown Log
URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO6DEB10AMD64/TopotestDetails/

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
see full log at https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO6U18AMD64/TopotestLogs/log_topotests.txt
Topotests Ubuntu 18.04 amd64 part 6: Unknown Log
URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO6U18AMD64/TopotestDetails/

Successful on other platforms/tests
  • Topotests Ubuntu 18.04 arm8 part 3
  • Addresssanitizer topotests part 5
  • Topotests debian 10 amd64 part 4
  • Topotests Ubuntu 18.04 amd64 part 3
  • Topotests Ubuntu 18.04 amd64 part 2
  • Addresssanitizer topotests part 0
  • Topotests debian 10 amd64 part 3
  • Topotests debian 10 amd64 part 8
  • Topotests Ubuntu 18.04 arm8 part 9
  • Addresssanitizer topotests part 2
  • Topotests Ubuntu 18.04 amd64 part 5
  • Ubuntu 20.04 deb pkg check
  • Topotests Ubuntu 18.04 arm8 part 2
  • Addresssanitizer topotests part 9
  • Topotests Ubuntu 18.04 amd64 part 4
  • Topotests Ubuntu 18.04 i386 part 1
  • Topotests Ubuntu 18.04 amd64 part 9
  • Topotests Ubuntu 18.04 arm8 part 7
  • Topotests Ubuntu 18.04 i386 part 8
  • Topotests Ubuntu 18.04 i386 part 3
  • Topotests Ubuntu 18.04 amd64 part 7
  • Debian 10 deb pkg check
  • Addresssanitizer topotests part 3
  • Addresssanitizer topotests part 7
  • Topotests debian 10 amd64 part 0
  • Topotests Ubuntu 18.04 i386 part 0
  • Addresssanitizer topotests part 6
  • Topotests debian 10 amd64 part 1
  • CentOS 7 rpm pkg check
  • Topotests debian 10 amd64 part 7
  • Topotests Ubuntu 18.04 amd64 part 0
  • Topotests Ubuntu 18.04 arm8 part 0
  • Topotests Ubuntu 18.04 i386 part 9
  • Topotests debian 10 amd64 part 2
  • Topotests Ubuntu 18.04 amd64 part 8
  • Topotests Ubuntu 18.04 i386 part 5
  • Static analyzer (clang)
  • Ubuntu 18.04 deb pkg check
  • Debian 9 deb pkg check
  • Topotests debian 10 amd64 part 5
  • Addresssanitizer topotests part 1
  • Topotests Ubuntu 18.04 i386 part 4
  • Topotests Ubuntu 18.04 amd64 part 1
  • Topotests Ubuntu 18.04 arm8 part 1
  • Addresssanitizer topotests part 8
  • Topotests Ubuntu 18.04 i386 part 7
  • Topotests Ubuntu 18.04 i386 part 2
  • Topotests Ubuntu 18.04 arm8 part 8

Warnings Generated during build:

Checkout code: Successful with additional warnings
Addresssanitizer topotests part 4: Failed (click for details)
## Error: SEGV

### AddressSanitizer error in topotest `ltemplate.py`, test `teardown_module`, router `r3`

    ERROR: AddressSanitizer: SEGV on unknown address 0x0000000018a6 (pc 0x7f8f4c1903a6 bp 0x0000000003fd sp 0x7ffdc3afa7c0 T0)
        #0 0x7f8f4c1903a5  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2a3a5)
        #1 0x7f8f4c191443  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2b443)
        #2 0x7f8f4c244772 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde772)
        #3 0x565339bcafdf in qfree lib/memory.c:130
        #4 0x565339a9df81 in zebra_nhg_free zebra/zebra_nhg.c:1636
        #5 0x565339a77ff5 in mpls_ftn_uninstall_all zebra/zebra_mpls.c:3484
        #6 0x565339a78c3a in zebra_mpls_cleanup_zclient_labels zebra/zebra_mpls.c:2526
        #7 0x565339b38459 in hook_call_zserv_client_close zebra/zserv.c:561
        #8 0x565339b38459 in zserv_client_free zebra/zserv.c:580
        #9 0x565339b38459 in zserv_close_client zebra/zserv.c:701
        #10 0x5653399dd8e0 in sigint zebra/main.c:156
        #11 0x565339c3aa44 in frr_sigevent_process lib/sigevent.c:115
        #12 0x565339c656ff in event_fetch lib/event.c:1761
        #13 0x565339bad882 in frr_run lib/libfrr.c:1212
        #14 0x5653399de1b4 in main zebra/main.c:467
        #15 0x7f8f4aaa0c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
        #16 0x5653399aab09 in _start (/usr/lib/frr/zebra+0x2f7b09)
    
    AddressSanitizer can not provide additional info.
    SUMMARY: AddressSanitizer: SEGV (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2a3a5) 

---------------
## Error: SEGV

### AddressSanitizer error in topotest `ltemplate.py`, test `teardown_module`, router `ce1`

    ERROR: AddressSanitizer: SEGV on unknown address 0x00000000198f (pc 0x7f4e065623a6 bp 0x0000000002c4 sp 0x7ffe2b24ee70 T0)
        #0 0x7f4e065623a5  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2a3a5)
        #1 0x7f4e06563443  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2b443)
        #2 0x7f4e06616772 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde772)
        #3 0x55bf8b9affdf in qfree lib/memory.c:130
        #4 0x55bf8b882f81 in zebra_nhg_free zebra/zebra_nhg.c:1636
        #5 0x55bf8b85cff5 in mpls_ftn_uninstall_all zebra/zebra_mpls.c:3484
        #6 0x55bf8b85dc3a in zebra_mpls_cleanup_zclient_labels zebra/zebra_mpls.c:2526
        #7 0x55bf8b91d459 in hook_call_zserv_client_close zebra/zserv.c:561
        #8 0x55bf8b91d459 in zserv_client_free zebra/zserv.c:580
        #9 0x55bf8b91d459 in zserv_close_client zebra/zserv.c:701
        #10 0x55bf8b7c28e0 in sigint zebra/main.c:156
        #11 0x55bf8ba1fa44 in frr_sigevent_process lib/sigevent.c:115
        #12 0x55bf8ba4a6ff in event_fetch lib/event.c:1761
        #13 0x55bf8b992882 in frr_run lib/libfrr.c:1212
        #14 0x55bf8b7c31b4 in main zebra/main.c:467
        #15 0x7f4e04e72c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
        #16 0x55bf8b78fb09 in _start (/usr/lib/frr/zebra+0x2f7b09)
    
    AddressSanitizer can not provide additional info.
    SUMMARY: AddressSanitizer: SEGV (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2a3a5) 

---------------
## Error: SEGV

### AddressSanitizer error in topotest `ltemplate.py`, test `teardown_module`, router `ce2`

    ERROR: AddressSanitizer: SEGV on unknown address 0x000000001a33 (pc 0x7f787b2b35f0 bp 0x6190006a2c80 sp 0x7ffe55e8e358 T0)
        #0 0x7f787b2b35ef  (/lib/x86_64-linux-gnu/libc.so.6+0xbb5ef)
        #1 0x7f787c906080  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x27080)
        #2 0x7f787c9bdcf0 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdecf0)
        #3 0x55e852ab164b in qcalloc lib/memory.c:105
        #4 0x55e85291959a in dplane_ctx_alloc zebra/zebra_dplane.c:651
        #5 0x55e8529232e3 in dplane_route_update_internal zebra/zebra_dplane.c:3676
        #6 0x55e852923b11 in dplane_route_delete zebra/zebra_dplane.c:3992
        #7 0x55e85299f266 in rib_uninstall_kernel zebra/zebra_rib.c:741
        #8 0x55e8529adf7b in rib_close_table zebra/zebra_rib.c:4668
        #9 0x55e8529c6f8b in zebra_vrf_disable zebra/zebra_vrf.c:192
        #10 0x55e852b55e7d in vrf_disable lib/vrf.c:325
        #11 0x55e852b56380 in vrf_terminate_single lib/vrf.c:512
        #12 0x55e852b56bc3 in vrf_terminate lib/vrf.c:543
        #13 0x55e8528c4ac2 in zebra_finalize zebra/main.c:207
        #14 0x55e852b4eb08 in event_call lib/event.c:1995
        #15 0x55e852a94877 in frr_run lib/libfrr.c:1213
        #16 0x55e8528c51b4 in main zebra/main.c:467
        #17 0x7f787b219c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
        #18 0x55e852891b09 in _start (/usr/lib/frr/zebra+0x2f7b09)
    
    AddressSanitizer can not provide additional info.
    SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0xbb5ef) 

---------------

Addresssanitizer topotests part 4: Unknown Log
URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/ASANP4/TopotestDetails/

Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-ASANP4-12142/test

Topology Tests failed for Addresssanitizer topotests part 4
see full log at https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/ASANP4/Topotest-Logs/log_topotests.txt

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
see full log at https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO9DEB10AMD64/TopotestLogs/log_topotests.txt
Topotests debian 10 amd64 part 9: Unknown Log
URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO9DEB10AMD64/TopotestDetails/

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
see full log at https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO6U18I386/TopotestLogs/log_topotests.txt
Topotests Ubuntu 18.04 i386 part 6: Unknown Log
URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO6U18I386/TopotestDetails/

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 found
Topotests 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
see full log at https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO6DEB10AMD64/TopotestLogs/log_topotests.txt
Topotests debian 10 amd64 part 6: Unknown Log
URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO6DEB10AMD64/TopotestDetails/

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
see full log at https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO6U18AMD64/TopotestLogs/log_topotests.txt
Topotests Ubuntu 18.04 amd64 part 6: Unknown Log
URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-12142/artifact/TOPO6U18AMD64/TopotestDetails/

Report for rfapi_vty.c | 2 issues
===============================================
< WARNING: Missing a blank line after declarations
< #1176: FILE: /tmp/f1-383341/rfapi_vty.c:1176:

@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link

This PR is stale because it has been open 180 days with no activity. Comment or remove the autoclose label in order to avoid having this PR closed.

Copy link

github-actions bot commented Feb 1, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@louis-6wind louis-6wind force-pushed the attr-label branch 2 times, most recently from ce567a7 to bcb63f4 Compare February 6, 2024 15:20
@louis-6wind louis-6wind changed the title bgpd: move extra->num_labels to attr->num_labels bgpd: move labels from extra to attr structure Feb 6, 2024
Copy link

github-actions bot commented Feb 6, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

louis-6wind and others added 16 commits February 7, 2024 10:08
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]>
Copy link

github-actions bot commented Feb 8, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@louis-6wind
Copy link
Contributor Author

We are not going to move labels from extra to attr. See waste of memory concern :

#15307 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants