History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next

Pull networking updates from David Miller: 1) Allow setting bluetooth L2CAP modes via socket option, from Luiz Augusto von Dentz. 2) Add GSO partial support to igc, from Sasha Neftin. 3) Several cleanups and improvements to r8169 from Heiner Kallweit. 4) Add IF_OPER_TESTING link state and use it when ethtool triggers a device self-test. From Andrew Lunn. 5) Start moving away from custom driver versions, use the globally defined kernel version instead, from Leon Romanovsky. 6) Support GRO vis gro_cells in DSA layer, from Alexander Lobakin. 7) Allow hard IRQ deferral during NAPI, from Eric Dumazet. 8) Add sriov and vf support to hinic, from Luo bin. 9) Support Media Redundancy Protocol (MRP) in the bridging code, from Horatiu Vultur. 10) Support netmap in the nft_nat code, from Pablo Neira Ayuso. 11) Allow UDPv6 encapsulation of ESP in the ipsec code, from Sabrina Dubroca. Also add ipv6 support for espintcp. 12) Lots of ReST conversions of the networking documentation, from Mauro Carvalho Chehab. 13) Support configuration of ethtool rxnfc flows in bcmgenet driver, from Doug Berger. 14) Allow to dump cgroup id and filter by it in inet_diag code, from Dmitry Yakunin. 15) Add infrastructure to export netlink attribute policies to userspace, from Johannes Berg. 16) Several optimizations to sch_fq scheduler, from Eric Dumazet. 17) Fallback to the default qdisc if qdisc init fails because otherwise a packet scheduler init failure will make a device inoperative. From Jesper Dangaard Brouer. 18) Several RISCV bpf jit optimizations, from Luke Nelson. 19) Correct the return type of the ->ndo_start_xmit() method in several drivers, it's netdev_tx_t but many drivers were using 'int'. From Yunjian Wang. 20) Add an ethtool interface for PHY master/slave config, from Oleksij Rempel. 21) Add BPF iterators, from Yonghang Song. 22) Add cable test infrastructure, including ethool interfaces, from Andrew Lunn. Marvell PHY driver is the first to support this facility. 23) Remove zero-length arrays all over, from Gustavo A. R. Silva. 24) Calculate and maintain an explicit frame size in XDP, from Jesper Dangaard Brouer. 25) Add CAP_BPF, from Alexei Starovoitov. 26) Support terse dumps in the packet scheduler, from Vlad Buslov. 27) Support XDP_TX bulking in dpaa2 driver, from Ioana Ciornei. 28) Add devm_register_netdev(), from Bartosz Golaszewski. 29) Minimize qdisc resets, from Cong Wang. 30) Get rid of kernel_getsockopt and kernel_setsockopt in order to eliminate set_fs/get_fs calls. From Christoph Hellwig. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2517 commits) selftests: net: ip_defrag: ignore EPERM net_failover: fixed rollback in net_failover_open() Revert "tipc: Fix potential tipc_aead refcnt leak in tipc_crypto_rcv" Revert "tipc: Fix potential tipc_node refcnt leak in tipc_rcv" vmxnet3: allow rx flow hash ops only when rss is enabled hinic: add set_channels ethtool_ops support selftests/bpf: Add a default $(CXX) value tools/bpf: Don't use $(COMPILE.c) bpf, selftests: Use bpf_probe_read_kernel s390/bpf: Use bcr 0,%0 as tail call nop filler s390/bpf: Maintain 8-byte stack alignment selftests/bpf: Fix verifier test selftests/bpf: Fix sample_cnt shared between two threads bpf, selftests: Adapt cls_redirect to call csum_level helper bpf: Add csum_level helper for fixing up csum levels bpf: Fix up bpf_skb_adjust_room helper's skb csum setting sfc: add missing annotation for efx_ef10_try_update_nic_stats_vf() crypto/chtls: IPv6 support for inline TLS Crypto/chcr: Fixes a coccinile check error Crypto/chcr: Fixes compilations warnings ...

Linus Torvalds committed 6 years ago

Commit cb8e59c2 parents 2e63f6c 065fcfd2097 files · +151766 −46213Browse files

Showing the changes to include/uapi (29 of 2097 files). Show all

Unified · Split

29 files
  1. include/uapi/linux/bpf.h +343 −45
  2. include/uapi/linux/capability.h +33 −1
  3. include/uapi/linux/devlink.h +9 −0
  4. include/uapi/linux/errqueue.h +1 −1
  5. include/uapi/linux/ethtool.h +15 −1
  6. include/uapi/linux/ethtool_netlink.h +151 −0
  7. include/uapi/linux/genetlink.h +2 −0
  8. include/uapi/linux/if.h +1 −0
  9. include/uapi/linux/if_bridge.h +96 −0
  10. include/uapi/linux/if_ether.h +1 −0
  11. include/uapi/linux/if_link.h +1 −0
  12. include/uapi/linux/if_x25.h +1 −1
  13. include/uapi/linux/inet_diag.h +2 −0
  14. include/uapi/linux/mii.h +2 −0
  15. include/uapi/linux/mrp_bridge.h +122 −0
  16. include/uapi/linux/neighbour.h +1 −0
  17. include/uapi/linux/netfilter/nf_conntrack_common.h +6 −2
  18. include/uapi/linux/netfilter/nf_nat.h +3 −1
  19. include/uapi/linux/netfilter/nfnetlink_conntrack.h +9 −0
  20. include/uapi/linux/netlink.h +103 −0
  21. include/uapi/linux/nexthop.h +3 −0
  22. include/uapi/linux/nl80211.h +122 −25
  23. include/uapi/linux/pkt_cls.h +24 −0
  24. include/uapi/linux/pkt_sched.h +6 −0
  25. include/uapi/linux/psample.h +22 −0
  26. include/uapi/linux/ptp_clock.h +3 −1
  27. include/uapi/linux/rtnetlink.h +6 −0
  28. include/uapi/linux/tc_act/tc_gate.h +47 −0
  29. include/uapi/linux/wireless.h +5 −1
include/uapi/linux/bpf.h+343−45
@@ -113,6 +113,10 @@ enum bpf_cmd { · 112 unmodified lines
113113 BPF_MAP_DELETE_BATCH,
114114 BPF_LINK_CREATE,
115115 BPF_LINK_UPDATE,
116+ BPF_LINK_GET_FD_BY_ID,
117+ BPF_LINK_GET_NEXT_ID,
118+ BPF_ENABLE_STATS,
119+ BPF_ITER_CREATE,
116120 };
117121
118122 enum bpf_map_type {
@@ -143,6 +147,7 @@ enum bpf_map_type { · 24 unmodified lines
143147 BPF_MAP_TYPE_SK_STORAGE,
144148 BPF_MAP_TYPE_DEVMAP_HASH,
145149 BPF_MAP_TYPE_STRUCT_OPS,
150+ BPF_MAP_TYPE_RINGBUF,
146151 };
147152
148153 /* Note that tracing related programs such as
@@ -215,11 +220,28 @@ enum bpf_attach_type { · 66 unmodified lines
215220 BPF_TRACE_FEXIT,
216221 BPF_MODIFY_RETURN,
217222 BPF_LSM_MAC,
223+ BPF_TRACE_ITER,
224+ BPF_CGROUP_INET4_GETPEERNAME,
225+ BPF_CGROUP_INET6_GETPEERNAME,
226+ BPF_CGROUP_INET4_GETSOCKNAME,
227+ BPF_CGROUP_INET6_GETSOCKNAME,
228+ BPF_XDP_DEVMAP,
218229 __MAX_BPF_ATTACH_TYPE
219230 };
220231
221232 #define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE
222233
234+enum bpf_link_type {
235+ BPF_LINK_TYPE_UNSPEC = 0,
236+ BPF_LINK_TYPE_RAW_TRACEPOINT = 1,
237+ BPF_LINK_TYPE_TRACING = 2,
238+ BPF_LINK_TYPE_CGROUP = 3,
239+ BPF_LINK_TYPE_ITER = 4,
240+ BPF_LINK_TYPE_NETNS = 5,
241+
242+ MAX_BPF_LINK_TYPE,
243+};
244+
223245 /* cgroup-bpf attach flags used in BPF_PROG_ATTACH command
224246 *
225247 * NONE(default): No further bpf programs allowed in the subtree.
@@ -379,6 +401,12 @@ enum { · 153 unmodified lines
379401 */
380402 #define BPF_F_QUERY_EFFECTIVE (1U << 0)
381403
404+/* type for BPF_ENABLE_STATS */
405+enum bpf_stats_type {
406+ /* enabled run_time_ns and run_cnt */
407+ BPF_STATS_RUN_TIME = 0,
408+};
409+
382410 enum bpf_stack_build_id_status {
383411 /* user space need an empty entry to identify end of a trace */
384412 BPF_STACK_BUILD_ID_EMPTY = 0,
@@ -523,6 +551,7 @@ union bpf_attr { · 138 unmodified lines
523551 __u32 prog_id;
524552 __u32 map_id;
525553 __u32 btf_id;
554+ __u32 link_id;
526555 };
527556 __u32 next_id;
528557 __u32 open_flags;
@@ -589,6 +618,15 @@ union bpf_attr { · 60 unmodified lines
589618 __u32 old_prog_fd;
590619 } link_update;
591620
621+ struct { /* struct used by BPF_ENABLE_STATS command */
622+ __u32 type;
623+ } enable_stats;
624+
625+ struct { /* struct used by BPF_ITER_CREATE command */
626+ __u32 link_fd;
627+ __u32 flags;
628+ } iter_create;
629+
592630 } __attribute__((aligned(8)));
593631
594632 /* The description below is an attempt at providing documentation to eBPF
@@ -644,14 +682,16 @@ union bpf_attr { · 49 unmodified lines
644682 * For tracing programs, safely attempt to read *size* bytes from
645683 * kernel space address *unsafe_ptr* and store the data in *dst*.
646684 *
647− * Generally, use bpf_probe_read_user() or bpf_probe_read_kernel()
648− * instead.
685+ * Generally, use **bpf_probe_read_user**\ () or
686+ * **bpf_probe_read_kernel**\ () instead.
649687 * Return
650688 * 0 on success, or a negative error in case of failure.
651689 *
652690 * u64 bpf_ktime_get_ns(void)
653691 * Description
654692 * Return the time elapsed since system boot, in nanoseconds.
693+ * Does not include time the system was suspended.
694+ * See: **clock_gettime**\ (**CLOCK_MONOTONIC**)
655695 * Return
656696 * Current *ktime*.
657697 *
@@ -1510,11 +1550,11 @@ union bpf_attr { · 852 unmodified lines
15101550 * int bpf_probe_read_str(void *dst, u32 size, const void *unsafe_ptr)
15111551 * Description
15121552 * Copy a NUL terminated string from an unsafe kernel address
1513− * *unsafe_ptr* to *dst*. See bpf_probe_read_kernel_str() for
1553+ * *unsafe_ptr* to *dst*. See **bpf_probe_read_kernel_str**\ () for
15141554 * more details.
15151555 *
1516− * Generally, use bpf_probe_read_user_str() or bpf_probe_read_kernel_str()
1517− * instead.
1556+ * Generally, use **bpf_probe_read_user_str**\ () or
1557+ * **bpf_probe_read_kernel_str**\ () instead.
15181558 * Return
15191559 * On success, the strictly positive length of the string,
15201560 * including the trailing NUL character. On error, a negative
@@ -1542,7 +1582,7 @@ union bpf_attr { · 21 unmodified lines
15421582 *
15431583 * u64 bpf_get_socket_cookie(struct bpf_sock_ops *ctx)
15441584 * Description
1545− * Equivalent to bpf_get_socket_cookie() helper that accepts
1585+ * Equivalent to **bpf_get_socket_cookie**\ () helper that accepts
15461586 * *skb*, but gets socket from **struct bpf_sock_ops** context.
15471587 * Return
15481588 * A 8-byte long non-decreasing number.
@@ -1562,7 +1602,7 @@ union bpf_attr { · 13 unmodified lines
15621602 * Return
15631603 * 0
15641604 *
1565− * int bpf_setsockopt(struct bpf_sock_ops *bpf_socket, int level, int optname, void *optval, int optlen)
1605+ * int bpf_setsockopt(void *bpf_socket, int level, int optname, void *optval, int optlen)
15661606 * Description
15671607 * Emulate a call to **setsockopt()** on the socket associated to
15681608 * *bpf_socket*, which must be a full socket. The *level* at
@@ -1570,6 +1610,12 @@ union bpf_attr { · 1 unmodified line
15701610 * must be specified, see **setsockopt(2)** for more information.
15711611 * The option value of length *optlen* is pointed by *optval*.
15721612 *
1613+ * *bpf_socket* should be one of the following:
1614+ *
1615+ * * **struct bpf_sock_ops** for **BPF_PROG_TYPE_SOCK_OPS**.
1616+ * * **struct bpf_sock_addr** for **BPF_CGROUP_INET4_CONNECT**
1617+ * and **BPF_CGROUP_INET6_CONNECT**.
1618+ *
15731619 * This helper actually implements a subset of **setsockopt()**.
15741620 * It supports the following *level*\ s:
15751621 *
@@ -1589,6 +1635,13 @@ union bpf_attr { · 13 unmodified lines
15891635 * Grow or shrink the room for data in the packet associated to
15901636 * *skb* by *len_diff*, and according to the selected *mode*.
15911637 *
1638+ * By default, the helper will reset any offloaded checksum
1639+ * indicator of the skb to CHECKSUM_NONE. This can be avoided
1640+ * by the following flag:
1641+ *
1642+ * * **BPF_F_ADJ_ROOM_NO_CSUM_RESET**: Do not reset offloaded
1643+ * checksum data of the skb to CHECKSUM_NONE.
1644+ *
15921645 * There are two supported modes at this time:
15931646 *
15941647 * * **BPF_ADJ_ROOM_MAC**: Adjust room at the mac layer
@@ -1634,12 +1687,12 @@ union bpf_attr { · 39 unmodified lines
16341687 *
16351688 * The lower two bits of *flags* are used as the return code if
16361689 * the map lookup fails. This is so that the return value can be
1637− * one of the XDP program return codes up to XDP_TX, as chosen by
1638− * the caller. Any higher bits in the *flags* argument must be
1690+ * one of the XDP program return codes up to **XDP_TX**, as chosen
1691+ * by the caller. Any higher bits in the *flags* argument must be
16391692 * unset.
16401693 *
1641− * See also bpf_redirect(), which only supports redirecting to an
1642− * ifindex, but doesn't require a map to do so.
1694+ * See also **bpf_redirect**\ (), which only supports redirecting
1695+ * to an ifindex, but doesn't require a map to do so.
16431696 * Return
16441697 * **XDP_REDIRECT** on success, or the value of the two lower bits
16451698 * of the *flags* argument on error.
@@ -1747,7 +1800,7 @@ union bpf_attr { · 101 unmodified lines
17471800 * the time running for event since last normalization. The
17481801 * enabled and running times are accumulated since the perf event
17491802 * open. To achieve scaling factor between two invocations of an
1750− * eBPF program, users can can use CPU id as the key (which is
1803+ * eBPF program, users can use CPU id as the key (which is
17511804 * typical for perf array usage model) to remember the previous
17521805 * value and do the calculation inside the eBPF program.
17531806 * Return
@@ -1764,7 +1817,7 @@ union bpf_attr { · 10 unmodified lines
17641817 * Return
17651818 * 0 on success, or a negative error in case of failure.
17661819 *
1767− * int bpf_getsockopt(struct bpf_sock_ops *bpf_socket, int level, int optname, void *optval, int optlen)
1820+ * int bpf_getsockopt(void *bpf_socket, int level, int optname, void *optval, int optlen)
17681821 * Description
17691822 * Emulate a call to **getsockopt()** on the socket associated to
17701823 * *bpf_socket*, which must be a full socket. The *level* at
@@ -1773,6 +1826,12 @@ union bpf_attr { · 2 unmodified lines
17731826 * The retrieved value is stored in the structure pointed by
17741827 * *opval* and of length *optlen*.
17751828 *
1829+ * *bpf_socket* should be one of the following:
1830+ *
1831+ * * **struct bpf_sock_ops** for **BPF_PROG_TYPE_SOCK_OPS**.
1832+ * * **struct bpf_sock_addr** for **BPF_CGROUP_INET4_CONNECT**
1833+ * and **BPF_CGROUP_INET6_CONNECT**.
1834+ *
17761835 * This helper actually implements a subset of **getsockopt()**.
17771836 * It supports the following *level*\ s:
17781837 *
@@ -1790,7 +1849,7 @@ union bpf_attr { · 11 unmodified lines
17901849 * The first argument is the context *regs* on which the kprobe
17911850 * works.
17921851 *
1793− * This helper works by setting setting the PC (program counter)
1852+ * This helper works by setting the PC (program counter)
17941853 * to an override function which is run in place of the original
17951854 * probed function. This means the probed function is not run at
17961855 * all. The replacement function just returns with the required
@@ -1959,18 +2018,19 @@ union bpf_attr { · 162 unmodified lines
19592018 *
19602019 * This helper works for IPv4 and IPv6, TCP and UDP sockets. The
19612020 * domain (*addr*\ **->sa_family**) must be **AF_INET** (or
1962− * **AF_INET6**). Looking for a free port to bind to can be
1963− * expensive, therefore binding to port is not permitted by the
1964− * helper: *addr*\ **->sin_port** (or **sin6_port**, respectively)
1965− * must be set to zero.
2021+ * **AF_INET6**). It's advised to pass zero port (**sin_port**
2022+ * or **sin6_port**) which triggers IP_BIND_ADDRESS_NO_PORT-like
2023+ * behavior and lets the kernel efficiently pick up an unused
2024+ * port as long as 4-tuple is unique. Passing non-zero port might
2025+ * lead to degraded performance.
19662026 * Return
19672027 * 0 on success, or a negative error in case of failure.
19682028 *
19692029 * int bpf_xdp_adjust_tail(struct xdp_buff *xdp_md, int delta)
19702030 * Description
19712031 * Adjust (move) *xdp_md*\ **->data_end** by *delta* bytes. It is
1972− * only possible to shrink the packet as of this writing,
1973− * therefore *delta* must be a negative integer.
2032+ * possible to both shrink and grow the packet tail.
2033+ * Shrink done via *delta* being a negative integer.
19742034 *
19752035 * A call to this helper is susceptible to change the underlying
19762036 * packet buffer. Therefore, at load time, all checks on pointers
@@ -2256,7 +2316,7 @@ union bpf_attr { · 279 unmodified lines
22562316 * **bpf_rc_keydown**\ () again with the same values, or calling
22572317 * **bpf_rc_repeat**\ ().
22582318 *
2259− * Some protocols include a toggle bit, in case the button was
2319+ * Some protocols include a toggle bit, in case the button was
22602320 * released and pressed again between consecutive scancodes.
22612321 *
22622322 * The *ctx* should point to the lirc sample as passed into
@@ -2602,7 +2662,6 @@ union bpf_attr { · 339 unmodified lines
26022662 *
26032663 * *th* points to the start of the TCP header, while *th_len*
26042664 * contains **sizeof**\ (**struct tcphdr**).
2605− *
26062665 * Return
26072666 * 0 if *iph* and *th* are a valid SYN cookie ACK, or a negative
26082667 * error otherwise.
@@ -2785,7 +2844,6 @@ union bpf_attr { · 176 unmodified lines
27852844 *
27862845 * *th* points to the start of the TCP header, while *th_len*
27872846 * contains the length of the TCP header.
2788− *
27892847 * Return
27902848 * On success, lower 32 bits hold the generated SYN cookie in
27912849 * followed by 16 bits which hold the MSS value for that cookie,
@@ -2868,7 +2926,7 @@ union bpf_attr { · 76 unmodified lines
28682926 * // size, after checking its boundaries.
28692927 * }
28702928 *
2871− * In comparison, using **bpf_probe_read_user()** helper here
2929+ * In comparison, using **bpf_probe_read_user**\ () helper here
28722930 * instead to read the string would require to estimate the length
28732931 * at compile time, and would often result in copying more memory
28742932 * than necessary.
@@ -2886,14 +2944,14 @@ union bpf_attr { · 11 unmodified lines
28862944 * int bpf_probe_read_kernel_str(void *dst, u32 size, const void *unsafe_ptr)
28872945 * Description
28882946 * Copy a NUL terminated string from an unsafe kernel address *unsafe_ptr*
2889− * to *dst*. Same semantics as with bpf_probe_read_user_str() apply.
2947+ * to *dst*. Same semantics as with **bpf_probe_read_user_str**\ () apply.
28902948 * Return
2891− * On success, the strictly positive length of the string, including
2949+ * On success, the strictly positive length of the string, including
28922950 * the trailing NUL character. On error, a negative value.
28932951 *
28942952 * int bpf_tcp_send_ack(void *tp, u32 rcv_nxt)
28952953 * Description
2896− * Send out a tcp-ack. *tp* is the in-kernel struct tcp_sock.
2954+ * Send out a tcp-ack. *tp* is the in-kernel struct **tcp_sock**.
28972955 * *rcv_nxt* is the ack_seq to be sent out.
28982956 * Return
28992957 * 0 on success, or a negative error in case of failure.
@@ -2921,19 +2979,19 @@ union bpf_attr { · 21 unmodified lines
29212979 * int bpf_read_branch_records(struct bpf_perf_event_data *ctx, void *buf, u32 size, u64 flags)
29222980 * Description
29232981 * For an eBPF program attached to a perf event, retrieve the
2924− * branch records (struct perf_branch_entry) associated to *ctx*
2925− * and store it in the buffer pointed by *buf* up to size
2982+ * branch records (**struct perf_branch_entry**) associated to *ctx*
2983+ * and store it in the buffer pointed by *buf* up to size
29262984 * *size* bytes.
29272985 * Return
29282986 * On success, number of bytes written to *buf*. On error, a
29292987 * negative value.
29302988 *
29312989 * The *flags* can be set to **BPF_F_GET_BRANCH_RECORDS_SIZE** to
2932− * instead return the number of bytes required to store all the
2990+ * instead return the number of bytes required to store all the
29332991 * branch entries. If this flag is set, *buf* may be NULL.
29342992 *
29352993 * **-EINVAL** if arguments invalid or **size** not a multiple
2936− * of sizeof(struct perf_branch_entry).
2994+ * of **sizeof**\ (**struct perf_branch_entry**\ ).
29372995 *
29382996 * **-ENOENT** if architecture does not support branch records.
29392997 *
@@ -2941,8 +2999,8 @@ union bpf_attr { · 1 unmodified line
29412999 * Description
29423000 * Returns 0 on success, values for *pid* and *tgid* as seen from the current
29433001 * *namespace* will be returned in *nsdata*.
2944− *
2945− * On failure, the returned value is one of the following:
3002+ * Return
3003+ * 0 on success, or one of the following in case of failure:
29463004 *
29473005 * **-EINVAL** if dev and inum supplied don't match dev_t and inode number
29483006 * with nsfs of current task, or if dev conversion to dev_t lost high bits.
@@ -2981,8 +3039,8 @@ union bpf_attr { · 32 unmodified lines
29813039 * a global identifier that can be assumed unique. If *ctx* is
29823040 * NULL, then the helper returns the cookie for the initial
29833041 * network namespace. The cookie itself is very similar to that
2984− * of bpf_get_socket_cookie() helper, but for network namespaces
2985− * instead of sockets.
3042+ * of **bpf_get_socket_cookie**\ () helper, but for network
3043+ * namespaces instead of sockets.
29863044 * Return
29873045 * A 8-byte long opaque number.
29883046 *
@@ -3017,14 +3075,183 @@ union bpf_attr { · 28 unmodified lines
30173075 *
30183076 * The *flags* argument must be zero.
30193077 * Return
3020− * 0 on success, or a negative errno in case of failure.
3021− *
3022− * * **-EINVAL** Unsupported flags specified.
3023− * * **-ENOENT** Socket is unavailable for assignment.
3024− * * **-ENETUNREACH** Socket is unreachable (wrong netns).
3025− * * **-EOPNOTSUPP** Unsupported operation, for example a
3026− * call from outside of TC ingress.
3027− * * **-ESOCKTNOSUPPORT** Socket type not supported (reuseport).
3078+ * 0 on success, or a negative error in case of failure:
3079+ *
3080+ * **-EINVAL** if specified *flags* are not supported.
3081+ *
3082+ * **-ENOENT** if the socket is unavailable for assignment.
3083+ *
3084+ * **-ENETUNREACH** if the socket is unreachable (wrong netns).
3085+ *
3086+ * **-EOPNOTSUPP** if the operation is not supported, for example
3087+ * a call from outside of TC ingress.
3088+ *
3089+ * **-ESOCKTNOSUPPORT** if the socket type is not supported
3090+ * (reuseport).
3091+ *
3092+ * u64 bpf_ktime_get_boot_ns(void)
3093+ * Description
3094+ * Return the time elapsed since system boot, in nanoseconds.
3095+ * Does include the time the system was suspended.
3096+ * See: **clock_gettime**\ (**CLOCK_BOOTTIME**)
3097+ * Return
3098+ * Current *ktime*.
3099+ *
3100+ * int bpf_seq_printf(struct seq_file *m, const char *fmt, u32 fmt_size, const void *data, u32 data_len)
3101+ * Description
3102+ * **bpf_seq_printf**\ () uses seq_file **seq_printf**\ () to print
3103+ * out the format string.
3104+ * The *m* represents the seq_file. The *fmt* and *fmt_size* are for
3105+ * the format string itself. The *data* and *data_len* are format string
3106+ * arguments. The *data* are a **u64** array and corresponding format string
3107+ * values are stored in the array. For strings and pointers where pointees
3108+ * are accessed, only the pointer values are stored in the *data* array.
3109+ * The *data_len* is the size of *data* in bytes.
3110+ *
3111+ * Formats **%s**, **%p{i,I}{4,6}** requires to read kernel memory.
3112+ * Reading kernel memory may fail due to either invalid address or
3113+ * valid address but requiring a major memory fault. If reading kernel memory
3114+ * fails, the string for **%s** will be an empty string, and the ip
3115+ * address for **%p{i,I}{4,6}** will be 0. Not returning error to
3116+ * bpf program is consistent with what **bpf_trace_printk**\ () does for now.
3117+ * Return
3118+ * 0 on success, or a negative error in case of failure:
3119+ *
3120+ * **-EBUSY** if per-CPU memory copy buffer is busy, can try again
3121+ * by returning 1 from bpf program.
3122+ *
3123+ * **-EINVAL** if arguments are invalid, or if *fmt* is invalid/unsupported.
3124+ *
3125+ * **-E2BIG** if *fmt* contains too many format specifiers.
3126+ *
3127+ * **-EOVERFLOW** if an overflow happened: The same object will be tried again.
3128+ *
3129+ * int bpf_seq_write(struct seq_file *m, const void *data, u32 len)
3130+ * Description
3131+ * **bpf_seq_write**\ () uses seq_file **seq_write**\ () to write the data.
3132+ * The *m* represents the seq_file. The *data* and *len* represent the
3133+ * data to write in bytes.
3134+ * Return
3135+ * 0 on success, or a negative error in case of failure:
3136+ *
3137+ * **-EOVERFLOW** if an overflow happened: The same object will be tried again.
3138+ *
3139+ * u64 bpf_sk_cgroup_id(struct bpf_sock *sk)
3140+ * Description
3141+ * Return the cgroup v2 id of the socket *sk*.
3142+ *
3143+ * *sk* must be a non-**NULL** pointer to a full socket, e.g. one
3144+ * returned from **bpf_sk_lookup_xxx**\ (),
3145+ * **bpf_sk_fullsock**\ (), etc. The format of returned id is
3146+ * same as in **bpf_skb_cgroup_id**\ ().
3147+ *
3148+ * This helper is available only if the kernel was compiled with
3149+ * the **CONFIG_SOCK_CGROUP_DATA** configuration option.
3150+ * Return
3151+ * The id is returned or 0 in case the id could not be retrieved.
3152+ *
3153+ * u64 bpf_sk_ancestor_cgroup_id(struct bpf_sock *sk, int ancestor_level)
3154+ * Description
3155+ * Return id of cgroup v2 that is ancestor of cgroup associated
3156+ * with the *sk* at the *ancestor_level*. The root cgroup is at
3157+ * *ancestor_level* zero and each step down the hierarchy
3158+ * increments the level. If *ancestor_level* == level of cgroup
3159+ * associated with *sk*, then return value will be same as that
3160+ * of **bpf_sk_cgroup_id**\ ().
3161+ *
3162+ * The helper is useful to implement policies based on cgroups
3163+ * that are upper in hierarchy than immediate cgroup associated
3164+ * with *sk*.
3165+ *
3166+ * The format of returned id and helper limitations are same as in
3167+ * **bpf_sk_cgroup_id**\ ().
3168+ * Return
3169+ * The id is returned or 0 in case the id could not be retrieved.
3170+ *
3171+ * void *bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
3172+ * Description
3173+ * Copy *size* bytes from *data* into a ring buffer *ringbuf*.
3174+ * If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of
3175+ * new data availability is sent.
3176+ * IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of
3177+ * new data availability is sent unconditionally.
3178+ * Return
3179+ * 0, on success;
3180+ * < 0, on error.
3181+ *
3182+ * void *bpf_ringbuf_reserve(void *ringbuf, u64 size, u64 flags)
3183+ * Description
3184+ * Reserve *size* bytes of payload in a ring buffer *ringbuf*.
3185+ * Return
3186+ * Valid pointer with *size* bytes of memory available; NULL,
3187+ * otherwise.
3188+ *
3189+ * void bpf_ringbuf_submit(void *data, u64 flags)
3190+ * Description
3191+ * Submit reserved ring buffer sample, pointed to by *data*.
3192+ * If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of
3193+ * new data availability is sent.
3194+ * IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of
3195+ * new data availability is sent unconditionally.
3196+ * Return
3197+ * Nothing. Always succeeds.
3198+ *
3199+ * void bpf_ringbuf_discard(void *data, u64 flags)
3200+ * Description
3201+ * Discard reserved ring buffer sample, pointed to by *data*.
3202+ * If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of
3203+ * new data availability is sent.
3204+ * IF BPF_RB_FORCE_WAKEUP is specified in *flags*, notification of
3205+ * new data availability is sent unconditionally.
3206+ * Return
3207+ * Nothing. Always succeeds.
3208+ *
3209+ * u64 bpf_ringbuf_query(void *ringbuf, u64 flags)
3210+ * Description
3211+ * Query various characteristics of provided ring buffer. What
3212+ * exactly is queries is determined by *flags*:
3213+ * - BPF_RB_AVAIL_DATA - amount of data not yet consumed;
3214+ * - BPF_RB_RING_SIZE - the size of ring buffer;
3215+ * - BPF_RB_CONS_POS - consumer position (can wrap around);
3216+ * - BPF_RB_PROD_POS - producer(s) position (can wrap around);
3217+ * Data returned is just a momentary snapshots of actual values
3218+ * and could be inaccurate, so this facility should be used to
3219+ * power heuristics and for reporting, not to make 100% correct
3220+ * calculation.
3221+ * Return
3222+ * Requested value, or 0, if flags are not recognized.
3223+ *
3224+ * int bpf_csum_level(struct sk_buff *skb, u64 level)
3225+ * Description
3226+ * Change the skbs checksum level by one layer up or down, or
3227+ * reset it entirely to none in order to have the stack perform
3228+ * checksum validation. The level is applicable to the following
3229+ * protocols: TCP, UDP, GRE, SCTP, FCOE. For example, a decap of
3230+ * | ETH | IP | UDP | GUE | IP | TCP | into | ETH | IP | TCP |
3231+ * through **bpf_skb_adjust_room**\ () helper with passing in
3232+ * **BPF_F_ADJ_ROOM_NO_CSUM_RESET** flag would require one call
3233+ * to **bpf_csum_level**\ () with **BPF_CSUM_LEVEL_DEC** since
3234+ * the UDP header is removed. Similarly, an encap of the latter
3235+ * into the former could be accompanied by a helper call to
3236+ * **bpf_csum_level**\ () with **BPF_CSUM_LEVEL_INC** if the
3237+ * skb is still intended to be processed in higher layers of the
3238+ * stack instead of just egressing at tc.
3239+ *
3240+ * There are three supported level settings at this time:
3241+ *
3242+ * * **BPF_CSUM_LEVEL_INC**: Increases skb->csum_level for skbs
3243+ * with CHECKSUM_UNNECESSARY.
3244+ * * **BPF_CSUM_LEVEL_DEC**: Decreases skb->csum_level for skbs
3245+ * with CHECKSUM_UNNECESSARY.
3246+ * * **BPF_CSUM_LEVEL_RESET**: Resets skb->csum_level to 0 and
3247+ * sets CHECKSUM_NONE to force checksum validation by the stack.
3248+ * * **BPF_CSUM_LEVEL_QUERY**: No-op, returns the current
3249+ * skb->csum_level.
3250+ * Return
3251+ * 0 on success, or a negative error in case of failure. In the
3252+ * case of **BPF_CSUM_LEVEL_QUERY**, the current skb->csum_level
3253+ * is returned or the error code -EACCES in case the skb is not
3254+ * subject to CHECKSUM_UNNECESSARY.
30283255 */
30293256 #define __BPF_FUNC_MAPPER(FN) \
30303257 FN(unspec), \
@@ -3151,7 +3378,18 @@ union bpf_attr { · 120 unmodified lines
31513378 FN(xdp_output), \
31523379 FN(get_netns_cookie), \
31533380 FN(get_current_ancestor_cgroup_id), \
3154− FN(sk_assign),
3381+ FN(sk_assign), \
3382+ FN(ktime_get_boot_ns), \
3383+ FN(seq_printf), \
3384+ FN(seq_write), \
3385+ FN(sk_cgroup_id), \
3386+ FN(sk_ancestor_cgroup_id), \
3387+ FN(ringbuf_output), \
3388+ FN(ringbuf_reserve), \
3389+ FN(ringbuf_submit), \
3390+ FN(ringbuf_discard), \
3391+ FN(ringbuf_query), \
3392+ FN(csum_level),
31553393
31563394 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
31573395 * function eBPF program intends to call
@@ -3228,6 +3466,14 @@ enum { · 70 unmodified lines
32283466 BPF_F_CURRENT_NETNS = (-1L),
32293467 };
32303468
3469+/* BPF_FUNC_csum_level level values. */
3470+enum {
3471+ BPF_CSUM_LEVEL_QUERY,
3472+ BPF_CSUM_LEVEL_INC,
3473+ BPF_CSUM_LEVEL_DEC,
3474+ BPF_CSUM_LEVEL_RESET,
3475+};
3476+
32313477 /* BPF_FUNC_skb_adjust_room flags. */
32323478 enum {
32333479 BPF_F_ADJ_ROOM_FIXED_GSO = (1ULL << 0),
@@ -3235,6 +3481,7 @@ enum { · 1 unmodified line
32353481 BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = (1ULL << 2),
32363482 BPF_F_ADJ_ROOM_ENCAP_L4_GRE = (1ULL << 3),
32373483 BPF_F_ADJ_ROOM_ENCAP_L4_UDP = (1ULL << 4),
3484+ BPF_F_ADJ_ROOM_NO_CSUM_RESET = (1ULL << 5),
32383485 };
32393486
32403487 enum {
@@ -3261,6 +3508,29 @@ enum { · 20 unmodified lines
32613508 BPF_F_GET_BRANCH_RECORDS_SIZE = (1ULL << 0),
32623509 };
32633510
3511+/* BPF_FUNC_bpf_ringbuf_commit, BPF_FUNC_bpf_ringbuf_discard, and
3512+ * BPF_FUNC_bpf_ringbuf_output flags.
3513+ */
3514+enum {
3515+ BPF_RB_NO_WAKEUP = (1ULL << 0),
3516+ BPF_RB_FORCE_WAKEUP = (1ULL << 1),
3517+};
3518+
3519+/* BPF_FUNC_bpf_ringbuf_query flags */
3520+enum {
3521+ BPF_RB_AVAIL_DATA = 0,
3522+ BPF_RB_RING_SIZE = 1,
3523+ BPF_RB_CONS_POS = 2,
3524+ BPF_RB_PROD_POS = 3,
3525+};
3526+
3527+/* BPF ring buffer constants */
3528+enum {
3529+ BPF_RINGBUF_BUSY_BIT = (1U << 31),
3530+ BPF_RINGBUF_DISCARD_BIT = (1U << 30),
3531+ BPF_RINGBUF_HDR_SZ = 8,
3532+};
3533+
32643534 /* Mode for BPF_FUNC_skb_adjust_room helper. */
32653535 enum bpf_adj_room_mode {
32663536 BPF_ADJ_ROOM_NET,
@@ -3393,6 +3663,7 @@ struct bpf_sock { · 126 unmodified lines
33933663 __u32 dst_ip4;
33943664 __u32 dst_ip6[4];
33953665 __u32 state;
3666+ __s32 rx_queue_mapping;
33963667 };
33973668
33983669 struct bpf_tcp_sock {
@@ -3486,6 +3757,8 @@ struct xdp_md { · 87 unmodified lines
34863757 /* Below access go through struct xdp_rxq_info */
34873758 __u32 ingress_ifindex; /* rxq->dev->ifindex */
34883759 __u32 rx_queue_index; /* rxq->queue_index */
3760+
3761+ __u32 egress_ifindex; /* txq->dev->ifindex */
34893762 };
34903763
34913764 enum sk_action {
@@ -3508,6 +3781,8 @@ struct sk_msg_md { · 16 unmodified lines
35083781 __u32 remote_port; /* Stored in network byte order */
35093782 __u32 local_port; /* stored in host byte order */
35103783 __u32 size; /* Total size of sk_msg */
3784+
3785+ __bpf_md_ptr(struct bpf_sock *, sk); /* current socket */
35113786 };
35123787
35133788 struct sk_reuseport_md {
@@ -3598,6 +3873,29 @@ struct bpf_btf_info { · 84 unmodified lines
35983873 __u32 id;
35993874 } __attribute__((aligned(8)));
36003875
3876+struct bpf_link_info {
3877+ __u32 type;
3878+ __u32 id;
3879+ __u32 prog_id;
3880+ union {
3881+ struct {
3882+ __aligned_u64 tp_name; /* in/out: tp_name buffer ptr */
3883+ __u32 tp_name_len; /* in/out: tp_name buffer len */
3884+ } raw_tracepoint;
3885+ struct {
3886+ __u32 attach_type;
3887+ } tracing;
3888+ struct {
3889+ __u64 cgroup_id;
3890+ __u32 attach_type;
3891+ } cgroup;
3892+ struct {
3893+ __u32 netns_ino;
3894+ __u32 attach_type;
3895+ } netns;
3896+ };
3897+} __attribute__((aligned(8)));
3898+
36013899 /* User bpf_sock_addr struct to access socket fields and sockaddr struct passed
36023900 * by user and intended to be used by socket (e.g. to bind to, depends on
36033901 * attach attach type).
@@ -3610,7 +3908,7 @@ struct bpf_sock_addr { · 6 unmodified lines
36103908 __u32 user_ip6[4]; /* Allows 1,2,4,8-byte read and 4,8-byte write.
36113909 * Stored in network byte order.
36123910 */
3613− __u32 user_port; /* Allows 4-byte read and write.
3911+ __u32 user_port; /* Allows 1,2,4-byte read and 4-byte write.
36143912 * Stored in network byte order
36153913 */
36163914 __u32 family; /* Allows 4-byte read, but no write */
include/uapi/linux/capability.h+33−1
@@ -274,6 +274,7 @@ struct vfs_ns_cap_data { · 273 unmodified lines
274274 arbitrary SCSI commands */
275275 /* Allow setting encryption key on loopback filesystem */
276276 /* Allow setting zone reclaim policy */
277+/* Allow everything under CAP_BPF and CAP_PERFMON for backward compatibility */
277278
278279 #define CAP_SYS_ADMIN 21
279280
@@ -376,7 +377,38 @@ struct vfs_ns_cap_data { · 96 unmodified lines
376377
377378 #define CAP_PERFMON 38
378379
379−#define CAP_LAST_CAP CAP_PERFMON
380+/*
381+ * CAP_BPF allows the following BPF operations:
382+ * - Creating all types of BPF maps
383+ * - Advanced verifier features
384+ * - Indirect variable access
385+ * - Bounded loops
386+ * - BPF to BPF function calls
387+ * - Scalar precision tracking
388+ * - Larger complexity limits
389+ * - Dead code elimination
390+ * - And potentially other features
391+ * - Loading BPF Type Format (BTF) data
392+ * - Retrieve xlated and JITed code of BPF programs
393+ * - Use bpf_spin_lock() helper
394+ *
395+ * CAP_PERFMON relaxes the verifier checks further:
396+ * - BPF progs can use of pointer-to-integer conversions
397+ * - speculation attack hardening measures are bypassed
398+ * - bpf_probe_read to read arbitrary kernel memory is allowed
399+ * - bpf_trace_printk to print kernel memory is allowed
400+ *
401+ * CAP_SYS_ADMIN is required to use bpf_probe_write_user.
402+ *
403+ * CAP_SYS_ADMIN is required to iterate system wide loaded
404+ * programs, maps, links, BTFs and convert their IDs to file descriptors.
405+ *
406+ * CAP_PERFMON and CAP_BPF are required to load tracing programs.
407+ * CAP_NET_ADMIN and CAP_BPF are required to load networking programs.
408+ */
409+#define CAP_BPF 39
410+
411+#define CAP_LAST_CAP CAP_BPF
380412
381413 #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
382414
include/uapi/linux/devlink.h+9−0
@@ -233,10 +233,13 @@ enum { · 232 unmodified lines
233233 * @DEVLINK_TRAP_ACTION_DROP: Packet is dropped by the device and a copy is not
234234 * sent to the CPU.
235235 * @DEVLINK_TRAP_ACTION_TRAP: The sole copy of the packet is sent to the CPU.
236+ * @DEVLINK_TRAP_ACTION_MIRROR: Packet is forwarded by the device and a copy is
237+ * sent to the CPU.
236238 */
237239 enum devlink_trap_action {
238240 DEVLINK_TRAP_ACTION_DROP,
239241 DEVLINK_TRAP_ACTION_TRAP,
242+ DEVLINK_TRAP_ACTION_MIRROR,
240243 };
241244
242245 /**
@@ -250,10 +253,16 @@ enum devlink_trap_action { · 7 unmodified lines
250253 * control plane for resolution. Trapped packets
251254 * are processed by devlink and injected to
252255 * the kernel's Rx path.
256+ * @DEVLINK_TRAP_TYPE_CONTROL: Packet was trapped because it is required for
257+ * the correct functioning of the control plane.
258+ * For example, an ARP request packet. Trapped
259+ * packets are injected to the kernel's Rx path,
260+ * but not reported to drop monitor.
253261 */
254262 enum devlink_trap_type {
255263 DEVLINK_TRAP_TYPE_DROP,
256264 DEVLINK_TRAP_TYPE_EXCEPTION,
265+ DEVLINK_TRAP_TYPE_CONTROL,
257266 };
258267
259268 enum {
include/uapi/linux/errqueue.h+1−1
@@ -36,7 +36,7 @@ struct sock_extended_err { · 35 unmodified lines
3636 *
3737 * The timestamping interfaces SO_TIMESTAMPING, MSG_TSTAMP_*
3838 * communicate network timestamps by passing this struct in a cmsg with
39− * recvmsg(). See Documentation/networking/timestamping.txt for details.
39+ * recvmsg(). See Documentation/networking/timestamping.rst for details.
4040 * User space sees a timespec definition that matches either
4141 * __kernel_timespec or __kernel_old_timespec, in the kernel we
4242 * require two structure definitions to provide both.
include/uapi/linux/ethtool.h+15−1
@@ -1666,6 +1666,18 @@ static inline int ethtool_validate_duplex(__u8 duplex) · 1665 unmodified lines
16661666 return 0;
16671667 }
16681668
1669+#define MASTER_SLAVE_CFG_UNSUPPORTED 0
1670+#define MASTER_SLAVE_CFG_UNKNOWN 1
1671+#define MASTER_SLAVE_CFG_MASTER_PREFERRED 2
1672+#define MASTER_SLAVE_CFG_SLAVE_PREFERRED 3
1673+#define MASTER_SLAVE_CFG_MASTER_FORCE 4
1674+#define MASTER_SLAVE_CFG_SLAVE_FORCE 5
1675+#define MASTER_SLAVE_STATE_UNSUPPORTED 0
1676+#define MASTER_SLAVE_STATE_UNKNOWN 1
1677+#define MASTER_SLAVE_STATE_MASTER 2
1678+#define MASTER_SLAVE_STATE_SLAVE 3
1679+#define MASTER_SLAVE_STATE_ERR 4
1680+
16691681 /* Which connector port. */
16701682 #define PORT_TP 0x00
16711683 #define PORT_AUI 0x01
@@ -1904,7 +1916,9 @@ struct ethtool_link_settings { · 232 unmodified lines
19041916 __u8 eth_tp_mdix_ctrl;
19051917 __s8 link_mode_masks_nwords;
19061918 __u8 transceiver;
1907− __u8 reserved1[3];
1919+ __u8 master_slave_cfg;
1920+ __u8 master_slave_state;
1921+ __u8 reserved1[1];
19081922 __u32 reserved[7];
19091923 __u32 link_mode_masks[0];
19101924 /* layout of link_mode_masks fields:
include/uapi/linux/ethtool_netlink.h+151−0
@@ -39,6 +39,8 @@ enum { · 38 unmodified lines
3939 ETHTOOL_MSG_EEE_GET,
4040 ETHTOOL_MSG_EEE_SET,
4141 ETHTOOL_MSG_TSINFO_GET,
42+ ETHTOOL_MSG_CABLE_TEST_ACT,
43+ ETHTOOL_MSG_CABLE_TEST_TDR_ACT,
4244
4345 /* add new constants above here */
4446 __ETHTOOL_MSG_USER_CNT,
@@ -74,6 +76,8 @@ enum { · 29 unmodified lines
7476 ETHTOOL_MSG_EEE_GET_REPLY,
7577 ETHTOOL_MSG_EEE_NTF,
7678 ETHTOOL_MSG_TSINFO_GET_REPLY,
79+ ETHTOOL_MSG_CABLE_TEST_NTF,
80+ ETHTOOL_MSG_CABLE_TEST_TDR_NTF,
7781
7882 /* add new constants above here */
7983 __ETHTOOL_MSG_KERNEL_CNT,
@@ -216,6 +220,8 @@ enum { · 136 unmodified lines
216220 ETHTOOL_A_LINKMODES_PEER, /* bitset */
217221 ETHTOOL_A_LINKMODES_SPEED, /* u32 */
218222 ETHTOOL_A_LINKMODES_DUPLEX, /* u8 */
223+ ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG, /* u8 */
224+ ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE, /* u8 */
219225
220226 /* add new constants above here */
221227 __ETHTOOL_A_LINKMODES_CNT,
@@ -228,6 +234,8 @@ enum { · 6 unmodified lines
228234 ETHTOOL_A_LINKSTATE_UNSPEC,
229235 ETHTOOL_A_LINKSTATE_HEADER, /* nest - _A_HEADER_* */
230236 ETHTOOL_A_LINKSTATE_LINK, /* u8 */
237+ ETHTOOL_A_LINKSTATE_SQI, /* u32 */
238+ ETHTOOL_A_LINKSTATE_SQI_MAX, /* u32 */
231239
232240 /* add new constants above here */
233241 __ETHTOOL_A_LINKSTATE_CNT,
@@ -403,6 +411,149 @@ enum { · 169 unmodified lines
403411 ETHTOOL_A_TSINFO_MAX = (__ETHTOOL_A_TSINFO_CNT - 1)
404412 };
405413
414+/* CABLE TEST */
415+
416+enum {
417+ ETHTOOL_A_CABLE_TEST_UNSPEC,
418+ ETHTOOL_A_CABLE_TEST_HEADER, /* nest - _A_HEADER_* */
419+
420+ /* add new constants above here */
421+ __ETHTOOL_A_CABLE_TEST_CNT,
422+ ETHTOOL_A_CABLE_TEST_MAX = __ETHTOOL_A_CABLE_TEST_CNT - 1
423+};
424+
425+/* CABLE TEST NOTIFY */
426+enum {
427+ ETHTOOL_A_CABLE_RESULT_CODE_UNSPEC,
428+ ETHTOOL_A_CABLE_RESULT_CODE_OK,
429+ ETHTOOL_A_CABLE_RESULT_CODE_OPEN,
430+ ETHTOOL_A_CABLE_RESULT_CODE_SAME_SHORT,
431+ ETHTOOL_A_CABLE_RESULT_CODE_CROSS_SHORT,
432+};
433+
434+enum {
435+ ETHTOOL_A_CABLE_PAIR_A,
436+ ETHTOOL_A_CABLE_PAIR_B,
437+ ETHTOOL_A_CABLE_PAIR_C,
438+ ETHTOOL_A_CABLE_PAIR_D,
439+};
440+
441+enum {
442+ ETHTOOL_A_CABLE_RESULT_UNSPEC,
443+ ETHTOOL_A_CABLE_RESULT_PAIR, /* u8 ETHTOOL_A_CABLE_PAIR_ */
444+ ETHTOOL_A_CABLE_RESULT_CODE, /* u8 ETHTOOL_A_CABLE_RESULT_CODE_ */
445+
446+ __ETHTOOL_A_CABLE_RESULT_CNT,
447+ ETHTOOL_A_CABLE_RESULT_MAX = (__ETHTOOL_A_CABLE_RESULT_CNT - 1)
448+};
449+
450+enum {
451+ ETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC,
452+ ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR, /* u8 ETHTOOL_A_CABLE_PAIR_ */
453+ ETHTOOL_A_CABLE_FAULT_LENGTH_CM, /* u32 */
454+
455+ __ETHTOOL_A_CABLE_FAULT_LENGTH_CNT,
456+ ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = (__ETHTOOL_A_CABLE_FAULT_LENGTH_CNT - 1)
457+};
458+
459+enum {
460+ ETHTOOL_A_CABLE_TEST_NTF_STATUS_UNSPEC,
461+ ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED,
462+ ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED
463+};
464+
465+enum {
466+ ETHTOOL_A_CABLE_NEST_UNSPEC,
467+ ETHTOOL_A_CABLE_NEST_RESULT, /* nest - ETHTOOL_A_CABLE_RESULT_ */
468+ ETHTOOL_A_CABLE_NEST_FAULT_LENGTH, /* nest - ETHTOOL_A_CABLE_FAULT_LENGTH_ */
469+ __ETHTOOL_A_CABLE_NEST_CNT,
470+ ETHTOOL_A_CABLE_NEST_MAX = (__ETHTOOL_A_CABLE_NEST_CNT - 1)
471+};
472+
473+enum {
474+ ETHTOOL_A_CABLE_TEST_NTF_UNSPEC,
475+ ETHTOOL_A_CABLE_TEST_NTF_HEADER, /* nest - ETHTOOL_A_HEADER_* */
476+ ETHTOOL_A_CABLE_TEST_NTF_STATUS, /* u8 - _STARTED/_COMPLETE */
477+ ETHTOOL_A_CABLE_TEST_NTF_NEST, /* nest - of results: */
478+
479+ __ETHTOOL_A_CABLE_TEST_NTF_CNT,
480+ ETHTOOL_A_CABLE_TEST_NTF_MAX = (__ETHTOOL_A_CABLE_TEST_NTF_CNT - 1)
481+};
482+
483+/* CABLE TEST TDR */
484+
485+enum {
486+ ETHTOOL_A_CABLE_TEST_TDR_CFG_UNSPEC,
487+ ETHTOOL_A_CABLE_TEST_TDR_CFG_FIRST, /* u32 */
488+ ETHTOOL_A_CABLE_TEST_TDR_CFG_LAST, /* u32 */
489+ ETHTOOL_A_CABLE_TEST_TDR_CFG_STEP, /* u32 */
490+ ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR, /* u8 */
491+
492+ /* add new constants above here */
493+ __ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT,
494+ ETHTOOL_A_CABLE_TEST_TDR_CFG_MAX = __ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT - 1
495+};
496+
497+enum {
498+ ETHTOOL_A_CABLE_TEST_TDR_UNSPEC,
499+ ETHTOOL_A_CABLE_TEST_TDR_HEADER, /* nest - _A_HEADER_* */
500+ ETHTOOL_A_CABLE_TEST_TDR_CFG, /* nest - *_TDR_CFG_* */
501+
502+ /* add new constants above here */
503+ __ETHTOOL_A_CABLE_TEST_TDR_CNT,
504+ ETHTOOL_A_CABLE_TEST_TDR_MAX = __ETHTOOL_A_CABLE_TEST_TDR_CNT - 1
505+};
506+
507+/* CABLE TEST TDR NOTIFY */
508+
509+enum {
510+ ETHTOOL_A_CABLE_AMPLITUDE_UNSPEC,
511+ ETHTOOL_A_CABLE_AMPLITUDE_PAIR, /* u8 */
512+ ETHTOOL_A_CABLE_AMPLITUDE_mV, /* s16 */
513+
514+ __ETHTOOL_A_CABLE_AMPLITUDE_CNT,
515+ ETHTOOL_A_CABLE_AMPLITUDE_MAX = (__ETHTOOL_A_CABLE_AMPLITUDE_CNT - 1)
516+};
517+
518+enum {
519+ ETHTOOL_A_CABLE_PULSE_UNSPEC,
520+ ETHTOOL_A_CABLE_PULSE_mV, /* s16 */
521+
522+ __ETHTOOL_A_CABLE_PULSE_CNT,
523+ ETHTOOL_A_CABLE_PULSE_MAX = (__ETHTOOL_A_CABLE_PULSE_CNT - 1)
524+};
525+
526+enum {
527+ ETHTOOL_A_CABLE_STEP_UNSPEC,
528+ ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE, /* u32 */
529+ ETHTOOL_A_CABLE_STEP_LAST_DISTANCE, /* u32 */
530+ ETHTOOL_A_CABLE_STEP_STEP_DISTANCE, /* u32 */
531+
532+ __ETHTOOL_A_CABLE_STEP_CNT,
533+ ETHTOOL_A_CABLE_STEP_MAX = (__ETHTOOL_A_CABLE_STEP_CNT - 1)
534+};
535+
536+enum {
537+ ETHTOOL_A_CABLE_TDR_NEST_UNSPEC,
538+ ETHTOOL_A_CABLE_TDR_NEST_STEP, /* nest - ETHTTOOL_A_CABLE_STEP */
539+ ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE, /* nest - ETHTOOL_A_CABLE_AMPLITUDE */
540+ ETHTOOL_A_CABLE_TDR_NEST_PULSE, /* nest - ETHTOOL_A_CABLE_PULSE */
541+
542+ __ETHTOOL_A_CABLE_TDR_NEST_CNT,
543+ ETHTOOL_A_CABLE_TDR_NEST_MAX = (__ETHTOOL_A_CABLE_TDR_NEST_CNT - 1)
544+};
545+
546+enum {
547+ ETHTOOL_A_CABLE_TEST_TDR_NTF_UNSPEC,
548+ ETHTOOL_A_CABLE_TEST_TDR_NTF_HEADER, /* nest - ETHTOOL_A_HEADER_* */
549+ ETHTOOL_A_CABLE_TEST_TDR_NTF_STATUS, /* u8 - _STARTED/_COMPLETE */
550+ ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST, /* nest - of results: */
551+
552+ /* add new constants above here */
553+ __ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT,
554+ ETHTOOL_A_CABLE_TEST_TDR_NTF_MAX = __ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT - 1
555+};
556+
406557 /* generic netlink info */
407558 #define ETHTOOL_GENL_NAME "ethtool"
408559 #define ETHTOOL_GENL_VERSION 1
include/uapi/linux/genetlink.h+2−0
@@ -48,6 +48,7 @@ enum { · 47 unmodified lines
4848 CTRL_CMD_NEWMCAST_GRP,
4949 CTRL_CMD_DELMCAST_GRP,
5050 CTRL_CMD_GETMCAST_GRP, /* unused */
51+ CTRL_CMD_GETPOLICY,
5152 __CTRL_CMD_MAX,
5253 };
5354
@@ -62,6 +63,7 @@ enum { · 8 unmodified lines
6263 CTRL_ATTR_MAXATTR,
6364 CTRL_ATTR_OPS,
6465 CTRL_ATTR_MCAST_GROUPS,
66+ CTRL_ATTR_POLICY,
6567 __CTRL_ATTR_MAX,
6668 };
6769
include/uapi/linux/if.h+1−0
@@ -178,6 +178,7 @@ enum { · 177 unmodified lines
178178 enum {
179179 IF_LINK_MODE_DEFAULT,
180180 IF_LINK_MODE_DORMANT, /* limit upward transition to dormant */
181+ IF_LINK_MODE_TESTING, /* limit upward transition to testing */
181182 };
182183
183184 /*
include/uapi/linux/if_bridge.h+96−0
@@ -120,6 +120,7 @@ enum { · 119 unmodified lines
120120 IFLA_BRIDGE_MODE,
121121 IFLA_BRIDGE_VLAN_INFO,
122122 IFLA_BRIDGE_VLAN_TUNNEL_INFO,
123+ IFLA_BRIDGE_MRP,
123124 __IFLA_BRIDGE_MAX,
124125 };
125126 #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
@@ -157,6 +158,101 @@ struct bridge_vlan_xstats { · 31 unmodified lines
157158 __u32 pad2;
158159 };
159160
161+enum {
162+ IFLA_BRIDGE_MRP_UNSPEC,
163+ IFLA_BRIDGE_MRP_INSTANCE,
164+ IFLA_BRIDGE_MRP_PORT_STATE,
165+ IFLA_BRIDGE_MRP_PORT_ROLE,
166+ IFLA_BRIDGE_MRP_RING_STATE,
167+ IFLA_BRIDGE_MRP_RING_ROLE,
168+ IFLA_BRIDGE_MRP_START_TEST,
169+ __IFLA_BRIDGE_MRP_MAX,
170+};
171+
172+#define IFLA_BRIDGE_MRP_MAX (__IFLA_BRIDGE_MRP_MAX - 1)
173+
174+enum {
175+ IFLA_BRIDGE_MRP_INSTANCE_UNSPEC,
176+ IFLA_BRIDGE_MRP_INSTANCE_RING_ID,
177+ IFLA_BRIDGE_MRP_INSTANCE_P_IFINDEX,
178+ IFLA_BRIDGE_MRP_INSTANCE_S_IFINDEX,
179+ IFLA_BRIDGE_MRP_INSTANCE_PRIO,
180+ __IFLA_BRIDGE_MRP_INSTANCE_MAX,
181+};
182+
183+#define IFLA_BRIDGE_MRP_INSTANCE_MAX (__IFLA_BRIDGE_MRP_INSTANCE_MAX - 1)
184+
185+enum {
186+ IFLA_BRIDGE_MRP_PORT_STATE_UNSPEC,
187+ IFLA_BRIDGE_MRP_PORT_STATE_STATE,
188+ __IFLA_BRIDGE_MRP_PORT_STATE_MAX,
189+};
190+
191+#define IFLA_BRIDGE_MRP_PORT_STATE_MAX (__IFLA_BRIDGE_MRP_PORT_STATE_MAX - 1)
192+
193+enum {
194+ IFLA_BRIDGE_MRP_PORT_ROLE_UNSPEC,
195+ IFLA_BRIDGE_MRP_PORT_ROLE_ROLE,
196+ __IFLA_BRIDGE_MRP_PORT_ROLE_MAX,
197+};
198+
199+#define IFLA_BRIDGE_MRP_PORT_ROLE_MAX (__IFLA_BRIDGE_MRP_PORT_ROLE_MAX - 1)
200+
201+enum {
202+ IFLA_BRIDGE_MRP_RING_STATE_UNSPEC,
203+ IFLA_BRIDGE_MRP_RING_STATE_RING_ID,
204+ IFLA_BRIDGE_MRP_RING_STATE_STATE,
205+ __IFLA_BRIDGE_MRP_RING_STATE_MAX,
206+};
207+
208+#define IFLA_BRIDGE_MRP_RING_STATE_MAX (__IFLA_BRIDGE_MRP_RING_STATE_MAX - 1)
209+
210+enum {
211+ IFLA_BRIDGE_MRP_RING_ROLE_UNSPEC,
212+ IFLA_BRIDGE_MRP_RING_ROLE_RING_ID,
213+ IFLA_BRIDGE_MRP_RING_ROLE_ROLE,
214+ __IFLA_BRIDGE_MRP_RING_ROLE_MAX,
215+};
216+
217+#define IFLA_BRIDGE_MRP_RING_ROLE_MAX (__IFLA_BRIDGE_MRP_RING_ROLE_MAX - 1)
218+
219+enum {
220+ IFLA_BRIDGE_MRP_START_TEST_UNSPEC,
221+ IFLA_BRIDGE_MRP_START_TEST_RING_ID,
222+ IFLA_BRIDGE_MRP_START_TEST_INTERVAL,
223+ IFLA_BRIDGE_MRP_START_TEST_MAX_MISS,
224+ IFLA_BRIDGE_MRP_START_TEST_PERIOD,
225+ IFLA_BRIDGE_MRP_START_TEST_MONITOR,
226+ __IFLA_BRIDGE_MRP_START_TEST_MAX,
227+};
228+
229+#define IFLA_BRIDGE_MRP_START_TEST_MAX (__IFLA_BRIDGE_MRP_START_TEST_MAX - 1)
230+
231+struct br_mrp_instance {
232+ __u32 ring_id;
233+ __u32 p_ifindex;
234+ __u32 s_ifindex;
235+ __u16 prio;
236+};
237+
238+struct br_mrp_ring_state {
239+ __u32 ring_id;
240+ __u32 ring_state;
241+};
242+
243+struct br_mrp_ring_role {
244+ __u32 ring_id;
245+ __u32 ring_role;
246+};
247+
248+struct br_mrp_start_test {
249+ __u32 ring_id;
250+ __u32 interval;
251+ __u32 max_miss;
252+ __u32 period;
253+ __u32 monitor;
254+};
255+
160256 struct bridge_stp_xstats {
161257 __u64 transition_blk;
162258 __u64 transition_fwd;
include/uapi/linux/if_ether.h+1−0
@@ -92,6 +92,7 @@ · 91 unmodified lines
9292 #define ETH_P_PREAUTH 0x88C7 /* 802.11 Preauthentication */
9393 #define ETH_P_TIPC 0x88CA /* TIPC */
9494 #define ETH_P_LLDP 0x88CC /* Link Layer Discovery Protocol */
95+#define ETH_P_MRP 0x88E3 /* Media Redundancy Protocol */
9596 #define ETH_P_MACSEC 0x88E5 /* 802.1ae MACsec */
9697 #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */
9798 #define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */
include/uapi/linux/if_link.h+1−0
@@ -343,6 +343,7 @@ enum { · 342 unmodified lines
343343 IFLA_BRPORT_NEIGH_SUPPRESS,
344344 IFLA_BRPORT_ISOLATED,
345345 IFLA_BRPORT_BACKUP_PORT,
346+ IFLA_BRPORT_MRP_RING_OPEN,
346347 __IFLA_BRPORT_MAX
347348 };
348349 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
include/uapi/linux/if_x25.h+1−1
@@ -18,7 +18,7 @@ · 17 unmodified lines
1818
1919 #include <linux/types.h>
2020
21−/* Documentation/networking/x25-iface.txt */
21+/* Documentation/networking/x25-iface.rst */
2222 #define X25_IFACE_DATA 0x00
2323 #define X25_IFACE_CONNECT 0x01
2424 #define X25_IFACE_DISCONNECT 0x02
include/uapi/linux/inet_diag.h+2−0
@@ -96,6 +96,7 @@ enum { · 95 unmodified lines
9696 INET_DIAG_BC_MARK_COND,
9797 INET_DIAG_BC_S_EQ,
9898 INET_DIAG_BC_D_EQ,
99+ INET_DIAG_BC_CGROUP_COND, /* u64 cgroup v2 ID */
99100 };
100101
101102 struct inet_diag_hostcond {
@@ -157,6 +158,7 @@ enum { · 55 unmodified lines
157158 INET_DIAG_MD5SIG,
158159 INET_DIAG_ULP_INFO,
159160 INET_DIAG_SK_BPF_STORAGES,
161+ INET_DIAG_CGROUP_ID,
160162 __INET_DIAG_MAX,
161163 };
162164
include/uapi/linux/mii.h+2−0
@@ -151,11 +151,13 @@ · 150 unmodified lines
151151 /* 1000BASE-T Control register */
152152 #define ADVERTISE_1000FULL 0x0200 /* Advertise 1000BASE-T full duplex */
153153 #define ADVERTISE_1000HALF 0x0100 /* Advertise 1000BASE-T half duplex */
154+#define CTL1000_PREFER_MASTER 0x0400 /* prefer to operate as master */
154155 #define CTL1000_AS_MASTER 0x0800
155156 #define CTL1000_ENABLE_MASTER 0x1000
156157
157158 /* 1000BASE-T Status register */
158159 #define LPA_1000MSFAIL 0x8000 /* Master/Slave resolution failure */
160+#define LPA_1000MSRES 0x4000 /* Master/Slave resolution status */
159161 #define LPA_1000LOCALRXOK 0x2000 /* Link partner local receiver status */
160162 #define LPA_1000REMRXOK 0x1000 /* Link partner remote receiver status */
161163 #define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */
include/uapi/linux/mrp_bridge.h+122−0
@@ -0,0 +1,122 @@
1+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2+
3+#ifndef _UAPI_LINUX_MRP_BRIDGE_H_
4+#define _UAPI_LINUX_MRP_BRIDGE_H_
5+
6+#include <linux/types.h>
7+#include <linux/if_ether.h>
8+
9+#define MRP_MAX_FRAME_LENGTH 200
10+#define MRP_DEFAULT_PRIO 0x8000
11+#define MRP_DOMAIN_UUID_LENGTH 16
12+#define MRP_VERSION 1
13+#define MRP_FRAME_PRIO 7
14+#define MRP_OUI_LENGTH 3
15+#define MRP_MANUFACTURE_DATA_LENGTH 2
16+
17+enum br_mrp_ring_role_type {
18+ BR_MRP_RING_ROLE_DISABLED,
19+ BR_MRP_RING_ROLE_MRC,
20+ BR_MRP_RING_ROLE_MRM,
21+ BR_MRP_RING_ROLE_MRA,
22+};
23+
24+enum br_mrp_ring_state_type {
25+ BR_MRP_RING_STATE_OPEN,
26+ BR_MRP_RING_STATE_CLOSED,
27+};
28+
29+enum br_mrp_port_state_type {
30+ BR_MRP_PORT_STATE_DISABLED,
31+ BR_MRP_PORT_STATE_BLOCKED,
32+ BR_MRP_PORT_STATE_FORWARDING,
33+ BR_MRP_PORT_STATE_NOT_CONNECTED,
34+};
35+
36+enum br_mrp_port_role_type {
37+ BR_MRP_PORT_ROLE_PRIMARY,
38+ BR_MRP_PORT_ROLE_SECONDARY,
39+ BR_MRP_PORT_ROLE_NONE,
40+};
41+
42+enum br_mrp_tlv_header_type {
43+ BR_MRP_TLV_HEADER_END = 0x0,
44+ BR_MRP_TLV_HEADER_COMMON = 0x1,
45+ BR_MRP_TLV_HEADER_RING_TEST = 0x2,
46+ BR_MRP_TLV_HEADER_RING_TOPO = 0x3,
47+ BR_MRP_TLV_HEADER_RING_LINK_DOWN = 0x4,
48+ BR_MRP_TLV_HEADER_RING_LINK_UP = 0x5,
49+ BR_MRP_TLV_HEADER_OPTION = 0x7f,
50+};
51+
52+enum br_mrp_sub_tlv_header_type {
53+ BR_MRP_SUB_TLV_HEADER_TEST_MGR_NACK = 0x1,
54+ BR_MRP_SUB_TLV_HEADER_TEST_PROPAGATE = 0x2,
55+ BR_MRP_SUB_TLV_HEADER_TEST_AUTO_MGR = 0x3,
56+};
57+
58+struct br_mrp_tlv_hdr {
59+ __u8 type;
60+ __u8 length;
61+};
62+
63+struct br_mrp_sub_tlv_hdr {
64+ __u8 type;
65+ __u8 length;
66+};
67+
68+struct br_mrp_end_hdr {
69+ struct br_mrp_tlv_hdr hdr;
70+};
71+
72+struct br_mrp_common_hdr {
73+ __be16 seq_id;
74+ __u8 domain[MRP_DOMAIN_UUID_LENGTH];
75+};
76+
77+struct br_mrp_ring_test_hdr {
78+ __be16 prio;
79+ __u8 sa[ETH_ALEN];
80+ __be16 port_role;
81+ __be16 state;
82+ __be16 transitions;
83+ __be32 timestamp;
84+};
85+
86+struct br_mrp_ring_topo_hdr {
87+ __be16 prio;
88+ __u8 sa[ETH_ALEN];
89+ __be16 interval;
90+};
91+
92+struct br_mrp_ring_link_hdr {
93+ __u8 sa[ETH_ALEN];
94+ __be16 port_role;
95+ __be16 interval;
96+ __be16 blocked;
97+};
98+
99+struct br_mrp_sub_opt_hdr {
100+ __u8 type;
101+ __u8 manufacture_data[MRP_MANUFACTURE_DATA_LENGTH];
102+};
103+
104+struct br_mrp_test_mgr_nack_hdr {
105+ __be16 prio;
106+ __u8 sa[ETH_ALEN];
107+ __be16 other_prio;
108+ __u8 other_sa[ETH_ALEN];
109+};
110+
111+struct br_mrp_test_prop_hdr {
112+ __be16 prio;
113+ __u8 sa[ETH_ALEN];
114+ __be16 other_prio;
115+ __u8 other_sa[ETH_ALEN];
116+};
117+
118+struct br_mrp_oui_hdr {
119+ __u8 oui[MRP_OUI_LENGTH];
120+};
121+
122+#endif
include/uapi/linux/neighbour.h+1−0
@@ -29,6 +29,7 @@ enum { · 28 unmodified lines
2929 NDA_LINK_NETNSID,
3030 NDA_SRC_VNI,
3131 NDA_PROTOCOL, /* Originator of entry */
32+ NDA_NH_ID,
3233 __NDA_MAX
3334 };
3435
include/uapi/linux/netfilter/nf_conntrack_common.h+6−2
@@ -114,15 +114,19 @@ enum ip_conntrack_status { · 113 unmodified lines
114114 IPS_OFFLOAD_BIT = 14,
115115 IPS_OFFLOAD = (1 << IPS_OFFLOAD_BIT),
116116
117+ /* Conntrack has been offloaded to hardware. */
118+ IPS_HW_OFFLOAD_BIT = 15,
119+ IPS_HW_OFFLOAD = (1 << IPS_HW_OFFLOAD_BIT),
120+
117121 /* Be careful here, modifying these bits can make things messy,
118122 * so don't let users modify them directly.
119123 */
120124 IPS_UNCHANGEABLE_MASK = (IPS_NAT_DONE_MASK | IPS_NAT_MASK |
121125 IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING |
122126 IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_UNTRACKED |
123− IPS_OFFLOAD),
127+ IPS_OFFLOAD | IPS_HW_OFFLOAD),
124128
125− __IPS_MAX_BIT = 15,
129+ __IPS_MAX_BIT = 16,
126130 };
127131
128132 /* Connection tracking event types */
include/uapi/linux/netfilter/nf_nat.h+3−1
@@ -11,6 +11,7 @@ · 10 unmodified lines
1111 #define NF_NAT_RANGE_PERSISTENT (1 << 3)
1212 #define NF_NAT_RANGE_PROTO_RANDOM_FULLY (1 << 4)
1313 #define NF_NAT_RANGE_PROTO_OFFSET (1 << 5)
14+#define NF_NAT_RANGE_NETMAP (1 << 6)
1415
1516 #define NF_NAT_RANGE_PROTO_RANDOM_ALL \
1617 (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY)
@@ -18,7 +19,8 @@ · 1 unmodified line
1819 #define NF_NAT_RANGE_MASK \
1920 (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED | \
2021 NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PERSISTENT | \
21− NF_NAT_RANGE_PROTO_RANDOM_FULLY | NF_NAT_RANGE_PROTO_OFFSET)
22+ NF_NAT_RANGE_PROTO_RANDOM_FULLY | NF_NAT_RANGE_PROTO_OFFSET | \
23+ NF_NAT_RANGE_NETMAP)
2224
2325 struct nf_nat_ipv4_range {
2426 unsigned int flags;
include/uapi/linux/netfilter/nfnetlink_conntrack.h+9−0
@@ -55,6 +55,7 @@ enum ctattr_type { · 54 unmodified lines
5555 CTA_LABELS,
5656 CTA_LABELS_MASK,
5757 CTA_SYNPROXY,
58+ CTA_FILTER,
5859 __CTA_MAX
5960 };
6061 #define CTA_MAX (__CTA_MAX - 1)
@@ -276,4 +277,12 @@ enum ctattr_expect_stats { · 215 unmodified lines
276277 };
277278 #define CTA_STATS_EXP_MAX (__CTA_STATS_EXP_MAX - 1)
278279
280+enum ctattr_filter {
281+ CTA_FILTER_UNSPEC,
282+ CTA_FILTER_ORIG_FLAGS,
283+ CTA_FILTER_REPLY_FLAGS,
284+ __CTA_FILTER_MAX
285+};
286+#define CTA_FILTER_MAX (__CTA_FILTER_MAX - 1)
287+
279288 #endif /* _IPCONNTRACK_NETLINK_H */
include/uapi/linux/netlink.h+103−0
@@ -249,4 +249,107 @@ struct nla_bitfield32 { · 248 unmodified lines
249249 __u32 selector;
250250 };
251251
252+/*
253+ * policy descriptions - it's specific to each family how this is used
254+ * Normally, it should be retrieved via a dump inside another attribute
255+ * specifying where it applies.
256+ */
257+
258+/**
259+ * enum netlink_attribute_type - type of an attribute
260+ * @NL_ATTR_TYPE_INVALID: unused
261+ * @NL_ATTR_TYPE_FLAG: flag attribute (present/not present)
262+ * @NL_ATTR_TYPE_U8: 8-bit unsigned attribute
263+ * @NL_ATTR_TYPE_U16: 16-bit unsigned attribute
264+ * @NL_ATTR_TYPE_U32: 32-bit unsigned attribute
265+ * @NL_ATTR_TYPE_U64: 64-bit unsigned attribute
266+ * @NL_ATTR_TYPE_S8: 8-bit signed attribute
267+ * @NL_ATTR_TYPE_S16: 16-bit signed attribute
268+ * @NL_ATTR_TYPE_S32: 32-bit signed attribute
269+ * @NL_ATTR_TYPE_S64: 64-bit signed attribute
270+ * @NL_ATTR_TYPE_BINARY: binary data, min/max length may be specified
271+ * @NL_ATTR_TYPE_STRING: string, min/max length may be specified
272+ * @NL_ATTR_TYPE_NUL_STRING: NUL-terminated string,
273+ * min/max length may be specified
274+ * @NL_ATTR_TYPE_NESTED: nested, i.e. the content of this attribute
275+ * consists of sub-attributes. The nested policy and maxtype
276+ * inside may be specified.
277+ * @NL_ATTR_TYPE_NESTED_ARRAY: nested array, i.e. the content of this
278+ * attribute contains sub-attributes whose type is irrelevant
279+ * (just used to separate the array entries) and each such array
280+ * entry has attributes again, the policy for those inner ones
281+ * and the corresponding maxtype may be specified.
282+ * @NL_ATTR_TYPE_BITFIELD32: &struct nla_bitfield32 attribute
283+ */
284+enum netlink_attribute_type {
285+ NL_ATTR_TYPE_INVALID,
286+
287+ NL_ATTR_TYPE_FLAG,
288+
289+ NL_ATTR_TYPE_U8,
290+ NL_ATTR_TYPE_U16,
291+ NL_ATTR_TYPE_U32,
292+ NL_ATTR_TYPE_U64,
293+
294+ NL_ATTR_TYPE_S8,
295+ NL_ATTR_TYPE_S16,
296+ NL_ATTR_TYPE_S32,
297+ NL_ATTR_TYPE_S64,
298+
299+ NL_ATTR_TYPE_BINARY,
300+ NL_ATTR_TYPE_STRING,
301+ NL_ATTR_TYPE_NUL_STRING,
302+
303+ NL_ATTR_TYPE_NESTED,
304+ NL_ATTR_TYPE_NESTED_ARRAY,
305+
306+ NL_ATTR_TYPE_BITFIELD32,
307+};
308+
309+/**
310+ * enum netlink_policy_type_attr - policy type attributes
311+ * @NL_POLICY_TYPE_ATTR_UNSPEC: unused
312+ * @NL_POLICY_TYPE_ATTR_TYPE: type of the attribute,
313+ * &enum netlink_attribute_type (U32)
314+ * @NL_POLICY_TYPE_ATTR_MIN_VALUE_S: minimum value for signed
315+ * integers (S64)
316+ * @NL_POLICY_TYPE_ATTR_MAX_VALUE_S: maximum value for signed
317+ * integers (S64)
318+ * @NL_POLICY_TYPE_ATTR_MIN_VALUE_U: minimum value for unsigned
319+ * integers (U64)
320+ * @NL_POLICY_TYPE_ATTR_MAX_VALUE_U: maximum value for unsigned
321+ * integers (U64)
322+ * @NL_POLICY_TYPE_ATTR_MIN_LENGTH: minimum length for binary
323+ * attributes, no minimum if not given (U32)
324+ * @NL_POLICY_TYPE_ATTR_MAX_LENGTH: maximum length for binary
325+ * attributes, no maximum if not given (U32)
326+ * @NL_POLICY_TYPE_ATTR_POLICY_IDX: sub policy for nested and
327+ * nested array types (U32)
328+ * @NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE: maximum sub policy
329+ * attribute for nested and nested array types, this can
330+ * in theory be < the size of the policy pointed to by
331+ * the index, if limited inside the nesting (U32)
332+ * @NL_POLICY_TYPE_ATTR_BITFIELD32_MASK: valid mask for the
333+ * bitfield32 type (U32)
334+ * @NL_POLICY_TYPE_ATTR_PAD: pad attribute for 64-bit alignment
335+ */
336+enum netlink_policy_type_attr {
337+ NL_POLICY_TYPE_ATTR_UNSPEC,
338+ NL_POLICY_TYPE_ATTR_TYPE,
339+ NL_POLICY_TYPE_ATTR_MIN_VALUE_S,
340+ NL_POLICY_TYPE_ATTR_MAX_VALUE_S,
341+ NL_POLICY_TYPE_ATTR_MIN_VALUE_U,
342+ NL_POLICY_TYPE_ATTR_MAX_VALUE_U,
343+ NL_POLICY_TYPE_ATTR_MIN_LENGTH,
344+ NL_POLICY_TYPE_ATTR_MAX_LENGTH,
345+ NL_POLICY_TYPE_ATTR_POLICY_IDX,
346+ NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE,
347+ NL_POLICY_TYPE_ATTR_BITFIELD32_MASK,
348+ NL_POLICY_TYPE_ATTR_PAD,
349+
350+ /* keep last */
351+ __NL_POLICY_TYPE_ATTR_MAX,
352+ NL_POLICY_TYPE_ATTR_MAX = __NL_POLICY_TYPE_ATTR_MAX - 1
353+};
354+
252355 #endif /* _UAPI__LINUX_NETLINK_H */
include/uapi/linux/nexthop.h+3−0
@@ -49,6 +49,9 @@ enum { · 48 unmodified lines
4949 NHA_GROUPS, /* flag; only return nexthop groups in dump */
5050 NHA_MASTER, /* u32; only return nexthops with given master dev */
5151
52+ NHA_FDB, /* flag; nexthop belongs to a bridge fdb */
53+ /* if NHA_FDB is added, OIF, BLACKHOLE, ENCAP cannot be set */
54+
5255 __NHA_MAX,
5356 };
5457
include/uapi/linux/nl80211.h+122−25
@@ -296,13 +296,14 @@ · 295 unmodified lines
296296 * to get a list of all present wiphys.
297297 * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or
298298 * %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME,
299− * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ (and the
300− * attributes determining the channel width; this is used for setting
301− * monitor mode channel), %NL80211_ATTR_WIPHY_RETRY_SHORT,
302− * %NL80211_ATTR_WIPHY_RETRY_LONG, %NL80211_ATTR_WIPHY_FRAG_THRESHOLD,
303− * and/or %NL80211_ATTR_WIPHY_RTS_THRESHOLD.
304− * However, for setting the channel, see %NL80211_CMD_SET_CHANNEL
305− * instead, the support here is for backward compatibility only.
299+ * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ,
300+ * %NL80211_ATTR_WIPHY_FREQ_OFFSET (and the attributes determining the
301+ * channel width; this is used for setting monitor mode channel),
302+ * %NL80211_ATTR_WIPHY_RETRY_SHORT, %NL80211_ATTR_WIPHY_RETRY_LONG,
303+ * %NL80211_ATTR_WIPHY_FRAG_THRESHOLD, and/or
304+ * %NL80211_ATTR_WIPHY_RTS_THRESHOLD. However, for setting the channel,
305+ * see %NL80211_CMD_SET_CHANNEL instead, the support here is for backward
306+ * compatibility only.
306307 * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request
307308 * or rename notification. Has attributes %NL80211_ATTR_WIPHY and
308309 * %NL80211_ATTR_WIPHY_NAME.
@@ -351,7 +352,8 @@ · 42 unmodified lines
351352 * %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_INACTIVITY_TIMEOUT,
352353 * %NL80211_ATTR_ACL_POLICY and %NL80211_ATTR_MAC_ADDRS.
353354 * The channel to use can be set on the interface or be given using the
354− * %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel width.
355+ * %NL80211_ATTR_WIPHY_FREQ and %NL80211_ATTR_WIPHY_FREQ_OFFSET, and the
356+ * attributes determining channel width.
355357 * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP
356358 * @NL80211_CMD_STOP_AP: Stop AP operation on the given interface
357359 * @NL80211_CMD_DEL_BEACON: old alias for %NL80211_CMD_STOP_AP
@@ -536,11 +538,12 @@ · 178 unmodified lines
536538 * interface. %NL80211_ATTR_MAC is used to specify PeerSTAAddress (and
537539 * BSSID in case of station mode). %NL80211_ATTR_SSID is used to specify
538540 * the SSID (mainly for association, but is included in authentication
539− * request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ is used
540− * to specify the frequence of the channel in MHz. %NL80211_ATTR_AUTH_TYPE
541− * is used to specify the authentication type. %NL80211_ATTR_IE is used to
542− * define IEs (VendorSpecificInfo, but also including RSN IE and FT IEs)
543− * to be added to the frame.
541+ * request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ +
542+ * %NL80211_ATTR_WIPHY_FREQ_OFFSET is used to specify the frequence of the
543+ * channel in MHz. %NL80211_ATTR_AUTH_TYPE is used to specify the
544+ * authentication type. %NL80211_ATTR_IE is used to define IEs
545+ * (VendorSpecificInfo, but also including RSN IE and FT IEs) to be added
546+ * to the frame.
544547 * When used as an event, this reports reception of an Authentication
545548 * frame in station and IBSS modes when the local MLME processed the
546549 * frame, i.e., it was for the local STA and was received in correct
@@ -595,8 +598,9 @@ · 48 unmodified lines
595598 * requests to connect to a specified network but without separating
596599 * auth and assoc steps. For this, you need to specify the SSID in a
597600 * %NL80211_ATTR_SSID attribute, and can optionally specify the association
598− * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP,
599− * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
601+ * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE,
602+ * %NL80211_ATTR_USE_MFP, %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ,
603+ * %NL80211_ATTR_WIPHY_FREQ_OFFSET, %NL80211_ATTR_CONTROL_PORT,
600604 * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
601605 * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT,
602606 * %NL80211_ATTR_CONTROL_PORT_OVER_NL80211, %NL80211_ATTR_MAC_HINT, and
@@ -687,6 +691,10 @@ · 84 unmodified lines
687691 * four bytes for vendor frames including the OUI. The registration
688692 * cannot be dropped, but is removed automatically when the netlink
689693 * socket is closed. Multiple registrations can be made.
694+ * The %NL80211_ATTR_RECEIVE_MULTICAST flag attribute can be given if
695+ * %NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS is available, in which
696+ * case the registration can also be modified to include/exclude the
697+ * flag, rather than requiring unregistration to change it.
690698 * @NL80211_CMD_REGISTER_ACTION: Alias for @NL80211_CMD_REGISTER_FRAME for
691699 * backward compatibility
692700 * @NL80211_CMD_FRAME: Management frame TX request and RX notification. This
@@ -1151,6 +1159,17 @@ · 458 unmodified lines
11511159 * @NL80211_CMD_SET_TID_CONFIG: Data frame TID specific configuration
11521160 * is passed using %NL80211_ATTR_TID_CONFIG attribute.
11531161 *
1162+ * @NL80211_CMD_UNPROT_BEACON: Unprotected or incorrectly protected Beacon
1163+ * frame. This event is used to indicate that a received Beacon frame was
1164+ * dropped because it did not include a valid MME MIC while beacon
1165+ * protection was enabled (BIGTK configured in station mode).
1166+ *
1167+ * @NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS: Report TX status of a control
1168+ * port frame transmitted with %NL80211_CMD_CONTROL_PORT_FRAME.
1169+ * %NL80211_ATTR_COOKIE identifies the TX command and %NL80211_ATTR_FRAME
1170+ * includes the contents of the frame. %NL80211_ATTR_ACK flag is included
1171+ * if the recipient acknowledged the frame.
1172+ *
11541173 * @NL80211_CMD_MAX: highest used command number
11551174 * @__NL80211_CMD_AFTER_LAST: internal use
11561175 */
@@ -1377,6 +1396,10 @@ enum nl80211_commands { · 220 unmodified lines
13771396
13781397 NL80211_CMD_SET_TID_CONFIG,
13791398
1399+ NL80211_CMD_UNPROT_BEACON,
1400+
1401+ NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS,
1402+
13801403 /* add new commands above here */
13811404
13821405 /* used to define NL80211_CMD_MAX below */
@@ -1422,7 +1445,8 @@ enum nl80211_commands { · 39 unmodified lines
14221445 * of &enum nl80211_chan_width, describing the channel width. See the
14231446 * documentation of the enum for more information.
14241447 * @NL80211_ATTR_CENTER_FREQ1: Center frequency of the first part of the
1425− * channel, used for anything but 20 MHz bandwidth
1448+ * channel, used for anything but 20 MHz bandwidth. In S1G this is the
1449+ * operating channel center frequency.
14261450 * @NL80211_ATTR_CENTER_FREQ2: Center frequency of the second part of the
14271451 * channel, used only for 80+80 MHz bandwidth
14281452 * @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ
@@ -2469,6 +2493,17 @@ enum nl80211_commands { · 1040 unmodified lines
24692493 * entry without having to force a disconnection after the PMK timeout. If
24702494 * no roaming occurs between the reauth threshold and PMK expiration,
24712495 * disassociation is still forced.
2496+ * @NL80211_ATTR_RECEIVE_MULTICAST: multicast flag for the
2497+ * %NL80211_CMD_REGISTER_FRAME command, see the description there.
2498+ * @NL80211_ATTR_WIPHY_FREQ_OFFSET: offset of the associated
2499+ * %NL80211_ATTR_WIPHY_FREQ in positive KHz. Only valid when supplied with
2500+ * an %NL80211_ATTR_WIPHY_FREQ_OFFSET.
2501+ * @NL80211_ATTR_CENTER_FREQ1_OFFSET: Center frequency offset in KHz for the
2502+ * first channel segment specified in %NL80211_ATTR_CENTER_FREQ1.
2503+ * @NL80211_ATTR_SCAN_FREQ_KHZ: nested attribute with KHz frequencies
2504+ *
2505+ * @NL80211_ATTR_HE_6GHZ_CAPABILITY: HE 6 GHz Band Capability element (from
2506+ * association request when used with NL80211_CMD_NEW_STATION).
24722507 *
24732508 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
24742509 * @NL80211_ATTR_MAX: highest attribute number currently defined
@@ -2945,6 +2980,13 @@ enum nl80211_attrs { · 470 unmodified lines
29452980 NL80211_ATTR_PMK_LIFETIME,
29462981 NL80211_ATTR_PMK_REAUTH_THRESHOLD,
29472982
2983+ NL80211_ATTR_RECEIVE_MULTICAST,
2984+ NL80211_ATTR_WIPHY_FREQ_OFFSET,
2985+ NL80211_ATTR_CENTER_FREQ1_OFFSET,
2986+ NL80211_ATTR_SCAN_FREQ_KHZ,
2987+
2988+ NL80211_ATTR_HE_6GHZ_CAPABILITY,
2989+
29482990 /* add attributes here, update the policy in nl80211.c */
29492991
29502992 __NL80211_ATTR_AFTER_LAST,
@@ -3523,6 +3565,8 @@ enum nl80211_mpath_info { · 572 unmodified lines
35233565 * defined in HE capabilities IE
35243566 * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band HE capability attribute currently
35253567 * defined
3568+ * @NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA: HE 6GHz band capabilities (__le16),
3569+ * given for all 6 GHz band channels
35263570 * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use
35273571 */
35283572 enum nl80211_band_iftype_attr {
@@ -3533,6 +3577,7 @@ enum nl80211_band_iftype_attr { · 4 unmodified lines
35333577 NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY,
35343578 NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET,
35353579 NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,
3580+ NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA,
35363581
35373582 /* keep last */
35383583 __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,
@@ -3666,6 +3711,7 @@ enum nl80211_wmm_rule { · 127 unmodified lines
36663711 * (see &enum nl80211_wmm_rule)
36673712 * @NL80211_FREQUENCY_ATTR_NO_HE: HE operation is not allowed on this channel
36683713 * in current regulatory domain.
3714+ * @NL80211_FREQUENCY_ATTR_OFFSET: frequency offset in KHz
36693715 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
36703716 * currently defined
36713717 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
@@ -3696,6 +3742,7 @@ enum nl80211_frequency_attr { · 24 unmodified lines
36963742 NL80211_FREQUENCY_ATTR_NO_10MHZ,
36973743 NL80211_FREQUENCY_ATTR_WMM,
36983744 NL80211_FREQUENCY_ATTR_NO_HE,
3745+ NL80211_FREQUENCY_ATTR_OFFSET,
36993746
37003747 /* keep last */
37013748 __NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -4466,6 +4513,7 @@ enum nl80211_bss_scan_width { · 764 unmodified lines
44664513 * @NL80211_BSS_CHAIN_SIGNAL: per-chain signal strength of last BSS update.
44674514 * Contains a nested array of signal strength attributes (u8, dBm),
44684515 * using the nesting index as the antenna number.
4516+ * @NL80211_BSS_FREQUENCY_OFFSET: frequency offset in KHz
44694517 * @__NL80211_BSS_AFTER_LAST: internal
44704518 * @NL80211_BSS_MAX: highest BSS attribute
44714519 */
@@ -4490,6 +4538,7 @@ enum nl80211_bss { · 18 unmodified lines
44904538 NL80211_BSS_PARENT_TSF,
44914539 NL80211_BSS_PARENT_BSSID,
44924540 NL80211_BSS_CHAIN_SIGNAL,
4541+ NL80211_BSS_FREQUENCY_OFFSET,
44934542
44944543 /* keep last */
44954544 __NL80211_BSS_AFTER_LAST,
@@ -4800,6 +4849,17 @@ enum nl80211_tid_config { · 304 unmodified lines
48004849 NL80211_TID_CONFIG_DISABLE,
48014850 };
48024851
4852+/* enum nl80211_tx_rate_setting - TX rate configuration type
4853+ * @NL80211_TX_RATE_AUTOMATIC: automatically determine TX rate
4854+ * @NL80211_TX_RATE_LIMITED: limit the TX rate by the TX rate parameter
4855+ * @NL80211_TX_RATE_FIXED: fix TX rate to the TX rate parameter
4856+ */
4857+enum nl80211_tx_rate_setting {
4858+ NL80211_TX_RATE_AUTOMATIC,
4859+ NL80211_TX_RATE_LIMITED,
4860+ NL80211_TX_RATE_FIXED,
4861+};
4862+
48034863 /* enum nl80211_tid_config_attr - TID specific configuration.
48044864 * @NL80211_TID_CONFIG_ATTR_PAD: pad attribute for 64-bit values
48054865 * @NL80211_TID_CONFIG_ATTR_VIF_SUPP: a bitmap (u64) of attributes supported
@@ -4807,12 +4867,10 @@ enum nl80211_tid_config { · 1 unmodified line
48074867 * (%NL80211_TID_CONFIG_ATTR_TIDS, %NL80211_TID_CONFIG_ATTR_OVERRIDE).
48084868 * @NL80211_TID_CONFIG_ATTR_PEER_SUPP: same as the previous per-vif one, but
48094869 * per peer instead.
4810− * @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribue, if no peer
4811− * is selected, if set indicates that the new configuration overrides
4812− * all previous peer configurations, otherwise previous peer specific
4813− * configurations should be left untouched. If peer is selected then
4814− * it will reset particular TID configuration of that peer and it will
4815− * not accept other TID config attributes along with peer.
4870+ * @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribue, if set indicates
4871+ * that the new configuration overrides all previous peer
4872+ * configurations, otherwise previous peer specific configurations
4873+ * should be left untouched.
48164874 * @NL80211_TID_CONFIG_ATTR_TIDS: a bitmask value of TIDs (bit 0 to 7)
48174875 * Its type is u16.
48184876 * @NL80211_TID_CONFIG_ATTR_NOACK: Configure ack policy for the TID.
@@ -4828,12 +4886,23 @@ enum nl80211_tid_config { · 9 unmodified lines
48284886 * &NL80211_CMD_SET_TID_CONFIG. Its type is u8, min value is 1 and
48294887 * the max value is advertised by the driver in this attribute on
48304888 * output in wiphy capabilities.
4831− * @NL80211_TID_CONFIG_ATTR_AMPDU_CTRL: Enable/Disable aggregation for the TIDs
4832− * specified in %NL80211_TID_CONFIG_ATTR_TIDS. Its type is u8, using
4833− * the values from &nl80211_tid_config.
4889+ * @NL80211_TID_CONFIG_ATTR_AMPDU_CTRL: Enable/Disable MPDU aggregation
4890+ * for the TIDs specified in %NL80211_TID_CONFIG_ATTR_TIDS.
4891+ * Its type is u8, using the values from &nl80211_tid_config.
48344892 * @NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL: Enable/Disable RTS_CTS for the TIDs
48354893 * specified in %NL80211_TID_CONFIG_ATTR_TIDS. It is u8 type, using
48364894 * the values from &nl80211_tid_config.
4895+ * @NL80211_TID_CONFIG_ATTR_AMSDU_CTRL: Enable/Disable MSDU aggregation
4896+ * for the TIDs specified in %NL80211_TID_CONFIG_ATTR_TIDS.
4897+ * Its type is u8, using the values from &nl80211_tid_config.
4898+ * @NL80211_TID_CONFIG_ATTR_TX_RATE_TYPE: This attribute will be useful
4899+ * to notfiy the driver that what type of txrate should be used
4900+ * for the TIDs specified in %NL80211_TID_CONFIG_ATTR_TIDS. using
4901+ * the values form &nl80211_tx_rate_setting.
4902+ * @NL80211_TID_CONFIG_ATTR_TX_RATE: Data frame TX rate mask should be applied
4903+ * with the parameters passed through %NL80211_ATTR_TX_RATES.
4904+ * configuration is applied to the data frame for the tid to that connected
4905+ * station.
48374906 */
48384907 enum nl80211_tid_config_attr {
48394908 __NL80211_TID_CONFIG_ATTR_INVALID,
@@ -4847,6 +4916,9 @@ enum nl80211_tid_config_attr { · 7 unmodified lines
48474916 NL80211_TID_CONFIG_ATTR_RETRY_LONG,
48484917 NL80211_TID_CONFIG_ATTR_AMPDU_CTRL,
48494918 NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL,
4919+ NL80211_TID_CONFIG_ATTR_AMSDU_CTRL,
4920+ NL80211_TID_CONFIG_ATTR_TX_RATE_TYPE,
4921+ NL80211_TID_CONFIG_ATTR_TX_RATE,
48504922
48514923 /* keep last */
48524924 __NL80211_TID_CONFIG_ATTR_AFTER_LAST,
@@ -5324,6 +5396,8 @@ enum plink_actions { · 471 unmodified lines
53245396
53255397 #define NL80211_KCK_LEN 16
53265398 #define NL80211_KEK_LEN 16
5399+#define NL80211_KCK_EXT_LEN 24
5400+#define NL80211_KEK_EXT_LEN 32
53275401 #define NL80211_REPLAY_CTR_LEN 8
53285402
53295403 /**
@@ -5332,6 +5406,7 @@ enum plink_actions { · 2 unmodified lines
53325406 * @NL80211_REKEY_DATA_KEK: key encryption key (binary)
53335407 * @NL80211_REKEY_DATA_KCK: key confirmation key (binary)
53345408 * @NL80211_REKEY_DATA_REPLAY_CTR: replay counter (binary)
5409+ * @NL80211_REKEY_DATA_AKM: AKM data (OUI, suite type)
53355410 * @NUM_NL80211_REKEY_DATA: number of rekey attributes (internal)
53365411 * @MAX_NL80211_REKEY_DATA: highest rekey attribute (internal)
53375412 */
@@ -5340,6 +5415,7 @@ enum nl80211_rekey_data { · 2 unmodified lines
53405415 NL80211_REKEY_DATA_KEK,
53415416 NL80211_REKEY_DATA_KCK,
53425417 NL80211_REKEY_DATA_REPLAY_CTR,
5418+ NL80211_REKEY_DATA_AKM,
53435419
53445420 /* keep last */
53455421 NUM_NL80211_REKEY_DATA,
@@ -5674,6 +5750,8 @@ enum nl80211_feature_flags { · 328 unmodified lines
56745750 *
56755751 * @NL80211_EXT_FEATURE_BEACON_PROTECTION: The driver supports Beacon protection
56765752 * and can receive key configuration for BIGTK using key indexes 6 and 7.
5753+ * @NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT: The driver supports Beacon
5754+ * protection as a client only and cannot transmit protected beacons.
56775755 *
56785756 * @NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH: The driver can disable the
56795757 * forwarding of preauth frames over the control port. They are then
@@ -5684,6 +5762,17 @@ enum nl80211_feature_flags { · 4 unmodified lines
56845762 * @NL80211_EXT_FEATURE_DEL_IBSS_STA: The driver supports removing stations
56855763 * in IBSS mode, essentially by dropping their state.
56865764 *
5765+ * @NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS: management frame registrations
5766+ * are possible for multicast frames and those will be reported properly.
5767+ *
5768+ * @NL80211_EXT_FEATURE_SCAN_FREQ_KHZ: This driver supports receiving and
5769+ * reporting scan request with %NL80211_ATTR_SCAN_FREQ_KHZ. In order to
5770+ * report %NL80211_ATTR_SCAN_FREQ_KHZ, %NL80211_SCAN_FLAG_FREQ_KHZ must be
5771+ * included in the scan request.
5772+ *
5773+ * @NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS: The driver
5774+ * can report tx status for control port over nl80211 tx operations.
5775+ *
56875776 * @NUM_NL80211_EXT_FEATURES: number of extended features.
56885777 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
56895778 */
@@ -5735,6 +5824,10 @@ enum nl80211_ext_feature_index { · 45 unmodified lines
57355824 NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH,
57365825 NL80211_EXT_FEATURE_PROTECTED_TWT,
57375826 NL80211_EXT_FEATURE_DEL_IBSS_STA,
5827+ NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS,
5828+ NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT,
5829+ NL80211_EXT_FEATURE_SCAN_FREQ_KHZ,
5830+ NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS,
57385831
57395832 /* add new features before the definition below */
57405833 NUM_NL80211_EXT_FEATURES,
@@ -5846,6 +5939,9 @@ enum nl80211_timeout_reason { · 105 unmodified lines
58465939 * @NL80211_SCAN_FLAG_MIN_PREQ_CONTENT: minimize probe request content to
58475940 * only have supported rates and no additional capabilities (unless
58485941 * added by userspace explicitly.)
5942+ * @NL80211_SCAN_FLAG_FREQ_KHZ: report scan results with
5943+ * %NL80211_ATTR_SCAN_FREQ_KHZ. This also means
5944+ * %NL80211_ATTR_SCAN_FREQUENCIES will not be included.
58495945 */
58505946 enum nl80211_scan_flags {
58515947 NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0,
@@ -5861,6 +5957,7 @@ enum nl80211_scan_flags { · 9 unmodified lines
58615957 NL80211_SCAN_FLAG_HIGH_ACCURACY = 1<<10,
58625958 NL80211_SCAN_FLAG_RANDOM_SN = 1<<11,
58635959 NL80211_SCAN_FLAG_MIN_PREQ_CONTENT = 1<<12,
5960+ NL80211_SCAN_FLAG_FREQ_KHZ = 1<<13,
58645961 };
58655962
58665963 /**
include/uapi/linux/pkt_cls.h+24−0
@@ -134,6 +134,7 @@ enum tca_id { · 133 unmodified lines
134134 TCA_ID_CTINFO,
135135 TCA_ID_MPLS,
136136 TCA_ID_CT,
137+ TCA_ID_GATE,
137138 /* other actions go here */
138139 __TCA_ID_MAX = 255
139140 };
@@ -575,6 +576,8 @@ enum { · 435 unmodified lines
575576 TCA_FLOWER_KEY_CT_LABELS, /* u128 */
576577 TCA_FLOWER_KEY_CT_LABELS_MASK, /* u128 */
577578
579+ TCA_FLOWER_KEY_MPLS_OPTS,
580+
578581 __TCA_FLOWER_MAX,
579582 };
580583
@@ -639,6 +642,27 @@ enum { · 58 unmodified lines
639642 #define TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX \
640643 (__TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX - 1)
641644
645+enum {
646+ TCA_FLOWER_KEY_MPLS_OPTS_UNSPEC,
647+ TCA_FLOWER_KEY_MPLS_OPTS_LSE,
648+ __TCA_FLOWER_KEY_MPLS_OPTS_MAX,
649+};
650+
651+#define TCA_FLOWER_KEY_MPLS_OPTS_MAX (__TCA_FLOWER_KEY_MPLS_OPTS_MAX - 1)
652+
653+enum {
654+ TCA_FLOWER_KEY_MPLS_OPT_LSE_UNSPEC,
655+ TCA_FLOWER_KEY_MPLS_OPT_LSE_DEPTH,
656+ TCA_FLOWER_KEY_MPLS_OPT_LSE_TTL,
657+ TCA_FLOWER_KEY_MPLS_OPT_LSE_BOS,
658+ TCA_FLOWER_KEY_MPLS_OPT_LSE_TC,
659+ TCA_FLOWER_KEY_MPLS_OPT_LSE_LABEL,
660+ __TCA_FLOWER_KEY_MPLS_OPT_LSE_MAX,
661+};
662+
663+#define TCA_FLOWER_KEY_MPLS_OPT_LSE_MAX \
664+ (__TCA_FLOWER_KEY_MPLS_OPT_LSE_MAX - 1)
665+
642666 enum {
643667 TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT = (1 << 0),
644668 TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST = (1 << 1),
include/uapi/linux/pkt_sched.h+6−0
@@ -913,6 +913,10 @@ enum { · 912 unmodified lines
913913
914914 TCA_FQ_TIMER_SLACK, /* timer slack */
915915
916+ TCA_FQ_HORIZON, /* time horizon in us */
917+
918+ TCA_FQ_HORIZON_DROP, /* drop packets beyond horizon, or cap their EDT */
919+
916920 __TCA_FQ_MAX
917921 };
918922
@@ -932,6 +936,8 @@ struct tc_fq_qd_stats { · 13 unmodified lines
932936 __u32 throttled_flows;
933937 __u32 unthrottle_latency_ns;
934938 __u64 ce_mark; /* packets above ce_threshold */
939+ __u64 horizon_drops;
940+ __u64 horizon_caps;
935941 };
936942
937943 /* Heavy-Hitter Filter */
include/uapi/linux/psample.h+22−0
@@ -11,6 +11,7 @@ enum { · 10 unmodified lines
1111 PSAMPLE_ATTR_GROUP_SEQ,
1212 PSAMPLE_ATTR_SAMPLE_RATE,
1313 PSAMPLE_ATTR_DATA,
14+ PSAMPLE_ATTR_TUNNEL,
1415
1516 /* commands attributes */
1617 PSAMPLE_ATTR_GROUP_REFCOUNT,
@@ -25,6 +26,27 @@ enum psample_command { · 8 unmodified lines
2526 PSAMPLE_CMD_DEL_GROUP,
2627 };
2728
29+enum psample_tunnel_key_attr {
30+ PSAMPLE_TUNNEL_KEY_ATTR_ID, /* be64 Tunnel ID */
31+ PSAMPLE_TUNNEL_KEY_ATTR_IPV4_SRC, /* be32 src IP address. */
32+ PSAMPLE_TUNNEL_KEY_ATTR_IPV4_DST, /* be32 dst IP address. */
33+ PSAMPLE_TUNNEL_KEY_ATTR_TOS, /* u8 Tunnel IP ToS. */
34+ PSAMPLE_TUNNEL_KEY_ATTR_TTL, /* u8 Tunnel IP TTL. */
35+ PSAMPLE_TUNNEL_KEY_ATTR_DONT_FRAGMENT, /* No argument, set DF. */
36+ PSAMPLE_TUNNEL_KEY_ATTR_CSUM, /* No argument. CSUM packet. */
37+ PSAMPLE_TUNNEL_KEY_ATTR_OAM, /* No argument. OAM frame. */
38+ PSAMPLE_TUNNEL_KEY_ATTR_GENEVE_OPTS, /* Array of Geneve options. */
39+ PSAMPLE_TUNNEL_KEY_ATTR_TP_SRC, /* be16 src Transport Port. */
40+ PSAMPLE_TUNNEL_KEY_ATTR_TP_DST, /* be16 dst Transport Port. */
41+ PSAMPLE_TUNNEL_KEY_ATTR_VXLAN_OPTS, /* Nested VXLAN opts* */
42+ PSAMPLE_TUNNEL_KEY_ATTR_IPV6_SRC, /* struct in6_addr src IPv6 address. */
43+ PSAMPLE_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. */
44+ PSAMPLE_TUNNEL_KEY_ATTR_PAD,
45+ PSAMPLE_TUNNEL_KEY_ATTR_ERSPAN_OPTS, /* struct erspan_metadata */
46+ PSAMPLE_TUNNEL_KEY_ATTR_IPV4_INFO_BRIDGE, /* No argument. IPV4_INFO_BRIDGE mode.*/
47+ __PSAMPLE_TUNNEL_KEY_ATTR_MAX
48+};
49+
2850 /* Can be overridden at runtime by module option */
2951 #define PSAMPLE_ATTR_MAX (__PSAMPLE_ATTR_MAX - 1)
3052
include/uapi/linux/ptp_clock.h+3−1
@@ -89,7 +89,9 @@ struct ptp_clock_caps { · 88 unmodified lines
8989 int n_pins; /* Number of input/output pins. */
9090 /* Whether the clock supports precise system-device cross timestamps */
9191 int cross_timestamping;
92− int rsv[13]; /* Reserved for future use. */
92+ /* Whether the clock supports adjust phase */
93+ int adjust_phase;
94+ int rsv[12]; /* Reserved for future use. */
9395 };
9496
9597 struct ptp_extts_request {
include/uapi/linux/rtnetlink.h+6−0
@@ -609,11 +609,17 @@ enum { · 608 unmodified lines
609609 TCA_HW_OFFLOAD,
610610 TCA_INGRESS_BLOCK,
611611 TCA_EGRESS_BLOCK,
612+ TCA_DUMP_FLAGS,
612613 __TCA_MAX
613614 };
614615
615616 #define TCA_MAX (__TCA_MAX - 1)
616617
618+#define TCA_DUMP_FLAGS_TERSE (1 << 0) /* Means that in dump user gets only basic
619+ * data necessary to identify the objects
620+ * (handle, cookie, etc.) and stats.
621+ */
622+
617623 #define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg))))
618624 #define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg))
619625
include/uapi/linux/tc_act/tc_gate.h+47−0
@@ -0,0 +1,47 @@
1+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2+/* Copyright 2020 NXP */
3+
4+#ifndef __LINUX_TC_GATE_H
5+#define __LINUX_TC_GATE_H
6+
7+#include <linux/pkt_cls.h>
8+
9+struct tc_gate {
10+ tc_gen;
11+};
12+
13+enum {
14+ TCA_GATE_ENTRY_UNSPEC,
15+ TCA_GATE_ENTRY_INDEX,
16+ TCA_GATE_ENTRY_GATE,
17+ TCA_GATE_ENTRY_INTERVAL,
18+ TCA_GATE_ENTRY_IPV,
19+ TCA_GATE_ENTRY_MAX_OCTETS,
20+ __TCA_GATE_ENTRY_MAX,
21+};
22+#define TCA_GATE_ENTRY_MAX (__TCA_GATE_ENTRY_MAX - 1)
23+
24+enum {
25+ TCA_GATE_ONE_ENTRY_UNSPEC,
26+ TCA_GATE_ONE_ENTRY,
27+ __TCA_GATE_ONE_ENTRY_MAX,
28+};
29+#define TCA_GATE_ONE_ENTRY_MAX (__TCA_GATE_ONE_ENTRY_MAX - 1)
30+
31+enum {
32+ TCA_GATE_UNSPEC,
33+ TCA_GATE_TM,
34+ TCA_GATE_PARMS,
35+ TCA_GATE_PAD,
36+ TCA_GATE_PRIORITY,
37+ TCA_GATE_ENTRY_LIST,
38+ TCA_GATE_BASE_TIME,
39+ TCA_GATE_CYCLE_TIME,
40+ TCA_GATE_CYCLE_TIME_EXT,
41+ TCA_GATE_FLAGS,
42+ TCA_GATE_CLOCKID,
43+ __TCA_GATE_MAX,
44+};
45+#define TCA_GATE_MAX (__TCA_GATE_MAX - 1)
46+
47+#endif
include/uapi/linux/wireless.h+5−1
@@ -74,7 +74,11 @@ · 73 unmodified lines
7474 #include <linux/socket.h> /* for "struct sockaddr" et al */
7575 #include <linux/if.h> /* for IFNAMSIZ and co... */
7676
77−#include <stddef.h> /* for offsetof */
77+#ifdef __KERNEL__
78+# include <linux/stddef.h> /* for offsetof */
79+#else
80+# include <stddef.h> /* for offsetof */
81+#endif
7882
7983 /***************************** VERSION *****************************/
8084 /*