History

Merge tag 'net-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next

Pull networking updates from Paolo Abeni: "Core: - Introduce a config option to tweak MAX_SKB_FRAGS. Increasing the default value allows for better BIG TCP performances - Reduce compound page head access for zero-copy data transfers - RPS/RFS improvements, avoiding unneeded NET_RX_SOFTIRQ when possible - Threaded NAPI improvements, adding defer skb free support and unneeded softirq avoidance - Address dst_entry reference count scalability issues, via false sharing avoidance and optimize refcount tracking - Add lockless accesses annotation to sk_err[_soft] - Optimize again the skb struct layout - Extends the skb drop reasons to make it usable by multiple subsystems - Better const qualifier awareness for socket casts BPF: - Add skb and XDP typed dynptrs which allow BPF programs for more ergonomic and less brittle iteration through data and variable-sized accesses - Add a new BPF netfilter program type and minimal support to hook BPF programs to netfilter hooks such as prerouting or forward - Add more precise memory usage reporting for all BPF map types - Adds support for using {FOU,GUE} encap with an ipip device operating in collect_md mode and add a set of BPF kfuncs for controlling encap params - Allow BPF programs to detect at load time whether a particular kfunc exists or not, and also add support for this in light skeleton - Bigger batch of BPF verifier improvements to prepare for upcoming BPF open-coded iterators allowing for less restrictive looping capabilities - Rework RCU enforcement in the verifier, add kptr_rcu and enforce BPF programs to NULL-check before passing such pointers into kfunc - Add support for kptrs in percpu hashmaps, percpu LRU hashmaps and in local storage maps - Enable RCU semantics for task BPF kptrs and allow referenced kptr tasks to be stored in BPF maps - Add support for refcounted local kptrs to the verifier for allowing shared ownership, useful for adding a node to both the BPF list and rbtree - Add BPF verifier support for ST instructions in convert_ctx_access() which will help new -mcpu=v4 clang flag to start emitting them - Add ARM32 USDT support to libbpf - Improve bpftool's visual program dump which produces the control flow graph in a DOT format by adding C source inline annotations Protocols: - IPv4: Allow adding to IPv4 address a 'protocol' tag. Such value indicates the provenance of the IP address - IPv6: optimize route lookup, dropping unneeded R/W lock acquisition - Add the handshake upcall mechanism, allowing the user-space to implement generic TLS handshake on kernel's behalf - Bridge: support per-{Port, VLAN} neighbor suppression, increasing resilience to nodes failures - SCTP: add support for Fair Capacity and Weighted Fair Queueing schedulers - MPTCP: delay first subflow allocation up to its first usage. This will allow for later better LSM interaction - xfrm: Remove inner/outer modes from input/output path. These are not needed anymore - WiFi: - reduced neighbor report (RNR) handling for AP mode - HW timestamping support - support for randomized auth/deauth TA for PASN privacy - per-link debugfs for multi-link - TC offload support for mac80211 drivers - mac80211 mesh fast-xmit and fast-rx support - enable Wi-Fi 7 (EHT) mesh support Netfilter: - Add nf_tables 'brouting' support, to force a packet to be routed instead of being bridged - Update bridge netfilter and ovs conntrack helpers to handle IPv6 Jumbo packets properly, i.e. fetch the packet length from hop-by-hop extension header. This is needed for BIT TCP support - The iptables 32bit compat interface isn't compiled in by default anymore - Move ip(6)tables builtin icmp matches to the udptcp one. This has the advantage that icmp/icmpv6 match doesn't load the iptables/ip6tables modules anymore when iptables-nft is used - Extended netlink error report for netdevice in flowtables and netdev/chains. Allow for incrementally add/delete devices to netdev basechain. Allow to create netdev chain without device Driver API: - Remove redundant Device Control Error Reporting Enable, as PCI core has already error reporting enabled at enumeration time - Move Multicast DB netlink handlers to core, allowing devices other then bridge to use them - Allow the page_pool to directly recycle the pages from safely localized NAPI - Implement lockless TX queue stop/wake combo macros, allowing for further code de-duplication and sanitization - Add YNL support for user headers and struct attrs - Add partial YNL specification for devlink - Add partial YNL specification for ethtool - Add tc-mqprio and tc-taprio support for preemptible traffic classes - Add tx push buf len param to ethtool, specifies the maximum number of bytes of a transmitted packet a driver can push directly to the underlying device - Add basic LED support for switch/phy - Add NAPI documentation, stop relaying on external links - Convert dsa_master_ioctl() to netdev notifier. This is a preparatory work to make the hardware timestamping layer selectable by user space - Add transceiver support and improve the error messages for CAN-FD controllers New hardware / drivers: - Ethernet: - AMD/Pensando core device support - MediaTek MT7981 SoC - MediaTek MT7988 SoC - Broadcom BCM53134 embedded switch - Texas Instruments CPSW9G ethernet switch - Qualcomm EMAC3 DWMAC ethernet - StarFive JH7110 SoC - NXP CBTX ethernet PHY - WiFi: - Apple M1 Pro/Max devices - RealTek rtl8710bu/rtl8188gu - RealTek rtl8822bs, rtl8822cs and rtl8821cs SDIO chipset - Bluetooth: - Realtek RTL8821CS, RTL8851B, RTL8852BS - Mediatek MT7663, MT7922 - NXP w8997 - Actions Semi ATS2851 - QTI WCN6855 - Marvell 88W8997 - Can: - STMicroelectronics bxcan stm32f429 Drivers: - Ethernet NICs: - Intel (1G, icg): - add tracking and reporting of QBV config errors - add support for configuring max SDU for each Tx queue - Intel (100G, ice): - refactor mailbox overflow detection to support Scalable IOV - GNSS interface optimization - Intel (i40e): - support XDP multi-buffer - nVidia/Mellanox: - add the support for linux bridge multicast offload - enable TC offload for egress and engress MACVLAN over bond - add support for VxLAN GBP encap/decap flows offload - extend packet offload to fully support libreswan - support tunnel mode in mlx5 IPsec packet offload - extend XDP multi-buffer support - support MACsec VLAN offload - add support for dynamic msix vectors allocation - drop RX page_cache and fully use page_pool - implement thermal zone to report NIC temperature - Netronome/Corigine: - add support for multi-zone conntrack offload - Solarflare/Xilinx: - support offloading TC VLAN push/pop actions to the MAE - support TC decap rules - support unicast PTP - Other NICs: - Broadcom (bnxt): enforce software based freq adjustments only on shared PHC NIC - RealTek (r8169): refactor to addess ASPM issues during NAPI poll - Micrel (lan8841): add support for PTP_PF_PEROUT - Cadence (macb): enable PTP unicast - Engleder (tsnep): add XDP socket zero-copy support - virtio-net: implement exact header length guest feature - veth: add page_pool support for page recycling - vxlan: add MDB data path support - gve: add XDP support for GQI-QPL format - geneve: accept every ethertype - macvlan: allow some packets to bypass broadcast queue - mana: add support for jumbo frame - Ethernet high-speed switches: - Microchip (sparx5): Add support for TC flower templates - Ethernet embedded switches: - Broadcom (b54): - configure 6318 and 63268 RGMII ports - Marvell (mv88e6xxx): - faster C45 bus scan - Microchip: - lan966x: - add support for IS1 VCAP - better TX/RX from/to CPU performances - ksz9477: add ETS Qdisc support - ksz8: enhance static MAC table operations and error handling - sama7g5: add PTP capability - NXP (ocelot): - add support for external ports - add support for preemptible traffic classes - Texas Instruments: - add CPSWxG SGMII support for J7200 and J721E - Intel WiFi (iwlwifi): - preparation for Wi-Fi 7 EHT and multi-link support - EHT (Wi-Fi 7) sniffer support - hardware timestamping support for some devices/firwmares - TX beacon protection on newer hardware - Qualcomm 802.11ax WiFi (ath11k): - MU-MIMO parameters support - ack signal support for management packets - RealTek WiFi (rtw88): - SDIO bus support - better support for some SDIO devices (e.g. MAC address from efuse) - RealTek WiFi (rtw89): - HW scan support for 8852b - better support for 6 GHz scanning - support for various newer firmware APIs - framework firmware backwards compatibility - MediaTek WiFi (mt76): - P2P support - mesh A-MSDU support - EHT (Wi-Fi 7) support - coredump support" * tag 'net-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2078 commits) net: phy: hide the PHYLIB_LEDS knob net: phy: marvell-88x2222: remove unnecessary (void*) conversions tcp/udp: Fix memleaks of sk and zerocopy skbs with TX timestamp. net: amd: Fix link leak when verifying config failed net: phy: marvell: Fix inconsistent indenting in led_blink_set lan966x: Don't use xdp_frame when action is XDP_TX tsnep: Add XDP socket zero-copy TX support tsnep: Add XDP socket zero-copy RX support tsnep: Move skb receive action to separate function tsnep: Add functions for queue enable/disable tsnep: Rework TX/RX queue initialization tsnep: Replace modulo operation with mask net: phy: dp83867: Add led_brightness_set support net: phy: Fix reading LED reg property drivers: nfc: nfcsim: remove return value check of `dev_dir` net: phy: dp83867: Remove unnecessary (void*) conversions net: ethtool: coalesce: try to make user settings stick twice net: mana: Check if netdev/napi_alloc_frag returns single page net: mana: Rename mana_refill_rxoob and remove some empty lines net: veth: add page_pool stats ...

Linus Torvalds committed 3 years ago

Commit 6e98b092 parents b68ee1c 9b78d911925 files · +138910 −47345Browse files

Showing the changes to tools/include/uapi (2 of 1925 files). Show all

Unified · Split

2 files
  1. tools/include/uapi/linux/bpf.h +99 −13
  2. tools/include/uapi/linux/if_link.h +1 −0
tools/include/uapi/linux/bpf.h+99−13
@@ -986,6 +986,7 @@ enum bpf_prog_type { · 985 unmodified lines
986986 BPF_PROG_TYPE_LSM,
987987 BPF_PROG_TYPE_SK_LOOKUP,
988988 BPF_PROG_TYPE_SYSCALL, /* a program that can execute syscalls */
989+ BPF_PROG_TYPE_NETFILTER,
989990 };
990991
991992 enum bpf_attach_type {
@@ -1033,6 +1034,7 @@ enum bpf_attach_type { · 41 unmodified lines
10331034 BPF_PERF_EVENT,
10341035 BPF_TRACE_KPROBE_MULTI,
10351036 BPF_LSM_CGROUP,
1037+ BPF_STRUCT_OPS,
10361038 __MAX_BPF_ATTACH_TYPE
10371039 };
10381040
@@ -1049,6 +1051,7 @@ enum bpf_link_type { · 10 unmodified lines
10491051 BPF_LINK_TYPE_PERF_EVENT = 7,
10501052 BPF_LINK_TYPE_KPROBE_MULTI = 8,
10511053 BPF_LINK_TYPE_STRUCT_OPS = 9,
1054+ BPF_LINK_TYPE_NETFILTER = 10,
10521055
10531056 MAX_BPF_LINK_TYPE,
10541057 };
@@ -1108,7 +1111,7 @@ enum bpf_link_type { · 53 unmodified lines
11081111 */
11091112 #define BPF_F_STRICT_ALIGNMENT (1U << 0)
11101113
1111−/* If BPF_F_ANY_ALIGNMENT is used in BPF_PROF_LOAD command, the
1114+/* If BPF_F_ANY_ALIGNMENT is used in BPF_PROG_LOAD command, the
11121115 * verifier will allow any alignment whatsoever. On platforms
11131116 * with strict alignment requirements for loads ands stores (such
11141117 * as sparc and mips) the verifier validates that all loads and
@@ -1266,6 +1269,9 @@ enum { · 151 unmodified lines
12661269
12671270 /* Create a map that is suitable to be an inner map with dynamic max entries */
12681271 BPF_F_INNER_MAP = (1U << 12),
1272+
1273+/* Create a map that will be registered/unregesitered by the backed bpf_link */
1274+ BPF_F_LINK = (1U << 13),
12691275 };
12701276
12711277 /* Flags for BPF_PROG_QUERY. */
@@ -1403,6 +1409,11 @@ union bpf_attr { · 131 unmodified lines
14031409 __aligned_u64 fd_array; /* array of FDs */
14041410 __aligned_u64 core_relos;
14051411 __u32 core_relo_rec_size; /* sizeof(struct bpf_core_relo) */
1412+ /* output: actual total log contents size (including termintaing zero).
1413+ * It could be both larger than original log_size (if log was
1414+ * truncated), or smaller (if log buffer wasn't filled completely).
1415+ */
1416+ __u32 log_true_size;
14061417 };
14071418
14081419 struct { /* anonymous struct used by BPF_OBJ_* commands */
@@ -1488,6 +1499,11 @@ union bpf_attr { · 79 unmodified lines
14881499 __u32 btf_size;
14891500 __u32 btf_log_size;
14901501 __u32 btf_log_level;
1502+ /* output: actual total log contents size (including termintaing zero).
1503+ * It could be both larger than original log_size (if log was
1504+ * truncated), or smaller (if log buffer wasn't filled completely).
1505+ */
1506+ __u32 btf_log_true_size;
14911507 };
14921508
14931509 struct {
@@ -1507,7 +1523,10 @@ union bpf_attr { · 13 unmodified lines
15071523 } task_fd_query;
15081524
15091525 struct { /* struct used by BPF_LINK_CREATE command */
1510− __u32 prog_fd; /* eBPF program to attach */
1526+ union {
1527+ __u32 prog_fd; /* eBPF program to attach */
1528+ __u32 map_fd; /* struct_ops to attach */
1529+ };
15111530 union {
15121531 __u32 target_fd; /* object to attach to */
15131532 __u32 target_ifindex; /* target ifindex */
@@ -1543,17 +1562,34 @@ union bpf_attr { · 29 unmodified lines
15431562 */
15441563 __u64 cookie;
15451564 } tracing;
1565+ struct {
1566+ __u32 pf;
1567+ __u32 hooknum;
1568+ __s32 priority;
1569+ __u32 flags;
1570+ } netfilter;
15461571 };
15471572 } link_create;
15481573
15491574 struct { /* struct used by BPF_LINK_UPDATE command */
15501575 __u32 link_fd; /* link fd */
1551− /* new program fd to update link with */
1552− __u32 new_prog_fd;
1576+ union {
1577+ /* new program fd to update link with */
1578+ __u32 new_prog_fd;
1579+ /* new struct_ops map fd to update link with */
1580+ __u32 new_map_fd;
1581+ };
15531582 __u32 flags; /* extra flags */
1554− /* expected link's program fd; is specified only if
1555− * BPF_F_REPLACE flag is set in flags */
1556− __u32 old_prog_fd;
1583+ union {
1584+ /* expected link's program fd; is specified only if
1585+ * BPF_F_REPLACE flag is set in flags.
1586+ */
1587+ __u32 old_prog_fd;
1588+ /* expected link's map fd; is specified only
1589+ * if BPF_F_REPLACE flag is set.
1590+ */
1591+ __u32 old_map_fd;
1592+ };
15571593 } link_update;
15581594
15591595 struct {
@@ -1647,17 +1683,17 @@ union bpf_attr { · 87 unmodified lines
16471683 * Description
16481684 * This helper is a "printk()-like" facility for debugging. It
16491685 * prints a message defined by format *fmt* (of size *fmt_size*)
1650− * to file *\/sys/kernel/debug/tracing/trace* from DebugFS, if
1686+ * to file *\/sys/kernel/tracing/trace* from TraceFS, if
16511687 * available. It can take up to three additional **u64**
16521688 * arguments (as an eBPF helpers, the total number of arguments is
16531689 * limited to five).
16541690 *
16551691 * Each time the helper is called, it appends a line to the trace.
1656− * Lines are discarded while *\/sys/kernel/debug/tracing/trace* is
1657− * open, use *\/sys/kernel/debug/tracing/trace_pipe* to avoid this.
1692+ * Lines are discarded while *\/sys/kernel/tracing/trace* is
1693+ * open, use *\/sys/kernel/tracing/trace_pipe* to avoid this.
16581694 * The format of the trace is customizable, and the exact output
16591695 * one will get depends on the options set in
1660− * *\/sys/kernel/debug/tracing/trace_options* (see also the
1696+ * *\/sys/kernel/tracing/trace_options* (see also the
16611697 * *README* file under the same directory). However, it usually
16621698 * defaults to something like:
16631699 *
@@ -4969,6 +5005,12 @@ union bpf_attr { · 3305 unmodified lines
49695005 * different maps if key/value layout matches across maps.
49705006 * Every bpf_timer_set_callback() can have different callback_fn.
49715007 *
5008+ * *flags* can be one of:
5009+ *
5010+ * **BPF_F_TIMER_ABS**
5011+ * Start the timer in absolute expire value instead of the
5012+ * default relative one.
5013+ *
49725014 * Return
49735015 * 0 on success.
49745016 * **-EINVAL** if *timer* was not initialized with bpf_timer_init() earlier
@@ -5325,11 +5367,22 @@ union bpf_attr { · 350 unmodified lines
53255367 * Description
53265368 * Write *len* bytes from *src* into *dst*, starting from *offset*
53275369 * into *dst*.
5328− * *flags* is currently unused.
5370+ *
5371+ * *flags* must be 0 except for skb-type dynptrs.
5372+ *
5373+ * For skb-type dynptrs:
5374+ * * All data slices of the dynptr are automatically
5375+ * invalidated after **bpf_dynptr_write**\ (). This is
5376+ * because writing may pull the skb and change the
5377+ * underlying packet buffer.
5378+ *
5379+ * * For *flags*, please see the flags accepted by
5380+ * **bpf_skb_store_bytes**\ ().
53295381 * Return
53305382 * 0 on success, -E2BIG if *offset* + *len* exceeds the length
53315383 * of *dst*'s data, -EINVAL if *dst* is an invalid dynptr or if *dst*
5332− * is a read-only dynptr or if *flags* is not 0.
5384+ * is a read-only dynptr or if *flags* is not correct. For skb-type dynptrs,
5385+ * other errors correspond to errors returned by **bpf_skb_store_bytes**\ ().
53335386 *
53345387 * void *bpf_dynptr_data(const struct bpf_dynptr *ptr, u32 offset, u32 len)
53355388 * Description
@@ -5337,6 +5390,9 @@ union bpf_attr { · 1 unmodified line
53375390 *
53385391 * *len* must be a statically known value. The returned data slice
53395392 * is invalidated whenever the dynptr is invalidated.
5393+ *
5394+ * skb and xdp type dynptrs may not use bpf_dynptr_data. They should
5395+ * instead use bpf_dynptr_slice and bpf_dynptr_slice_rdwr.
53405396 * Return
53415397 * Pointer to the underlying dynptr data, NULL if the dynptr is
53425398 * read-only, if the dynptr is invalid, or if the offset and length
@@ -6359,6 +6415,15 @@ struct bpf_link_info { · 1016 unmodified lines
63596415 struct {
63606416 __u32 ifindex;
63616417 } xdp;
6418+ struct {
6419+ __u32 map_id;
6420+ } struct_ops;
6421+ struct {
6422+ __u32 pf;
6423+ __u32 hooknum;
6424+ __s32 priority;
6425+ __u32 flags;
6426+ } netfilter;
63626427 };
63636428 } __attribute__((aligned(8)));
63646429
@@ -6934,6 +6999,10 @@ struct bpf_rb_node { · 569 unmodified lines
69346999 __u64 :64;
69357000 } __attribute__((aligned(8)));
69367001
7002+struct bpf_refcount {
7003+ __u32 :32;
7004+} __attribute__((aligned(4)));
7005+
69377006 struct bpf_sysctl {
69387007 __u32 write; /* Sysctl is being read (= 0) or written (= 1).
69397008 * Allows 1,2,4-byte read, but no write.
@@ -7083,4 +7152,21 @@ struct bpf_core_relo { · 143 unmodified lines
70837152 enum bpf_core_relo_kind kind;
70847153 };
70857154
7155+/*
7156+ * Flags to control bpf_timer_start() behaviour.
7157+ * - BPF_F_TIMER_ABS: Timeout passed is absolute time, by default it is
7158+ * relative to current time.
7159+ */
7160+enum {
7161+ BPF_F_TIMER_ABS = (1ULL << 0),
7162+};
7163+
7164+/* BPF numbers iterator state */
7165+struct bpf_iter_num {
7166+ /* opaque iterator state; having __u64 here allows to preserve correct
7167+ * alignment requirements in vmlinux.h, generated from BTF
7168+ */
7169+ __u64 __opaque[1];
7170+} __attribute__((aligned(8)));
7171+
70867172 #endif /* _UAPI__LINUX_BPF_H__ */
tools/include/uapi/linux/if_link.h+1−0
@@ -605,6 +605,7 @@ enum { · 604 unmodified lines
605605 IFLA_MACVLAN_MACADDR_COUNT,
606606 IFLA_MACVLAN_BC_QUEUE_LEN,
607607 IFLA_MACVLAN_BC_QUEUE_LEN_USED,
608+ IFLA_MACVLAN_BC_CUTOFF,
608609 __IFLA_MACVLAN_MAX,
609610 };
610611