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

Clean up the zebra's Netlink API #6569

Merged
merged 3 commits into from
Jun 16, 2020

Conversation

xThaid
Copy link
Contributor

@xThaid xThaid commented Jun 11, 2020

This is the part of the dataplane batch sending project. I added bounds checking in functions encoding Netlink messages. It shouldn't have any effect on the way the code works now, but this will be more important in the future.

  • Rename netlink utility functions like addattr to be less ambiguous
  • Replace rta_attr_* functions with nl_attr_* since they introduced
    inconsistencies in the code
  • Add helper functions for adding rtnexthop struct to the Netlink
    message
  • Move code encoding Netlink messages to separate functions
  • Add buffer bounds checking while creating Nelink messages

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jun 11, 2020

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

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

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: Failed

CentOS 7 amd64 build: Failed (click for details)

Make failed for CentOS 7 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/CI005BUILD/ErrorLog/log_make.txt)

Makefile:10163: warning: ignoring old recipe for target `grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
zebra/zebra_fpm_netlink.c: In function 'netlink_route_info_encode':
zebra/zebra_fpm_netlink.c:457:38: error: 'buf' undeclared (first use in this function)
zebra/zebra_fpm_netlink.c:457:38: note: each undeclared identifier is reported only once for each function it appears in
zebra/zebra_fpm_netlink.c:464:16: error: 'rta' undeclared (first use in this function)
make[1]: *** [zebra/zebra_fpm_netlink.lo] Error 1
deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.  SPHINX   doc/user/_build/texinfo/frr.texi
deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.deprecation warning: io.FileInput() argument `handle_io_errors` is ignored since "Docutils 0.10 (2012-12-16)" and will soon be removed.  SPHINX   doc/manpages/_build/man/man.stamp
make[1]: Target `all-am' not remade because of errors.

CentOS 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/CI005BUILD/config.status/config.status

Debian 10 amd64 build: Failed (click for details)

Make failed for Debian 10 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/DEB10BUILD/ErrorLog/log_make.txt)

make[1]: Entering directory '/home/ci/cibuild.12640/frr-source'
zebra/zebra_fpm_netlink.c: In function netlink_route_info_encode:
zebra/zebra_fpm_netlink.c:457:38: error: buf undeclared (first use in this function)
zebra/zebra_fpm_netlink.c:457:38: note: each undeclared identifier is reported only once for each function it appears in
zebra/zebra_fpm_netlink.c:464:16: error: rta undeclared (first use in this function)
make[1]: *** [Makefile:7804: zebra/zebra_fpm_netlink.lo] Error 1
make[1]: Leaving directory '/home/ci/cibuild.12640/frr-source'
make[1]: Target 'all-am' not remade because of errors.
make: *** [Makefile:4635: all] Error 2

Debian 10 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/DEB10BUILD/config.status/config.status

Debian 8 amd64 build: Failed (click for details)

Make failed for Debian 8 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/CI008BLD/ErrorLog/log_make.txt)

Makefile:10170: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
zebra/zebra_fpm_netlink.c: In function 'netlink_route_info_encode':
zebra/zebra_fpm_netlink.c:457:38: error: 'buf' undeclared (first use in this function)
zebra/zebra_fpm_netlink.c:457:38: note: each undeclared identifier is reported only once for each function it appears in
zebra/zebra_fpm_netlink.c:464:16: error: 'rta' undeclared (first use in this function)
Makefile:7302: recipe for target 'zebra/zebra_fpm_netlink.lo' failed
make[1]: *** [zebra/zebra_fpm_netlink.lo] Error 1
make[1]: Leaving directory '/home/ci/cibuild.12640/frr-source'
make[1]: Target 'all-am' not remade because of errors.

Debian 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/CI008BLD/config.status/config.status

Ubuntu 16.04 amd64 build: Failed (click for details)

Make failed for Ubuntu 16.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/CI014BUILD/ErrorLog/log_make.txt)

Makefile:10185: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
zebra/zebra_fpm_netlink.c: In function netlink_route_info_encode:
zebra/zebra_fpm_netlink.c:457:38: error: buf undeclared (first use in this function)
zebra/zebra_fpm_netlink.c:457:38: note: each undeclared identifier is reported only once for each function it appears in
zebra/zebra_fpm_netlink.c:464:16: error: rta undeclared (first use in this function)
Makefile:7315: recipe for target 'zebra/zebra_fpm_netlink.lo' failed
make[1]: *** [zebra/zebra_fpm_netlink.lo] Error 1
make[1]: Leaving directory '/home/ci/cibuild.12640/frr-source'
Makefile:4152: recipe for target 'all' failed

Ubuntu 16.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/CI014BUILD/config.status/config.status

Ubuntu 18.04 amd64 build: Failed (click for details)

Make failed for Ubuntu 18.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/U1804AMD64/ErrorLog/log_make.txt)

Makefile:10185: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
zebra/zebra_fpm_netlink.c: In function netlink_route_info_encode:
zebra/zebra_fpm_netlink.c:457:38: error: buf undeclared (first use in this function)
zebra/zebra_fpm_netlink.c:457:38: note: each undeclared identifier is reported only once for each function it appears in
zebra/zebra_fpm_netlink.c:464:16: error: rta undeclared (first use in this function)
Makefile:7315: recipe for target 'zebra/zebra_fpm_netlink.lo' failed
make[1]: *** [zebra/zebra_fpm_netlink.lo] Error 1
make[1]: Leaving directory '/home/ci/cibuild.12640/frr-source'
Makefile:4152: recipe for target 'all' failed

Ubuntu 18.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/U1804AMD64/config.status/config.status

Debian 9 amd64 build: Failed (click for details)

Make failed for Debian 9 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/CI021BUILD/ErrorLog/log_make.txt)

Makefile:10185: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
zebra/zebra_fpm_netlink.c: In function netlink_route_info_encode:
zebra/zebra_fpm_netlink.c:457:38: error: buf undeclared (first use in this function)
zebra/zebra_fpm_netlink.c:457:38: note: each undeclared identifier is reported only once for each function it appears in
zebra/zebra_fpm_netlink.c:464:16: error: rta undeclared (first use in this function)
Makefile:7315: recipe for target 'zebra/zebra_fpm_netlink.lo' failed
make[1]: *** [zebra/zebra_fpm_netlink.lo] Error 1
make[1]: Leaving directory '/home/ci/cibuild.12640/frr-source'
make[1]: Target 'all-am' not remade because of errors.

Debian 9 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/CI021BUILD/config.status/config.status

Ubuntu 20.04 amd64 build: Failed (click for details)

Make failed for Ubuntu 20.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/U2004AMD64BUILD/ErrorLog/log_make.txt)

make[1]: Entering directory '/home/ci/cibuild.12640/frr-source'
zebra/zebra_fpm_netlink.c: In function netlink_route_info_encode:
zebra/zebra_fpm_netlink.c:457:38: error: buf undeclared (first use in this function)
zebra/zebra_fpm_netlink.c:457:38: note: each undeclared identifier is reported only once for each function it appears in
zebra/zebra_fpm_netlink.c:464:16: error: rta undeclared (first use in this function)
make[1]: *** [Makefile:7804: zebra/zebra_fpm_netlink.lo] Error 1
make[1]: Target 'all-am' not remade because of errors.
make[1]: Leaving directory '/home/ci/cibuild.12640/frr-source'
make: *** [Makefile:4635: all] Error 2

Ubuntu 20.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/U2004AMD64BUILD/config.status/config.status

Ubuntu 18.04 ppc64le build: Failed (click for details)

Make failed for Ubuntu 18.04 ppc64le build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/U1804PPC64LEBUILD/ErrorLog/log_make.txt)

Makefile:10185: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
zebra/zebra_fpm_netlink.c: In function netlink_route_info_encode:
zebra/zebra_fpm_netlink.c:457:38: error: buf undeclared (first use in this function)
zebra/zebra_fpm_netlink.c:457:38: note: each undeclared identifier is reported only once for each function it appears in
zebra/zebra_fpm_netlink.c:464:16: error: rta undeclared (first use in this function)
Makefile:7315: recipe for target 'zebra/zebra_fpm_netlink.lo' failed
make[1]: *** [zebra/zebra_fpm_netlink.lo] Error 1
make[1]: Leaving directory '/home/ci/cibuild.12640/frr-source'
make[1]: Target 'all-am' not remade because of errors.

Ubuntu 18.04 ppc64le build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/U1804PPC64LEBUILD/config.status/config.status

Ubuntu 16.04 i386 build: Failed (click for details)

Make failed for Ubuntu 16.04 i386 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/U1604I386/ErrorLog/log_make.txt)

Makefile:10185: warning: ignoring old recipe for target 'grpc/grpc_libfrrgrpc_pb_la-frr-northbound.grpc.pb.lo.bc'
zebra/zebra_fpm_netlink.c: In function netlink_route_info_encode:
zebra/zebra_fpm_netlink.c:457:38: error: buf undeclared (first use in this function)
zebra/zebra_fpm_netlink.c:457:38: note: each undeclared identifier is reported only once for each function it appears in
zebra/zebra_fpm_netlink.c:464:16: error: rta undeclared (first use in this function)
Makefile:7315: recipe for target 'zebra/zebra_fpm_netlink.lo' failed
make[1]: *** [zebra/zebra_fpm_netlink.lo] Error 1
make[1]: Leaving directory '/home/ci/cibuild.12640/frr-source'
make[1]: Target 'all-am' not remade because of errors.

Ubuntu 16.04 i386 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/U1604I386/config.status/config.status

Fedora 29 amd64 build: Failed (click for details)

Make failed for Fedora 29 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/F29BUILD/ErrorLog/log_make.txt)

make[1]: Entering directory '/home/ci/cibuild.12640/frr-source'
zebra/zebra_fpm_netlink.c: In function netlink_route_info_encode:
zebra/zebra_fpm_netlink.c:457:38: error: buf undeclared (first use in this function)
zebra/zebra_fpm_netlink.c:457:38: note: each undeclared identifier is reported only once for each function it appears in
zebra/zebra_fpm_netlink.c:464:16: error: rta undeclared (first use in this function)
make[1]: *** [Makefile:7803: zebra/zebra_fpm_netlink.lo] Error 1
make[1]: Leaving directory '/home/ci/cibuild.12640/frr-source'
make[1]: Target 'all-am' not remade because of errors.
make: *** [Makefile:4634: all] Error 2

Fedora 29 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12640/artifact/F29BUILD/config.status/config.status

Successful on other platforms/tests
  • FreeBSD 12 amd64 build
  • OpenBSD 6 amd64 build
  • NetBSD 8 amd64 build
  • FreeBSD 11 amd64 build

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jun 11, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git pull/6569 41b8eed (merge failed)
Date 06/11/2020
Start 14:50:29
Finish 15:16:30
Run-Time 26:01
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-06-11-14:50:29.txt
Log autoscript-2020-06-11-14:51:28.log.bz2
Memory 498 495 426

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jun 11, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git pull/6569 026d200 (merge failed)
Date 06/11/2020
Start 17:30:30
Finish 17:56:28
Run-Time 25:58
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-06-11-17:30:30.txt
Log autoscript-2020-06-11-17:31:31.log.bz2
Memory 471 482 425

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jun 11, 2020

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12644/

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.

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12644/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200611-01-g026d2003d-0 (missing) -> 7.5-dev-20200611-01-g026d2003d-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200611-01-g026d2003d-0 (missing) -> 7.5-dev-20200611-01-g026d2003d-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200611-01-g026d2003d-0 (missing) -> 7.5-dev-20200611-01-g026d2003d-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200611-01-g026d2003d-0 (missing) -> 7.5-dev-20200611-01-g026d2003d-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200611-01-g026d2003d-0 (missing) -> 7.5-dev-20200611-01-g026d2003d-0~deb10u1

Copy link
Contributor

@mjstapp mjstapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a couple of initial questions

zebra/if_netlink.c Outdated Show resolved Hide resolved
*/
static void _netlink_route_build_singlepath(const struct prefix *p,
static bool _netlink_route_build_singlepath(const struct prefix *p,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you say a bit about how this return status would be used? it seems as if there would already have been some data put into whereever 'nlmsg' is pointing - does that ... matter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This return status tells us if all attributes appended to the message in this function fits entirely in the buffer. This is used in netlink_route_multipath_msg_encode. And if I understand the second part of the question correctly, this function doesn't encode a separate message, but it adds some attributes to the existing one.

Copy link
Contributor

@mjstapp mjstapp Jun 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's sort of my question: if this returns 'false', it has already ... added some attributes (probably). how would a caller recover?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will make sure, but I think it doesn't matter whether the buffer is partially filled or not, because every time we encode a new message we firstly fill it with zeroes.

zebra/rt_netlink.c Outdated Show resolved Hide resolved
@LabN-CI
Copy link
Collaborator

LabN-CI commented Jun 13, 2020

Outdated results 💚

Basic BGPD CI results: SUCCESS, 0 tests failed

_ _
Result SUCCESS git pull/6569 551db0b (merge failed)
Date 06/13/2020
Start 07:55:28
Finish 08:21:24
Run-Time 25:56
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-06-13-07:55:28.txt
Log autoscript-2020-06-13-07:56:29.log.bz2
Memory 475 496 425

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Jun 13, 2020

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

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

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

Topo tests part 1 on Ubuntu 18.04 amd64: Failed (click for details)

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TP1U1804AMD64-12662/test

Topology Tests failed for Topo tests part 1 on Ubuntu 18.04 amd64:

2020-06-13 12:27:04,703 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1804AMD64/topotests/lib/bgp.py", line 190, in create_router_bgp
    tgen, router, data_all_bgp, "bgp", build, load_config
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1804AMD64/topotests/lib/common_config.py", line 282, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1804AMD64/topotests/lib/common_config.py", line 542, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: line 6: % Unknown command[27]: neighbor 10.0.0.13 remote-as 0 


2020-06-13 12:27:05,016 ERROR: Traceback (most recent call last):
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1804AMD64/topotests/lib/bgp.py", line 190, in create_router_bgp
    tgen, router, data_all_bgp, "bgp", build, load_config
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1804AMD64/topotests/lib/common_config.py", line 282, in create_common_configuration
    load_config_to_router(tgen, router)
  File "/root/bamboo-agent-home/xml-data/build-dir/FRR-FRRPULLREQ-TP1U1804AMD64/topotests/lib/common_config.py", line 542, in load_config_to_router
    raise InvalidCLIError("%s" % output)
InvalidCLIError: % No BGP process is configured
line 2: Failure to communicate[13] to bgpd, line: no router bgp  



2020-06-13 12:41:42,815 ERROR: '_bgp_has_routes' failed after 39.32 seconds
2020-06-13 12:43:13,030 ERROR: 'compare_ospf_srdb' failed after 78.91 seconds
2020-06-13 12:43:13,031 ERROR: assert failed at "test_ospf_sr_topo1/test_ospf_sr": OSPF did not start Segment Routing on r1:
  --- Current output
  +++ Expected output
  @@ -112,6 +112,22 @@
         ],
         "extendedLink":[
           {
  +          "prefix":"10.0.0.1\/32",
  +          "sid":"XX",
  +          "inputLabel":"XX",
  +          "outputLabel":3,
  +          "interface":"r1-eth0",
  +          "nexthop":"10.0.0.2"
  +        },
  +        {
  +          "prefix":"10.0.0.1\/32",
  +          "sid":"XX",
  +          "inputLabel":"XX",
  +          "outputLabel":3,
  +          "interface":"r1-eth0",
  +          "nexthop":"10.0.0.2"
  +        },
  +        {
             "prefix":"10.0.1.1\/32",
             "sid":"XX",
             "inputLabel":"XX",
  @@ -126,22 +142,6 @@
             "outputLabel":3,
             "interface":"r1-eth1",
             "nexthop":"10.0.1.2"
  -        },
  -        {
  -          "prefix":"10.0.0.1\/32",
  -          "sid":"XX",
  -          "inputLabel":"XX",
  -          "outputLabel":3,
  -          "interface":"r1-eth0",
  -          "nexthop":"10.0.0.2"
  -        },
  -        {
  -          "prefix":"10.0.0.1\/32",
  -          "sid":"XX",
  -          "inputLabel":"XX",
  -          "outputLabel":3,
  -          "interface":"r1-eth0",
  -          "nexthop":"10.0.0.2"
           }
         ]
       }
assert False

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12662/artifact/TP1U1804AMD64/ErrorLog/log_topotests.txt

Successful on other platforms/tests
  • CentOS 7 rpm pkg check
  • Topo tests part 2 on Ubuntu 16.04 i386
  • Topo tests part 2 on Ubuntu 18.04 amd64
  • Topo tests part 0 on Ubuntu 18.04 amd64
  • IPv6 protocols on Ubuntu 18.04
  • Debian 10 deb pkg check
  • Addresssanitizer topotests part 1
  • Ubuntu 16.04 deb pkg check
  • Topo tests part 2 on Ubuntu 16.04 amd64
  • Addresssanitizer topotests part 2
  • Topo tests part 1 on Ubuntu 16.04 amd64
  • Topo tests part 1 on Ubuntu 16.04 i386
  • Fedora 29 rpm pkg check
  • Ubuntu 20.04 deb pkg check
  • Addresssanitizer topotests part 0
  • Debian 8 deb pkg check
  • Ubuntu 18.04 deb pkg check
  • Debian 9 deb pkg check
  • Topo tests part 0 on Ubuntu 16.04 amd64
  • IPv4 protocols on Ubuntu 18.04
  • IPv4 ldp protocol on Ubuntu 18.04
  • Topo tests part 0 on Ubuntu 16.04 i386
  • Static analyzer (clang)

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12662/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200613-00-g551db0b89-0 (missing) -> 7.5-dev-20200613-00-g551db0b89-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200613-00-g551db0b89-0 (missing) -> 7.5-dev-20200613-00-g551db0b89-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200613-00-g551db0b89-0 (missing) -> 7.5-dev-20200613-00-g551db0b89-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200613-00-g551db0b89-0 (missing) -> 7.5-dev-20200613-00-g551db0b89-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200613-00-g551db0b89-0 (missing) -> 7.5-dev-20200613-00-g551db0b89-0~deb10u1

 * Rename netlink utility functions like addattr to be less ambiguous
 * Replace rta_attr_* functions with nl_attr_* since they introduced
   inconsistencies in the code
 * Add helper functions for adding rtnexthop struct to the Netlink
   message

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
 * Move code encoding Netlink messages to separate functions
 * Add buffer bounds checking while creating Nelink messages

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
 * Use nl_attr_add32 instead of nl_attr_add where it is possible.
 * Move common code from build_singlepath() and build_multipath()
   to separate function.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
@xThaid
Copy link
Contributor Author

xThaid commented Jun 13, 2020

Rebased onto master.

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jun 13, 2020

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/6569 a757997
Date 06/13/2020
Start 17:05:39
Finish 17:31:36
Run-Time 25:57
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-06-13-17:05:39.txt
Log autoscript-2020-06-13-17:06:38.log.bz2
Memory 464 460 426

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12668/

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.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for rt_netlink.c | 4 issues
===============================================
< WARNING: line over 80 characters
< #2151: FILE: /tmp/f1-17885/rt_netlink.c:2151:
< WARNING: line over 80 characters
< #2174: FILE: /tmp/f1-17885/rt_netlink.c:2174:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12668/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200613-02-ga757997ca-0 (missing) -> 7.5-dev-20200613-02-ga757997ca-0~deb10u1
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200613-02-ga757997ca-0 (missing) -> 7.5-dev-20200613-02-ga757997ca-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200613-02-ga757997ca-0 (missing) -> 7.5-dev-20200613-02-ga757997ca-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200613-02-ga757997ca-0 (missing) -> 7.5-dev-20200613-02-ga757997ca-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200613-02-ga757997ca-0 (missing) -> 7.5-dev-20200613-02-ga757997ca-0~deb10u1

@Spantik Spantik requested a review from mjstapp June 16, 2020 15:39
Copy link
Contributor

@mjstapp mjstapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now, thanks.

@mjstapp mjstapp merged commit 0d55f01 into FRRouting:master Jun 16, 2020
@xThaid xThaid deleted the dplane_batching_cleanup branch July 18, 2020 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants