Skip to content

iplink: bond: fix partner LACP state decoding

Dave Seddon netdev 2 versions – Applied

Status from this message: This series was applied to iproute2/iproute2.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesApplied
  2. v13 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- .gitignore and make clean: use tests/ip/link/*.nl
- trim the test comment
- shorter commit messages

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3iplink_bond_slave: read ad_partner_oper_port_state as u16ip/iplink_bond_slave.c+1 -10 replies
2/3testsuite: fix test_on_not on multi-line outputtestsuite/lib/generic.sh+3 -20 replies
3/3testsuite: add bond slave LACP port state test.gitignore testsuite/Makefile testsuite/tests/ip/link/show_bond_slave_lacp_state.t +1 more+122 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH iproute2 v2 0/3] iplink: bond: fix partner LACP state decoding

G'day,

Thanks Stephen for the feedback.

While porting iproute2 to Go, I noticed ip reads the u16 IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE as a u8. For normal LACP state values, this makes the partner state print as 0 on big-endian systems.

Patch 1 fixes the attribute read. Patch 2 fixes the absence check used by the regression test in patch 3.

v2:
- .gitignore and make clean: use tests/ip/link/*.nl
- trim the test comment
- shorter commit messages

v1: https://lore.kernel.org/netdev/[email protected]/

Dave Seddon (3):
iplink_bond_slave: read ad_partner_oper_port_state as u16
testsuite: fix test_on_not on multi-line output
testsuite: add bond slave LACP port state test

 .gitignore                                    |   2 +-
 ip/iplink_bond_slave.c                        |   2 +-
 testsuite/Makefile                            |   2 +-
 testsuite/lib/generic.sh                      |   5 +-
 .../ip/link/show_bond_slave_lacp_state.t      |  26 +++++
 testsuite/tools/generate_nlmsg.c              | 103 ++++++++++++++++--
 6 files changed, 126 insertions(+), 14 deletions(-)
 create mode 100755 testsuite/tests/ip/link/show_bond_slave_lacp_state.t
Signature · 1 line
2.55.0