From ea66c052755a687c9c54e04d348e00bd8f2cf71e Mon Sep 17 00:00:00 2001 From: Paul Sbarra Date: Sun, 25 Dec 2022 00:23:32 -0600 Subject: [PATCH 1/2] linux: add additional netlink interface attribute tags IFLA_PARENT_DEV_* were added in linux v5.13 linux: 00e77ed8e64d5f271c1f015c7153545980d48a76 IFLA_GRO_MAX_SIZE was added in linux v5.16 linux: eac1b93c14d645ef147b049ace0d5230df755548 IFLA_TSO_MAX_* were added in linux v5.18 linux: 89527be8d8d672773eeaec910118a6e84fb597e3 IFLA_ALLMULTI was added in linux v6.0 linux: 7e6e1b57162ed6a2d32d2f0929c27d79482ff706 --- libc-test/build.rs | 7 +++++++ libc-test/semver/linux.txt | 6 ++++++ src/unix/linux_like/linux/mod.rs | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index 602bb89ffbb85..d7f63f4c62160 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -3634,6 +3634,13 @@ fn test_linux(target: &str) { // Added in Linux 5.13 "PTRACE_GET_RSEQ_CONFIGURATION" if sparc64 => true, + // FIXME: Requires more recent kernel headers + | "IFLA_GRO_MAX_SIZE" // linux v5.16+ + | "IFLA_TSO_MAX_SIZE" // linux v5.18+ + | "IFLA_TSO_MAX_SEGS" // linux v5.18+ + | "IFLA_ALLMULTI" // linux v6.0+ + => true, + _ => false, } }); diff --git a/libc-test/semver/linux.txt b/libc-test/semver/linux.txt index 7e0585ac97613..f5c5f385378bc 100644 --- a/libc-test/semver/linux.txt +++ b/libc-test/semver/linux.txt @@ -836,6 +836,7 @@ IFF_UP IFF_VNET_HDR IFLA_ADDRESS IFLA_AF_SPEC +IFLA_ALLMULTI IFLA_ALT_IFNAME IFLA_BROADCAST IFLA_CARRIER @@ -845,6 +846,7 @@ IFLA_CARRIER_UP_COUNT IFLA_COST IFLA_EVENT IFLA_EXT_MASK +IFLA_GRO_MAX_SIZE IFLA_GROUP IFLA_GSO_MAX_SEGS IFLA_GSO_MAX_SIZE @@ -875,6 +877,8 @@ IFLA_NUM_TX_QUEUES IFLA_NUM_VF IFLA_OPERSTATE IFLA_PAD +IFLA_PARENT_DEV_BUS_NAME +IFLA_PARENT_DEV_NAME IFLA_PERM_ADDRESS IFLA_PHYS_PORT_ID IFLA_PHYS_PORT_NAME @@ -890,6 +894,8 @@ IFLA_QDISC IFLA_STATS IFLA_STATS64 IFLA_TARGET_NETNSID +IFLA_TSO_MAX_SEGS +IFLA_TSO_MAX_SIZE IFLA_TXQLEN IFLA_UNSPEC IFLA_VFINFO_LIST diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index d3d627234ceea..36e8a552facb4 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -1699,6 +1699,12 @@ pub const IFLA_PROP_LIST: ::c_ushort = 52; pub const IFLA_ALT_IFNAME: ::c_ushort = 53; pub const IFLA_PERM_ADDRESS: ::c_ushort = 54; pub const IFLA_PROTO_DOWN_REASON: ::c_ushort = 55; +pub const IFLA_PARENT_DEV_NAME: ::c_ushort = 56; +pub const IFLA_PARENT_DEV_BUS_NAME: ::c_ushort = 57; +pub const IFLA_GRO_MAX_SIZE: ::c_ushort = 58; +pub const IFLA_TSO_MAX_SIZE: ::c_ushort = 59; +pub const IFLA_TSO_MAX_SEGS: ::c_ushort = 60; +pub const IFLA_ALLMULTI: ::c_ushort = 61; pub const IFLA_INFO_UNSPEC: ::c_ushort = 0; pub const IFLA_INFO_KIND: ::c_ushort = 1; From 8b912019179d691c1879af3d5998c5a784f5ff10 Mon Sep 17 00:00:00 2001 From: Paul Sbarra Date: Sat, 21 Jan 2023 14:16:43 -0600 Subject: [PATCH 2/2] ignore symbols to satisfy sparc64 builder --- libc-test/build.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index d7f63f4c62160..bf8f404115641 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -3635,10 +3635,12 @@ fn test_linux(target: &str) { "PTRACE_GET_RSEQ_CONFIGURATION" if sparc64 => true, // FIXME: Requires more recent kernel headers - | "IFLA_GRO_MAX_SIZE" // linux v5.16+ - | "IFLA_TSO_MAX_SIZE" // linux v5.18+ - | "IFLA_TSO_MAX_SEGS" // linux v5.18+ - | "IFLA_ALLMULTI" // linux v6.0+ + | "IFLA_PARENT_DEV_NAME" // linux v5.13+ + | "IFLA_PARENT_DEV_BUS_NAME" // linux v5.13+ + | "IFLA_GRO_MAX_SIZE" // linux v5.16+ + | "IFLA_TSO_MAX_SIZE" // linux v5.18+ + | "IFLA_TSO_MAX_SEGS" // linux v5.18+ + | "IFLA_ALLMULTI" // linux v6.0+ => true, _ => false,