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/linux (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
113 BPF_MAP_DELETE_BATCH,113 BPF_MAP_DELETE_BATCH,
114 BPF_LINK_CREATE,114 BPF_LINK_CREATE,
115 BPF_LINK_UPDATE,115 BPF_LINK_UPDATE,
116 BPF_LINK_GET_FD_BY_ID,
117 BPF_LINK_GET_NEXT_ID,
118 BPF_ENABLE_STATS,
119 BPF_ITER_CREATE,
116};120};
117 121
118enum bpf_map_type {122enum bpf_map_type {
@@ -143,6 +147,7 @@ enum bpf_map_type { · 24 unmodified lines
143 BPF_MAP_TYPE_SK_STORAGE,147 BPF_MAP_TYPE_SK_STORAGE,
144 BPF_MAP_TYPE_DEVMAP_HASH,148 BPF_MAP_TYPE_DEVMAP_HASH,
145 BPF_MAP_TYPE_STRUCT_OPS,149 BPF_MAP_TYPE_STRUCT_OPS,
150 BPF_MAP_TYPE_RINGBUF,
146};151};
147 152
148/* Note that tracing related programs such as153/* Note that tracing related programs such as
@@ -215,11 +220,28 @@ enum bpf_attach_type { · 66 unmodified lines
215 BPF_TRACE_FEXIT,220 BPF_TRACE_FEXIT,
216 BPF_MODIFY_RETURN,221 BPF_MODIFY_RETURN,
217 BPF_LSM_MAC,222 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,
218 __MAX_BPF_ATTACH_TYPE229 __MAX_BPF_ATTACH_TYPE
219};230};
220 231
221#define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE232#define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE
222 233
234enum 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
223/* cgroup-bpf attach flags used in BPF_PROG_ATTACH command245/* cgroup-bpf attach flags used in BPF_PROG_ATTACH command
224 *246 *
225 * NONE(default): No further bpf programs allowed in the subtree.247 * NONE(default): No further bpf programs allowed in the subtree.
@@ -379,6 +401,12 @@ enum { · 153 unmodified lines
379 */401 */
380#define BPF_F_QUERY_EFFECTIVE (1U << 0)402#define BPF_F_QUERY_EFFECTIVE (1U << 0)
381 403
404/* type for BPF_ENABLE_STATS */
405enum bpf_stats_type {
406 /* enabled run_time_ns and run_cnt */
407 BPF_STATS_RUN_TIME = 0,
408};
409
382enum bpf_stack_build_id_status {410enum bpf_stack_build_id_status {
383 /* user space need an empty entry to identify end of a trace */411 /* user space need an empty entry to identify end of a trace */
384 BPF_STACK_BUILD_ID_EMPTY = 0,412 BPF_STACK_BUILD_ID_EMPTY = 0,
@@ -523,6 +551,7 @@ union bpf_attr { · 138 unmodified lines
523 __u32 prog_id;551 __u32 prog_id;
524 __u32 map_id;552 __u32 map_id;
525 __u32 btf_id;553 __u32 btf_id;
554 __u32 link_id;
526 };555 };
527 __u32 next_id;556 __u32 next_id;
528 __u32 open_flags;557 __u32 open_flags;
@@ -589,6 +618,15 @@ union bpf_attr { · 60 unmodified lines
589 __u32 old_prog_fd;618 __u32 old_prog_fd;
590 } link_update;619 } link_update;
591 620
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
592} __attribute__((aligned(8)));630} __attribute__((aligned(8)));
593 631
594/* The description below is an attempt at providing documentation to eBPF632/* The description below is an attempt at providing documentation to eBPF
@@ -644,14 +682,16 @@ union bpf_attr { · 49 unmodified lines
644 * For tracing programs, safely attempt to read *size* bytes from682 * For tracing programs, safely attempt to read *size* bytes from
645 * kernel space address *unsafe_ptr* and store the data in *dst*.683 * kernel space address *unsafe_ptr* and store the data in *dst*.
646 *684 *
647 * Generally, use bpf_probe_read_user() or bpf_probe_read_kernel()685 * Generally, use **bpf_probe_read_user**\ () or
648 * instead.686 * **bpf_probe_read_kernel**\ () instead.
649 * Return687 * Return
650 * 0 on success, or a negative error in case of failure.688 * 0 on success, or a negative error in case of failure.
651 *689 *
652 * u64 bpf_ktime_get_ns(void)690 * u64 bpf_ktime_get_ns(void)
653 * Description691 * Description
654 * Return the time elapsed since system boot, in nanoseconds.692 * Return the time elapsed since system boot, in nanoseconds.
693 * Does not include time the system was suspended.
694 * See: **clock_gettime**\ (**CLOCK_MONOTONIC**)
655 * Return695 * Return
656 * Current *ktime*.696 * Current *ktime*.
657 *697 *
@@ -1510,11 +1550,11 @@ union bpf_attr { · 852 unmodified lines
1510 * int bpf_probe_read_str(void *dst, u32 size, const void *unsafe_ptr)1550 * int bpf_probe_read_str(void *dst, u32 size, const void *unsafe_ptr)
1511 * Description1551 * Description
1512 * Copy a NUL terminated string from an unsafe kernel address1552 * Copy a NUL terminated string from an unsafe kernel address
1513 * *unsafe_ptr* to *dst*. See bpf_probe_read_kernel_str() for1553 * *unsafe_ptr* to *dst*. See **bpf_probe_read_kernel_str**\ () for
1514 * more details.1554 * more details.
1515 *1555 *
1516 * Generally, use bpf_probe_read_user_str() or bpf_probe_read_kernel_str()1556 * Generally, use **bpf_probe_read_user_str**\ () or
1517 * instead.1557 * **bpf_probe_read_kernel_str**\ () instead.
1518 * Return1558 * Return
1519 * On success, the strictly positive length of the string,1559 * On success, the strictly positive length of the string,
1520 * including the trailing NUL character. On error, a negative1560 * including the trailing NUL character. On error, a negative
@@ -1542,7 +1582,7 @@ union bpf_attr { · 21 unmodified lines
1542 *1582 *
1543 * u64 bpf_get_socket_cookie(struct bpf_sock_ops *ctx)1583 * u64 bpf_get_socket_cookie(struct bpf_sock_ops *ctx)
1544 * Description1584 * Description
1545 * Equivalent to bpf_get_socket_cookie() helper that accepts1585 * Equivalent to **bpf_get_socket_cookie**\ () helper that accepts
1546 * *skb*, but gets socket from **struct bpf_sock_ops** context.1586 * *skb*, but gets socket from **struct bpf_sock_ops** context.
1547 * Return1587 * Return
1548 * A 8-byte long non-decreasing number.1588 * A 8-byte long non-decreasing number.
@@ -1562,7 +1602,7 @@ union bpf_attr { · 13 unmodified lines
1562 * Return1602 * Return
1563 * 01603 * 0
1564 *1604 *
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)
1566 * Description1606 * Description
1567 * Emulate a call to **setsockopt()** on the socket associated to1607 * Emulate a call to **setsockopt()** on the socket associated to
1568 * *bpf_socket*, which must be a full socket. The *level* at1608 * *bpf_socket*, which must be a full socket. The *level* at
@@ -1570,6 +1610,12 @@ union bpf_attr { · 1 unmodified line
1570 * must be specified, see **setsockopt(2)** for more information.1610 * must be specified, see **setsockopt(2)** for more information.
1571 * The option value of length *optlen* is pointed by *optval*.1611 * The option value of length *optlen* is pointed by *optval*.
1572 *1612 *
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 *
1573 * This helper actually implements a subset of **setsockopt()**.1619 * This helper actually implements a subset of **setsockopt()**.
1574 * It supports the following *level*\ s:1620 * It supports the following *level*\ s:
1575 *1621 *
@@ -1589,6 +1635,13 @@ union bpf_attr { · 13 unmodified lines
1589 * Grow or shrink the room for data in the packet associated to1635 * Grow or shrink the room for data in the packet associated to
1590 * *skb* by *len_diff*, and according to the selected *mode*.1636 * *skb* by *len_diff*, and according to the selected *mode*.
1591 *1637 *
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 *
1592 * There are two supported modes at this time:1645 * There are two supported modes at this time:
1593 *1646 *
1594 * * **BPF_ADJ_ROOM_MAC**: Adjust room at the mac layer1647 * * **BPF_ADJ_ROOM_MAC**: Adjust room at the mac layer
@@ -1634,12 +1687,12 @@ union bpf_attr { · 39 unmodified lines
1634 *1687 *
1635 * The lower two bits of *flags* are used as the return code if1688 * The lower two bits of *flags* are used as the return code if
1636 * the map lookup fails. This is so that the return value can be1689 * 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 by1690 * one of the XDP program return codes up to **XDP_TX**, as chosen
1638 * the caller. Any higher bits in the *flags* argument must be1691 * by the caller. Any higher bits in the *flags* argument must be
1639 * unset.1692 * unset.
1640 *1693 *
1641 * See also bpf_redirect(), which only supports redirecting to an1694 * See also **bpf_redirect**\ (), which only supports redirecting
1642 * ifindex, but doesn't require a map to do so.1695 * to an ifindex, but doesn't require a map to do so.
1643 * Return1696 * Return
1644 * **XDP_REDIRECT** on success, or the value of the two lower bits1697 * **XDP_REDIRECT** on success, or the value of the two lower bits
1645 * of the *flags* argument on error.1698 * of the *flags* argument on error.
@@ -1747,7 +1800,7 @@ union bpf_attr { · 101 unmodified lines
1747 * the time running for event since last normalization. The1800 * the time running for event since last normalization. The
1748 * enabled and running times are accumulated since the perf event1801 * enabled and running times are accumulated since the perf event
1749 * open. To achieve scaling factor between two invocations of an1802 * open. To achieve scaling factor between two invocations of an
1750 * eBPF program, users can can use CPU id as the key (which is1803 * eBPF program, users can use CPU id as the key (which is
1751 * typical for perf array usage model) to remember the previous1804 * typical for perf array usage model) to remember the previous
1752 * value and do the calculation inside the eBPF program.1805 * value and do the calculation inside the eBPF program.
1753 * Return1806 * Return
@@ -1764,7 +1817,7 @@ union bpf_attr { · 10 unmodified lines
1764 * Return1817 * Return
1765 * 0 on success, or a negative error in case of failure.1818 * 0 on success, or a negative error in case of failure.
1766 *1819 *
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)
1768 * Description1821 * Description
1769 * Emulate a call to **getsockopt()** on the socket associated to1822 * Emulate a call to **getsockopt()** on the socket associated to
1770 * *bpf_socket*, which must be a full socket. The *level* at1823 * *bpf_socket*, which must be a full socket. The *level* at
@@ -1773,6 +1826,12 @@ union bpf_attr { · 2 unmodified lines
1773 * The retrieved value is stored in the structure pointed by1826 * The retrieved value is stored in the structure pointed by
1774 * *opval* and of length *optlen*.1827 * *opval* and of length *optlen*.
1775 *1828 *
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 *
1776 * This helper actually implements a subset of **getsockopt()**.1835 * This helper actually implements a subset of **getsockopt()**.
1777 * It supports the following *level*\ s:1836 * It supports the following *level*\ s:
1778 *1837 *
@@ -1790,7 +1849,7 @@ union bpf_attr { · 11 unmodified lines
1790 * The first argument is the context *regs* on which the kprobe1849 * The first argument is the context *regs* on which the kprobe
1791 * works.1850 * works.
1792 *1851 *
1793 * This helper works by setting setting the PC (program counter)1852 * This helper works by setting the PC (program counter)
1794 * to an override function which is run in place of the original1853 * to an override function which is run in place of the original
1795 * probed function. This means the probed function is not run at1854 * probed function. This means the probed function is not run at
1796 * all. The replacement function just returns with the required1855 * all. The replacement function just returns with the required
@@ -1959,18 +2018,19 @@ union bpf_attr { · 162 unmodified lines
1959 *2018 *
1960 * This helper works for IPv4 and IPv6, TCP and UDP sockets. The2019 * This helper works for IPv4 and IPv6, TCP and UDP sockets. The
1961 * domain (*addr*\ **->sa_family**) must be **AF_INET** (or2020 * domain (*addr*\ **->sa_family**) must be **AF_INET** (or
1962 * **AF_INET6**). Looking for a free port to bind to can be2021 * **AF_INET6**). It's advised to pass zero port (**sin_port**
1963 * expensive, therefore binding to port is not permitted by the2022 * or **sin6_port**) which triggers IP_BIND_ADDRESS_NO_PORT-like
1964 * helper: *addr*\ **->sin_port** (or **sin6_port**, respectively)2023 * behavior and lets the kernel efficiently pick up an unused
1965 * must be set to zero.2024 * port as long as 4-tuple is unique. Passing non-zero port might
2025 * lead to degraded performance.
1966 * Return2026 * Return
1967 * 0 on success, or a negative error in case of failure.2027 * 0 on success, or a negative error in case of failure.
1968 *2028 *
1969 * int bpf_xdp_adjust_tail(struct xdp_buff *xdp_md, int delta)2029 * int bpf_xdp_adjust_tail(struct xdp_buff *xdp_md, int delta)
1970 * Description2030 * Description
1971 * Adjust (move) *xdp_md*\ **->data_end** by *delta* bytes. It is2031 * Adjust (move) *xdp_md*\ **->data_end** by *delta* bytes. It is
1972 * only possible to shrink the packet as of this writing,2032 * possible to both shrink and grow the packet tail.
1973 * therefore *delta* must be a negative integer.2033 * Shrink done via *delta* being a negative integer.
1974 *2034 *
1975 * A call to this helper is susceptible to change the underlying2035 * A call to this helper is susceptible to change the underlying
1976 * packet buffer. Therefore, at load time, all checks on pointers2036 * packet buffer. Therefore, at load time, all checks on pointers
@@ -2256,7 +2316,7 @@ union bpf_attr { · 279 unmodified lines
2256 * **bpf_rc_keydown**\ () again with the same values, or calling2316 * **bpf_rc_keydown**\ () again with the same values, or calling
2257 * **bpf_rc_repeat**\ ().2317 * **bpf_rc_repeat**\ ().
2258 *2318 *
2259 * Some protocols include a toggle bit, in case the button was2319 * Some protocols include a toggle bit, in case the button was
2260 * released and pressed again between consecutive scancodes.2320 * released and pressed again between consecutive scancodes.
2261 *2321 *
2262 * The *ctx* should point to the lirc sample as passed into2322 * The *ctx* should point to the lirc sample as passed into
@@ -2602,7 +2662,6 @@ union bpf_attr { · 339 unmodified lines
2602 *2662 *
2603 * *th* points to the start of the TCP header, while *th_len*2663 * *th* points to the start of the TCP header, while *th_len*
2604 * contains **sizeof**\ (**struct tcphdr**).2664 * contains **sizeof**\ (**struct tcphdr**).
2605 *
2606 * Return2665 * Return
2607 * 0 if *iph* and *th* are a valid SYN cookie ACK, or a negative2666 * 0 if *iph* and *th* are a valid SYN cookie ACK, or a negative
2608 * error otherwise.2667 * error otherwise.
@@ -2785,7 +2844,6 @@ union bpf_attr { · 176 unmodified lines
2785 *2844 *
2786 * *th* points to the start of the TCP header, while *th_len*2845 * *th* points to the start of the TCP header, while *th_len*
2787 * contains the length of the TCP header.2846 * contains the length of the TCP header.
2788 *
2789 * Return2847 * Return
2790 * On success, lower 32 bits hold the generated SYN cookie in2848 * On success, lower 32 bits hold the generated SYN cookie in
2791 * followed by 16 bits which hold the MSS value for that cookie,2849 * followed by 16 bits which hold the MSS value for that cookie,
@@ -2868,7 +2926,7 @@ union bpf_attr { · 76 unmodified lines
2868 * // size, after checking its boundaries.2926 * // size, after checking its boundaries.
2869 * }2927 * }
2870 *2928 *
2871 * In comparison, using **bpf_probe_read_user()** helper here2929 * In comparison, using **bpf_probe_read_user**\ () helper here
2872 * instead to read the string would require to estimate the length2930 * instead to read the string would require to estimate the length
2873 * at compile time, and would often result in copying more memory2931 * at compile time, and would often result in copying more memory
2874 * than necessary.2932 * than necessary.
@@ -2886,14 +2944,14 @@ union bpf_attr { · 11 unmodified lines
2886 * int bpf_probe_read_kernel_str(void *dst, u32 size, const void *unsafe_ptr)2944 * int bpf_probe_read_kernel_str(void *dst, u32 size, const void *unsafe_ptr)
2887 * Description2945 * Description
2888 * Copy a NUL terminated string from an unsafe kernel address *unsafe_ptr*2946 * 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.
2890 * Return2948 * Return
2891 * On success, the strictly positive length of the string, including2949 * On success, the strictly positive length of the string, including
2892 * the trailing NUL character. On error, a negative value.2950 * the trailing NUL character. On error, a negative value.
2893 *2951 *
2894 * int bpf_tcp_send_ack(void *tp, u32 rcv_nxt)2952 * int bpf_tcp_send_ack(void *tp, u32 rcv_nxt)
2895 * Description2953 * 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**.
2897 * *rcv_nxt* is the ack_seq to be sent out.2955 * *rcv_nxt* is the ack_seq to be sent out.
2898 * Return2956 * Return
2899 * 0 on success, or a negative error in case of failure.2957 * 0 on success, or a negative error in case of failure.
@@ -2921,19 +2979,19 @@ union bpf_attr { · 21 unmodified lines
2921 * int bpf_read_branch_records(struct bpf_perf_event_data *ctx, void *buf, u32 size, u64 flags)2979 * int bpf_read_branch_records(struct bpf_perf_event_data *ctx, void *buf, u32 size, u64 flags)
2922 * Description2980 * Description
2923 * For an eBPF program attached to a perf event, retrieve the2981 * For an eBPF program attached to a perf event, retrieve the
2924 * branch records (struct perf_branch_entry) associated to *ctx*2982 * branch records (**struct perf_branch_entry**) associated to *ctx*
2925 * and store it in the buffer pointed by *buf* up to size2983 * and store it in the buffer pointed by *buf* up to size
2926 * *size* bytes.2984 * *size* bytes.
2927 * Return2985 * Return
2928 * On success, number of bytes written to *buf*. On error, a2986 * On success, number of bytes written to *buf*. On error, a
2929 * negative value.2987 * negative value.
2930 *2988 *
2931 * The *flags* can be set to **BPF_F_GET_BRANCH_RECORDS_SIZE** to2989 * The *flags* can be set to **BPF_F_GET_BRANCH_RECORDS_SIZE** to
2932 * instead return the number of bytes required to store all the2990 * instead return the number of bytes required to store all the
2933 * branch entries. If this flag is set, *buf* may be NULL.2991 * branch entries. If this flag is set, *buf* may be NULL.
2934 *2992 *
2935 * **-EINVAL** if arguments invalid or **size** not a multiple2993 * **-EINVAL** if arguments invalid or **size** not a multiple
2936 * of sizeof(struct perf_branch_entry).2994 * of **sizeof**\ (**struct perf_branch_entry**\ ).
2937 *2995 *
2938 * **-ENOENT** if architecture does not support branch records.2996 * **-ENOENT** if architecture does not support branch records.
2939 *2997 *
@@ -2941,8 +2999,8 @@ union bpf_attr { · 1 unmodified line
2941 * Description2999 * Description
2942 * Returns 0 on success, values for *pid* and *tgid* as seen from the current3000 * Returns 0 on success, values for *pid* and *tgid* as seen from the current
2943 * *namespace* will be returned in *nsdata*.3001 * *namespace* will be returned in *nsdata*.
2944 *3002 * Return
2945 * On failure, the returned value is one of the following:3003 * 0 on success, or one of the following in case of failure:
2946 *3004 *
2947 * **-EINVAL** if dev and inum supplied don't match dev_t and inode number3005 * **-EINVAL** if dev and inum supplied don't match dev_t and inode number
2948 * with nsfs of current task, or if dev conversion to dev_t lost high bits.3006 * 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
2981 * a global identifier that can be assumed unique. If *ctx* is3039 * a global identifier that can be assumed unique. If *ctx* is
2982 * NULL, then the helper returns the cookie for the initial3040 * NULL, then the helper returns the cookie for the initial
2983 * network namespace. The cookie itself is very similar to that3041 * network namespace. The cookie itself is very similar to that
2984 * of bpf_get_socket_cookie() helper, but for network namespaces3042 * of **bpf_get_socket_cookie**\ () helper, but for network
2985 * instead of sockets.3043 * namespaces instead of sockets.
2986 * Return3044 * Return
2987 * A 8-byte long opaque number.3045 * A 8-byte long opaque number.
2988 *3046 *
@@ -3017,14 +3075,183 @@ union bpf_attr { · 28 unmodified lines
3017 *3075 *
3018 * The *flags* argument must be zero.3076 * The *flags* argument must be zero.
3019 * Return3077 * Return
3020 * 0 on success, or a negative errno in case of failure.3078 * 0 on success, or a negative error in case of failure:
3021 *3079 *
3022 * * **-EINVAL** Unsupported flags specified.3080 * **-EINVAL** if specified *flags* are not supported.
3023 * * **-ENOENT** Socket is unavailable for assignment.3081 *
3024 * * **-ENETUNREACH** Socket is unreachable (wrong netns).3082 * **-ENOENT** if the socket is unavailable for assignment.
3025 * * **-EOPNOTSUPP** Unsupported operation, for example a3083 *
3026 * call from outside of TC ingress.3084 * **-ENETUNREACH** if the socket is unreachable (wrong netns).
3027 * * **-ESOCKTNOSUPPORT** Socket type not supported (reuseport).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.
3028 */3255 */
3029#define __BPF_FUNC_MAPPER(FN) \3256#define __BPF_FUNC_MAPPER(FN) \
3030 FN(unspec), \3257 FN(unspec), \
@@ -3151,7 +3378,18 @@ union bpf_attr { · 120 unmodified lines
3151 FN(xdp_output), \3378 FN(xdp_output), \
3152 FN(get_netns_cookie), \3379 FN(get_netns_cookie), \
3153 FN(get_current_ancestor_cgroup_id), \3380 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),
3155 3393
3156/* integer value in 'imm' field of BPF_CALL instruction selects which helper3394/* integer value in 'imm' field of BPF_CALL instruction selects which helper
3157 * function eBPF program intends to call3395 * function eBPF program intends to call
@@ -3228,6 +3466,14 @@ enum { · 70 unmodified lines
3228 BPF_F_CURRENT_NETNS = (-1L),3466 BPF_F_CURRENT_NETNS = (-1L),
3229};3467};
3230 3468
3469/* BPF_FUNC_csum_level level values. */
3470enum {
3471 BPF_CSUM_LEVEL_QUERY,
3472 BPF_CSUM_LEVEL_INC,
3473 BPF_CSUM_LEVEL_DEC,
3474 BPF_CSUM_LEVEL_RESET,
3475};
3476
3231/* BPF_FUNC_skb_adjust_room flags. */3477/* BPF_FUNC_skb_adjust_room flags. */
3232enum {3478enum {
3233 BPF_F_ADJ_ROOM_FIXED_GSO = (1ULL << 0),3479 BPF_F_ADJ_ROOM_FIXED_GSO = (1ULL << 0),
@@ -3235,6 +3481,7 @@ enum { · 1 unmodified line
3235 BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = (1ULL << 2),3481 BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = (1ULL << 2),
3236 BPF_F_ADJ_ROOM_ENCAP_L4_GRE = (1ULL << 3),3482 BPF_F_ADJ_ROOM_ENCAP_L4_GRE = (1ULL << 3),
3237 BPF_F_ADJ_ROOM_ENCAP_L4_UDP = (1ULL << 4),3483 BPF_F_ADJ_ROOM_ENCAP_L4_UDP = (1ULL << 4),
3484 BPF_F_ADJ_ROOM_NO_CSUM_RESET = (1ULL << 5),
3238};3485};
3239 3486
3240enum {3487enum {
@@ -3261,6 +3508,29 @@ enum { · 20 unmodified lines
3261 BPF_F_GET_BRANCH_RECORDS_SIZE = (1ULL << 0),3508 BPF_F_GET_BRANCH_RECORDS_SIZE = (1ULL << 0),
3262};3509};
3263 3510
3511/* BPF_FUNC_bpf_ringbuf_commit, BPF_FUNC_bpf_ringbuf_discard, and
3512 * BPF_FUNC_bpf_ringbuf_output flags.
3513 */
3514enum {
3515 BPF_RB_NO_WAKEUP = (1ULL << 0),
3516 BPF_RB_FORCE_WAKEUP = (1ULL << 1),
3517};
3518
3519/* BPF_FUNC_bpf_ringbuf_query flags */
3520enum {
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 */
3528enum {
3529 BPF_RINGBUF_BUSY_BIT = (1U << 31),
3530 BPF_RINGBUF_DISCARD_BIT = (1U << 30),
3531 BPF_RINGBUF_HDR_SZ = 8,
3532};
3533
3264/* Mode for BPF_FUNC_skb_adjust_room helper. */3534/* Mode for BPF_FUNC_skb_adjust_room helper. */
3265enum bpf_adj_room_mode {3535enum bpf_adj_room_mode {
3266 BPF_ADJ_ROOM_NET,3536 BPF_ADJ_ROOM_NET,
@@ -3393,6 +3663,7 @@ struct bpf_sock { · 126 unmodified lines
3393 __u32 dst_ip4;3663 __u32 dst_ip4;
3394 __u32 dst_ip6[4];3664 __u32 dst_ip6[4];
3395 __u32 state;3665 __u32 state;
3666 __s32 rx_queue_mapping;
3396};3667};
3397 3668
3398struct bpf_tcp_sock {3669struct bpf_tcp_sock {
@@ -3486,6 +3757,8 @@ struct xdp_md { · 87 unmodified lines
3486 /* Below access go through struct xdp_rxq_info */3757 /* Below access go through struct xdp_rxq_info */
3487 __u32 ingress_ifindex; /* rxq->dev->ifindex */3758 __u32 ingress_ifindex; /* rxq->dev->ifindex */
3488 __u32 rx_queue_index; /* rxq->queue_index */3759 __u32 rx_queue_index; /* rxq->queue_index */
3760
3761 __u32 egress_ifindex; /* txq->dev->ifindex */
3489};3762};
3490 3763
3491enum sk_action {3764enum sk_action {
@@ -3508,6 +3781,8 @@ struct sk_msg_md { · 16 unmodified lines
3508 __u32 remote_port; /* Stored in network byte order */3781 __u32 remote_port; /* Stored in network byte order */
3509 __u32 local_port; /* stored in host byte order */3782 __u32 local_port; /* stored in host byte order */
3510 __u32 size; /* Total size of sk_msg */3783 __u32 size; /* Total size of sk_msg */
3784
3785 __bpf_md_ptr(struct bpf_sock *, sk); /* current socket */
3511};3786};
3512 3787
3513struct sk_reuseport_md {3788struct sk_reuseport_md {
@@ -3598,6 +3873,29 @@ struct bpf_btf_info { · 84 unmodified lines
3598 __u32 id;3873 __u32 id;
3599} __attribute__((aligned(8)));3874} __attribute__((aligned(8)));
3600 3875
3876struct 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
3601/* User bpf_sock_addr struct to access socket fields and sockaddr struct passed3899/* User bpf_sock_addr struct to access socket fields and sockaddr struct passed
3602 * by user and intended to be used by socket (e.g. to bind to, depends on3900 * by user and intended to be used by socket (e.g. to bind to, depends on
3603 * attach attach type).3901 * attach attach type).
@@ -3610,7 +3908,7 @@ struct bpf_sock_addr { · 6 unmodified lines
3610 __u32 user_ip6[4]; /* Allows 1,2,4,8-byte read and 4,8-byte write.3908 __u32 user_ip6[4]; /* Allows 1,2,4,8-byte read and 4,8-byte write.
3611 * Stored in network byte order.3909 * Stored in network byte order.
3612 */3910 */
3613 __u32 user_port; /* Allows 4-byte read and write.3911 __u32 user_port; /* Allows 1,2,4-byte read and 4-byte write.
3614 * Stored in network byte order3912 * Stored in network byte order
3615 */3913 */
3616 __u32 family; /* Allows 4-byte read, but no write */3914 __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
274 arbitrary SCSI commands */274 arbitrary SCSI commands */
275/* Allow setting encryption key on loopback filesystem */275/* Allow setting encryption key on loopback filesystem */
276/* Allow setting zone reclaim policy */276/* Allow setting zone reclaim policy */
277/* Allow everything under CAP_BPF and CAP_PERFMON for backward compatibility */
277 278
278#define CAP_SYS_ADMIN 21279#define CAP_SYS_ADMIN 21
279 280
@@ -376,7 +377,38 @@ struct vfs_ns_cap_data { · 96 unmodified lines
376 377
377#define CAP_PERFMON 38378#define CAP_PERFMON 38
378 379
379#define CAP_LAST_CAP CAP_PERFMON380/*
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
380 412
381#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)413#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
382 414
include/uapi/linux/devlink.h+9−0
@@ -233,10 +233,13 @@ enum { · 232 unmodified lines
233 * @DEVLINK_TRAP_ACTION_DROP: Packet is dropped by the device and a copy is not233 * @DEVLINK_TRAP_ACTION_DROP: Packet is dropped by the device and a copy is not
234 * sent to the CPU.234 * sent to the CPU.
235 * @DEVLINK_TRAP_ACTION_TRAP: The sole copy of the packet is sent to the CPU.235 * @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.
236 */238 */
237enum devlink_trap_action {239enum devlink_trap_action {
238 DEVLINK_TRAP_ACTION_DROP,240 DEVLINK_TRAP_ACTION_DROP,
239 DEVLINK_TRAP_ACTION_TRAP,241 DEVLINK_TRAP_ACTION_TRAP,
242 DEVLINK_TRAP_ACTION_MIRROR,
240};243};
241 244
242/**245/**
@@ -250,10 +253,16 @@ enum devlink_trap_action { · 7 unmodified lines
250 * control plane for resolution. Trapped packets253 * control plane for resolution. Trapped packets
251 * are processed by devlink and injected to254 * are processed by devlink and injected to
252 * the kernel's Rx path.255 * 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.
253 */261 */
254enum devlink_trap_type {262enum devlink_trap_type {
255 DEVLINK_TRAP_TYPE_DROP,263 DEVLINK_TRAP_TYPE_DROP,
256 DEVLINK_TRAP_TYPE_EXCEPTION,264 DEVLINK_TRAP_TYPE_EXCEPTION,
265 DEVLINK_TRAP_TYPE_CONTROL,
257};266};
258 267
259enum {268enum {
include/uapi/linux/errqueue.h+1−1
@@ -36,7 +36,7 @@ struct sock_extended_err { · 35 unmodified lines
36 *36 *
37 * The timestamping interfaces SO_TIMESTAMPING, MSG_TSTAMP_*37 * The timestamping interfaces SO_TIMESTAMPING, MSG_TSTAMP_*
38 * communicate network timestamps by passing this struct in a cmsg with38 * 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.
40 * User space sees a timespec definition that matches either40 * User space sees a timespec definition that matches either
41 * __kernel_timespec or __kernel_old_timespec, in the kernel we41 * __kernel_timespec or __kernel_old_timespec, in the kernel we
42 * require two structure definitions to provide both.42 * 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
1666 return 0;1666 return 0;
1667}1667}
1668 1668
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
1669/* Which connector port. */1681/* Which connector port. */
1670#define PORT_TP 0x001682#define PORT_TP 0x00
1671#define PORT_AUI 0x011683#define PORT_AUI 0x01
@@ -1904,7 +1916,9 @@ struct ethtool_link_settings { · 232 unmodified lines
1904 __u8 eth_tp_mdix_ctrl;1916 __u8 eth_tp_mdix_ctrl;
1905 __s8 link_mode_masks_nwords;1917 __s8 link_mode_masks_nwords;
1906 __u8 transceiver;1918 __u8 transceiver;
1907 __u8 reserved1[3];1919 __u8 master_slave_cfg;
1920 __u8 master_slave_state;
1921 __u8 reserved1[1];
1908 __u32 reserved[7];1922 __u32 reserved[7];
1909 __u32 link_mode_masks[0];1923 __u32 link_mode_masks[0];
1910 /* layout of link_mode_masks fields:1924 /* layout of link_mode_masks fields:
include/uapi/linux/ethtool_netlink.h+151−0
@@ -39,6 +39,8 @@ enum { · 38 unmodified lines
39 ETHTOOL_MSG_EEE_GET,39 ETHTOOL_MSG_EEE_GET,
40 ETHTOOL_MSG_EEE_SET,40 ETHTOOL_MSG_EEE_SET,
41 ETHTOOL_MSG_TSINFO_GET,41 ETHTOOL_MSG_TSINFO_GET,
42 ETHTOOL_MSG_CABLE_TEST_ACT,
43 ETHTOOL_MSG_CABLE_TEST_TDR_ACT,
42 44
43 /* add new constants above here */45 /* add new constants above here */
44 __ETHTOOL_MSG_USER_CNT,46 __ETHTOOL_MSG_USER_CNT,
@@ -74,6 +76,8 @@ enum { · 29 unmodified lines
74 ETHTOOL_MSG_EEE_GET_REPLY,76 ETHTOOL_MSG_EEE_GET_REPLY,
75 ETHTOOL_MSG_EEE_NTF,77 ETHTOOL_MSG_EEE_NTF,
76 ETHTOOL_MSG_TSINFO_GET_REPLY,78 ETHTOOL_MSG_TSINFO_GET_REPLY,
79 ETHTOOL_MSG_CABLE_TEST_NTF,
80 ETHTOOL_MSG_CABLE_TEST_TDR_NTF,
77 81
78 /* add new constants above here */82 /* add new constants above here */
79 __ETHTOOL_MSG_KERNEL_CNT,83 __ETHTOOL_MSG_KERNEL_CNT,
@@ -216,6 +220,8 @@ enum { · 136 unmodified lines
216 ETHTOOL_A_LINKMODES_PEER, /* bitset */220 ETHTOOL_A_LINKMODES_PEER, /* bitset */
217 ETHTOOL_A_LINKMODES_SPEED, /* u32 */221 ETHTOOL_A_LINKMODES_SPEED, /* u32 */
218 ETHTOOL_A_LINKMODES_DUPLEX, /* u8 */222 ETHTOOL_A_LINKMODES_DUPLEX, /* u8 */
223 ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG, /* u8 */
224 ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE, /* u8 */
219 225
220 /* add new constants above here */226 /* add new constants above here */
221 __ETHTOOL_A_LINKMODES_CNT,227 __ETHTOOL_A_LINKMODES_CNT,
@@ -228,6 +234,8 @@ enum { · 6 unmodified lines
228 ETHTOOL_A_LINKSTATE_UNSPEC,234 ETHTOOL_A_LINKSTATE_UNSPEC,
229 ETHTOOL_A_LINKSTATE_HEADER, /* nest - _A_HEADER_* */235 ETHTOOL_A_LINKSTATE_HEADER, /* nest - _A_HEADER_* */
230 ETHTOOL_A_LINKSTATE_LINK, /* u8 */236 ETHTOOL_A_LINKSTATE_LINK, /* u8 */
237 ETHTOOL_A_LINKSTATE_SQI, /* u32 */
238 ETHTOOL_A_LINKSTATE_SQI_MAX, /* u32 */
231 239
232 /* add new constants above here */240 /* add new constants above here */
233 __ETHTOOL_A_LINKSTATE_CNT,241 __ETHTOOL_A_LINKSTATE_CNT,
@@ -403,6 +411,149 @@ enum { · 169 unmodified lines
403 ETHTOOL_A_TSINFO_MAX = (__ETHTOOL_A_TSINFO_CNT - 1)411 ETHTOOL_A_TSINFO_MAX = (__ETHTOOL_A_TSINFO_CNT - 1)
404};412};
405 413
414/* CABLE TEST */
415
416enum {
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 */
426enum {
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
434enum {
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
441enum {
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
450enum {
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
459enum {
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
465enum {
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
473enum {
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
485enum {
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
497enum {
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
509enum {
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
518enum {
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
526enum {
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
536enum {
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
546enum {
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
406/* generic netlink info */557/* generic netlink info */
407#define ETHTOOL_GENL_NAME "ethtool"558#define ETHTOOL_GENL_NAME "ethtool"
408#define ETHTOOL_GENL_VERSION 1559#define ETHTOOL_GENL_VERSION 1
include/uapi/linux/genetlink.h+2−0
@@ -48,6 +48,7 @@ enum { · 47 unmodified lines
48 CTRL_CMD_NEWMCAST_GRP,48 CTRL_CMD_NEWMCAST_GRP,
49 CTRL_CMD_DELMCAST_GRP,49 CTRL_CMD_DELMCAST_GRP,
50 CTRL_CMD_GETMCAST_GRP, /* unused */50 CTRL_CMD_GETMCAST_GRP, /* unused */
51 CTRL_CMD_GETPOLICY,
51 __CTRL_CMD_MAX,52 __CTRL_CMD_MAX,
52};53};
53 54
@@ -62,6 +63,7 @@ enum { · 8 unmodified lines
62 CTRL_ATTR_MAXATTR,63 CTRL_ATTR_MAXATTR,
63 CTRL_ATTR_OPS,64 CTRL_ATTR_OPS,
64 CTRL_ATTR_MCAST_GROUPS,65 CTRL_ATTR_MCAST_GROUPS,
66 CTRL_ATTR_POLICY,
65 __CTRL_ATTR_MAX,67 __CTRL_ATTR_MAX,
66};68};
67 69
include/uapi/linux/if.h+1−0
@@ -178,6 +178,7 @@ enum { · 177 unmodified lines
178enum {178enum {
179 IF_LINK_MODE_DEFAULT,179 IF_LINK_MODE_DEFAULT,
180 IF_LINK_MODE_DORMANT, /* limit upward transition to dormant */180 IF_LINK_MODE_DORMANT, /* limit upward transition to dormant */
181 IF_LINK_MODE_TESTING, /* limit upward transition to testing */
181};182};
182 183
183/*184/*
include/uapi/linux/if_bridge.h+96−0
@@ -120,6 +120,7 @@ enum { · 119 unmodified lines
120 IFLA_BRIDGE_MODE,120 IFLA_BRIDGE_MODE,
121 IFLA_BRIDGE_VLAN_INFO,121 IFLA_BRIDGE_VLAN_INFO,
122 IFLA_BRIDGE_VLAN_TUNNEL_INFO,122 IFLA_BRIDGE_VLAN_TUNNEL_INFO,
123 IFLA_BRIDGE_MRP,
123 __IFLA_BRIDGE_MAX,124 __IFLA_BRIDGE_MAX,
124};125};
125#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)126#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
@@ -157,6 +158,101 @@ struct bridge_vlan_xstats { · 31 unmodified lines
157 __u32 pad2;158 __u32 pad2;
158};159};
159 160
161enum {
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
174enum {
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
185enum {
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
193enum {
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
201enum {
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
210enum {
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
219enum {
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
231struct br_mrp_instance {
232 __u32 ring_id;
233 __u32 p_ifindex;
234 __u32 s_ifindex;
235 __u16 prio;
236};
237
238struct br_mrp_ring_state {
239 __u32 ring_id;
240 __u32 ring_state;
241};
242
243struct br_mrp_ring_role {
244 __u32 ring_id;
245 __u32 ring_role;
246};
247
248struct br_mrp_start_test {
249 __u32 ring_id;
250 __u32 interval;
251 __u32 max_miss;
252 __u32 period;
253 __u32 monitor;
254};
255
160struct bridge_stp_xstats {256struct bridge_stp_xstats {
161 __u64 transition_blk;257 __u64 transition_blk;
162 __u64 transition_fwd;258 __u64 transition_fwd;
include/uapi/linux/if_ether.h+1−0
@@ -92,6 +92,7 @@ · 91 unmodified lines
92#define ETH_P_PREAUTH 0x88C7 /* 802.11 Preauthentication */92#define ETH_P_PREAUTH 0x88C7 /* 802.11 Preauthentication */
93#define ETH_P_TIPC 0x88CA /* TIPC */93#define ETH_P_TIPC 0x88CA /* TIPC */
94#define ETH_P_LLDP 0x88CC /* Link Layer Discovery Protocol */94#define ETH_P_LLDP 0x88CC /* Link Layer Discovery Protocol */
95#define ETH_P_MRP 0x88E3 /* Media Redundancy Protocol */
95#define ETH_P_MACSEC 0x88E5 /* 802.1ae MACsec */96#define ETH_P_MACSEC 0x88E5 /* 802.1ae MACsec */
96#define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */97#define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */
97#define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */98#define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */
include/uapi/linux/if_link.h+1−0
@@ -343,6 +343,7 @@ enum { · 342 unmodified lines
343 IFLA_BRPORT_NEIGH_SUPPRESS,343 IFLA_BRPORT_NEIGH_SUPPRESS,
344 IFLA_BRPORT_ISOLATED,344 IFLA_BRPORT_ISOLATED,
345 IFLA_BRPORT_BACKUP_PORT,345 IFLA_BRPORT_BACKUP_PORT,
346 IFLA_BRPORT_MRP_RING_OPEN,
346 __IFLA_BRPORT_MAX347 __IFLA_BRPORT_MAX
347};348};
348#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)349#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
include/uapi/linux/if_x25.h+1−1
@@ -18,7 +18,7 @@ · 17 unmodified lines
18 18
19#include <linux/types.h>19#include <linux/types.h>
20 20
21/* Documentation/networking/x25-iface.txt */21/* Documentation/networking/x25-iface.rst */
22#define X25_IFACE_DATA 0x0022#define X25_IFACE_DATA 0x00
23#define X25_IFACE_CONNECT 0x0123#define X25_IFACE_CONNECT 0x01
24#define X25_IFACE_DISCONNECT 0x0224#define X25_IFACE_DISCONNECT 0x02
include/uapi/linux/inet_diag.h+2−0
@@ -96,6 +96,7 @@ enum { · 95 unmodified lines
96 INET_DIAG_BC_MARK_COND,96 INET_DIAG_BC_MARK_COND,
97 INET_DIAG_BC_S_EQ,97 INET_DIAG_BC_S_EQ,
98 INET_DIAG_BC_D_EQ,98 INET_DIAG_BC_D_EQ,
99 INET_DIAG_BC_CGROUP_COND, /* u64 cgroup v2 ID */
99};100};
100 101
101struct inet_diag_hostcond {102struct inet_diag_hostcond {
@@ -157,6 +158,7 @@ enum { · 55 unmodified lines
157 INET_DIAG_MD5SIG,158 INET_DIAG_MD5SIG,
158 INET_DIAG_ULP_INFO,159 INET_DIAG_ULP_INFO,
159 INET_DIAG_SK_BPF_STORAGES,160 INET_DIAG_SK_BPF_STORAGES,
161 INET_DIAG_CGROUP_ID,
160 __INET_DIAG_MAX,162 __INET_DIAG_MAX,
161};163};
162 164
include/uapi/linux/mii.h+2−0
@@ -151,11 +151,13 @@ · 150 unmodified lines
151/* 1000BASE-T Control register */151/* 1000BASE-T Control register */
152#define ADVERTISE_1000FULL 0x0200 /* Advertise 1000BASE-T full duplex */152#define ADVERTISE_1000FULL 0x0200 /* Advertise 1000BASE-T full duplex */
153#define ADVERTISE_1000HALF 0x0100 /* Advertise 1000BASE-T half duplex */153#define ADVERTISE_1000HALF 0x0100 /* Advertise 1000BASE-T half duplex */
154#define CTL1000_PREFER_MASTER 0x0400 /* prefer to operate as master */
154#define CTL1000_AS_MASTER 0x0800155#define CTL1000_AS_MASTER 0x0800
155#define CTL1000_ENABLE_MASTER 0x1000156#define CTL1000_ENABLE_MASTER 0x1000
156 157
157/* 1000BASE-T Status register */158/* 1000BASE-T Status register */
158#define LPA_1000MSFAIL 0x8000 /* Master/Slave resolution failure */159#define LPA_1000MSFAIL 0x8000 /* Master/Slave resolution failure */
160#define LPA_1000MSRES 0x4000 /* Master/Slave resolution status */
159#define LPA_1000LOCALRXOK 0x2000 /* Link partner local receiver status */161#define LPA_1000LOCALRXOK 0x2000 /* Link partner local receiver status */
160#define LPA_1000REMRXOK 0x1000 /* Link partner remote receiver status */162#define LPA_1000REMRXOK 0x1000 /* Link partner remote receiver status */
161#define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */163#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
17enum 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
24enum br_mrp_ring_state_type {
25 BR_MRP_RING_STATE_OPEN,
26 BR_MRP_RING_STATE_CLOSED,
27};
28
29enum 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
36enum 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
42enum 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
52enum 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
58struct br_mrp_tlv_hdr {
59 __u8 type;
60 __u8 length;
61};
62
63struct br_mrp_sub_tlv_hdr {
64 __u8 type;
65 __u8 length;
66};
67
68struct br_mrp_end_hdr {
69 struct br_mrp_tlv_hdr hdr;
70};
71
72struct br_mrp_common_hdr {
73 __be16 seq_id;
74 __u8 domain[MRP_DOMAIN_UUID_LENGTH];
75};
76
77struct 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
86struct br_mrp_ring_topo_hdr {
87 __be16 prio;
88 __u8 sa[ETH_ALEN];
89 __be16 interval;
90};
91
92struct br_mrp_ring_link_hdr {
93 __u8 sa[ETH_ALEN];
94 __be16 port_role;
95 __be16 interval;
96 __be16 blocked;
97};
98
99struct br_mrp_sub_opt_hdr {
100 __u8 type;
101 __u8 manufacture_data[MRP_MANUFACTURE_DATA_LENGTH];
102};
103
104struct 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
111struct 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
118struct 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
29 NDA_LINK_NETNSID,29 NDA_LINK_NETNSID,
30 NDA_SRC_VNI,30 NDA_SRC_VNI,
31 NDA_PROTOCOL, /* Originator of entry */31 NDA_PROTOCOL, /* Originator of entry */
32 NDA_NH_ID,
32 __NDA_MAX33 __NDA_MAX
33};34};
34 35
include/uapi/linux/netfilter/nf_conntrack_common.h+6−2
@@ -114,15 +114,19 @@ enum ip_conntrack_status { · 113 unmodified lines
114 IPS_OFFLOAD_BIT = 14,114 IPS_OFFLOAD_BIT = 14,
115 IPS_OFFLOAD = (1 << IPS_OFFLOAD_BIT),115 IPS_OFFLOAD = (1 << IPS_OFFLOAD_BIT),
116 116
117 /* Conntrack has been offloaded to hardware. */
118 IPS_HW_OFFLOAD_BIT = 15,
119 IPS_HW_OFFLOAD = (1 << IPS_HW_OFFLOAD_BIT),
120
117 /* Be careful here, modifying these bits can make things messy,121 /* Be careful here, modifying these bits can make things messy,
118 * so don't let users modify them directly.122 * so don't let users modify them directly.
119 */123 */
120 IPS_UNCHANGEABLE_MASK = (IPS_NAT_DONE_MASK | IPS_NAT_MASK |124 IPS_UNCHANGEABLE_MASK = (IPS_NAT_DONE_MASK | IPS_NAT_MASK |
121 IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING |125 IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING |
122 IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_UNTRACKED |126 IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_UNTRACKED |
123 IPS_OFFLOAD),127 IPS_OFFLOAD | IPS_HW_OFFLOAD),
124 128
125 __IPS_MAX_BIT = 15,129 __IPS_MAX_BIT = 16,
126};130};
127 131
128/* Connection tracking event types */132/* Connection tracking event types */
include/uapi/linux/netfilter/nf_nat.h+3−1
@@ -11,6 +11,7 @@ · 10 unmodified lines
11#define NF_NAT_RANGE_PERSISTENT (1 << 3)11#define NF_NAT_RANGE_PERSISTENT (1 << 3)
12#define NF_NAT_RANGE_PROTO_RANDOM_FULLY (1 << 4)12#define NF_NAT_RANGE_PROTO_RANDOM_FULLY (1 << 4)
13#define NF_NAT_RANGE_PROTO_OFFSET (1 << 5)13#define NF_NAT_RANGE_PROTO_OFFSET (1 << 5)
14#define NF_NAT_RANGE_NETMAP (1 << 6)
14 15
15#define NF_NAT_RANGE_PROTO_RANDOM_ALL \16#define NF_NAT_RANGE_PROTO_RANDOM_ALL \
16 (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY)17 (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY)
@@ -18,7 +19,8 @@ · 1 unmodified line
18#define NF_NAT_RANGE_MASK \19#define NF_NAT_RANGE_MASK \
19 (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED | \20 (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED | \
20 NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PERSISTENT | \21 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)
22 24
23struct nf_nat_ipv4_range {25struct nf_nat_ipv4_range {
24 unsigned int flags;26 unsigned int flags;
include/uapi/linux/netfilter/nfnetlink_conntrack.h+9−0
@@ -55,6 +55,7 @@ enum ctattr_type { · 54 unmodified lines
55 CTA_LABELS,55 CTA_LABELS,
56 CTA_LABELS_MASK,56 CTA_LABELS_MASK,
57 CTA_SYNPROXY,57 CTA_SYNPROXY,
58 CTA_FILTER,
58 __CTA_MAX59 __CTA_MAX
59};60};
60#define CTA_MAX (__CTA_MAX - 1)61#define CTA_MAX (__CTA_MAX - 1)
@@ -276,4 +277,12 @@ enum ctattr_expect_stats { · 215 unmodified lines
276};277};
277#define CTA_STATS_EXP_MAX (__CTA_STATS_EXP_MAX - 1)278#define CTA_STATS_EXP_MAX (__CTA_STATS_EXP_MAX - 1)
278 279
280enum 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
279#endif /* _IPCONNTRACK_NETLINK_H */288#endif /* _IPCONNTRACK_NETLINK_H */
include/uapi/linux/netlink.h+103−0
@@ -249,4 +249,107 @@ struct nla_bitfield32 { · 248 unmodified lines
249 __u32 selector;249 __u32 selector;
250};250};
251 251
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 */
284enum 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 */
336enum 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
252#endif /* _UAPI__LINUX_NETLINK_H */355#endif /* _UAPI__LINUX_NETLINK_H */
include/uapi/linux/nexthop.h+3−0
@@ -49,6 +49,9 @@ enum { · 48 unmodified lines
49 NHA_GROUPS, /* flag; only return nexthop groups in dump */49 NHA_GROUPS, /* flag; only return nexthop groups in dump */
50 NHA_MASTER, /* u32; only return nexthops with given master dev */50 NHA_MASTER, /* u32; only return nexthops with given master dev */
51 51
52 NHA_FDB, /* flag; nexthop belongs to a bridge fdb */
53 /* if NHA_FDB is added, OIF, BLACKHOLE, ENCAP cannot be set */
54
52 __NHA_MAX,55 __NHA_MAX,
53};56};
54 57
include/uapi/linux/nl80211.h+122−25
@@ -296,13 +296,14 @@ · 295 unmodified lines
296 * to get a list of all present wiphys.296 * to get a list of all present wiphys.
297 * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or297 * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or
298 * %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME,298 * %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME,
299 * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ (and the299 * %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ,
300 * attributes determining the channel width; this is used for setting300 * %NL80211_ATTR_WIPHY_FREQ_OFFSET (and the attributes determining the
301 * monitor mode channel), %NL80211_ATTR_WIPHY_RETRY_SHORT,301 * channel width; this is used for setting monitor mode channel),
302 * %NL80211_ATTR_WIPHY_RETRY_LONG, %NL80211_ATTR_WIPHY_FRAG_THRESHOLD,302 * %NL80211_ATTR_WIPHY_RETRY_SHORT, %NL80211_ATTR_WIPHY_RETRY_LONG,
303 * and/or %NL80211_ATTR_WIPHY_RTS_THRESHOLD.303 * %NL80211_ATTR_WIPHY_FRAG_THRESHOLD, and/or
304 * However, for setting the channel, see %NL80211_CMD_SET_CHANNEL304 * %NL80211_ATTR_WIPHY_RTS_THRESHOLD. However, for setting the channel,
305 * instead, the support here is for backward compatibility only.305 * see %NL80211_CMD_SET_CHANNEL instead, the support here is for backward
306 * compatibility only.
306 * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request307 * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request
307 * or rename notification. Has attributes %NL80211_ATTR_WIPHY and308 * or rename notification. Has attributes %NL80211_ATTR_WIPHY and
308 * %NL80211_ATTR_WIPHY_NAME.309 * %NL80211_ATTR_WIPHY_NAME.
@@ -351,7 +352,8 @@ · 42 unmodified lines
351 * %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_INACTIVITY_TIMEOUT,352 * %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_INACTIVITY_TIMEOUT,
352 * %NL80211_ATTR_ACL_POLICY and %NL80211_ATTR_MAC_ADDRS.353 * %NL80211_ATTR_ACL_POLICY and %NL80211_ATTR_MAC_ADDRS.
353 * The channel to use can be set on the interface or be given using the354 * 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.
355 * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP357 * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP
356 * @NL80211_CMD_STOP_AP: Stop AP operation on the given interface358 * @NL80211_CMD_STOP_AP: Stop AP operation on the given interface
357 * @NL80211_CMD_DEL_BEACON: old alias for %NL80211_CMD_STOP_AP359 * @NL80211_CMD_DEL_BEACON: old alias for %NL80211_CMD_STOP_AP
@@ -536,11 +538,12 @@ · 178 unmodified lines
536 * interface. %NL80211_ATTR_MAC is used to specify PeerSTAAddress (and538 * interface. %NL80211_ATTR_MAC is used to specify PeerSTAAddress (and
537 * BSSID in case of station mode). %NL80211_ATTR_SSID is used to specify539 * BSSID in case of station mode). %NL80211_ATTR_SSID is used to specify
538 * the SSID (mainly for association, but is included in authentication540 * the SSID (mainly for association, but is included in authentication
539 * request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ is used541 * request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ +
540 * to specify the frequence of the channel in MHz. %NL80211_ATTR_AUTH_TYPE542 * %NL80211_ATTR_WIPHY_FREQ_OFFSET is used to specify the frequence of the
541 * is used to specify the authentication type. %NL80211_ATTR_IE is used to543 * channel in MHz. %NL80211_ATTR_AUTH_TYPE is used to specify the
542 * define IEs (VendorSpecificInfo, but also including RSN IE and FT IEs)544 * authentication type. %NL80211_ATTR_IE is used to define IEs
543 * to be added to the frame.545 * (VendorSpecificInfo, but also including RSN IE and FT IEs) to be added
546 * to the frame.
544 * When used as an event, this reports reception of an Authentication547 * When used as an event, this reports reception of an Authentication
545 * frame in station and IBSS modes when the local MLME processed the548 * frame in station and IBSS modes when the local MLME processed the
546 * frame, i.e., it was for the local STA and was received in correct549 * frame, i.e., it was for the local STA and was received in correct
@@ -595,8 +598,9 @@ · 48 unmodified lines
595 * requests to connect to a specified network but without separating598 * requests to connect to a specified network but without separating
596 * auth and assoc steps. For this, you need to specify the SSID in a599 * auth and assoc steps. For this, you need to specify the SSID in a
597 * %NL80211_ATTR_SSID attribute, and can optionally specify the association600 * %NL80211_ATTR_SSID attribute, and can optionally specify the association
598 * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP,601 * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE,
599 * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,602 * %NL80211_ATTR_USE_MFP, %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ,
603 * %NL80211_ATTR_WIPHY_FREQ_OFFSET, %NL80211_ATTR_CONTROL_PORT,
600 * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE,604 * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
601 * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT,605 * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT,
602 * %NL80211_ATTR_CONTROL_PORT_OVER_NL80211, %NL80211_ATTR_MAC_HINT, and606 * %NL80211_ATTR_CONTROL_PORT_OVER_NL80211, %NL80211_ATTR_MAC_HINT, and
@@ -687,6 +691,10 @@ · 84 unmodified lines
687 * four bytes for vendor frames including the OUI. The registration691 * four bytes for vendor frames including the OUI. The registration
688 * cannot be dropped, but is removed automatically when the netlink692 * cannot be dropped, but is removed automatically when the netlink
689 * socket is closed. Multiple registrations can be made.693 * 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.
690 * @NL80211_CMD_REGISTER_ACTION: Alias for @NL80211_CMD_REGISTER_FRAME for698 * @NL80211_CMD_REGISTER_ACTION: Alias for @NL80211_CMD_REGISTER_FRAME for
691 * backward compatibility699 * backward compatibility
692 * @NL80211_CMD_FRAME: Management frame TX request and RX notification. This700 * @NL80211_CMD_FRAME: Management frame TX request and RX notification. This
@@ -1151,6 +1159,17 @@ · 458 unmodified lines
1151 * @NL80211_CMD_SET_TID_CONFIG: Data frame TID specific configuration1159 * @NL80211_CMD_SET_TID_CONFIG: Data frame TID specific configuration
1152 * is passed using %NL80211_ATTR_TID_CONFIG attribute.1160 * is passed using %NL80211_ATTR_TID_CONFIG attribute.
1153 *1161 *
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 *
1154 * @NL80211_CMD_MAX: highest used command number1173 * @NL80211_CMD_MAX: highest used command number
1155 * @__NL80211_CMD_AFTER_LAST: internal use1174 * @__NL80211_CMD_AFTER_LAST: internal use
1156 */1175 */
@@ -1377,6 +1396,10 @@ enum nl80211_commands { · 220 unmodified lines
1377 1396
1378 NL80211_CMD_SET_TID_CONFIG,1397 NL80211_CMD_SET_TID_CONFIG,
1379 1398
1399 NL80211_CMD_UNPROT_BEACON,
1400
1401 NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS,
1402
1380 /* add new commands above here */1403 /* add new commands above here */
1381 1404
1382 /* used to define NL80211_CMD_MAX below */1405 /* used to define NL80211_CMD_MAX below */
@@ -1422,7 +1445,8 @@ enum nl80211_commands { · 39 unmodified lines
1422 * of &enum nl80211_chan_width, describing the channel width. See the1445 * of &enum nl80211_chan_width, describing the channel width. See the
1423 * documentation of the enum for more information.1446 * documentation of the enum for more information.
1424 * @NL80211_ATTR_CENTER_FREQ1: Center frequency of the first part of the1447 * @NL80211_ATTR_CENTER_FREQ1: Center frequency of the first part of the
1425 * channel, used for anything but 20 MHz bandwidth1448 * channel, used for anything but 20 MHz bandwidth. In S1G this is the
1449 * operating channel center frequency.
1426 * @NL80211_ATTR_CENTER_FREQ2: Center frequency of the second part of the1450 * @NL80211_ATTR_CENTER_FREQ2: Center frequency of the second part of the
1427 * channel, used only for 80+80 MHz bandwidth1451 * channel, used only for 80+80 MHz bandwidth
1428 * @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ1452 * @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ
@@ -2469,6 +2493,17 @@ enum nl80211_commands { · 1040 unmodified lines
2469 * entry without having to force a disconnection after the PMK timeout. If2493 * entry without having to force a disconnection after the PMK timeout. If
2470 * no roaming occurs between the reauth threshold and PMK expiration,2494 * no roaming occurs between the reauth threshold and PMK expiration,
2471 * disassociation is still forced.2495 * 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).
2472 *2507 *
2473 * @NUM_NL80211_ATTR: total number of nl80211_attrs available2508 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
2474 * @NL80211_ATTR_MAX: highest attribute number currently defined2509 * @NL80211_ATTR_MAX: highest attribute number currently defined
@@ -2945,6 +2980,13 @@ enum nl80211_attrs { · 470 unmodified lines
2945 NL80211_ATTR_PMK_LIFETIME,2980 NL80211_ATTR_PMK_LIFETIME,
2946 NL80211_ATTR_PMK_REAUTH_THRESHOLD,2981 NL80211_ATTR_PMK_REAUTH_THRESHOLD,
2947 2982
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
2948 /* add attributes here, update the policy in nl80211.c */2990 /* add attributes here, update the policy in nl80211.c */
2949 2991
2950 __NL80211_ATTR_AFTER_LAST,2992 __NL80211_ATTR_AFTER_LAST,
@@ -3523,6 +3565,8 @@ enum nl80211_mpath_info { · 572 unmodified lines
3523 * defined in HE capabilities IE3565 * defined in HE capabilities IE
3524 * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band HE capability attribute currently3566 * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band HE capability attribute currently
3525 * defined3567 * defined
3568 * @NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA: HE 6GHz band capabilities (__le16),
3569 * given for all 6 GHz band channels
3526 * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use3570 * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use
3527 */3571 */
3528enum nl80211_band_iftype_attr {3572enum nl80211_band_iftype_attr {
@@ -3533,6 +3577,7 @@ enum nl80211_band_iftype_attr { · 4 unmodified lines
3533 NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY,3577 NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY,
3534 NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET,3578 NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET,
3535 NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,3579 NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,
3580 NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA,
3536 3581
3537 /* keep last */3582 /* keep last */
3538 __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,3583 __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,
@@ -3666,6 +3711,7 @@ enum nl80211_wmm_rule { · 127 unmodified lines
3666 * (see &enum nl80211_wmm_rule)3711 * (see &enum nl80211_wmm_rule)
3667 * @NL80211_FREQUENCY_ATTR_NO_HE: HE operation is not allowed on this channel3712 * @NL80211_FREQUENCY_ATTR_NO_HE: HE operation is not allowed on this channel
3668 * in current regulatory domain.3713 * in current regulatory domain.
3714 * @NL80211_FREQUENCY_ATTR_OFFSET: frequency offset in KHz
3669 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number3715 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
3670 * currently defined3716 * currently defined
3671 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use3717 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
@@ -3696,6 +3742,7 @@ enum nl80211_frequency_attr { · 24 unmodified lines
3696 NL80211_FREQUENCY_ATTR_NO_10MHZ,3742 NL80211_FREQUENCY_ATTR_NO_10MHZ,
3697 NL80211_FREQUENCY_ATTR_WMM,3743 NL80211_FREQUENCY_ATTR_WMM,
3698 NL80211_FREQUENCY_ATTR_NO_HE,3744 NL80211_FREQUENCY_ATTR_NO_HE,
3745 NL80211_FREQUENCY_ATTR_OFFSET,
3699 3746
3700 /* keep last */3747 /* keep last */
3701 __NL80211_FREQUENCY_ATTR_AFTER_LAST,3748 __NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -4466,6 +4513,7 @@ enum nl80211_bss_scan_width { · 764 unmodified lines
4466 * @NL80211_BSS_CHAIN_SIGNAL: per-chain signal strength of last BSS update.4513 * @NL80211_BSS_CHAIN_SIGNAL: per-chain signal strength of last BSS update.
4467 * Contains a nested array of signal strength attributes (u8, dBm),4514 * Contains a nested array of signal strength attributes (u8, dBm),
4468 * using the nesting index as the antenna number.4515 * using the nesting index as the antenna number.
4516 * @NL80211_BSS_FREQUENCY_OFFSET: frequency offset in KHz
4469 * @__NL80211_BSS_AFTER_LAST: internal4517 * @__NL80211_BSS_AFTER_LAST: internal
4470 * @NL80211_BSS_MAX: highest BSS attribute4518 * @NL80211_BSS_MAX: highest BSS attribute
4471 */4519 */
@@ -4490,6 +4538,7 @@ enum nl80211_bss { · 18 unmodified lines
4490 NL80211_BSS_PARENT_TSF,4538 NL80211_BSS_PARENT_TSF,
4491 NL80211_BSS_PARENT_BSSID,4539 NL80211_BSS_PARENT_BSSID,
4492 NL80211_BSS_CHAIN_SIGNAL,4540 NL80211_BSS_CHAIN_SIGNAL,
4541 NL80211_BSS_FREQUENCY_OFFSET,
4493 4542
4494 /* keep last */4543 /* keep last */
4495 __NL80211_BSS_AFTER_LAST,4544 __NL80211_BSS_AFTER_LAST,
@@ -4800,6 +4849,17 @@ enum nl80211_tid_config { · 304 unmodified lines
4800 NL80211_TID_CONFIG_DISABLE,4849 NL80211_TID_CONFIG_DISABLE,
4801};4850};
4802 4851
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 */
4857enum nl80211_tx_rate_setting {
4858 NL80211_TX_RATE_AUTOMATIC,
4859 NL80211_TX_RATE_LIMITED,
4860 NL80211_TX_RATE_FIXED,
4861};
4862
4803/* enum nl80211_tid_config_attr - TID specific configuration.4863/* enum nl80211_tid_config_attr - TID specific configuration.
4804 * @NL80211_TID_CONFIG_ATTR_PAD: pad attribute for 64-bit values4864 * @NL80211_TID_CONFIG_ATTR_PAD: pad attribute for 64-bit values
4805 * @NL80211_TID_CONFIG_ATTR_VIF_SUPP: a bitmap (u64) of attributes supported4865 * @NL80211_TID_CONFIG_ATTR_VIF_SUPP: a bitmap (u64) of attributes supported
@@ -4807,12 +4867,10 @@ enum nl80211_tid_config { · 1 unmodified line
4807 * (%NL80211_TID_CONFIG_ATTR_TIDS, %NL80211_TID_CONFIG_ATTR_OVERRIDE).4867 * (%NL80211_TID_CONFIG_ATTR_TIDS, %NL80211_TID_CONFIG_ATTR_OVERRIDE).
4808 * @NL80211_TID_CONFIG_ATTR_PEER_SUPP: same as the previous per-vif one, but4868 * @NL80211_TID_CONFIG_ATTR_PEER_SUPP: same as the previous per-vif one, but
4809 * per peer instead.4869 * per peer instead.
4810 * @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribue, if no peer4870 * @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribue, if set indicates
4811 * is selected, if set indicates that the new configuration overrides4871 * that the new configuration overrides all previous peer
4812 * all previous peer configurations, otherwise previous peer specific4872 * configurations, otherwise previous peer specific configurations
4813 * configurations should be left untouched. If peer is selected then4873 * should be left untouched.
4814 * it will reset particular TID configuration of that peer and it will
4815 * not accept other TID config attributes along with peer.
4816 * @NL80211_TID_CONFIG_ATTR_TIDS: a bitmask value of TIDs (bit 0 to 7)4874 * @NL80211_TID_CONFIG_ATTR_TIDS: a bitmask value of TIDs (bit 0 to 7)
4817 * Its type is u16.4875 * Its type is u16.
4818 * @NL80211_TID_CONFIG_ATTR_NOACK: Configure ack policy for the TID.4876 * @NL80211_TID_CONFIG_ATTR_NOACK: Configure ack policy for the TID.
@@ -4828,12 +4886,23 @@ enum nl80211_tid_config { · 9 unmodified lines
4828 * &NL80211_CMD_SET_TID_CONFIG. Its type is u8, min value is 1 and4886 * &NL80211_CMD_SET_TID_CONFIG. Its type is u8, min value is 1 and
4829 * the max value is advertised by the driver in this attribute on4887 * the max value is advertised by the driver in this attribute on
4830 * output in wiphy capabilities.4888 * output in wiphy capabilities.
4831 * @NL80211_TID_CONFIG_ATTR_AMPDU_CTRL: Enable/Disable aggregation for the TIDs4889 * @NL80211_TID_CONFIG_ATTR_AMPDU_CTRL: Enable/Disable MPDU aggregation
4832 * specified in %NL80211_TID_CONFIG_ATTR_TIDS. Its type is u8, using4890 * for the TIDs specified in %NL80211_TID_CONFIG_ATTR_TIDS.
4833 * the values from &nl80211_tid_config.4891 * Its type is u8, using the values from &nl80211_tid_config.
4834 * @NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL: Enable/Disable RTS_CTS for the TIDs4892 * @NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL: Enable/Disable RTS_CTS for the TIDs
4835 * specified in %NL80211_TID_CONFIG_ATTR_TIDS. It is u8 type, using4893 * specified in %NL80211_TID_CONFIG_ATTR_TIDS. It is u8 type, using
4836 * the values from &nl80211_tid_config.4894 * 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.
4837 */4906 */
4838enum nl80211_tid_config_attr {4907enum nl80211_tid_config_attr {
4839 __NL80211_TID_CONFIG_ATTR_INVALID,4908 __NL80211_TID_CONFIG_ATTR_INVALID,
@@ -4847,6 +4916,9 @@ enum nl80211_tid_config_attr { · 7 unmodified lines
4847 NL80211_TID_CONFIG_ATTR_RETRY_LONG,4916 NL80211_TID_CONFIG_ATTR_RETRY_LONG,
4848 NL80211_TID_CONFIG_ATTR_AMPDU_CTRL,4917 NL80211_TID_CONFIG_ATTR_AMPDU_CTRL,
4849 NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL,4918 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,
4850 4922
4851 /* keep last */4923 /* keep last */
4852 __NL80211_TID_CONFIG_ATTR_AFTER_LAST,4924 __NL80211_TID_CONFIG_ATTR_AFTER_LAST,
@@ -5324,6 +5396,8 @@ enum plink_actions { · 471 unmodified lines
5324 5396
5325#define NL80211_KCK_LEN 165397#define NL80211_KCK_LEN 16
5326#define NL80211_KEK_LEN 165398#define NL80211_KEK_LEN 16
5399#define NL80211_KCK_EXT_LEN 24
5400#define NL80211_KEK_EXT_LEN 32
5327#define NL80211_REPLAY_CTR_LEN 85401#define NL80211_REPLAY_CTR_LEN 8
5328 5402
5329/**5403/**
@@ -5332,6 +5406,7 @@ enum plink_actions { · 2 unmodified lines
5332 * @NL80211_REKEY_DATA_KEK: key encryption key (binary)5406 * @NL80211_REKEY_DATA_KEK: key encryption key (binary)
5333 * @NL80211_REKEY_DATA_KCK: key confirmation key (binary)5407 * @NL80211_REKEY_DATA_KCK: key confirmation key (binary)
5334 * @NL80211_REKEY_DATA_REPLAY_CTR: replay counter (binary)5408 * @NL80211_REKEY_DATA_REPLAY_CTR: replay counter (binary)
5409 * @NL80211_REKEY_DATA_AKM: AKM data (OUI, suite type)
5335 * @NUM_NL80211_REKEY_DATA: number of rekey attributes (internal)5410 * @NUM_NL80211_REKEY_DATA: number of rekey attributes (internal)
5336 * @MAX_NL80211_REKEY_DATA: highest rekey attribute (internal)5411 * @MAX_NL80211_REKEY_DATA: highest rekey attribute (internal)
5337 */5412 */
@@ -5340,6 +5415,7 @@ enum nl80211_rekey_data { · 2 unmodified lines
5340 NL80211_REKEY_DATA_KEK,5415 NL80211_REKEY_DATA_KEK,
5341 NL80211_REKEY_DATA_KCK,5416 NL80211_REKEY_DATA_KCK,
5342 NL80211_REKEY_DATA_REPLAY_CTR,5417 NL80211_REKEY_DATA_REPLAY_CTR,
5418 NL80211_REKEY_DATA_AKM,
5343 5419
5344 /* keep last */5420 /* keep last */
5345 NUM_NL80211_REKEY_DATA,5421 NUM_NL80211_REKEY_DATA,
@@ -5674,6 +5750,8 @@ enum nl80211_feature_flags { · 328 unmodified lines
5674 *5750 *
5675 * @NL80211_EXT_FEATURE_BEACON_PROTECTION: The driver supports Beacon protection5751 * @NL80211_EXT_FEATURE_BEACON_PROTECTION: The driver supports Beacon protection
5676 * and can receive key configuration for BIGTK using key indexes 6 and 7.5752 * 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.
5677 *5755 *
5678 * @NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH: The driver can disable the5756 * @NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH: The driver can disable the
5679 * forwarding of preauth frames over the control port. They are then5757 * forwarding of preauth frames over the control port. They are then
@@ -5684,6 +5762,17 @@ enum nl80211_feature_flags { · 4 unmodified lines
5684 * @NL80211_EXT_FEATURE_DEL_IBSS_STA: The driver supports removing stations5762 * @NL80211_EXT_FEATURE_DEL_IBSS_STA: The driver supports removing stations
5685 * in IBSS mode, essentially by dropping their state.5763 * in IBSS mode, essentially by dropping their state.
5686 *5764 *
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 *
5687 * @NUM_NL80211_EXT_FEATURES: number of extended features.5776 * @NUM_NL80211_EXT_FEATURES: number of extended features.
5688 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.5777 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
5689 */5778 */
@@ -5735,6 +5824,10 @@ enum nl80211_ext_feature_index { · 45 unmodified lines
5735 NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH,5824 NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH,
5736 NL80211_EXT_FEATURE_PROTECTED_TWT,5825 NL80211_EXT_FEATURE_PROTECTED_TWT,
5737 NL80211_EXT_FEATURE_DEL_IBSS_STA,5826 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,
5738 5831
5739 /* add new features before the definition below */5832 /* add new features before the definition below */
5740 NUM_NL80211_EXT_FEATURES,5833 NUM_NL80211_EXT_FEATURES,
@@ -5846,6 +5939,9 @@ enum nl80211_timeout_reason { · 105 unmodified lines
5846 * @NL80211_SCAN_FLAG_MIN_PREQ_CONTENT: minimize probe request content to5939 * @NL80211_SCAN_FLAG_MIN_PREQ_CONTENT: minimize probe request content to
5847 * only have supported rates and no additional capabilities (unless5940 * only have supported rates and no additional capabilities (unless
5848 * added by userspace explicitly.)5941 * 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.
5849 */5945 */
5850enum nl80211_scan_flags {5946enum nl80211_scan_flags {
5851 NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0,5947 NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0,
@@ -5861,6 +5957,7 @@ enum nl80211_scan_flags { · 9 unmodified lines
5861 NL80211_SCAN_FLAG_HIGH_ACCURACY = 1<<10,5957 NL80211_SCAN_FLAG_HIGH_ACCURACY = 1<<10,
5862 NL80211_SCAN_FLAG_RANDOM_SN = 1<<11,5958 NL80211_SCAN_FLAG_RANDOM_SN = 1<<11,
5863 NL80211_SCAN_FLAG_MIN_PREQ_CONTENT = 1<<12,5959 NL80211_SCAN_FLAG_MIN_PREQ_CONTENT = 1<<12,
5960 NL80211_SCAN_FLAG_FREQ_KHZ = 1<<13,
5864};5961};
5865 5962
5866/**5963/**
include/uapi/linux/pkt_cls.h+24−0
@@ -134,6 +134,7 @@ enum tca_id { · 133 unmodified lines
134 TCA_ID_CTINFO,134 TCA_ID_CTINFO,
135 TCA_ID_MPLS,135 TCA_ID_MPLS,
136 TCA_ID_CT,136 TCA_ID_CT,
137 TCA_ID_GATE,
137 /* other actions go here */138 /* other actions go here */
138 __TCA_ID_MAX = 255139 __TCA_ID_MAX = 255
139};140};
@@ -575,6 +576,8 @@ enum { · 435 unmodified lines
575 TCA_FLOWER_KEY_CT_LABELS, /* u128 */576 TCA_FLOWER_KEY_CT_LABELS, /* u128 */
576 TCA_FLOWER_KEY_CT_LABELS_MASK, /* u128 */577 TCA_FLOWER_KEY_CT_LABELS_MASK, /* u128 */
577 578
579 TCA_FLOWER_KEY_MPLS_OPTS,
580
578 __TCA_FLOWER_MAX,581 __TCA_FLOWER_MAX,
579};582};
580 583
@@ -639,6 +642,27 @@ enum { · 58 unmodified lines
639#define TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX \642#define TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX \
640 (__TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX - 1)643 (__TCA_FLOWER_KEY_ENC_OPT_ERSPAN_MAX - 1)
641 644
645enum {
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
653enum {
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
642enum {666enum {
643 TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT = (1 << 0),667 TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT = (1 << 0),
644 TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST = (1 << 1),668 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
913 913
914 TCA_FQ_TIMER_SLACK, /* timer slack */914 TCA_FQ_TIMER_SLACK, /* timer slack */
915 915
916 TCA_FQ_HORIZON, /* time horizon in us */
917
918 TCA_FQ_HORIZON_DROP, /* drop packets beyond horizon, or cap their EDT */
919
916 __TCA_FQ_MAX920 __TCA_FQ_MAX
917};921};
918 922
@@ -932,6 +936,8 @@ struct tc_fq_qd_stats { · 13 unmodified lines
932 __u32 throttled_flows;936 __u32 throttled_flows;
933 __u32 unthrottle_latency_ns;937 __u32 unthrottle_latency_ns;
934 __u64 ce_mark; /* packets above ce_threshold */938 __u64 ce_mark; /* packets above ce_threshold */
939 __u64 horizon_drops;
940 __u64 horizon_caps;
935};941};
936 942
937/* Heavy-Hitter Filter */943/* Heavy-Hitter Filter */
include/uapi/linux/psample.h+22−0
@@ -11,6 +11,7 @@ enum { · 10 unmodified lines
11 PSAMPLE_ATTR_GROUP_SEQ,11 PSAMPLE_ATTR_GROUP_SEQ,
12 PSAMPLE_ATTR_SAMPLE_RATE,12 PSAMPLE_ATTR_SAMPLE_RATE,
13 PSAMPLE_ATTR_DATA,13 PSAMPLE_ATTR_DATA,
14 PSAMPLE_ATTR_TUNNEL,
14 15
15 /* commands attributes */16 /* commands attributes */
16 PSAMPLE_ATTR_GROUP_REFCOUNT,17 PSAMPLE_ATTR_GROUP_REFCOUNT,
@@ -25,6 +26,27 @@ enum psample_command { · 8 unmodified lines
25 PSAMPLE_CMD_DEL_GROUP,26 PSAMPLE_CMD_DEL_GROUP,
26};27};
27 28
29enum 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
28/* Can be overridden at runtime by module option */50/* Can be overridden at runtime by module option */
29#define PSAMPLE_ATTR_MAX (__PSAMPLE_ATTR_MAX - 1)51#define PSAMPLE_ATTR_MAX (__PSAMPLE_ATTR_MAX - 1)
30 52
include/uapi/linux/ptp_clock.h+3−1
@@ -89,7 +89,9 @@ struct ptp_clock_caps { · 88 unmodified lines
89 int n_pins; /* Number of input/output pins. */89 int n_pins; /* Number of input/output pins. */
90 /* Whether the clock supports precise system-device cross timestamps */90 /* Whether the clock supports precise system-device cross timestamps */
91 int cross_timestamping;91 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. */
93};95};
94 96
95struct ptp_extts_request {97struct ptp_extts_request {
include/uapi/linux/rtnetlink.h+6−0
@@ -609,11 +609,17 @@ enum { · 608 unmodified lines
609 TCA_HW_OFFLOAD,609 TCA_HW_OFFLOAD,
610 TCA_INGRESS_BLOCK,610 TCA_INGRESS_BLOCK,
611 TCA_EGRESS_BLOCK,611 TCA_EGRESS_BLOCK,
612 TCA_DUMP_FLAGS,
612 __TCA_MAX613 __TCA_MAX
613};614};
614 615
615#define TCA_MAX (__TCA_MAX - 1)616#define TCA_MAX (__TCA_MAX - 1)
616 617
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
617#define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg))))623#define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg))))
618#define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg))624#define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg))
619 625
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
9struct tc_gate {
10 tc_gen;
11};
12
13enum {
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
24enum {
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
31enum {
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
74#include <linux/socket.h> /* for "struct sockaddr" et al */74#include <linux/socket.h> /* for "struct sockaddr" et al */
75#include <linux/if.h> /* for IFNAMSIZ and co... */75#include <linux/if.h> /* for IFNAMSIZ and co... */
76 76
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
78 82
79/***************************** VERSION *****************************/83/***************************** VERSION *****************************/
80/*84/*