diff options
author | Dmitry V. Levin <ldv@strace.io> | 2023-01-20 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2023-01-20 08:00:00 +0000 |
commit | cca4444964861b8bd89e8f3e554145838d050100 (patch) | |
tree | 44f655b36bfef613aa80b0f378344ac144bbb08b | |
parent | 458ab2f43469da649d30c3ac4922a7b7fb11ff2b (diff) | |
download | strace-cca4444964861b8bd89e8f3e554145838d050100.tar.gz |
xlat: update IFLA_* constants
* src/xlat/rtnl_ifla_brport_attrs.in (IFLA_BRPORT_MAB): New constant
introduced by Linux kernel commit v6.2-rc1~99^2~297^2~1.
* src/xlat/rtnl_link_attrs.in (IFLA_DEVLINK_PORT): New constant
introduced by Linux kernel commit v6.2-rc1~99^2~296^2.
* src/rtnl_link.c (ifla_brport_nla_decoders): Add IFLA_BRPORT_MAB.
(ifinfomsg_nla_decoders): Add IFLA_DEVLINK_PORT.
* tests/nlattr_ifla_brport.c (main): Update expected output.
* tests/nlattr_ifla_linkinfo.c: Likewise.
* NEWS: Mention this.
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | src/rtnl_link.c | 2 | ||||
-rw-r--r-- | src/xlat/rtnl_ifla_brport_attrs.in | 1 | ||||
-rw-r--r-- | src/xlat/rtnl_link_attrs.in | 1 | ||||
-rw-r--r-- | tests/nlattr_ifla_brport.c | 3 | ||||
-rw-r--r-- | tests/nlattr_ifla_linkinfo.c | 3 |
6 files changed, 11 insertions, 3 deletions
@@ -2,7 +2,9 @@ Noteworthy changes in release ?.? (????-??-??) ============================================== * Improvements - * Updated lists of ALG_* and BPF_* constants. + * Implemented decoding of IFLA_BRPORT_MAB and IFLA_DEVLINK_PORT + netlink attributes. + * Updated lists of ALG_*, BPF_*, and IFLA_* constants. Noteworthy changes in release 6.1 (2022-12-12) ============================================== diff --git a/src/rtnl_link.c b/src/rtnl_link.c index bf80af13e..60abdb3fe 100644 --- a/src/rtnl_link.c +++ b/src/rtnl_link.c @@ -211,6 +211,7 @@ static const nla_decoder_t ifla_brport_nla_decoders[] = { [IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT] = decode_nla_u32, [IFLA_BRPORT_MCAST_EHT_HOSTS_CNT] = decode_nla_u32, [IFLA_BRPORT_LOCKED] = decode_nla_u8, + [IFLA_BRPORT_MAB] = decode_nla_u8, }; static bool @@ -1688,6 +1689,7 @@ static const nla_decoder_t ifinfomsg_nla_decoders[] = { [IFLA_TSO_MAX_SIZE] = decode_nla_u32, [IFLA_TSO_MAX_SEGS] = decode_nla_u32, [IFLA_ALLMULTI] = decode_nla_u32, + [IFLA_DEVLINK_PORT] = decode_nla_u32, }; DECL_NETLINK_ROUTE_DECODER(decode_ifinfomsg) diff --git a/src/xlat/rtnl_ifla_brport_attrs.in b/src/xlat/rtnl_ifla_brport_attrs.in index dacb445f1..a4affcf1b 100644 --- a/src/xlat/rtnl_ifla_brport_attrs.in +++ b/src/xlat/rtnl_ifla_brport_attrs.in @@ -40,3 +40,4 @@ IFLA_BRPORT_MRP_IN_OPEN IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT IFLA_BRPORT_MCAST_EHT_HOSTS_CNT IFLA_BRPORT_LOCKED +IFLA_BRPORT_MAB diff --git a/src/xlat/rtnl_link_attrs.in b/src/xlat/rtnl_link_attrs.in index 9bf80c619..3d2112c7e 100644 --- a/src/xlat/rtnl_link_attrs.in +++ b/src/xlat/rtnl_link_attrs.in @@ -62,3 +62,4 @@ IFLA_GRO_MAX_SIZE IFLA_TSO_MAX_SIZE IFLA_TSO_MAX_SEGS IFLA_ALLMULTI +IFLA_DEVLINK_PORT diff --git a/tests/nlattr_ifla_brport.c b/tests/nlattr_ifla_brport.c index f72b783bf..16d7d7662 100644 --- a/tests/nlattr_ifla_brport.c +++ b/tests/nlattr_ifla_brport.c @@ -39,7 +39,7 @@ main(void) { ENUM_KNOWN(0, IFLA_BRPORT_UNSPEC) }, { ENUM_KNOWN(0x18, IFLA_BRPORT_FLUSH) }, { ENUM_KNOWN(0x1a, IFLA_BRPORT_PAD) }, - { ARG_XLAT_UNKNOWN(0x28, "IFLA_BRPORT_???") }, + { ARG_XLAT_UNKNOWN(0x29, "IFLA_BRPORT_???") }, { ARG_XLAT_UNKNOWN(0xbad, "IFLA_BRPORT_???") }, }; for (size_t i = 0; i < ARRAY_SIZE(un_attrs); i++) { @@ -75,6 +75,7 @@ main(void) { ENUM_KNOWN(0x23, IFLA_BRPORT_MRP_RING_OPEN) }, { ENUM_KNOWN(0x24, IFLA_BRPORT_MRP_IN_OPEN) }, { ENUM_KNOWN(0x27, IFLA_BRPORT_LOCKED) }, + { ENUM_KNOWN(0x28, IFLA_BRPORT_MAB) }, }; void *nlh_u8 = midtail_alloc(NLMSG_SPACE(hdrlen), NLA_HDRLEN * 2 + sizeof(uint8_t)); diff --git a/tests/nlattr_ifla_linkinfo.c b/tests/nlattr_ifla_linkinfo.c index e80fadeae..3e756924f 100644 --- a/tests/nlattr_ifla_linkinfo.c +++ b/tests/nlattr_ifla_linkinfo.c @@ -897,7 +897,7 @@ main(void) { 0, "IFLA_BRPORT_UNSPEC" }, { 24, "IFLA_BRPORT_FLUSH" }, { 26, "IFLA_BRPORT_PAD" }, - { 40, "0x28 /* IFLA_BRPORT_??? */" }, + { 41, "0x29 /* IFLA_BRPORT_??? */" }, { 2989, "0xbad /* IFLA_BRPORT_??? */" }, }; @@ -940,6 +940,7 @@ main(void) { ARG_STR(IFLA_BRPORT_MRP_RING_OPEN) }, { ARG_STR(IFLA_BRPORT_MRP_IN_OPEN) }, { ARG_STR(IFLA_BRPORT_LOCKED) }, + { ARG_STR(IFLA_BRPORT_MAB) }, }; for (size_t k = 0; k < ARRAY_SIZE(u8_brport_attrs); k++) { |