tools/include: Update if_link.h and netlink.h
Subsystems (4)
PATCH v2 1/2 tools/include: Update if_link.h and netlink.h
Sync the uAPI headers so that userspace and the kernel match. These changes make the tools version match the updates to the files in the kernel directory that were updated by commits:
if_link.h:8f4c0e01789c hsr: enhance netlink socket interface to support PRP427f0c8c194b macvlan: Add nodst option to macvlan type source583be982d934 mctp: Add device handling and netlink interfacec7fa1d9b1fb1 net: bridge: mcast: dump ipv4 querier state2dba407f994e net: bridge: multicast: make tracked EHT hosts limit configurable b6e5d27e32ef net: ethernet: rmnet: Add support for MAPv5 egress packets14452ca3b5ce net: qualcomm: rmnet: Export mux_id and flags to netlink78a3ea555713 net: remove comments on struct rtnl_link_stats0db0c34cfbc9 net: tighten the definition of interface statistics571912c69f0e net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc. 00e77ed8e64d rtnetlink: add IFLA_PARENT_[DEV|DEV_BUS]_NAME829eb208e80d rtnetlink: add support for protodown reason
netlink.h:d07dcf9aadd6 netlink: add infrastructure to expose policies to userspace 44f3625bc616 netlink: export policy in extended ACK d409989b59ad netlink: simplify NLMSG_DATA with NLMSG_HDRLEN a85cbe6159ff uapi: move constants from <linux/kernel.h> to <linux/const.h>
v2. Is a rebase and sync to the latest versions. A list of changes
computed via diff and blame was added to the commit message as suggested in:
https://lore.kernel.org/lkml/[email protected]/
--- tools/include/uapi/linux/if_link.h | 293 +++++++++++++++++++++++++---- tools/include/uapi/linux/netlink.h | 114 ++++++++++- 2 files changed, 370 insertions(+), 37 deletions(-)
tools/include/uapi/linux/if_link.h +259 -34
@@ -7,24 +7,23 @@/* This struct should be in sync with struct rtnl_link_stats64 */ struct rtnl_link_stats { -__u32 rx_packets;/* total packets received */ -__u32 tx_packets;/* total packets transmitted */ -__u32 rx_bytes;/* total bytes received */ -__u32 tx_bytes;/* total bytes transmitted */ -__u32 rx_errors;/* bad packets received */ -__u32 tx_errors;/* packet transmit problems */ -__u32 rx_dropped;/* no space in linux buffers */ -__u32 tx_dropped;/* no space available in linux */ -__u32 multicast;/* multicast packets received */ +__u32 rx_packets; +__u32 tx_packets; +__u32 rx_bytes; +__u32 tx_bytes; +__u32 rx_errors; +__u32 tx_errors; +__u32 rx_dropped; +__u32 tx_dropped; +__u32 multicast;__u32 collisions; -/* detailed rx_errors: */ __u32 rx_length_errors; -__u32 rx_over_errors;/* receiver ring buff overflow */ -__u32 rx_crc_errors;/* recved pkt with crc error */ -__u32 rx_frame_errors;/* recv'd frame alignment error */ -__u32 rx_fifo_errors;/* recv'r fifo overrun */ -__u32 rx_missed_errors;/* receiver missed packet */ +__u32 rx_over_errors; +__u32 rx_crc_errors; +__u32 rx_frame_errors; +__u32 rx_fifo_errors; +__u32 rx_missed_errors;/* detailed tx_errors */ __u32 tx_aborted_errors;
@@ -37,29 +36,201 @@ struct rtnl_link_stats {__u32 rx_compressed;__u32 tx_compressed; -__u32 rx_nohandler;/* dropped, no handler found */ +__u32 rx_nohandler; }; -/* The main device statistics structure */ +/** +* struct rtnl_link_stats64 - The main device statistics structure. +* +* @rx_packets: Number of good packets received by the interface. +* For hardware interfaces counts all good packets received from the device +* by the host, including packets which host had to drop at various stages +* of processing (even in the driver). +* +* @tx_packets: Number of packets successfully transmitted. +* For hardware interfaces counts packets which host was able to successfully +* hand over to the device, which does not necessarily mean that packets +* had been successfully transmitted out of the device, only that device +* acknowledged it copied them out of host memory. +* +* @rx_bytes: Number of good received bytes, corresponding to @rx_packets. +* +* For IEEE 802.3 devices should count the length of Ethernet Frames +* excluding the FCS. +* +* @tx_bytes: Number of good transmitted bytes, corresponding to @tx_packets. +* +* For IEEE 802.3 devices should count the length of Ethernet Frames +* excluding the FCS. +* +* @rx_errors: Total number of bad packets received on this network device. +* This counter must include events counted by @rx_length_errors, +* @rx_crc_errors, @rx_frame_errors and other errors not otherwise +* counted. +* +* @tx_errors: Total number of transmit problems. +* This counter must include events counter by @tx_aborted_errors, +* @tx_carrier_errors, @tx_fifo_errors, @tx_heartbeat_errors, +* @tx_window_errors and other errors not otherwise counted. +* +* @rx_dropped: Number of packets received but not processed, +* e.g. due to lack of resources or unsupported protocol. +* For hardware interfaces this counter may include packets discarded +* due to L2 address filtering but should not include packets dropped +* by the device due to buffer exhaustion which are counted separately in +* @rx_missed_errors (since procfs folds those two counters together). +* +* @tx_dropped: Number of packets dropped on their way to transmission, +* e.g. due to lack of resources. +* +* @multicast: Multicast packets received. +* For hardware interfaces this statistic is commonly calculated +* at the device level (unlike @rx_packets) and therefore may include +* packets which did not reach the host. +* +* For IEEE 802.3 devices this counter may be equivalent to: +* +* - 30.3.1.1.21 aMulticastFramesReceivedOK +* +* @collisions: Number of collisions during packet transmissions. +* +* @rx_length_errors: Number of packets dropped due to invalid length. +* Part of aggregate "frame" errors in `/proc/net/dev`. +* +* For IEEE 802.3 devices this counter should be equivalent to a sum +* of the following attributes: +* +* - 30.3.1.1.23 aInRangeLengthErrors +* - 30.3.1.1.24 aOutOfRangeLengthField +* - 30.3.1.1.25 aFrameTooLongErrors +* +* @rx_over_errors: Receiver FIFO overflow event counter. +* +* Historically the count of overflow events. Such events may be +* reported in the receive descriptors or via interrupts, and may +* not correspond one-to-one with dropped packets. +* +* The recommended interpretation for high speed interfaces is - +* number of packets dropped because they did not fit into buffers +* provided by the host, e.g. packets larger than MTU or next buffer +* in the ring was not available for a scatter transfer. +* +* Part of aggregate "frame" errors in `/proc/net/dev`. +* +* This statistics was historically used interchangeably with +* @rx_fifo_errors. +* +* This statistic corresponds to hardware events and is not commonly used +* on software devices. +* +* @rx_crc_errors: Number of packets received with a CRC error. +* Part of aggregate "frame" errors in `/proc/net/dev`. +* +* For IEEE 802.3 devices this counter must be equivalent to: +* +* - 30.3.1.1.6 aFrameCheckSequenceErrors +* +* @rx_frame_errors: Receiver frame alignment errors. +* Part of aggregate "frame" errors in `/proc/net/dev`. +* +* For IEEE 802.3 devices this counter should be equivalent to: +* +* - 30.3.1.1.7 aAlignmentErrors +* +* @rx_fifo_errors: Receiver FIFO error counter. +* +* Historically the count of overflow events. Those events may be +* reported in the receive descriptors or via interrupts, and may +* not correspond one-to-one with dropped packets. +* +* This statistics was used interchangeably with @rx_over_errors. +* Not recommended for use in drivers for high speed interfaces. +* +* This statistic is used on software devices, e.g. to count software +* packet queue overflow (can) or sequencing errors (GRE). +* +* @rx_missed_errors: Count of packets missed by the host. +* Folded into the "drop" counter in `/proc/net/dev`. +* +* Counts number of packets dropped by the device due to lack +* of buffer space. This usually indicates that the host interface +* is slower than the network interface, or host is not keeping up +* with the receive packet rate. +* +* This statistic corresponds to hardware events and is not used +* on software devices. +* +* @tx_aborted_errors: +* Part of aggregate "carrier" errors in `/proc/net/dev`. +* For IEEE 802.3 devices capable of half-duplex operation this counter +* must be equivalent to: +* +* - 30.3.1.1.11 aFramesAbortedDueToXSColls +* +* High speed interfaces may use this counter as a general device +* discard counter. +* +* @tx_carrier_errors: Number of frame transmission errors due to loss +* of carrier during transmission. +* Part of aggregate "carrier" errors in `/proc/net/dev`. +* +* For IEEE 802.3 devices this counter must be equivalent to: +* +* - 30.3.1.1.13 aCarrierSenseErrors +* +* @tx_fifo_errors: Number of frame transmission errors due to device +* FIFO underrun / underflow. This condition occurs when the device +* begins transmission of a frame but is unable to deliver the +* entire frame to the transmitter in time for transmission. +* Part of aggregate "carrier" errors in `/proc/net/dev`. +* +* @tx_heartbeat_errors: Number of Heartbeat / SQE Test errors for +* old half-duplex Ethernet. +* Part of aggregate "carrier" errors in `/proc/net/dev`. +* +* For IEEE 802.3 devices possibly equivalent to: +* +* - 30.3.2.1.4 aSQETestErrors +* +* @tx_window_errors: Number of frame transmission errors due +* to late collisions (for Ethernet - after the first 64B of transmission). +* Part of aggregate "carrier" errors in `/proc/net/dev`. +* +* For IEEE 802.3 devices this counter must be equivalent to: +* +* - 30.3.1.1.10 aLateCollisions +* +* @rx_compressed: Number of correctly received compressed packets. +* This counters is only meaningful for interfaces which support +* packet compression (e.g. CSLIP, PPP). +* +* @tx_compressed: Number of transmitted compressed packets. +* This counters is only meaningful for interfaces which support +* packet compression (e.g. CSLIP, PPP). +* +* @rx_nohandler: Number of packets received on the interface +* but dropped by the networking stack because the device is +* not designated to receive packets (e.g. backup link in a bond). +*/ struct rtnl_link_stats64 { -__u64 rx_packets;/* total packets received */ -__u64 tx_packets;/* total packets transmitted */ -__u64 rx_bytes;/* total bytes received */ -__u64 tx_bytes;/* total bytes transmitted */ -__u64 rx_errors;/* bad packets received */ -__u64 tx_errors;/* packet transmit problems */ -__u64 rx_dropped;/* no space in linux buffers */ -__u64 tx_dropped;/* no space available in linux */ -__u64 multicast;/* multicast packets received */ +__u64 rx_packets; +__u64 tx_packets; +__u64 rx_bytes; +__u64 tx_bytes; +__u64 rx_errors; +__u64 tx_errors; +__u64 rx_dropped; +__u64 tx_dropped; +__u64 multicast;__u64 collisions;/* detailed rx_errors: */ __u64 rx_length_errors; -__u64 rx_over_errors;/* receiver ring buff overflow */ -__u64 rx_crc_errors;/* recved pkt with crc error */ -__u64 rx_frame_errors;/* recv'd frame alignment error */ -__u64 rx_fifo_errors;/* recv'r fifo overrun */ -__u64 rx_missed_errors;/* receiver missed packet */ +__u64 rx_over_errors; +__u64 rx_crc_errors; +__u64 rx_frame_errors; +__u64 rx_fifo_errors; +__u64 rx_missed_errors;/* detailed tx_errors */ __u64 tx_aborted_errors;
@@ -71,8 +242,7 @@ struct rtnl_link_stats64 {/* for cslip etc */ __u64 rx_compressed;__u64 tx_compressed; - -__u64 rx_nohandler;/* dropped, no handler found */ +__u64 rx_nohandler; };/* The struct should be in sync with struct ifmap */
@@ -170,12 +340,29 @@ enum {IFLA_PROP_LIST ,IFLA_ALT_IFNAME ,/* Alternative ifname */ IFLA_PERM_ADDRESS , +IFLA_PROTO_DOWN_REASON , + +/* device (sysfs) name as parent, used instead +* of IFLA_LINK where there's no parent netdev +*/ +IFLA_PARENT_DEV_NAME , +IFLA_PARENT_DEV_BUS_NAME , + __IFLA_MAX };#define IFLA_MAX (__IFLA_MAX - 1) +enum { +IFLA_PROTO_DOWN_REASON_UNSPEC , +IFLA_PROTO_DOWN_REASON_MASK ,/* u32, mask for reason bits */ +IFLA_PROTO_DOWN_REASON_VALUE ,/* u32, reason bit value */ + + __IFLA_PROTO_DOWN_REASON_CNT, +IFLA_PROTO_DOWN_REASON_MAX = __IFLA_PROTO_DOWN_REASON_CNT -1 +}; +/* backwards compatibility for userspace */ #ifndef __KERNEL__#define IFLA_RTA (r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
@@ -293,6 +480,7 @@ enum {IFLA_BR_MCAST_MLD_VERSION ,IFLA_BR_VLAN_STATS_PER_PORT ,IFLA_BR_MULTI_BOOLOPT , +IFLA_BR_MCAST_QUERIER_STATE , __IFLA_BR_MAX, };
@@ -346,6 +534,8 @@ enum {IFLA_BRPORT_BACKUP_PORT ,IFLA_BRPORT_MRP_RING_OPEN ,IFLA_BRPORT_MRP_IN_OPEN , +IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT , +IFLA_BRPORT_MCAST_EHT_HOSTS_CNT , __IFLA_BRPORT_MAX };#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
@@ -433,6 +623,7 @@ enum macvlan_macaddr_mode { };#define MACVLAN_FLAG_NOPROMISC 1 +#define MACVLAN_FLAG_NODST 2/* skip dst macvlan if matching src macvlan */ /* VRF section */ enum {
@@ -597,6 +788,18 @@ enum ifla_geneve_df { GENEVE_DF_MAX = __GENEVE_DF_END - 1, }; +/* Bareudp section */ +enum { +IFLA_BAREUDP_UNSPEC , +IFLA_BAREUDP_PORT , +IFLA_BAREUDP_ETHERTYPE , +IFLA_BAREUDP_SRCPORT_MIN , +IFLA_BAREUDP_MULTIPROTO_MODE , + __IFLA_BAREUDP_MAX +}; + +#define IFLA_BAREUDP_MAX (__IFLA_BAREUDP_MAX - 1) +/* PPP section */ enum {IFLA_PPP_UNSPEC ,
@@ -899,7 +1102,14 @@ enum {#define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1) -/* HSR section */ +/* HSR/PRP section, both uses same interface */ + +/* Different redundancy protocols for hsr device */ +enum { +HSR_PROTOCOL_HSR , +HSR_PROTOCOL_PRP , +HSR_PROTOCOL_MAX , +};enum {IFLA_HSR_UNSPEC ,
@@ -909,6 +1119,9 @@ enum {IFLA_HSR_SUPERVISION_ADDR ,/* Supervision frame multicast addr */ IFLA_HSR_SEQ_NR ,IFLA_HSR_VERSION ,/* HSR version */ +IFLA_HSR_PROTOCOL ,/* Indicate different protocol than +* HSR. For example PRP. +*/ __IFLA_HSR_MAX, };
@@ -1033,6 +1246,8 @@ enum {#define RMNET_FLAGS_INGRESS_MAP_COMMANDS (1U << 1)#define RMNET_FLAGS_INGRESS_MAP_CKSUMV4 (1U << 2)#define RMNET_FLAGS_EGRESS_MAP_CKSUMV4 (1U << 3) +#define RMNET_FLAGS_INGRESS_MAP_CKSUMV5 (1U << 4) +#define RMNET_FLAGS_EGRESS_MAP_CKSUMV5 (1U << 5)enum {IFLA_RMNET_UNSPEC ,
@@ -1048,4 +1263,14 @@ struct ifla_rmnet_flags { __u32 mask; }; +/* MCTP section */ + +enum { +IFLA_MCTP_UNSPEC , +IFLA_MCTP_NET , + __IFLA_MCTP_MAX, +}; + +#define IFLA_MCTP_MAX (__IFLA_MCTP_MAX - 1) +#endif /* _UAPI_LINUX_IF_LINK_H */
tools/include/uapi/linux/netlink.h +111 -3
143 lines not on this page · raw message
Signature · 1 line
2.33.0.464.g1972c5931b-goog
PATCH v2 2/2 tools/include: Add rtnetlink.h, id_addr.h and neighbour.h
tools/lib/bpf/netlink.c depends on rtnetlink.h and netlink.h (via nlattr.h). Older versions of rtnetlink.h and netlink.h can cause duplicate conflicting definitions to occur, as things like header guards don't agree. To avoid these mismatches add rtnetlink.h, if_addr.h and neighbour.h to tools/include with the standard difference check.
--- tools/include/uapi/linux/if_addr.h | 72 +++ tools/include/uapi/linux/neighbour.h | 202 +++++++ tools/include/uapi/linux/rtnetlink.h | 810 +++++++++++++++++++++++++++ tools/lib/bpf/Makefile | 9 + 4 files changed, 1093 insertions(+) create mode 100644 tools/include/uapi/linux/if_addr.h create mode 100644 tools/include/uapi/linux/neighbour.h create mode 100644 tools/include/uapi/linux/rtnetlink.h
tools/include/uapi/linux/if_addr.h new file +72 -0
@@ -0,0 +1,72 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef __LINUX_IF_ADDR_H +#define __LINUX_IF_ADDR_H + +#include <linux/types.h> +#include <linux/netlink.h> + +struct ifaddrmsg { +__u8 ifa_family; +__u8 ifa_prefixlen;/* The prefix length */ +__u8 ifa_flags;/* Flags */ +__u8 ifa_scope;/* Address scope */ +__u32 ifa_index;/* Link index */ +}; + +/* +* Important comment: +* IFA_ADDRESS is prefix address, rather than local interface address. +* It makes no difference for normally configured broadcast interfaces, +* but for point-to-point IFA_ADDRESS is DESTINATION address, +* local address is supplied in IFA_LOCAL attribute. +* +* IFA_FLAGS is a u32 attribute that extends the u8 field ifa_flags. +* If present, the value from struct ifaddrmsg will be ignored. +*/ +enum { +IFA_UNSPEC , +IFA_ADDRESS , +IFA_LOCAL , +IFA_LABEL , +IFA_BROADCAST , +IFA_ANYCAST , +IFA_CACHEINFO , +IFA_MULTICAST , +IFA_FLAGS , +IFA_RT_PRIORITY ,/* u32, priority/metric for prefix route */ +IFA_TARGET_NETNSID , + __IFA_MAX, +}; + +#define IFA_MAX (__IFA_MAX - 1) + +/* ifa_flags */ +#define IFA_F_SECONDARY 0x01 +#define IFA_F_TEMPORARY IFA_F_SECONDARY + +#define IFA_F_NODAD 0x02 +#define IFA_F_OPTIMISTIC 0x04 +#define IFA_F_DADFAILED 0x08 +#define IFA_F_HOMEADDRESS 0x10 +#define IFA_F_DEPRECATED 0x20 +#define IFA_F_TENTATIVE 0x40 +#define IFA_F_PERMANENT 0x80 +#define IFA_F_MANAGETEMPADDR 0x100 +#define IFA_F_NOPREFIXROUTE 0x200 +#define IFA_F_MCAUTOJOIN 0x400 +#define IFA_F_STABLE_PRIVACY 0x800 + +struct ifa_cacheinfo { +__u32 ifa_prefered; +__u32 ifa_valid; +__u32 cstamp;/* created timestamp, hundredths of seconds */ +__u32 tstamp;/* updated timestamp, hundredths of seconds */ +}; + +/* backwards compatibility for userspace */ +#ifndef __KERNEL__ +#define IFA_RTA (r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg)))) +#define IFA_PAYLOAD (n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg)) +#endif + +#endif
tools/include/uapi/linux/neighbour.h new file +202 -0
202 lines not on this page · raw message
tools/include/uapi/linux/rtnetlink.h new file +810 -0
810 lines not on this page · raw message
tools/lib/bpf/Makefile +9 -0
@@ -155,6 +155,15 @@ $(BPF_IN_SHARED): force $(BPF_GENERATED) @(test -f ../../include/uapi/linux/if_xdp.h -a -f ../../../include/uapi/linux/if_xdp.h && ( \ (diff -B ../../include/uapi/linux/if_xdp.h ../../../include/uapi/linux/if_xdp.h >/dev/null) || \ echo "Warning: Kernel ABI header at 'tools/include/uapi/linux/if_xdp.h' differs from latest version at 'include/uapi/linux/if_xdp.h'" >&2 )) || true + @(test -f ../../include/uapi/linux/rtnetlink.h -a -f ../../../include/uapi/linux/rtnetlink.h && ( \ + (diff -B ../../include/uapi/linux/rtnetlink.h ../../../include/uapi/linux/rtnetlink.h >/dev/null) || \ + echo "Warning: Kernel ABI header at 'tools/include/uapi/linux/rtnetlink.h' differs from latest version at 'include/uapi/linux/rtnetlink.h'" >&2 )) || true + @(test -f ../../include/uapi/linux/if_addr.h -a -f ../../../include/uapi/linux/if_addr.h && ( \ + (diff -B ../../include/uapi/linux/if_addr.h ../../../include/uapi/linux/if_addr.h >/dev/null) || \ + echo "Warning: Kernel ABI header at 'tools/include/uapi/linux/if_addr.h' differs from latest version at 'include/uapi/linux/if_addr.h'" >&2 )) || true + @(test -f ../../include/uapi/linux/neighbour.h -a -f ../../../include/uapi/linux/neighbour.h && ( \ + (diff -B ../../include/uapi/linux/neighbour.h ../../../include/uapi/linux/neighbour.h >/dev/null) || \ + echo "Warning: Kernel ABI header at 'tools/include/uapi/linux/neighbour.h' differs from latest version at 'include/uapi/linux/neighbour.h'" >&2 )) || true $(Q)$(MAKE) $(build)=libbpf OUTPUT=$(SHARED_OBJDIR) CFLAGS="$(CFLAGS) $(SHLIB_FLAGS)" $(BPF_IN_STATIC): force $(BPF_GENERATED)
Signature · 1 line
2.33.0.464.g1972c5931b-goog
Daniel Borkmann
maintainerQuoted 24 lines · Ian Rogers
Sync the uAPI headers so that userspace and the kernel match. These changes make the tools version match the updates to the files in the kernel directory that were updated by commits:
if_link.h:8f4c0e01789chsr: enhance netlink socket interface to support PRP427f0c8c194bmacvlan: Add nodst option to macvlan type source583be982d934mctp: Add device handling and netlink interfacec7fa1d9b1fb1net: bridge: mcast: dump ipv4 querier state2dba407f994enet: bridge: multicast: make tracked EHT hosts limit configurableb6e5d27e32efnet: ethernet: rmnet: Add support for MAPv5 egress packets14452ca3b5cenet: qualcomm: rmnet: Exportmux_idand flags to netlink78a3ea555713net: remove comments on structrtnl_link_stats0db0c34cfbc9net: tighten the definition of interface statistics571912c69f0enet: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc.00e77ed8e64drtnetlink: add IFLA_PARENT_[DEV|DEV_BUS]_NAME829eb208e80drtnetlink: add support for protodown reason
netlink.h:d07dcf9aadd6netlink: add infrastructure to expose policies to userspace44f3625bc616netlink: export policy in extended ACKd409989b59adnetlink: simplifyNLMSG_DATAwithNLMSG_HDRLENa85cbe6159ffuapi: move constants from <linux/kernel.h> to <linux/const.h>
Quoted 6 lines
v2. Is a rebase and sync to the latest versions. A list of changes
computed via diff and blame was added to the commit message as suggested in:
https://lore.kernel.org/lkml/[email protected]/Signed-off-by Ian Rogers <[email protected]>
With both patches applied to bpf-next, this would break our CI:
[...]
CC bench.o CC bench_count.o CC bench_rename.o CC bench_trigger.o CC bench_ringbufs.o BINARY bench BINARY xdpxceiver
xdpxceiver.c: In function ‘testapp_invalid_desc’:
xdpxceiver.c:1223:41: warning: implicit declaration of function ‘ARRAY_SIZE’ [-Wimplicit-function-declaration]
1223 | pkt_stream_generate_custom(test, pkts, ARRAY_SIZE(pkts));
| ^~~~~~~~~~/usr/bin/ld: /tmp/ccoQONpi.o: in function `testapp_invalid_desc':/root/daniel/bpf/tools/testing/selftests/bpf/xdpxceiver.c:1223: undefined reference to `ARRAY_SIZE'
collect2: error: ld returned 1 exit status
make: *** [Makefile:166: /root/daniel/bpf/tools/testing/selftests/bpf/xdpxceiver] Error 1
Please take a look and submit v3 of the series with the build issue fixed.
Thanks,
Daniel
Daniel Borkmann
maintainerQuoted 51 lines · Daniel Borkmann
Quoted 24 lines · Ian Rogers
Sync the uAPI headers so that userspace and the kernel match. These changes make the tools version match the updates to the files in the kernel directory that were updated by commits:
if_link.h:8f4c0e01789chsr: enhance netlink socket interface to support PRP427f0c8c194bmacvlan: Add nodst option to macvlan type source583be982d934mctp: Add device handling and netlink interfacec7fa1d9b1fb1net: bridge: mcast: dump ipv4 querier state2dba407f994enet: bridge: multicast: make tracked EHT hosts limit configurableb6e5d27e32efnet: ethernet: rmnet: Add support for MAPv5 egress packets14452ca3b5cenet: qualcomm: rmnet: Exportmux_idand flags to netlink78a3ea555713net: remove comments on structrtnl_link_stats0db0c34cfbc9net: tighten the definition of interface statistics571912c69f0enet: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc.00e77ed8e64drtnetlink: add IFLA_PARENT_[DEV|DEV_BUS]_NAME829eb208e80drtnetlink: add support for protodown reason
netlink.h:d07dcf9aadd6netlink: add infrastructure to expose policies to userspace44f3625bc616netlink: export policy in extended ACKd409989b59adnetlink: simplifyNLMSG_DATAwithNLMSG_HDRLENa85cbe6159ffuapi: move constants from <linux/kernel.h> to <linux/const.h>Quoted 6 lines
v2. Is a rebase and sync to the latest versions. A list of changes computed via diff and blame was added to the commit message as suggested in:
https://lore.kernel.org/lkml/[email protected]/Signed-off-by Ian Rogers <[email protected]>With both patches applied to bpf-next, this would break our CI:
[...]
CC bench.o
CC bench_count.o
CC bench_rename.o
CC bench_trigger.o
CC bench_ringbufs.o
BINARY bench
BINARY xdpxceiverxdpxceiver.c: In function ‘testapp_invalid_desc’:
xdpxceiver.c:1223:41: warning: implicit declaration of function ‘ARRAY_SIZE’ [-Wimplicit-function-declaration]
1223 |pkt_stream_generate_custom(test, pkts, ARRAY_SIZE(pkts));
| ^~~~~~~~~~/usr/bin/ld:/tmp/ccoQONpi.o: in function `testapp_invalid_desc':/root/daniel/bpf/tools/testing/selftests/bpf/xdpxceiver.c:1223: undefined reference to `ARRAY_SIZE'
collect2: error: ld returned 1 exit status
make: *** [Makefile:166:/root/daniel/bpf/tools/testing/selftests/bpf/xdpxceiver] Error 1
Quoted 1 line
Please take a look and submit v3 of the series with the build issue fixed.
See also: https://github.com/kernel-patches/bpf/pull/1822/checks?check_run_id=3714445336
Thanks,
Daniel
Quoted 53 lines · Daniel Borkmann
Quoted 51 lines · Daniel Borkmann
Quoted 24 lines · Ian Rogers
Sync the uAPI headers so that userspace and the kernel match. These changes make the tools version match the updates to the files in the kernel directory that were updated by commits:
if_link.h:8f4c0e01789chsr: enhance netlink socket interface to support PRP427f0c8c194bmacvlan: Add nodst option to macvlan type source583be982d934mctp: Add device handling and netlink interfacec7fa1d9b1fb1net: bridge: mcast: dump ipv4 querier state2dba407f994enet: bridge: multicast: make tracked EHT hosts limit configurableb6e5d27e32efnet: ethernet: rmnet: Add support for MAPv5 egress packets14452ca3b5cenet: qualcomm: rmnet: Exportmux_idand flags to netlink78a3ea555713net: remove comments on structrtnl_link_stats0db0c34cfbc9net: tighten the definition of interface statistics571912c69f0enet: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc.00e77ed8e64drtnetlink: add IFLA_PARENT_[DEV|DEV_BUS]_NAME829eb208e80drtnetlink: add support for protodown reason
netlink.h:d07dcf9aadd6netlink: add infrastructure to expose policies to userspace44f3625bc616netlink: export policy in extended ACKd409989b59adnetlink: simplifyNLMSG_DATAwithNLMSG_HDRLENa85cbe6159ffuapi: move constants from <linux/kernel.h> to <linux/const.h>Quoted 6 lines
v2. Is a rebase and sync to the latest versions. A list of changes
computed via diff and blame was added to the commit message as suggested in:
https://lore.kernel.org/lkml/[email protected]/Signed-off-by Ian Rogers <[email protected]>With both patches applied to bpf-next, this would break our CI:
[...]
CC bench.o CC bench_count.o CC bench_rename.o CC bench_trigger.o CC bench_ringbufs.o BINARY bench BINARY xdpxceiver
xdpxceiver.c: In function ‘testapp_invalid_desc’:
xdpxceiver.c:1223:41: warning: implicit declaration of function ‘ARRAY_SIZE’ [-Wimplicit-function-declaration]
1223 |pkt_stream_generate_custom(test, pkts, ARRAY_SIZE(pkts));
| ^~~~~~~~~~/usr/bin/ld:/tmp/ccoQONpi.o: in function `testapp_invalid_desc':/root/daniel/bpf/tools/testing/selftests/bpf/xdpxceiver.c:1223: undefined reference to `ARRAY_SIZE'
collect2: error: ld returned 1 exit status
make: *** [Makefile:166:/root/daniel/bpf/tools/testing/selftests/bpf/xdpxceiver] Error 1
Quoted 3 lines
Quoted 1 line
Please take a look and submit v3 of the series with the build issue fixed.
See also: https://github.com/kernel-patches/bpf/pull/1822/checks?check_run_id=3714445336
Thanks, this looks like an "include what you use" problem in xdpxceiver.c and so I'll need to add a patch to fix that ahead of these patches.
Ian
Quoted 2 lines
Thanks,
Daniel