Netdev List
 help / color / mirror / Atom feed
* [PATCH iproute2 v2 0/3] iplink: bond: fix partner LACP state decoding
@ 2026-10-19 20:38 Dave Seddon
  2026-10-19 20:38 ` [PATCH iproute2 v2 1/3] iplink_bond_slave: read ad_partner_oper_port_state as u16 Dave Seddon
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dave Seddon @ 2026-10-19 20:38 UTC (permalink / raw)
  To: netdev; +Cc: Dave Seddon, Stephen Hemminger, David Ahern

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/20261011032906.1398174-1-dave.seddon.ca@gmail.com/

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

-- 
2.55.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-19 20:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19 20:38 [PATCH iproute2 v2 0/3] iplink: bond: fix partner LACP state decoding Dave Seddon
2026-10-19 20:38 ` [PATCH iproute2 v2 1/3] iplink_bond_slave: read ad_partner_oper_port_state as u16 Dave Seddon
2026-10-19 20:38 ` [PATCH iproute2 v2 2/3] testsuite: fix test_on_not on multi-line output Dave Seddon
2026-10-19 20:38 ` [PATCH iproute2 v2 3/3] testsuite: add bond slave LACP port state test Dave Seddon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox