bonding: move 802.3ad port state flags to uapi
authorAndy Roulin <aroulin@cumulusnetworks.com>
Wed, 11 Dec 2019 22:30:58 +0000 (14:30 -0800)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Sat, 14 Dec 2019 21:07:44 +0000 (13:07 -0800)
commit826f66b30c2e3d4df533e4224cb8c734afa0a17c
tree55415c6bf31d5aef895cd1128e2eaaa64b08b23c
parent1d1997db870f4058676439ef7014390ba9e24eb2
bonding: move 802.3ad port state flags to uapi

The bond slave actor/partner operating state is exported as
bitfield to userspace, which lacks a way to interpret it, e.g.,
iproute2 only prints the state as a number:

ad_actor_oper_port_state 15

For userspace to interpret the bitfield, the bitfield definitions
should be part of the uapi. The bitfield itself is defined in the
802.3ad standard.

This commit moves the 802.3ad bitfield definitions to uapi.

Related iproute2 patches, soon to be posted upstream, use the new uapi
headers to pretty-print bond slave state, e.g., with ip -d link show

ad_actor_oper_port_state_str <active,short_timeout,aggregating,in_sync>

Signed-off-by: Andy Roulin <aroulin@cumulusnetworks.com>
Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/bonding/bond_3ad.c
include/uapi/linux/if_bonding.h