History

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

Pull networking updates from Jakub Kicinski: - Add redirect_neigh() BPF packet redirect helper, allowing to limit stack traversal in common container configs and improving TCP back-pressure. Daniel reports ~10Gbps => ~15Gbps single stream TCP performance gain. - Expand netlink policy support and improve policy export to user space. (Ge)netlink core performs request validation according to declared policies. Expand the expressiveness of those policies (min/max length and bitmasks). Allow dumping policies for particular commands. This is used for feature discovery by user space (instead of kernel version parsing or trial and error). - Support IGMPv3/MLDv2 multicast listener discovery protocols in bridge. - Allow more than 255 IPv4 multicast interfaces. - Add support for Type of Service (ToS) reflection in SYN/SYN-ACK packets of TCPv6. - In Multi-patch TCP (MPTCP) support concurrent transmission of data on multiple subflows in a load balancing scenario. Enhance advertising addresses via the RM_ADDR/ADD_ADDR options. - Support SMC-Dv2 version of SMC, which enables multi-subnet deployments. - Allow more calls to same peer in RxRPC. - Support two new Controller Area Network (CAN) protocols - CAN-FD and ISO 15765-2:2016. - Add xfrm/IPsec compat layer, solving the 32bit user space on 64bit kernel problem. - Add TC actions for implementing MPLS L2 VPNs. - Improve nexthop code - e.g. handle various corner cases when nexthop objects are removed from groups better, skip unnecessary notifications and make it easier to offload nexthops into HW by converting to a blocking notifier. - Support adding and consuming TCP header options by BPF programs, opening the doors for easy experimental and deployment-specific TCP option use. - Reorganize TCP congestion control (CC) initialization to simplify life of TCP CC implemented in BPF. - Add support for shipping BPF programs with the kernel and loading them early on boot via the User Mode Driver mechanism, hence reusing all the user space infra we have. - Support sleepable BPF programs, initially targeting LSM and tracing. - Add bpf_d_path() helper for returning full path for given 'struct path'. - Make bpf_tail_call compatible with bpf-to-bpf calls. - Allow BPF programs to call map_update_elem on sockmaps. - Add BPF Type Format (BTF) support for type and enum discovery, as well as support for using BTF within the kernel itself (current use is for pretty printing structures). - Support listing and getting information about bpf_links via the bpf syscall. - Enhance kernel interfaces around NIC firmware update. Allow specifying overwrite mask to control if settings etc. are reset during update; report expected max time operation may take to users; support firmware activation without machine reboot incl. limits of how much impact reset may have (e.g. dropping link or not). - Extend ethtool configuration interface to report IEEE-standard counters, to limit the need for per-vendor logic in user space. - Adopt or extend devlink use for debug, monitoring, fw update in many drivers (dsa loop, ice, ionic, sja1105, qed, mlxsw, mv88e6xxx, dpaa2-eth). - In mlxsw expose critical and emergency SFP module temperature alarms. Refactor port buffer handling to make the defaults more suitable and support setting these values explicitly via the DCBNL interface. - Add XDP support for Intel's igb driver. - Support offloading TC flower classification and filtering rules to mscc_ocelot switches. - Add PTP support for Marvell Octeontx2 and PP2.2 hardware, as well as fixed interval period pulse generator and one-step timestamping in dpaa-eth. - Add support for various auth offloads in WiFi APs, e.g. SAE (WPA3) offload. - Add Lynx PHY/PCS MDIO module, and convert various drivers which have this HW to use it. Convert mvpp2 to split PCS. - Support Marvell Prestera 98DX3255 24-port switch ASICs, as well as 7-port Mediatek MT7531 IP. - Add initial support for QCA6390 and IPQ6018 in ath11k WiFi driver, and wcn3680 support in wcn36xx. - Improve performance for packets which don't require much offloads on recent Mellanox NICs by 20% by making multiple packets share a descriptor entry. - Move chelsio inline crypto drivers (for TLS and IPsec) from the crypto subtree to drivers/net. Move MDIO drivers out of the phy directory. - Clean up a lot of W=1 warnings, reportedly the actively developed subsections of networking drivers should now build W=1 warning free. - Make sure drivers don't use in_interrupt() to dynamically adapt their code. Convert tasklets to use new tasklet_setup API (sadly this conversion is not yet complete). * tag 'net-next-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2583 commits) Revert "bpfilter: Fix build error with CONFIG_BPFILTER_UMH" net, sockmap: Don't call bpf_prog_put() on NULL pointer bpf, selftest: Fix flaky tcp_hdr_options test when adding addr to lo bpf, sockmap: Add locking annotations to iterator netfilter: nftables: allow re-computing sctp CRC-32C in 'payload' statements net: fix pos incrementment in ipv6_route_seq_next net/smc: fix invalid return code in smcd_new_buf_create() net/smc: fix valid DMBE buffer sizes net/smc: fix use-after-free of delayed events bpfilter: Fix build error with CONFIG_BPFILTER_UMH cxgb4/ch_ipsec: Replace the module name to ch_ipsec from chcr net: sched: Fix suspicious RCU usage while accessing tcf_tunnel_info bpf: Fix register equivalence tracking. rxrpc: Fix loss of final ack on shutdown rxrpc: Fix bundle counting for exclusive connections netfilter: restore NF_INET_NUMHOOKS ibmveth: Identify ingress large send packets. ibmveth: Switch order of ibmveth_helper calls. cxgb4: handle 4-tuple PEDIT to NAT mode translation selftests: Add VRF route leaking tests ...

Linus Torvalds committed 6 years ago

Commit 9ff9b0d2 parents 840e5bb 105faa82301 files · +130475 −51396Browse files

Showing the changes to include/uapi/linux (23 of 2301 files). Show all

Unified · Split

23 files
  1. include/uapi/linux/bpf.h +621 −34
  2. include/uapi/linux/can/isotp.h +165 −0
  3. include/uapi/linux/can/raw.h +3 −0
  4. include/uapi/linux/devlink.h +69 −0
  5. include/uapi/linux/ethtool.h +2 −0
  6. include/uapi/linux/ethtool_netlink.h +17 −1
  7. include/uapi/linux/genetlink.h +11 −0
  8. include/uapi/linux/gtp.h +2 −0
  9. include/uapi/linux/if_bridge.h +38 −0
  10. include/uapi/linux/if_link.h +202 −33
  11. include/uapi/linux/if_pppol2tp.h +1 −1
  12. include/uapi/linux/inet_diag.h +18 −0
  13. include/uapi/linux/l2tp.h +5 −2
  14. include/uapi/linux/mroute.h +3 −2
  15. include/uapi/linux/netfilter.h +2 −1
  16. include/uapi/linux/netfilter/nf_tables.h +10 −0
  17. include/uapi/linux/netfilter/nfnetlink_conntrack.h +2 −1
  18. include/uapi/linux/netlink.h +4 −0
  19. include/uapi/linux/nl80211.h +174 −22
  20. include/uapi/linux/tc_act/tc_mpls.h +1 −0
  21. include/uapi/linux/tc_act/tc_vlan.h +4 −0
  22. include/uapi/linux/tipc.h +2 −0
  23. include/uapi/linux/tipc_netlink.h +2 −0
include/uapi/linux/bpf.h+621−34
@@ -124,6 +124,7 @@ enum bpf_cmd { · 123 unmodified lines
124124 BPF_ENABLE_STATS,
125125 BPF_ITER_CREATE,
126126 BPF_LINK_DETACH,
127+ BPF_PROG_BIND_MAP,
127128 };
128129
129130 enum bpf_map_type {
@@ -155,6 +156,7 @@ enum bpf_map_type { · 25 unmodified lines
155156 BPF_MAP_TYPE_DEVMAP_HASH,
156157 BPF_MAP_TYPE_STRUCT_OPS,
157158 BPF_MAP_TYPE_RINGBUF,
159+ BPF_MAP_TYPE_INODE_STORAGE,
158160 };
159161
160162 /* Note that tracing related programs such as
@@ -345,19 +347,45 @@ enum bpf_link_type { · 184 unmodified lines
345347 /* The verifier internal test flag. Behavior is undefined */
346348 #define BPF_F_TEST_STATE_FREQ (1U << 3)
347349
350+/* If BPF_F_SLEEPABLE is used in BPF_PROG_LOAD command, the verifier will
351+ * restrict map and helper usage for such programs. Sleepable BPF programs can
352+ * only be attached to hooks where kernel execution context allows sleeping.
353+ * Such programs are allowed to use helpers that may sleep like
354+ * bpf_copy_from_user().
355+ */
356+#define BPF_F_SLEEPABLE (1U << 4)
357+
348358 /* When BPF ldimm64's insn[0].src_reg != 0 then this can have
349− * two extensions:
350− *
351− * insn[0].src_reg: BPF_PSEUDO_MAP_FD BPF_PSEUDO_MAP_VALUE
352− * insn[0].imm: map fd map fd
353− * insn[1].imm: 0 offset into value
354− * insn[0].off: 0 0
355− * insn[1].off: 0 0
356− * ldimm64 rewrite: address of map address of map[0]+offset
357− * verifier type: CONST_PTR_TO_MAP PTR_TO_MAP_VALUE
359+ * the following extensions:
360+ *
361+ * insn[0].src_reg: BPF_PSEUDO_MAP_FD
362+ * insn[0].imm: map fd
363+ * insn[1].imm: 0
364+ * insn[0].off: 0
365+ * insn[1].off: 0
366+ * ldimm64 rewrite: address of map
367+ * verifier type: CONST_PTR_TO_MAP
358368 */
359369 #define BPF_PSEUDO_MAP_FD 1
370+/* insn[0].src_reg: BPF_PSEUDO_MAP_VALUE
371+ * insn[0].imm: map fd
372+ * insn[1].imm: offset into value
373+ * insn[0].off: 0
374+ * insn[1].off: 0
375+ * ldimm64 rewrite: address of map[0]+offset
376+ * verifier type: PTR_TO_MAP_VALUE
377+ */
360378 #define BPF_PSEUDO_MAP_VALUE 2
379+/* insn[0].src_reg: BPF_PSEUDO_BTF_ID
380+ * insn[0].imm: kernel btd id of VAR
381+ * insn[1].imm: 0
382+ * insn[0].off: 0
383+ * insn[1].off: 0
384+ * ldimm64 rewrite: address of the kernel variable
385+ * verifier type: PTR_TO_BTF_ID or PTR_TO_MEM, depending on whether the var
386+ * is struct/union.
387+ */
388+#define BPF_PSEUDO_BTF_ID 3
361389
362390 /* when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative
363391 * offset to another bpf function
@@ -404,6 +432,12 @@ enum { · 40 unmodified lines
404432
405433 /* Enable memory-mapping BPF map */
406434 BPF_F_MMAPABLE = (1U << 10),
435+
436+/* Share perf_event among processes */
437+ BPF_F_PRESERVE_ELEMS = (1U << 11),
438+
439+/* Create a map that is suitable to be an inner map with dynamic max entries */
440+ BPF_F_INNER_MAP = (1U << 12),
407441 };
408442
409443 /* Flags for BPF_PROG_QUERY. */
@@ -414,6 +448,11 @@ enum { · 4 unmodified lines
414448 */
415449 #define BPF_F_QUERY_EFFECTIVE (1U << 0)
416450
451+/* Flags for BPF_PROG_TEST_RUN */
452+
453+/* If set, run the test on the cpu specified by bpf_attr.test.cpu */
454+#define BPF_F_TEST_RUN_ON_CPU (1U << 0)
455+
417456 /* type for BPF_ENABLE_STATS */
418457 enum bpf_stats_type {
419458 /* enabled run_time_ns and run_cnt */
@@ -556,6 +595,8 @@ union bpf_attr { · 136 unmodified lines
556595 */
557596 __aligned_u64 ctx_in;
558597 __aligned_u64 ctx_out;
598+ __u32 flags;
599+ __u32 cpu;
559600 } test;
560601
561602 struct { /* anonymous struct used by BPF_*_GET_*_ID */
@@ -622,8 +663,13 @@ union bpf_attr { · 60 unmodified lines
622663 };
623664 __u32 attach_type; /* attach type */
624665 __u32 flags; /* extra flags */
625− __aligned_u64 iter_info; /* extra bpf_iter_link_info */
626− __u32 iter_info_len; /* iter_info length */
666+ union {
667+ __u32 target_btf_id; /* btf_id of target to attach to */
668+ struct {
669+ __aligned_u64 iter_info; /* extra bpf_iter_link_info */
670+ __u32 iter_info_len; /* iter_info length */
671+ };
672+ };
627673 } link_create;
628674
629675 struct { /* struct used by BPF_LINK_UPDATE command */
@@ -649,6 +695,12 @@ union bpf_attr { · 19 unmodified lines
649695 __u32 flags;
650696 } iter_create;
651697
698+ struct { /* struct used by BPF_PROG_BIND_MAP command */
699+ __u32 prog_fd;
700+ __u32 map_fd;
701+ __u32 flags; /* extra flags */
702+ } prog_bind_map;
703+
652704 } __attribute__((aligned(8)));
653705
654706 /* The description below is an attempt at providing documentation to eBPF
@@ -1438,8 +1490,8 @@ union bpf_attr { · 783 unmodified lines
14381490 * Return
14391491 * The return value depends on the result of the test, and can be:
14401492 *
1441− * * 0, if the *skb* task belongs to the cgroup2.
1442− * * 1, if the *skb* task does not belong to the cgroup2.
1493+ * * 0, if current task belongs to the cgroup2.
1494+ * * 1, if current task does not belong to the cgroup2.
14431495 * * A negative error code, if an error occurred.
14441496 *
14451497 * long bpf_skb_change_tail(struct sk_buff *skb, u32 len, u64 flags)
@@ -1649,7 +1701,7 @@ union bpf_attr { · 203 unmodified lines
16491701 * **TCP_CONGESTION**, **TCP_BPF_IW**,
16501702 * **TCP_BPF_SNDCWND_CLAMP**, **TCP_SAVE_SYN**,
16511703 * **TCP_KEEPIDLE**, **TCP_KEEPINTVL**, **TCP_KEEPCNT**,
1652− * **TCP_SYNCNT**, **TCP_USER_TIMEOUT**.
1704+ * **TCP_SYNCNT**, **TCP_USER_TIMEOUT**, **TCP_NOTSENT_LOWAT**.
16531705 * * **IPPROTO_IP**, which supports *optname* **IP_TOS**.
16541706 * * **IPPROTO_IPV6**, which supports *optname* **IPV6_TCLASS**.
16551707 * Return
@@ -2204,7 +2256,7 @@ union bpf_attr { · 548 unmodified lines
22042256 * Description
22052257 * This helper is used in programs implementing policies at the
22062258 * skb socket level. If the sk_buff *skb* is allowed to pass (i.e.
2207− * if the verdeict eBPF program returns **SK_PASS**), redirect it
2259+ * if the verdict eBPF program returns **SK_PASS**), redirect it
22082260 * to the socket referenced by *map* (of type
22092261 * **BPF_MAP_TYPE_SOCKHASH**) using hash *key*. Both ingress and
22102262 * egress interfaces can be used for redirection. The
@@ -2496,7 +2548,7 @@ union bpf_attr { · 285 unmodified lines
24962548 * result is from *reuse*\ **->socks**\ [] using the hash of the
24972549 * tuple.
24982550 *
2499− * long bpf_sk_release(struct bpf_sock *sock)
2551+ * long bpf_sk_release(void *sock)
25002552 * Description
25012553 * Release the reference held by *sock*. *sock* must be a
25022554 * non-**NULL** pointer that was returned from
@@ -2676,7 +2728,7 @@ union bpf_attr { · 173 unmodified lines
26762728 * result is from *reuse*\ **->socks**\ [] using the hash of the
26772729 * tuple.
26782730 *
2679− * long bpf_tcp_check_syncookie(struct bpf_sock *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
2731+ * long bpf_tcp_check_syncookie(void *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
26802732 * Description
26812733 * Check whether *iph* and *th* contain a valid SYN cookie ACK for
26822734 * the listening socket in *sk*.
@@ -2807,7 +2859,7 @@ union bpf_attr { · 124 unmodified lines
28072859 *
28082860 * **-ERANGE** if resulting value was out of range.
28092861 *
2810− * void *bpf_sk_storage_get(struct bpf_map *map, struct bpf_sock *sk, void *value, u64 flags)
2862+ * void *bpf_sk_storage_get(struct bpf_map *map, void *sk, void *value, u64 flags)
28112863 * Description
28122864 * Get a bpf-local-storage from a *sk*.
28132865 *
@@ -2823,6 +2875,9 @@ union bpf_attr { · 9 unmodified lines
28232875 * "type". The bpf-local-storage "type" (i.e. the *map*) is
28242876 * searched against all bpf-local-storages residing at *sk*.
28252877 *
2878+ * *sk* is a kernel **struct sock** pointer for LSM program.
2879+ * *sk* is a **struct bpf_sock** pointer for other program types.
2880+ *
28262881 * An optional *flags* (**BPF_SK_STORAGE_GET_F_CREATE**) can be
28272882 * used such that a new bpf-local-storage will be
28282883 * created if one does not exist. *value* can be used
@@ -2835,13 +2890,14 @@ union bpf_attr { · 6 unmodified lines
28352890 * **NULL** if not found or there was an error in adding
28362891 * a new bpf-local-storage.
28372892 *
2838− * long bpf_sk_storage_delete(struct bpf_map *map, struct bpf_sock *sk)
2893+ * long bpf_sk_storage_delete(struct bpf_map *map, void *sk)
28392894 * Description
28402895 * Delete a bpf-local-storage from a *sk*.
28412896 * Return
28422897 * 0 on success.
28432898 *
28442899 * **-ENOENT** if the bpf-local-storage cannot be found.
2900+ * **-EINVAL** if sk is not a fullsock (e.g. a request_sock).
28452901 *
28462902 * long bpf_send_signal(u32 sig)
28472903 * Description
@@ -2858,7 +2914,7 @@ union bpf_attr { · 10 unmodified lines
28582914 *
28592915 * **-EAGAIN** if bpf program can try again.
28602916 *
2861− * s64 bpf_tcp_gen_syncookie(struct bpf_sock *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
2917+ * s64 bpf_tcp_gen_syncookie(void *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
28622918 * Description
28632919 * Try to issue a SYN cookie for the packet with corresponding
28642920 * IP/TCP headers, *iph* and *th*, on the listening socket in *sk*.
@@ -3087,7 +3143,7 @@ union bpf_attr { · 222 unmodified lines
30873143 * Return
30883144 * The id is returned or 0 in case the id could not be retrieved.
30893145 *
3090− * long bpf_sk_assign(struct sk_buff *skb, struct bpf_sock *sk, u64 flags)
3146+ * long bpf_sk_assign(struct sk_buff *skb, void *sk, u64 flags)
30913147 * Description
30923148 * Helper is overloaded depending on BPF program type. This
30933149 * description applies to **BPF_PROG_TYPE_SCHED_CLS** and
@@ -3215,11 +3271,11 @@ union bpf_attr { · 121 unmodified lines
32153271 *
32163272 * **-EOVERFLOW** if an overflow happened: The same object will be tried again.
32173273 *
3218− * u64 bpf_sk_cgroup_id(struct bpf_sock *sk)
3274+ * u64 bpf_sk_cgroup_id(void *sk)
32193275 * Description
32203276 * Return the cgroup v2 id of the socket *sk*.
32213277 *
3222− * *sk* must be a non-**NULL** pointer to a full socket, e.g. one
3278+ * *sk* must be a non-**NULL** pointer to a socket, e.g. one
32233279 * returned from **bpf_sk_lookup_xxx**\ (),
32243280 * **bpf_sk_fullsock**\ (), etc. The format of returned id is
32253281 * same as in **bpf_skb_cgroup_id**\ ().
@@ -3229,7 +3285,7 @@ union bpf_attr { · 3 unmodified lines
32293285 * Return
32303286 * The id is returned or 0 in case the id could not be retrieved.
32313287 *
3232− * u64 bpf_sk_ancestor_cgroup_id(struct bpf_sock *sk, int ancestor_level)
3288+ * u64 bpf_sk_ancestor_cgroup_id(void *sk, int ancestor_level)
32333289 * Description
32343290 * Return id of cgroup v2 that is ancestor of cgroup associated
32353291 * with the *sk* at the *ancestor_level*. The root cgroup is at
@@ -3337,38 +3393,38 @@ union bpf_attr { · 101 unmodified lines
33373393 * Description
33383394 * Dynamically cast a *sk* pointer to a *tcp6_sock* pointer.
33393395 * Return
3340− * *sk* if casting is valid, or NULL otherwise.
3396+ * *sk* if casting is valid, or **NULL** otherwise.
33413397 *
33423398 * struct tcp_sock *bpf_skc_to_tcp_sock(void *sk)
33433399 * Description
33443400 * Dynamically cast a *sk* pointer to a *tcp_sock* pointer.
33453401 * Return
3346− * *sk* if casting is valid, or NULL otherwise.
3402+ * *sk* if casting is valid, or **NULL** otherwise.
33473403 *
33483404 * struct tcp_timewait_sock *bpf_skc_to_tcp_timewait_sock(void *sk)
33493405 * Description
33503406 * Dynamically cast a *sk* pointer to a *tcp_timewait_sock* pointer.
33513407 * Return
3352− * *sk* if casting is valid, or NULL otherwise.
3408+ * *sk* if casting is valid, or **NULL** otherwise.
33533409 *
33543410 * struct tcp_request_sock *bpf_skc_to_tcp_request_sock(void *sk)
33553411 * Description
33563412 * Dynamically cast a *sk* pointer to a *tcp_request_sock* pointer.
33573413 * Return
3358− * *sk* if casting is valid, or NULL otherwise.
3414+ * *sk* if casting is valid, or **NULL** otherwise.
33593415 *
33603416 * struct udp6_sock *bpf_skc_to_udp6_sock(void *sk)
33613417 * Description
33623418 * Dynamically cast a *sk* pointer to a *udp6_sock* pointer.
33633419 * Return
3364− * *sk* if casting is valid, or NULL otherwise.
3420+ * *sk* if casting is valid, or **NULL** otherwise.
33653421 *
33663422 * long bpf_get_task_stack(struct task_struct *task, void *buf, u32 size, u64 flags)
33673423 * Description
33683424 * Return a user or a kernel stack in bpf program provided buffer.
33693425 * To achieve this, the helper needs *task*, which is a valid
3370− * pointer to struct task_struct. To store the stacktrace, the
3371− * bpf program provides *buf* with a nonnegative *size*.
3426+ * pointer to **struct task_struct**. To store the stacktrace, the
3427+ * bpf program provides *buf* with a nonnegative *size*.
33723428 *
33733429 * The last argument, *flags*, holds the number of stack frames to
33743430 * skip (from 0 to 255), masked with
@@ -3395,6 +3451,293 @@ union bpf_attr { · 20 unmodified lines
33953451 * A non-negative value equal to or less than *size* on success,
33963452 * or a negative error in case of failure.
33973453 *
3454+ * long bpf_load_hdr_opt(struct bpf_sock_ops *skops, void *searchby_res, u32 len, u64 flags)
3455+ * Description
3456+ * Load header option. Support reading a particular TCP header
3457+ * option for bpf program (**BPF_PROG_TYPE_SOCK_OPS**).
3458+ *
3459+ * If *flags* is 0, it will search the option from the
3460+ * *skops*\ **->skb_data**. The comment in **struct bpf_sock_ops**
3461+ * has details on what skb_data contains under different
3462+ * *skops*\ **->op**.
3463+ *
3464+ * The first byte of the *searchby_res* specifies the
3465+ * kind that it wants to search.
3466+ *
3467+ * If the searching kind is an experimental kind
3468+ * (i.e. 253 or 254 according to RFC6994). It also
3469+ * needs to specify the "magic" which is either
3470+ * 2 bytes or 4 bytes. It then also needs to
3471+ * specify the size of the magic by using
3472+ * the 2nd byte which is "kind-length" of a TCP
3473+ * header option and the "kind-length" also
3474+ * includes the first 2 bytes "kind" and "kind-length"
3475+ * itself as a normal TCP header option also does.
3476+ *
3477+ * For example, to search experimental kind 254 with
3478+ * 2 byte magic 0xeB9F, the searchby_res should be
3479+ * [ 254, 4, 0xeB, 0x9F, 0, 0, .... 0 ].
3480+ *
3481+ * To search for the standard window scale option (3),
3482+ * the *searchby_res* should be [ 3, 0, 0, .... 0 ].
3483+ * Note, kind-length must be 0 for regular option.
3484+ *
3485+ * Searching for No-Op (0) and End-of-Option-List (1) are
3486+ * not supported.
3487+ *
3488+ * *len* must be at least 2 bytes which is the minimal size
3489+ * of a header option.
3490+ *
3491+ * Supported flags:
3492+ *
3493+ * * **BPF_LOAD_HDR_OPT_TCP_SYN** to search from the
3494+ * saved_syn packet or the just-received syn packet.
3495+ *
3496+ * Return
3497+ * > 0 when found, the header option is copied to *searchby_res*.
3498+ * The return value is the total length copied. On failure, a
3499+ * negative error code is returned:
3500+ *
3501+ * **-EINVAL** if a parameter is invalid.
3502+ *
3503+ * **-ENOMSG** if the option is not found.
3504+ *
3505+ * **-ENOENT** if no syn packet is available when
3506+ * **BPF_LOAD_HDR_OPT_TCP_SYN** is used.
3507+ *
3508+ * **-ENOSPC** if there is not enough space. Only *len* number of
3509+ * bytes are copied.
3510+ *
3511+ * **-EFAULT** on failure to parse the header options in the
3512+ * packet.
3513+ *
3514+ * **-EPERM** if the helper cannot be used under the current
3515+ * *skops*\ **->op**.
3516+ *
3517+ * long bpf_store_hdr_opt(struct bpf_sock_ops *skops, const void *from, u32 len, u64 flags)
3518+ * Description
3519+ * Store header option. The data will be copied
3520+ * from buffer *from* with length *len* to the TCP header.
3521+ *
3522+ * The buffer *from* should have the whole option that
3523+ * includes the kind, kind-length, and the actual
3524+ * option data. The *len* must be at least kind-length
3525+ * long. The kind-length does not have to be 4 byte
3526+ * aligned. The kernel will take care of the padding
3527+ * and setting the 4 bytes aligned value to th->doff.
3528+ *
3529+ * This helper will check for duplicated option
3530+ * by searching the same option in the outgoing skb.
3531+ *
3532+ * This helper can only be called during
3533+ * **BPF_SOCK_OPS_WRITE_HDR_OPT_CB**.
3534+ *
3535+ * Return
3536+ * 0 on success, or negative error in case of failure:
3537+ *
3538+ * **-EINVAL** If param is invalid.
3539+ *
3540+ * **-ENOSPC** if there is not enough space in the header.
3541+ * Nothing has been written
3542+ *
3543+ * **-EEXIST** if the option already exists.
3544+ *
3545+ * **-EFAULT** on failrue to parse the existing header options.
3546+ *
3547+ * **-EPERM** if the helper cannot be used under the current
3548+ * *skops*\ **->op**.
3549+ *
3550+ * long bpf_reserve_hdr_opt(struct bpf_sock_ops *skops, u32 len, u64 flags)
3551+ * Description
3552+ * Reserve *len* bytes for the bpf header option. The
3553+ * space will be used by **bpf_store_hdr_opt**\ () later in
3554+ * **BPF_SOCK_OPS_WRITE_HDR_OPT_CB**.
3555+ *
3556+ * If **bpf_reserve_hdr_opt**\ () is called multiple times,
3557+ * the total number of bytes will be reserved.
3558+ *
3559+ * This helper can only be called during
3560+ * **BPF_SOCK_OPS_HDR_OPT_LEN_CB**.
3561+ *
3562+ * Return
3563+ * 0 on success, or negative error in case of failure:
3564+ *
3565+ * **-EINVAL** if a parameter is invalid.
3566+ *
3567+ * **-ENOSPC** if there is not enough space in the header.
3568+ *
3569+ * **-EPERM** if the helper cannot be used under the current
3570+ * *skops*\ **->op**.
3571+ *
3572+ * void *bpf_inode_storage_get(struct bpf_map *map, void *inode, void *value, u64 flags)
3573+ * Description
3574+ * Get a bpf_local_storage from an *inode*.
3575+ *
3576+ * Logically, it could be thought of as getting the value from
3577+ * a *map* with *inode* as the **key**. From this
3578+ * perspective, the usage is not much different from
3579+ * **bpf_map_lookup_elem**\ (*map*, **&**\ *inode*) except this
3580+ * helper enforces the key must be an inode and the map must also
3581+ * be a **BPF_MAP_TYPE_INODE_STORAGE**.
3582+ *
3583+ * Underneath, the value is stored locally at *inode* instead of
3584+ * the *map*. The *map* is used as the bpf-local-storage
3585+ * "type". The bpf-local-storage "type" (i.e. the *map*) is
3586+ * searched against all bpf_local_storage residing at *inode*.
3587+ *
3588+ * An optional *flags* (**BPF_LOCAL_STORAGE_GET_F_CREATE**) can be
3589+ * used such that a new bpf_local_storage will be
3590+ * created if one does not exist. *value* can be used
3591+ * together with **BPF_LOCAL_STORAGE_GET_F_CREATE** to specify
3592+ * the initial value of a bpf_local_storage. If *value* is
3593+ * **NULL**, the new bpf_local_storage will be zero initialized.
3594+ * Return
3595+ * A bpf_local_storage pointer is returned on success.
3596+ *
3597+ * **NULL** if not found or there was an error in adding
3598+ * a new bpf_local_storage.
3599+ *
3600+ * int bpf_inode_storage_delete(struct bpf_map *map, void *inode)
3601+ * Description
3602+ * Delete a bpf_local_storage from an *inode*.
3603+ * Return
3604+ * 0 on success.
3605+ *
3606+ * **-ENOENT** if the bpf_local_storage cannot be found.
3607+ *
3608+ * long bpf_d_path(struct path *path, char *buf, u32 sz)
3609+ * Description
3610+ * Return full path for given **struct path** object, which
3611+ * needs to be the kernel BTF *path* object. The path is
3612+ * returned in the provided buffer *buf* of size *sz* and
3613+ * is zero terminated.
3614+ *
3615+ * Return
3616+ * On success, the strictly positive length of the string,
3617+ * including the trailing NUL character. On error, a negative
3618+ * value.
3619+ *
3620+ * long bpf_copy_from_user(void *dst, u32 size, const void *user_ptr)
3621+ * Description
3622+ * Read *size* bytes from user space address *user_ptr* and store
3623+ * the data in *dst*. This is a wrapper of **copy_from_user**\ ().
3624+ * Return
3625+ * 0 on success, or a negative error in case of failure.
3626+ *
3627+ * long bpf_snprintf_btf(char *str, u32 str_size, struct btf_ptr *ptr, u32 btf_ptr_size, u64 flags)
3628+ * Description
3629+ * Use BTF to store a string representation of *ptr*->ptr in *str*,
3630+ * using *ptr*->type_id. This value should specify the type
3631+ * that *ptr*->ptr points to. LLVM __builtin_btf_type_id(type, 1)
3632+ * can be used to look up vmlinux BTF type ids. Traversing the
3633+ * data structure using BTF, the type information and values are
3634+ * stored in the first *str_size* - 1 bytes of *str*. Safe copy of
3635+ * the pointer data is carried out to avoid kernel crashes during
3636+ * operation. Smaller types can use string space on the stack;
3637+ * larger programs can use map data to store the string
3638+ * representation.
3639+ *
3640+ * The string can be subsequently shared with userspace via
3641+ * bpf_perf_event_output() or ring buffer interfaces.
3642+ * bpf_trace_printk() is to be avoided as it places too small
3643+ * a limit on string size to be useful.
3644+ *
3645+ * *flags* is a combination of
3646+ *
3647+ * **BTF_F_COMPACT**
3648+ * no formatting around type information
3649+ * **BTF_F_NONAME**
3650+ * no struct/union member names/types
3651+ * **BTF_F_PTR_RAW**
3652+ * show raw (unobfuscated) pointer values;
3653+ * equivalent to printk specifier %px.
3654+ * **BTF_F_ZERO**
3655+ * show zero-valued struct/union members; they
3656+ * are not displayed by default
3657+ *
3658+ * Return
3659+ * The number of bytes that were written (or would have been
3660+ * written if output had to be truncated due to string size),
3661+ * or a negative error in cases of failure.
3662+ *
3663+ * long bpf_seq_printf_btf(struct seq_file *m, struct btf_ptr *ptr, u32 ptr_size, u64 flags)
3664+ * Description
3665+ * Use BTF to write to seq_write a string representation of
3666+ * *ptr*->ptr, using *ptr*->type_id as per bpf_snprintf_btf().
3667+ * *flags* are identical to those used for bpf_snprintf_btf.
3668+ * Return
3669+ * 0 on success or a negative error in case of failure.
3670+ *
3671+ * u64 bpf_skb_cgroup_classid(struct sk_buff *skb)
3672+ * Description
3673+ * See **bpf_get_cgroup_classid**\ () for the main description.
3674+ * This helper differs from **bpf_get_cgroup_classid**\ () in that
3675+ * the cgroup v1 net_cls class is retrieved only from the *skb*'s
3676+ * associated socket instead of the current process.
3677+ * Return
3678+ * The id is returned or 0 in case the id could not be retrieved.
3679+ *
3680+ * long bpf_redirect_neigh(u32 ifindex, u64 flags)
3681+ * Description
3682+ * Redirect the packet to another net device of index *ifindex*
3683+ * and fill in L2 addresses from neighboring subsystem. This helper
3684+ * is somewhat similar to **bpf_redirect**\ (), except that it
3685+ * populates L2 addresses as well, meaning, internally, the helper
3686+ * performs a FIB lookup based on the skb's networking header to
3687+ * get the address of the next hop and then relies on the neighbor
3688+ * lookup for the L2 address of the nexthop.
3689+ *
3690+ * The *flags* argument is reserved and must be 0. The helper is
3691+ * currently only supported for tc BPF program types, and enabled
3692+ * for IPv4 and IPv6 protocols.
3693+ * Return
3694+ * The helper returns **TC_ACT_REDIRECT** on success or
3695+ * **TC_ACT_SHOT** on error.
3696+ *
3697+ * void *bpf_per_cpu_ptr(const void *percpu_ptr, u32 cpu)
3698+ * Description
3699+ * Take a pointer to a percpu ksym, *percpu_ptr*, and return a
3700+ * pointer to the percpu kernel variable on *cpu*. A ksym is an
3701+ * extern variable decorated with '__ksym'. For ksym, there is a
3702+ * global var (either static or global) defined of the same name
3703+ * in the kernel. The ksym is percpu if the global var is percpu.
3704+ * The returned pointer points to the global percpu var on *cpu*.
3705+ *
3706+ * bpf_per_cpu_ptr() has the same semantic as per_cpu_ptr() in the
3707+ * kernel, except that bpf_per_cpu_ptr() may return NULL. This
3708+ * happens if *cpu* is larger than nr_cpu_ids. The caller of
3709+ * bpf_per_cpu_ptr() must check the returned value.
3710+ * Return
3711+ * A pointer pointing to the kernel percpu variable on *cpu*, or
3712+ * NULL, if *cpu* is invalid.
3713+ *
3714+ * void *bpf_this_cpu_ptr(const void *percpu_ptr)
3715+ * Description
3716+ * Take a pointer to a percpu ksym, *percpu_ptr*, and return a
3717+ * pointer to the percpu kernel variable on this cpu. See the
3718+ * description of 'ksym' in **bpf_per_cpu_ptr**\ ().
3719+ *
3720+ * bpf_this_cpu_ptr() has the same semantic as this_cpu_ptr() in
3721+ * the kernel. Different from **bpf_per_cpu_ptr**\ (), it would
3722+ * never return NULL.
3723+ * Return
3724+ * A pointer pointing to the kernel percpu variable on this cpu.
3725+ *
3726+ * long bpf_redirect_peer(u32 ifindex, u64 flags)
3727+ * Description
3728+ * Redirect the packet to another net device of index *ifindex*.
3729+ * This helper is somewhat similar to **bpf_redirect**\ (), except
3730+ * that the redirection happens to the *ifindex*' peer device and
3731+ * the netns switch takes place from ingress to ingress without
3732+ * going through the CPU's backlog queue.
3733+ *
3734+ * The *flags* argument is reserved and must be 0. The helper is
3735+ * currently only supported for tc BPF program types at the ingress
3736+ * hook and for veth device types. The peer device must reside in a
3737+ * different network namespace.
3738+ * Return
3739+ * The helper returns **TC_ACT_REDIRECT** on success or
3740+ * **TC_ACT_SHOT** on error.
33983741 */
33993742 #define __BPF_FUNC_MAPPER(FN) \
34003743 FN(unspec), \
@@ -3539,6 +3882,20 @@ union bpf_attr { · 138 unmodified lines
35393882 FN(skc_to_tcp_request_sock), \
35403883 FN(skc_to_udp6_sock), \
35413884 FN(get_task_stack), \
3885+ FN(load_hdr_opt), \
3886+ FN(store_hdr_opt), \
3887+ FN(reserve_hdr_opt), \
3888+ FN(inode_storage_get), \
3889+ FN(inode_storage_delete), \
3890+ FN(d_path), \
3891+ FN(copy_from_user), \
3892+ FN(snprintf_btf), \
3893+ FN(seq_printf_btf), \
3894+ FN(skb_cgroup_classid), \
3895+ FN(redirect_neigh), \
3896+ FN(bpf_per_cpu_ptr), \
3897+ FN(bpf_this_cpu_ptr), \
3898+ FN(redirect_peer), \
35423899 /* */
35433900
35443901 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
@@ -3648,9 +4005,13 @@ enum { · 103 unmodified lines
36484005 BPF_F_SYSCTL_BASE_NAME = (1ULL << 0),
36494006 };
36504007
3651−/* BPF_FUNC_sk_storage_get flags */
4008+/* BPF_FUNC_<kernel_obj>_storage_get flags */
36524009 enum {
3653− BPF_SK_STORAGE_GET_F_CREATE = (1ULL << 0),
4010+ BPF_LOCAL_STORAGE_GET_F_CREATE = (1ULL << 0),
4011+ /* BPF_SK_STORAGE_GET_F_CREATE is only kept for backward compatibility
4012+ * and BPF_LOCAL_STORAGE_GET_F_CREATE must be used instead.
4013+ */
4014+ BPF_SK_STORAGE_GET_F_CREATE = BPF_LOCAL_STORAGE_GET_F_CREATE,
36544015 };
36554016
36564017 /* BPF_FUNC_read_branch_records flags. */
@@ -4071,6 +4432,15 @@ struct bpf_link_info { · 414 unmodified lines
40714432 __u64 cgroup_id;
40724433 __u32 attach_type;
40734434 } cgroup;
4435+ struct {
4436+ __aligned_u64 target_name; /* in/out: target_name buffer ptr */
4437+ __u32 target_name_len; /* in/out: target_name buffer len */
4438+ union {
4439+ struct {
4440+ __u32 map_id;
4441+ } map;
4442+ };
4443+ } iter;
40744444 struct {
40754445 __u32 netns_ino;
40764446 __u32 attach_type;
@@ -4158,6 +4528,36 @@ struct bpf_sock_ops { · 81 unmodified lines
41584528 __u64 bytes_received;
41594529 __u64 bytes_acked;
41604530 __bpf_md_ptr(struct bpf_sock *, sk);
4531+ /* [skb_data, skb_data_end) covers the whole TCP header.
4532+ *
4533+ * BPF_SOCK_OPS_PARSE_HDR_OPT_CB: The packet received
4534+ * BPF_SOCK_OPS_HDR_OPT_LEN_CB: Not useful because the
4535+ * header has not been written.
4536+ * BPF_SOCK_OPS_WRITE_HDR_OPT_CB: The header and options have
4537+ * been written so far.
4538+ * BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: The SYNACK that concludes
4539+ * the 3WHS.
4540+ * BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: The ACK that concludes
4541+ * the 3WHS.
4542+ *
4543+ * bpf_load_hdr_opt() can also be used to read a particular option.
4544+ */
4545+ __bpf_md_ptr(void *, skb_data);
4546+ __bpf_md_ptr(void *, skb_data_end);
4547+ __u32 skb_len; /* The total length of a packet.
4548+ * It includes the header, options,
4549+ * and payload.
4550+ */
4551+ __u32 skb_tcp_flags; /* tcp_flags of the header. It provides
4552+ * an easy way to check for tcp_flags
4553+ * without parsing skb_data.
4554+ *
4555+ * In particular, the skb_tcp_flags
4556+ * will still be available in
4557+ * BPF_SOCK_OPS_HDR_OPT_LEN even though
4558+ * the outgoing header has not
4559+ * been written yet.
4560+ */
41614561 };
41624562
41634563 /* Definitions for bpf_sock_ops_cb_flags */
@@ -4166,8 +4566,51 @@ enum { · 2 unmodified lines
41664566 BPF_SOCK_OPS_RETRANS_CB_FLAG = (1<<1),
41674567 BPF_SOCK_OPS_STATE_CB_FLAG = (1<<2),
41684568 BPF_SOCK_OPS_RTT_CB_FLAG = (1<<3),
4569+ /* Call bpf for all received TCP headers. The bpf prog will be
4570+ * called under sock_ops->op == BPF_SOCK_OPS_PARSE_HDR_OPT_CB
4571+ *
4572+ * Please refer to the comment in BPF_SOCK_OPS_PARSE_HDR_OPT_CB
4573+ * for the header option related helpers that will be useful
4574+ * to the bpf programs.
4575+ *
4576+ * It could be used at the client/active side (i.e. connect() side)
4577+ * when the server told it that the server was in syncookie
4578+ * mode and required the active side to resend the bpf-written
4579+ * options. The active side can keep writing the bpf-options until
4580+ * it received a valid packet from the server side to confirm
4581+ * the earlier packet (and options) has been received. The later
4582+ * example patch is using it like this at the active side when the
4583+ * server is in syncookie mode.
4584+ *
4585+ * The bpf prog will usually turn this off in the common cases.
4586+ */
4587+ BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = (1<<4),
4588+ /* Call bpf when kernel has received a header option that
4589+ * the kernel cannot handle. The bpf prog will be called under
4590+ * sock_ops->op == BPF_SOCK_OPS_PARSE_HDR_OPT_CB.
4591+ *
4592+ * Please refer to the comment in BPF_SOCK_OPS_PARSE_HDR_OPT_CB
4593+ * for the header option related helpers that will be useful
4594+ * to the bpf programs.
4595+ */
4596+ BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = (1<<5),
4597+ /* Call bpf when the kernel is writing header options for the
4598+ * outgoing packet. The bpf prog will first be called
4599+ * to reserve space in a skb under
4600+ * sock_ops->op == BPF_SOCK_OPS_HDR_OPT_LEN_CB. Then
4601+ * the bpf prog will be called to write the header option(s)
4602+ * under sock_ops->op == BPF_SOCK_OPS_WRITE_HDR_OPT_CB.
4603+ *
4604+ * Please refer to the comment in BPF_SOCK_OPS_HDR_OPT_LEN_CB
4605+ * and BPF_SOCK_OPS_WRITE_HDR_OPT_CB for the header option
4606+ * related helpers that will be useful to the bpf programs.
4607+ *
4608+ * The kernel gets its chance to reserve space and write
4609+ * options first before the BPF program does.
4610+ */
4611+ BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = (1<<6),
41694612 /* Mask of all currently supported cb flags */
4170− BPF_SOCK_OPS_ALL_CB_FLAGS = 0xF,
4613+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7F,
41714614 };
41724615
41734616 /* List of known BPF sock_ops operators.
@@ -4223,6 +4666,63 @@ enum { · 49 unmodified lines
42234666 */
42244667 BPF_SOCK_OPS_RTT_CB, /* Called on every RTT.
42254668 */
4669+ BPF_SOCK_OPS_PARSE_HDR_OPT_CB, /* Parse the header option.
4670+ * It will be called to handle
4671+ * the packets received at
4672+ * an already established
4673+ * connection.
4674+ *
4675+ * sock_ops->skb_data:
4676+ * Referring to the received skb.
4677+ * It covers the TCP header only.
4678+ *
4679+ * bpf_load_hdr_opt() can also
4680+ * be used to search for a
4681+ * particular option.
4682+ */
4683+ BPF_SOCK_OPS_HDR_OPT_LEN_CB, /* Reserve space for writing the
4684+ * header option later in
4685+ * BPF_SOCK_OPS_WRITE_HDR_OPT_CB.
4686+ * Arg1: bool want_cookie. (in
4687+ * writing SYNACK only)
4688+ *
4689+ * sock_ops->skb_data:
4690+ * Not available because no header has
4691+ * been written yet.
4692+ *
4693+ * sock_ops->skb_tcp_flags:
4694+ * The tcp_flags of the
4695+ * outgoing skb. (e.g. SYN, ACK, FIN).
4696+ *
4697+ * bpf_reserve_hdr_opt() should
4698+ * be used to reserve space.
4699+ */
4700+ BPF_SOCK_OPS_WRITE_HDR_OPT_CB, /* Write the header options
4701+ * Arg1: bool want_cookie. (in
4702+ * writing SYNACK only)
4703+ *
4704+ * sock_ops->skb_data:
4705+ * Referring to the outgoing skb.
4706+ * It covers the TCP header
4707+ * that has already been written
4708+ * by the kernel and the
4709+ * earlier bpf-progs.
4710+ *
4711+ * sock_ops->skb_tcp_flags:
4712+ * The tcp_flags of the outgoing
4713+ * skb. (e.g. SYN, ACK, FIN).
4714+ *
4715+ * bpf_store_hdr_opt() should
4716+ * be used to write the
4717+ * option.
4718+ *
4719+ * bpf_load_hdr_opt() can also
4720+ * be used to search for a
4721+ * particular option that
4722+ * has already been written
4723+ * by the kernel or the
4724+ * earlier bpf-progs.
4725+ */
42264726 };
42274727
42284728 /* List of TCP states. There is a build check in net/ipv4/tcp.c to detect
@@ -4250,6 +4750,63 @@ enum { · 21 unmodified lines
42504750 enum {
42514751 TCP_BPF_IW = 1001, /* Set TCP initial congestion window */
42524752 TCP_BPF_SNDCWND_CLAMP = 1002, /* Set sndcwnd_clamp */
4753+ TCP_BPF_DELACK_MAX = 1003, /* Max delay ack in usecs */
4754+ TCP_BPF_RTO_MIN = 1004, /* Min delay ack in usecs */
4755+ /* Copy the SYN pkt to optval
4756+ *
4757+ * BPF_PROG_TYPE_SOCK_OPS only. It is similar to the
4758+ * bpf_getsockopt(TCP_SAVED_SYN) but it does not limit
4759+ * to only getting from the saved_syn. It can either get the
4760+ * syn packet from:
4761+ *
4762+ * 1. the just-received SYN packet (only available when writing the
4763+ * SYNACK). It will be useful when it is not necessary to
4764+ * save the SYN packet for latter use. It is also the only way
4765+ * to get the SYN during syncookie mode because the syn
4766+ * packet cannot be saved during syncookie.
4767+ *
4768+ * OR
4769+ *
4770+ * 2. the earlier saved syn which was done by
4771+ * bpf_setsockopt(TCP_SAVE_SYN).
4772+ *
4773+ * The bpf_getsockopt(TCP_BPF_SYN*) option will hide where the
4774+ * SYN packet is obtained.
4775+ *
4776+ * If the bpf-prog does not need the IP[46] header, the
4777+ * bpf-prog can avoid parsing the IP header by using
4778+ * TCP_BPF_SYN. Otherwise, the bpf-prog can get both
4779+ * IP[46] and TCP header by using TCP_BPF_SYN_IP.
4780+ *
4781+ * >0: Total number of bytes copied
4782+ * -ENOSPC: Not enough space in optval. Only optlen number of
4783+ * bytes is copied.
4784+ * -ENOENT: The SYN skb is not available now and the earlier SYN pkt
4785+ * is not saved by setsockopt(TCP_SAVE_SYN).
4786+ */
4787+ TCP_BPF_SYN = 1005, /* Copy the TCP header */
4788+ TCP_BPF_SYN_IP = 1006, /* Copy the IP[46] and TCP header */
4789+ TCP_BPF_SYN_MAC = 1007, /* Copy the MAC, IP[46], and TCP header */
4790+};
4791+
4792+enum {
4793+ BPF_LOAD_HDR_OPT_TCP_SYN = (1ULL << 0),
4794+};
4795+
4796+/* args[0] value during BPF_SOCK_OPS_HDR_OPT_LEN_CB and
4797+ * BPF_SOCK_OPS_WRITE_HDR_OPT_CB.
4798+ */
4799+enum {
4800+ BPF_WRITE_HDR_TCP_CURRENT_MSS = 1, /* Kernel is finding the
4801+ * total option spaces
4802+ * required for an established
4803+ * sk in order to calculate the
4804+ * MSS. No skb is actually
4805+ * sent.
4806+ */
4807+ BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 2, /* Kernel is in syncookie mode
4808+ * when sending a SYN.
4809+ */
42534810 };
42544811
42554812 struct bpf_perf_event_value {
@@ -4447,4 +5004,34 @@ struct bpf_sk_lookup { · 191 unmodified lines
44475004 __u32 local_port; /* Host byte order */
44485005 };
44495006
5007+/*
5008+ * struct btf_ptr is used for typed pointer representation; the
5009+ * type id is used to render the pointer data as the appropriate type
5010+ * via the bpf_snprintf_btf() helper described above. A flags field -
5011+ * potentially to specify additional details about the BTF pointer
5012+ * (rather than its mode of display) - is included for future use.
5013+ * Display flags - BTF_F_* - are passed to bpf_snprintf_btf separately.
5014+ */
5015+struct btf_ptr {
5016+ void *ptr;
5017+ __u32 type_id;
5018+ __u32 flags; /* BTF ptr flags; unused at present. */
5019+};
5020+
5021+/*
5022+ * Flags to control bpf_snprintf_btf() behaviour.
5023+ * - BTF_F_COMPACT: no formatting around type information
5024+ * - BTF_F_NONAME: no struct/union member names/types
5025+ * - BTF_F_PTR_RAW: show raw (unobfuscated) pointer values;
5026+ * equivalent to %px.
5027+ * - BTF_F_ZERO: show zero-valued struct/union members; they
5028+ * are not displayed by default
5029+ */
5030+enum {
5031+ BTF_F_COMPACT = (1ULL << 0),
5032+ BTF_F_NONAME = (1ULL << 1),
5033+ BTF_F_PTR_RAW = (1ULL << 2),
5034+ BTF_F_ZERO = (1ULL << 3),
5035+};
5036+
44505037 #endif /* _UAPI__LINUX_BPF_H__ */
include/uapi/linux/can/isotp.h+165−0
@@ -0,0 +1,165 @@
1+/* SPDX-License-Identifier: ((GPL-2.0-only WITH Linux-syscall-note) OR BSD-3-Clause) */
2+/*
3+ * linux/can/isotp.h
4+ *
5+ * Definitions for isotp CAN sockets (ISO 15765-2:2016)
6+ *
7+ * Copyright (c) 2020 Volkswagen Group Electronic Research
8+ * All rights reserved.
9+ *
10+ * Redistribution and use in source and binary forms, with or without
11+ * modification, are permitted provided that the following conditions
12+ * are met:
13+ * 1. Redistributions of source code must retain the above copyright
14+ * notice, this list of conditions and the following disclaimer.
15+ * 2. Redistributions in binary form must reproduce the above copyright
16+ * notice, this list of conditions and the following disclaimer in the
17+ * documentation and/or other materials provided with the distribution.
18+ * 3. Neither the name of Volkswagen nor the names of its contributors
19+ * may be used to endorse or promote products derived from this software
20+ * without specific prior written permission.
21+ *
22+ * Alternatively, provided that this notice is retained in full, this
23+ * software may be distributed under the terms of the GNU General
24+ * Public License ("GPL") version 2, in which case the provisions of the
25+ * GPL apply INSTEAD OF those given above.
26+ *
27+ * The provided data structures and external interfaces from this code
28+ * are not restricted to be used by modules with a GPL compatible license.
29+ *
30+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
33+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
34+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
35+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
36+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
37+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
38+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
39+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
40+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
41+ * DAMAGE.
42+ */
43+
44+#ifndef _UAPI_CAN_ISOTP_H
45+#define _UAPI_CAN_ISOTP_H
46+
47+#include <linux/types.h>
48+#include <linux/can.h>
49+
50+#define SOL_CAN_ISOTP (SOL_CAN_BASE + CAN_ISOTP)
51+
52+/* for socket options affecting the socket (not the global system) */
53+
54+#define CAN_ISOTP_OPTS 1 /* pass struct can_isotp_options */
55+
56+#define CAN_ISOTP_RECV_FC 2 /* pass struct can_isotp_fc_options */
57+
58+/* sockopts to force stmin timer values for protocol regression tests */
59+
60+#define CAN_ISOTP_TX_STMIN 3 /* pass __u32 value in nano secs */
61+ /* use this time instead of value */
62+ /* provided in FC from the receiver */
63+
64+#define CAN_ISOTP_RX_STMIN 4 /* pass __u32 value in nano secs */
65+ /* ignore received CF frames which */
66+ /* timestamps differ less than val */
67+
68+#define CAN_ISOTP_LL_OPTS 5 /* pass struct can_isotp_ll_options */
69+
70+struct can_isotp_options {
71+
72+ __u32 flags; /* set flags for isotp behaviour. */
73+ /* __u32 value : flags see below */
74+
75+ __u32 frame_txtime; /* frame transmission time (N_As/N_Ar) */
76+ /* __u32 value : time in nano secs */
77+
78+ __u8 ext_address; /* set address for extended addressing */
79+ /* __u8 value : extended address */
80+
81+ __u8 txpad_content; /* set content of padding byte (tx) */
82+ /* __u8 value : content on tx path */
83+
84+ __u8 rxpad_content; /* set content of padding byte (rx) */
85+ /* __u8 value : content on rx path */
86+
87+ __u8 rx_ext_address; /* set address for extended addressing */
88+ /* __u8 value : extended address (rx) */
89+};
90+
91+struct can_isotp_fc_options {
92+
93+ __u8 bs; /* blocksize provided in FC frame */
94+ /* __u8 value : blocksize. 0 = off */
95+
96+ __u8 stmin; /* separation time provided in FC frame */
97+ /* __u8 value : */
98+ /* 0x00 - 0x7F : 0 - 127 ms */
99+ /* 0x80 - 0xF0 : reserved */
100+ /* 0xF1 - 0xF9 : 100 us - 900 us */
101+ /* 0xFA - 0xFF : reserved */
102+
103+ __u8 wftmax; /* max. number of wait frame transmiss. */
104+ /* __u8 value : 0 = omit FC N_PDU WT */
105+};
106+
107+struct can_isotp_ll_options {
108+
109+ __u8 mtu; /* generated & accepted CAN frame type */
110+ /* __u8 value : */
111+ /* CAN_MTU (16) -> standard CAN 2.0 */
112+ /* CANFD_MTU (72) -> CAN FD frame */
113+
114+ __u8 tx_dl; /* tx link layer data length in bytes */
115+ /* (configured maximum payload length) */
116+ /* __u8 value : 8,12,16,20,24,32,48,64 */
117+ /* => rx path supports all LL_DL values */
118+
119+ __u8 tx_flags; /* set into struct canfd_frame.flags */
120+ /* at frame creation: e.g. CANFD_BRS */
121+ /* Obsolete when the BRS flag is fixed */
122+ /* by the CAN netdriver configuration */
123+};
124+
125+/* flags for isotp behaviour */
126+
127+#define CAN_ISOTP_LISTEN_MODE 0x001 /* listen only (do not send FC) */
128+#define CAN_ISOTP_EXTEND_ADDR 0x002 /* enable extended addressing */
129+#define CAN_ISOTP_TX_PADDING 0x004 /* enable CAN frame padding tx path */
130+#define CAN_ISOTP_RX_PADDING 0x008 /* enable CAN frame padding rx path */
131+#define CAN_ISOTP_CHK_PAD_LEN 0x010 /* check received CAN frame padding */
132+#define CAN_ISOTP_CHK_PAD_DATA 0x020 /* check received CAN frame padding */
133+#define CAN_ISOTP_HALF_DUPLEX 0x040 /* half duplex error state handling */
134+#define CAN_ISOTP_FORCE_TXSTMIN 0x080 /* ignore stmin from received FC */
135+#define CAN_ISOTP_FORCE_RXSTMIN 0x100 /* ignore CFs depending on rx stmin */
136+#define CAN_ISOTP_RX_EXT_ADDR 0x200 /* different rx extended addressing */
137+#define CAN_ISOTP_WAIT_TX_DONE 0x400 /* wait for tx completion */
138+
139+
140+/* default values */
141+
142+#define CAN_ISOTP_DEFAULT_FLAGS 0
143+#define CAN_ISOTP_DEFAULT_EXT_ADDRESS 0x00
144+#define CAN_ISOTP_DEFAULT_PAD_CONTENT 0xCC /* prevent bit-stuffing */
145+#define CAN_ISOTP_DEFAULT_FRAME_TXTIME 0
146+#define CAN_ISOTP_DEFAULT_RECV_BS 0
147+#define CAN_ISOTP_DEFAULT_RECV_STMIN 0x00
148+#define CAN_ISOTP_DEFAULT_RECV_WFTMAX 0
149+
150+#define CAN_ISOTP_DEFAULT_LL_MTU CAN_MTU
151+#define CAN_ISOTP_DEFAULT_LL_TX_DL CAN_MAX_DLEN
152+#define CAN_ISOTP_DEFAULT_LL_TX_FLAGS 0
153+
154+/*
155+ * Remark on CAN_ISOTP_DEFAULT_RECV_* values:
156+ *
157+ * We can strongly assume, that the Linux Kernel implementation of
158+ * CAN_ISOTP is capable to run with BS=0, STmin=0 and WFTmax=0.
159+ * But as we like to be able to behave as a commonly available ECU,
160+ * these default settings can be changed via sockopts.
161+ * For that reason the STmin value is intentionally _not_ checked for
162+ * consistency and copied directly into the flow control (FC) frame.
163+ */
164+
165+#endif /* !_UAPI_CAN_ISOTP_H */
include/uapi/linux/can/raw.h+3−0
@@ -49,6 +49,9 @@ · 48 unmodified lines
4949 #include <linux/can.h>
5050
5151 #define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW)
52+enum {
53+ SCM_CAN_RAW_ERRQUEUE = 1,
54+};
5255
5356 /* for socket options affecting the socket (not the global system) */
5457
include/uapi/linux/devlink.h+69−0
@@ -13,6 +13,8 @@ · 12 unmodified lines
1313 #ifndef _UAPI_LINUX_DEVLINK_H_
1414 #define _UAPI_LINUX_DEVLINK_H_
1515
16+#include <linux/const.h>
17+
1618 #define DEVLINK_GENL_NAME "devlink"
1719 #define DEVLINK_GENL_VERSION 0x1
1820 #define DEVLINK_GENL_MCGRP_CONFIG_NAME "config"
@@ -122,6 +124,8 @@ enum devlink_command { · 103 unmodified lines
122124 DEVLINK_CMD_TRAP_POLICER_NEW,
123125 DEVLINK_CMD_TRAP_POLICER_DEL,
124126
127+ DEVLINK_CMD_HEALTH_REPORTER_TEST,
128+
125129 /* add new commands above here */
126130 __DEVLINK_CMD_MAX,
127131 DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1
@@ -193,6 +197,9 @@ enum devlink_port_flavour { · 65 unmodified lines
193197 * port that faces the PCI VF.
194198 */
195199 DEVLINK_PORT_FLAVOUR_VIRTUAL, /* Any virtual port facing the user. */
200+ DEVLINK_PORT_FLAVOUR_UNUSED, /* Port which exists in the switch, but
201+ * is not used in any way.
202+ */
196203 };
197204
198205 enum devlink_param_cmode {
@@ -228,6 +235,28 @@ enum { · 29 unmodified lines
228235 DEVLINK_ATTR_STATS_MAX = __DEVLINK_ATTR_STATS_MAX - 1
229236 };
230237
238+/* Specify what sections of a flash component can be overwritten when
239+ * performing an update. Overwriting of firmware binary sections is always
240+ * implicitly assumed to be allowed.
241+ *
242+ * Each section must be documented in
243+ * Documentation/networking/devlink/devlink-flash.rst
244+ *
245+ */
246+enum {
247+ DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT,
248+ DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT,
249+
250+ __DEVLINK_FLASH_OVERWRITE_MAX_BIT,
251+ DEVLINK_FLASH_OVERWRITE_MAX_BIT = __DEVLINK_FLASH_OVERWRITE_MAX_BIT - 1
252+};
253+
254+#define DEVLINK_FLASH_OVERWRITE_SETTINGS _BITUL(DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT)
255+#define DEVLINK_FLASH_OVERWRITE_IDENTIFIERS _BITUL(DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT)
256+
257+#define DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS \
258+ (_BITUL(__DEVLINK_FLASH_OVERWRITE_MAX_BIT) - 1)
259+
231260 /**
232261 * enum devlink_trap_action - Packet trap action.
233262 * @DEVLINK_TRAP_ACTION_DROP: Packet is dropped by the device and a copy is not
@@ -272,6 +301,29 @@ enum { · 38 unmodified lines
272301 DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE,
273302 };
274303
304+enum devlink_reload_action {
305+ DEVLINK_RELOAD_ACTION_UNSPEC,
306+ DEVLINK_RELOAD_ACTION_DRIVER_REINIT, /* Driver entities re-instantiation */
307+ DEVLINK_RELOAD_ACTION_FW_ACTIVATE, /* FW activate */
308+
309+ /* Add new reload actions above */
310+ __DEVLINK_RELOAD_ACTION_MAX,
311+ DEVLINK_RELOAD_ACTION_MAX = __DEVLINK_RELOAD_ACTION_MAX - 1
312+};
313+
314+enum devlink_reload_limit {
315+ DEVLINK_RELOAD_LIMIT_UNSPEC, /* unspecified, no constraints */
316+ DEVLINK_RELOAD_LIMIT_NO_RESET, /* No reset allowed, no down time allowed,
317+ * no link flap and no configuration is lost.
318+ */
319+
320+ /* Add new reload limit above */
321+ __DEVLINK_RELOAD_LIMIT_MAX,
322+ DEVLINK_RELOAD_LIMIT_MAX = __DEVLINK_RELOAD_LIMIT_MAX - 1
323+};
324+
325+#define DEVLINK_RELOAD_LIMITS_VALID_MASK (BIT(__DEVLINK_RELOAD_LIMIT_MAX) - 1)
326+
275327 enum devlink_attr {
276328 /* don't change the order or add anything between, this is ABI! */
277329 DEVLINK_ATTR_UNSPEC,
@@ -458,6 +510,23 @@ enum devlink_attr { · 180 unmodified lines
458510 DEVLINK_ATTR_PORT_LANES, /* u32 */
459511 DEVLINK_ATTR_PORT_SPLITTABLE, /* u8 */
460512
513+ DEVLINK_ATTR_PORT_EXTERNAL, /* u8 */
514+ DEVLINK_ATTR_PORT_CONTROLLER_NUMBER, /* u32 */
515+
516+ DEVLINK_ATTR_FLASH_UPDATE_STATUS_TIMEOUT, /* u64 */
517+ DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK, /* bitfield32 */
518+
519+ DEVLINK_ATTR_RELOAD_ACTION, /* u8 */
520+ DEVLINK_ATTR_RELOAD_ACTIONS_PERFORMED, /* bitfield32 */
521+ DEVLINK_ATTR_RELOAD_LIMITS, /* bitfield32 */
522+
523+ DEVLINK_ATTR_DEV_STATS, /* nested */
524+ DEVLINK_ATTR_RELOAD_STATS, /* nested */
525+ DEVLINK_ATTR_RELOAD_STATS_ENTRY, /* nested */
526+ DEVLINK_ATTR_RELOAD_STATS_LIMIT, /* u8 */
527+ DEVLINK_ATTR_RELOAD_STATS_VALUE, /* u32 */
528+ DEVLINK_ATTR_REMOTE_RELOAD_STATS, /* nested */
529+
461530 /* add new attributes above here, update the policy in devlink.c */
462531
463532 __DEVLINK_ATTR_MAX,
include/uapi/linux/ethtool.h+2−0
@@ -1617,6 +1617,8 @@ enum ethtool_link_mode_bit_indices { · 1616 unmodified lines
16171617 ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT = 87,
16181618 ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT = 88,
16191619 ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT = 89,
1620+ ETHTOOL_LINK_MODE_100baseFX_Half_BIT = 90,
1621+ ETHTOOL_LINK_MODE_100baseFX_Full_BIT = 91,
16201622 /* must be last entry */
16211623 __ETHTOOL_LINK_MODE_MASK_NBITS
16221624 };
include/uapi/linux/ethtool_netlink.h+17−1
@@ -92,9 +92,12 @@ enum { · 91 unmodified lines
9292 #define ETHTOOL_FLAG_COMPACT_BITSETS (1 << 0)
9393 /* provide optional reply for SET or ACT requests */
9494 #define ETHTOOL_FLAG_OMIT_REPLY (1 << 1)
95+/* request statistics, if supported by the driver */
96+#define ETHTOOL_FLAG_STATS (1 << 2)
9597
9698 #define ETHTOOL_FLAG_ALL (ETHTOOL_FLAG_COMPACT_BITSETS | \
97− ETHTOOL_FLAG_OMIT_REPLY)
99+ ETHTOOL_FLAG_OMIT_REPLY | \
100+ ETHTOOL_FLAG_STATS)
98101
99102 enum {
100103 ETHTOOL_A_HEADER_UNSPEC,
@@ -377,12 +380,25 @@ enum { · 276 unmodified lines
377380 ETHTOOL_A_PAUSE_AUTONEG, /* u8 */
378381 ETHTOOL_A_PAUSE_RX, /* u8 */
379382 ETHTOOL_A_PAUSE_TX, /* u8 */
383+ ETHTOOL_A_PAUSE_STATS, /* nest - _PAUSE_STAT_* */
380384
381385 /* add new constants above here */
382386 __ETHTOOL_A_PAUSE_CNT,
383387 ETHTOOL_A_PAUSE_MAX = (__ETHTOOL_A_PAUSE_CNT - 1)
384388 };
385389
390+enum {
391+ ETHTOOL_A_PAUSE_STAT_UNSPEC,
392+ ETHTOOL_A_PAUSE_STAT_PAD,
393+
394+ ETHTOOL_A_PAUSE_STAT_TX_FRAMES,
395+ ETHTOOL_A_PAUSE_STAT_RX_FRAMES,
396+
397+ /* add new constants above here */
398+ __ETHTOOL_A_PAUSE_STAT_CNT,
399+ ETHTOOL_A_PAUSE_STAT_MAX = (__ETHTOOL_A_PAUSE_STAT_CNT - 1)
400+};
401+
386402 /* EEE */
387403
388404 enum {
include/uapi/linux/genetlink.h+11−0
@@ -64,6 +64,8 @@ enum { · 63 unmodified lines
6464 CTRL_ATTR_OPS,
6565 CTRL_ATTR_MCAST_GROUPS,
6666 CTRL_ATTR_POLICY,
67+ CTRL_ATTR_OP_POLICY,
68+ CTRL_ATTR_OP,
6769 __CTRL_ATTR_MAX,
6870 };
6971
@@ -85,6 +87,15 @@ enum { · 15 unmodified lines
8587 __CTRL_ATTR_MCAST_GRP_MAX,
8688 };
8789
90+enum {
91+ CTRL_ATTR_POLICY_UNSPEC,
92+ CTRL_ATTR_POLICY_DO,
93+ CTRL_ATTR_POLICY_DUMP,
94+
95+ __CTRL_ATTR_POLICY_DUMP_MAX,
96+ CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX - 1
97+};
98+
8899 #define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
89100
90101
include/uapi/linux/gtp.h+2−0
@@ -2,6 +2,8 @@ · 1 unmodified line
22 #ifndef _UAPI_LINUX_GTP_H_
33 #define _UAPI_LINUX_GTP_H_
44
5+#define GTP_GENL_MCGRP_NAME "gtp"
6+
57 enum gtp_genl_cmds {
68 GTP_CMD_NEWPDP,
79 GTP_CMD_DELPDP,
include/uapi/linux/if_bridge.h+38−0
@@ -455,10 +455,33 @@ enum { · 454 unmodified lines
455455 enum {
456456 MDBA_MDB_EATTR_UNSPEC,
457457 MDBA_MDB_EATTR_TIMER,
458+ MDBA_MDB_EATTR_SRC_LIST,
459+ MDBA_MDB_EATTR_GROUP_MODE,
460+ MDBA_MDB_EATTR_SOURCE,
461+ MDBA_MDB_EATTR_RTPROT,
458462 __MDBA_MDB_EATTR_MAX
459463 };
460464 #define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)
461465
466+/* per mdb entry source */
467+enum {
468+ MDBA_MDB_SRCLIST_UNSPEC,
469+ MDBA_MDB_SRCLIST_ENTRY,
470+ __MDBA_MDB_SRCLIST_MAX
471+};
472+#define MDBA_MDB_SRCLIST_MAX (__MDBA_MDB_SRCLIST_MAX - 1)
473+
474+/* per mdb entry per source attributes
475+ * these are embedded in MDBA_MDB_SRCLIST_ENTRY
476+ */
477+enum {
478+ MDBA_MDB_SRCATTR_UNSPEC,
479+ MDBA_MDB_SRCATTR_ADDRESS,
480+ MDBA_MDB_SRCATTR_TIMER,
481+ __MDBA_MDB_SRCATTR_MAX
482+};
483+#define MDBA_MDB_SRCATTR_MAX (__MDBA_MDB_SRCATTR_MAX - 1)
484+
462485 /* multicast router types */
463486 enum {
464487 MDB_RTR_TYPE_DISABLED,
@@ -495,6 +518,8 @@ struct br_mdb_entry { · 30 unmodified lines
495518 __u8 state;
496519 #define MDB_FLAGS_OFFLOAD (1 << 0)
497520 #define MDB_FLAGS_FAST_LEAVE (1 << 1)
521+#define MDB_FLAGS_STAR_EXCL (1 << 2)
522+#define MDB_FLAGS_BLOCKED (1 << 3)
498523 __u8 flags;
499524 __u16 vid;
500525 struct {
@@ -509,10 +534,23 @@ struct br_mdb_entry { · 8 unmodified lines
509534 enum {
510535 MDBA_SET_ENTRY_UNSPEC,
511536 MDBA_SET_ENTRY,
537+ MDBA_SET_ENTRY_ATTRS,
512538 __MDBA_SET_ENTRY_MAX,
513539 };
514540 #define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)
515541
542+/* [MDBA_SET_ENTRY_ATTRS] = {
543+ * [MDBE_ATTR_xxx]
544+ * ...
545+ * }
546+ */
547+enum {
548+ MDBE_ATTR_UNSPEC,
549+ MDBE_ATTR_SOURCE,
550+ __MDBE_ATTR_MAX,
551+};
552+#define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)
553+
516554 /* Embedded inside LINK_XSTATS_TYPE_BRIDGE */
517555 enum {
518556 BRIDGE_XSTATS_UNSPEC,
include/uapi/linux/if_link.h+202−33
@@ -7,24 +7,23 @@ · 6 unmodified lines
77
88 /* This struct should be in sync with struct rtnl_link_stats64 */
99 struct rtnl_link_stats {
10− __u32 rx_packets; /* total packets received */
11− __u32 tx_packets; /* total packets transmitted */
12− __u32 rx_bytes; /* total bytes received */
13− __u32 tx_bytes; /* total bytes transmitted */
14− __u32 rx_errors; /* bad packets received */
15− __u32 tx_errors; /* packet transmit problems */
16− __u32 rx_dropped; /* no space in linux buffers */
17− __u32 tx_dropped; /* no space available in linux */
18− __u32 multicast; /* multicast packets received */
10+ __u32 rx_packets;
11+ __u32 tx_packets;
12+ __u32 rx_bytes;
13+ __u32 tx_bytes;
14+ __u32 rx_errors;
15+ __u32 tx_errors;
16+ __u32 rx_dropped;
17+ __u32 tx_dropped;
18+ __u32 multicast;
1919 __u32 collisions;
20−
2120 /* detailed rx_errors: */
2221 __u32 rx_length_errors;
23− __u32 rx_over_errors; /* receiver ring buff overflow */
24− __u32 rx_crc_errors; /* recved pkt with crc error */
25− __u32 rx_frame_errors; /* recv'd frame alignment error */
26− __u32 rx_fifo_errors; /* recv'r fifo overrun */
27− __u32 rx_missed_errors; /* receiver missed packet */
22+ __u32 rx_over_errors;
23+ __u32 rx_crc_errors;
24+ __u32 rx_frame_errors;
25+ __u32 rx_fifo_errors;
26+ __u32 rx_missed_errors;
2827
2928 /* detailed tx_errors */
3029 __u32 tx_aborted_errors;
@@ -37,29 +36,200 @@ struct rtnl_link_stats { · 6 unmodified lines
3736 __u32 rx_compressed;
3837 __u32 tx_compressed;
3938
40− __u32 rx_nohandler; /* dropped, no handler found */
39+ __u32 rx_nohandler;
4140 };
4241
43−/* The main device statistics structure */
42+/**
43+ * struct rtnl_link_stats64 - The main device statistics structure.
44+ *
45+ * @rx_packets: Number of good packets received by the interface.
46+ * For hardware interfaces counts all good packets received from the device
47+ * by the host, including packets which host had to drop at various stages
48+ * of processing (even in the driver).
49+ *
50+ * @tx_packets: Number of packets successfully transmitted.
51+ * For hardware interfaces counts packets which host was able to successfully
52+ * hand over to the device, which does not necessarily mean that packets
53+ * had been successfully transmitted out of the device, only that device
54+ * acknowledged it copied them out of host memory.
55+ *
56+ * @rx_bytes: Number of good received bytes, corresponding to @rx_packets.
57+ *
58+ * For IEEE 802.3 devices should count the length of Ethernet Frames
59+ * excluding the FCS.
60+ *
61+ * @tx_bytes: Number of good transmitted bytes, corresponding to @tx_packets.
62+ *
63+ * For IEEE 802.3 devices should count the length of Ethernet Frames
64+ * excluding the FCS.
65+ *
66+ * @rx_errors: Total number of bad packets received on this network device.
67+ * This counter must include events counted by @rx_length_errors,
68+ * @rx_crc_errors, @rx_frame_errors and other errors not otherwise
69+ * counted.
70+ *
71+ * @tx_errors: Total number of transmit problems.
72+ * This counter must include events counter by @tx_aborted_errors,
73+ * @tx_carrier_errors, @tx_fifo_errors, @tx_heartbeat_errors,
74+ * @tx_window_errors and other errors not otherwise counted.
75+ *
76+ * @rx_dropped: Number of packets received but not processed,
77+ * e.g. due to lack of resources or unsupported protocol.
78+ * For hardware interfaces this counter should not include packets
79+ * dropped by the device which are counted separately in
80+ * @rx_missed_errors (since procfs folds those two counters together).
81+ *
82+ * @tx_dropped: Number of packets dropped on their way to transmission,
83+ * e.g. due to lack of resources.
84+ *
85+ * @multicast: Multicast packets received.
86+ * For hardware interfaces this statistic is commonly calculated
87+ * at the device level (unlike @rx_packets) and therefore may include
88+ * packets which did not reach the host.
89+ *
90+ * For IEEE 802.3 devices this counter may be equivalent to:
91+ *
92+ * - 30.3.1.1.21 aMulticastFramesReceivedOK
93+ *
94+ * @collisions: Number of collisions during packet transmissions.
95+ *
96+ * @rx_length_errors: Number of packets dropped due to invalid length.
97+ * Part of aggregate "frame" errors in `/proc/net/dev`.
98+ *
99+ * For IEEE 802.3 devices this counter should be equivalent to a sum
100+ * of the following attributes:
101+ *
102+ * - 30.3.1.1.23 aInRangeLengthErrors
103+ * - 30.3.1.1.24 aOutOfRangeLengthField
104+ * - 30.3.1.1.25 aFrameTooLongErrors
105+ *
106+ * @rx_over_errors: Receiver FIFO overflow event counter.
107+ *
108+ * Historically the count of overflow events. Such events may be
109+ * reported in the receive descriptors or via interrupts, and may
110+ * not correspond one-to-one with dropped packets.
111+ *
112+ * The recommended interpretation for high speed interfaces is -
113+ * number of packets dropped because they did not fit into buffers
114+ * provided by the host, e.g. packets larger than MTU or next buffer
115+ * in the ring was not available for a scatter transfer.
116+ *
117+ * Part of aggregate "frame" errors in `/proc/net/dev`.
118+ *
119+ * This statistics was historically used interchangeably with
120+ * @rx_fifo_errors.
121+ *
122+ * This statistic corresponds to hardware events and is not commonly used
123+ * on software devices.
124+ *
125+ * @rx_crc_errors: Number of packets received with a CRC error.
126+ * Part of aggregate "frame" errors in `/proc/net/dev`.
127+ *
128+ * For IEEE 802.3 devices this counter must be equivalent to:
129+ *
130+ * - 30.3.1.1.6 aFrameCheckSequenceErrors
131+ *
132+ * @rx_frame_errors: Receiver frame alignment errors.
133+ * Part of aggregate "frame" errors in `/proc/net/dev`.
134+ *
135+ * For IEEE 802.3 devices this counter should be equivalent to:
136+ *
137+ * - 30.3.1.1.7 aAlignmentErrors
138+ *
139+ * @rx_fifo_errors: Receiver FIFO error counter.
140+ *
141+ * Historically the count of overflow events. Those events may be
142+ * reported in the receive descriptors or via interrupts, and may
143+ * not correspond one-to-one with dropped packets.
144+ *
145+ * This statistics was used interchangeably with @rx_over_errors.
146+ * Not recommended for use in drivers for high speed interfaces.
147+ *
148+ * This statistic is used on software devices, e.g. to count software
149+ * packet queue overflow (can) or sequencing errors (GRE).
150+ *
151+ * @rx_missed_errors: Count of packets missed by the host.
152+ * Folded into the "drop" counter in `/proc/net/dev`.
153+ *
154+ * Counts number of packets dropped by the device due to lack
155+ * of buffer space. This usually indicates that the host interface
156+ * is slower than the network interface, or host is not keeping up
157+ * with the receive packet rate.
158+ *
159+ * This statistic corresponds to hardware events and is not used
160+ * on software devices.
161+ *
162+ * @tx_aborted_errors:
163+ * Part of aggregate "carrier" errors in `/proc/net/dev`.
164+ * For IEEE 802.3 devices capable of half-duplex operation this counter
165+ * must be equivalent to:
166+ *
167+ * - 30.3.1.1.11 aFramesAbortedDueToXSColls
168+ *
169+ * High speed interfaces may use this counter as a general device
170+ * discard counter.
171+ *
172+ * @tx_carrier_errors: Number of frame transmission errors due to loss
173+ * of carrier during transmission.
174+ * Part of aggregate "carrier" errors in `/proc/net/dev`.
175+ *
176+ * For IEEE 802.3 devices this counter must be equivalent to:
177+ *
178+ * - 30.3.1.1.13 aCarrierSenseErrors
179+ *
180+ * @tx_fifo_errors: Number of frame transmission errors due to device
181+ * FIFO underrun / underflow. This condition occurs when the device
182+ * begins transmission of a frame but is unable to deliver the
183+ * entire frame to the transmitter in time for transmission.
184+ * Part of aggregate "carrier" errors in `/proc/net/dev`.
185+ *
186+ * @tx_heartbeat_errors: Number of Heartbeat / SQE Test errors for
187+ * old half-duplex Ethernet.
188+ * Part of aggregate "carrier" errors in `/proc/net/dev`.
189+ *
190+ * For IEEE 802.3 devices possibly equivalent to:
191+ *
192+ * - 30.3.2.1.4 aSQETestErrors
193+ *
194+ * @tx_window_errors: Number of frame transmission errors due
195+ * to late collisions (for Ethernet - after the first 64B of transmission).
196+ * Part of aggregate "carrier" errors in `/proc/net/dev`.
197+ *
198+ * For IEEE 802.3 devices this counter must be equivalent to:
199+ *
200+ * - 30.3.1.1.10 aLateCollisions
201+ *
202+ * @rx_compressed: Number of correctly received compressed packets.
203+ * This counters is only meaningful for interfaces which support
204+ * packet compression (e.g. CSLIP, PPP).
205+ *
206+ * @tx_compressed: Number of transmitted compressed packets.
207+ * This counters is only meaningful for interfaces which support
208+ * packet compression (e.g. CSLIP, PPP).
209+ *
210+ * @rx_nohandler: Number of packets received on the interface
211+ * but dropped by the networking stack because the device is
212+ * not designated to receive packets (e.g. backup link in a bond).
213+ */
44214 struct rtnl_link_stats64 {
45− __u64 rx_packets; /* total packets received */
46− __u64 tx_packets; /* total packets transmitted */
47− __u64 rx_bytes; /* total bytes received */
48− __u64 tx_bytes; /* total bytes transmitted */
49− __u64 rx_errors; /* bad packets received */
50− __u64 tx_errors; /* packet transmit problems */
51− __u64 rx_dropped; /* no space in linux buffers */
52− __u64 tx_dropped; /* no space available in linux */
53− __u64 multicast; /* multicast packets received */
215+ __u64 rx_packets;
216+ __u64 tx_packets;
217+ __u64 rx_bytes;
218+ __u64 tx_bytes;
219+ __u64 rx_errors;
220+ __u64 tx_errors;
221+ __u64 rx_dropped;
222+ __u64 tx_dropped;
223+ __u64 multicast;
54224 __u64 collisions;
55225
56226 /* detailed rx_errors: */
57227 __u64 rx_length_errors;
58− __u64 rx_over_errors; /* receiver ring buff overflow */
59− __u64 rx_crc_errors; /* recved pkt with crc error */
60− __u64 rx_frame_errors; /* recv'd frame alignment error */
61− __u64 rx_fifo_errors; /* recv'r fifo overrun */
62− __u64 rx_missed_errors; /* receiver missed packet */
228+ __u64 rx_over_errors;
229+ __u64 rx_crc_errors;
230+ __u64 rx_frame_errors;
231+ __u64 rx_fifo_errors;
232+ __u64 rx_missed_errors;
63233
64234 /* detailed tx_errors */
65235 __u64 tx_aborted_errors;
@@ -71,8 +241,7 @@ struct rtnl_link_stats64 { · 5 unmodified lines
71241 /* for cslip etc */
72242 __u64 rx_compressed;
73243 __u64 tx_compressed;
74−
75− __u64 rx_nohandler; /* dropped, no handler found */
244+ __u64 rx_nohandler;
76245 };
77246
78247 /* The struct should be in sync with struct ifmap */
include/uapi/linux/if_pppol2tp.h+1−1
@@ -75,7 +75,7 @@ struct pppol2tpv3in6_addr { · 74 unmodified lines
7575 };
7676
7777 /* Socket options:
78− * DEBUG - bitmask of debug message categories
78+ * DEBUG - bitmask of debug message categories (not used)
7979 * SENDSEQ - 0 => don't send packets with sequence numbers
8080 * 1 => send packets with sequence numbers
8181 * RECVSEQ - 0 => receive packet sequence numbers are optional
include/uapi/linux/inet_diag.h+18−0
@@ -160,6 +160,7 @@ enum { · 159 unmodified lines
160160 INET_DIAG_ULP_INFO,
161161 INET_DIAG_SK_BPF_STORAGES,
162162 INET_DIAG_CGROUP_ID,
163+ INET_DIAG_SOCKOPT,
163164 __INET_DIAG_MAX,
164165 };
165166
@@ -183,6 +184,23 @@ struct inet_diag_meminfo { · 17 unmodified lines
183184 __u32 idiag_tmem;
184185 };
185186
187+/* INET_DIAG_SOCKOPT */
188+
189+struct inet_diag_sockopt {
190+ __u8 recverr:1,
191+ is_icsk:1,
192+ freebind:1,
193+ hdrincl:1,
194+ mc_loop:1,
195+ transparent:1,
196+ mc_all:1,
197+ nodefrag:1;
198+ __u8 bind_address_no_port:1,
199+ recverr_rfc4884:1,
200+ defer_connect:1,
201+ unused:5;
202+};
203+
186204 /* INET_DIAG_VEGASINFO */
187205
188206 struct tcpvegas_info {
include/uapi/linux/l2tp.h+5−2
@@ -108,7 +108,7 @@ enum { · 107 unmodified lines
108108 L2TP_ATTR_VLAN_ID, /* u16 (not used) */
109109 L2TP_ATTR_COOKIE, /* 0, 4 or 8 bytes */
110110 L2TP_ATTR_PEER_COOKIE, /* 0, 4 or 8 bytes */
111− L2TP_ATTR_DEBUG, /* u32, enum l2tp_debug_flags */
111+ L2TP_ATTR_DEBUG, /* u32, enum l2tp_debug_flags (not used) */
112112 L2TP_ATTR_RECV_SEQ, /* u8 */
113113 L2TP_ATTR_SEND_SEQ, /* u8 */
114114 L2TP_ATTR_LNS_MODE, /* u8 */
@@ -144,6 +144,7 @@ enum { · 29 unmodified lines
144144 L2TP_ATTR_RX_OOS_PACKETS, /* u64 */
145145 L2TP_ATTR_RX_ERRORS, /* u64 */
146146 L2TP_ATTR_STATS_PAD,
147+ L2TP_ATTR_RX_COOKIE_DISCARDS, /* u64 */
147148 __L2TP_ATTR_STATS_MAX,
148149 };
149150
@@ -177,7 +178,9 @@ enum l2tp_seqmode { · 27 unmodified lines
177178 };
178179
179180 /**
180− * enum l2tp_debug_flags - debug message categories for L2TP tunnels/sessions
181+ * enum l2tp_debug_flags - debug message categories for L2TP tunnels/sessions.
182+ *
183+ * Unused.
181184 *
182185 * @L2TP_MSG_DEBUG: verbose debug (if compiled in)
183186 * @L2TP_MSG_CONTROL: userspace - kernel interface
include/uapi/linux/mroute.h+3−2
@@ -113,8 +113,8 @@ struct igmpmsg { · 112 unmodified lines
113113 __u32 unused1,unused2;
114114 unsigned char im_msgtype; /* What is this */
115115 unsigned char im_mbz; /* Must be zero */
116− unsigned char im_vif; /* Interface (this ought to be a vifi_t!) */
117− unsigned char unused3;
116+ unsigned char im_vif; /* Low 8 bits of Interface */
117+ unsigned char im_vif_hi; /* High 8 bits of Interface */
118118 struct in_addr im_src,im_dst;
119119 };
120120
@@ -169,6 +169,7 @@ enum { · 48 unmodified lines
169169 IPMRA_CREPORT_SRC_ADDR,
170170 IPMRA_CREPORT_DST_ADDR,
171171 IPMRA_CREPORT_PKT,
172+ IPMRA_CREPORT_TABLE,
172173 __IPMRA_CREPORT_MAX
173174 };
174175 #define IPMRA_CREPORT_MAX (__IPMRA_CREPORT_MAX - 1)
include/uapi/linux/netfilter.h+2−1
@@ -45,7 +45,8 @@ enum nf_inet_hooks { · 44 unmodified lines
4545 NF_INET_FORWARD,
4646 NF_INET_LOCAL_OUT,
4747 NF_INET_POST_ROUTING,
48− NF_INET_NUMHOOKS
48+ NF_INET_NUMHOOKS,
49+ NF_INET_INGRESS = NF_INET_NUMHOOKS,
4950 };
5051
5152 enum nf_dev_hooks {
include/uapi/linux/netfilter/nf_tables.h+10−0
@@ -172,6 +172,7 @@ enum nft_table_flags { · 171 unmodified lines
172172 * @NFTA_TABLE_NAME: name of the table (NLA_STRING)
173173 * @NFTA_TABLE_FLAGS: bitmask of enum nft_table_flags (NLA_U32)
174174 * @NFTA_TABLE_USE: number of chains in this table (NLA_U32)
175+ * @NFTA_TABLE_USERDATA: user data (NLA_BINARY)
175176 */
176177 enum nft_table_attributes {
177178 NFTA_TABLE_UNSPEC,
@@ -180,6 +181,7 @@ enum nft_table_attributes { · 2 unmodified lines
180181 NFTA_TABLE_USE,
181182 NFTA_TABLE_HANDLE,
182183 NFTA_TABLE_PAD,
184+ NFTA_TABLE_USERDATA,
183185 __NFTA_TABLE_MAX
184186 };
185187 #define NFTA_TABLE_MAX (__NFTA_TABLE_MAX - 1)
@@ -206,6 +208,7 @@ enum nft_chain_flags { · 20 unmodified lines
206208 * @NFTA_CHAIN_COUNTERS: counter specification of the chain (NLA_NESTED: nft_counter_attributes)
207209 * @NFTA_CHAIN_FLAGS: chain flags
208210 * @NFTA_CHAIN_ID: uniquely identifies a chain in a transaction (NLA_U32)
211+ * @NFTA_CHAIN_USERDATA: user data (NLA_BINARY)
209212 */
210213 enum nft_chain_attributes {
211214 NFTA_CHAIN_UNSPEC,
@@ -220,6 +223,7 @@ enum nft_chain_attributes { · 8 unmodified lines
220223 NFTA_CHAIN_PAD,
221224 NFTA_CHAIN_FLAGS,
222225 NFTA_CHAIN_ID,
226+ NFTA_CHAIN_USERDATA,
223227 __NFTA_CHAIN_MAX
224228 };
225229 #define NFTA_CHAIN_MAX (__NFTA_CHAIN_MAX - 1)
@@ -745,10 +749,12 @@ enum nft_payload_bases { · 519 unmodified lines
745749 *
746750 * @NFT_PAYLOAD_CSUM_NONE: no checksumming
747751 * @NFT_PAYLOAD_CSUM_INET: internet checksum (RFC 791)
752+ * @NFT_PAYLOAD_CSUM_SCTP: CRC-32c, for use in SCTP header (RFC 3309)
748753 */
749754 enum nft_payload_csum_types {
750755 NFT_PAYLOAD_CSUM_NONE,
751756 NFT_PAYLOAD_CSUM_INET,
757+ NFT_PAYLOAD_CSUM_SCTP,
752758 };
753759
754760 enum nft_payload_csum_flags {
@@ -1008,10 +1014,12 @@ enum nft_socket_attributes { · 253 unmodified lines
10081014 *
10091015 * @NFT_SOCKET_TRANSPARENT: Value of the IP(V6)_TRANSPARENT socket option
10101016 * @NFT_SOCKET_MARK: Value of the socket mark
1017+ * @NFT_SOCKET_WILDCARD: Whether the socket is zero-bound (e.g. 0.0.0.0 or ::0)
10111018 */
10121019 enum nft_socket_keys {
10131020 NFT_SOCKET_TRANSPARENT,
10141021 NFT_SOCKET_MARK,
1022+ NFT_SOCKET_WILDCARD,
10151023 __NFT_SOCKET_MAX
10161024 };
10171025 #define NFT_SOCKET_MAX (__NFT_SOCKET_MAX - 1)
@@ -1555,6 +1563,7 @@ enum nft_ct_expectation_attributes { · 537 unmodified lines
15551563 * @NFTA_OBJ_DATA: stateful object data (NLA_NESTED)
15561564 * @NFTA_OBJ_USE: number of references to this expression (NLA_U32)
15571565 * @NFTA_OBJ_HANDLE: object handle (NLA_U64)
1566+ * @NFTA_OBJ_USERDATA: user data (NLA_BINARY)
15581567 */
15591568 enum nft_object_attributes {
15601569 NFTA_OBJ_UNSPEC,
@@ -1565,6 +1574,7 @@ enum nft_object_attributes { · 4 unmodified lines
15651574 NFTA_OBJ_USE,
15661575 NFTA_OBJ_HANDLE,
15671576 NFTA_OBJ_PAD,
1577+ NFTA_OBJ_USERDATA,
15681578 __NFTA_OBJ_MAX
15691579 };
15701580 #define NFTA_OBJ_MAX (__NFTA_OBJ_MAX - 1)
include/uapi/linux/netfilter/nfnetlink_conntrack.h+2−1
@@ -247,7 +247,7 @@ enum ctattr_stats_cpu { · 246 unmodified lines
247247 CTA_STATS_FOUND,
248248 CTA_STATS_NEW, /* no longer used */
249249 CTA_STATS_INVALID,
250− CTA_STATS_IGNORE,
250+ CTA_STATS_IGNORE, /* no longer used */
251251 CTA_STATS_DELETE, /* no longer used */
252252 CTA_STATS_DELETE_LIST, /* no longer used */
253253 CTA_STATS_INSERT,
@@ -256,6 +256,7 @@ enum ctattr_stats_cpu { · 2 unmodified lines
256256 CTA_STATS_EARLY_DROP,
257257 CTA_STATS_ERROR,
258258 CTA_STATS_SEARCH_RESTART,
259+ CTA_STATS_CLASH_RESOLVE,
259260 __CTA_STATS_MAX,
260261 };
261262 #define CTA_STATS_MAX (__CTA_STATS_MAX - 1)
include/uapi/linux/netlink.h+4−0
@@ -129,6 +129,7 @@ struct nlmsgerr { · 128 unmodified lines
129129 * @NLMSGERR_ATTR_COOKIE: arbitrary subsystem specific cookie to
130130 * be used - in the success case - to identify a created
131131 * object or operation or similar (binary)
132+ * @NLMSGERR_ATTR_POLICY: policy for a rejected attribute
132133 * @__NLMSGERR_ATTR_MAX: number of attributes
133134 * @NLMSGERR_ATTR_MAX: highest attribute number
134135 */
@@ -137,6 +138,7 @@ enum nlmsgerr_attrs { · 2 unmodified lines
137138 NLMSGERR_ATTR_MSG,
138139 NLMSGERR_ATTR_OFFS,
139140 NLMSGERR_ATTR_COOKIE,
141+ NLMSGERR_ATTR_POLICY,
140142
141143 __NLMSGERR_ATTR_MAX,
142144 NLMSGERR_ATTR_MAX = __NLMSGERR_ATTR_MAX - 1
@@ -331,6 +333,7 @@ enum netlink_attribute_type { · 188 unmodified lines
331333 * the index, if limited inside the nesting (U32)
332334 * @NL_POLICY_TYPE_ATTR_BITFIELD32_MASK: valid mask for the
333335 * bitfield32 type (U32)
336+ * @NL_POLICY_TYPE_ATTR_MASK: mask of valid bits for unsigned integers (U64)
334337 * @NL_POLICY_TYPE_ATTR_PAD: pad attribute for 64-bit alignment
335338 */
336339 enum netlink_policy_type_attr {
@@ -346,6 +349,7 @@ enum netlink_policy_type_attr { · 9 unmodified lines
346349 NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE,
347350 NL_POLICY_TYPE_ATTR_BITFIELD32_MASK,
348351 NL_POLICY_TYPE_ATTR_PAD,
352+ NL_POLICY_TYPE_ATTR_MASK,
349353
350354 /* keep last */
351355 __NL_POLICY_TYPE_ATTR_MAX,
include/uapi/linux/nl80211.h+174−22
@@ -252,9 +252,13 @@ · 251 unmodified lines
252252 * DOC: SAE authentication offload
253253 *
254254 * By setting @NL80211_EXT_FEATURE_SAE_OFFLOAD flag drivers can indicate they
255− * support offloading SAE authentication for WPA3-Personal networks. In
256− * %NL80211_CMD_CONNECT the password for SAE should be specified using
257− * %NL80211_ATTR_SAE_PASSWORD.
255+ * support offloading SAE authentication for WPA3-Personal networks in station
256+ * mode. Similarly @NL80211_EXT_FEATURE_SAE_OFFLOAD_AP flag can be set by
257+ * drivers indicating the offload support in AP mode.
258+ *
259+ * The password for SAE should be specified using %NL80211_ATTR_SAE_PASSWORD in
260+ * %NL80211_CMD_CONNECT and %NL80211_CMD_START_AP for station and AP mode
261+ * respectively.
258262 */
259263
260264 /**
@@ -647,13 +651,9 @@ · 386 unmodified lines
647651 * authentication/association or not receiving a response from the AP.
648652 * Non-zero %NL80211_ATTR_STATUS_CODE value is indicated in that case as
649653 * well to remain backwards compatible.
650− * When establishing a security association, drivers that support 4 way
651− * handshake offload should send %NL80211_CMD_PORT_AUTHORIZED event when
652− * the 4 way handshake is completed successfully.
653654 * @NL80211_CMD_ROAM: Notification indicating the card/driver roamed by itself.
654− * When a security association was established with the new AP (e.g. if
655− * the FT protocol was used for roaming or the driver completed the 4 way
656− * handshake), this event should be followed by an
655+ * When a security association was established on an 802.1X network using
656+ * fast transition, this event should be followed by an
657657 * %NL80211_CMD_PORT_AUTHORIZED event.
658658 * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify
659659 * userspace that a connection was dropped by the AP or due to other
@@ -1067,13 +1067,11 @@ · 407 unmodified lines
10671067 * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously
10681068 * configured PMK for the authenticator address identified by
10691069 * %NL80211_ATTR_MAC.
1070− * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates that the 4 way
1071− * handshake was completed successfully by the driver. The BSSID is
1072− * specified with %NL80211_ATTR_MAC. Drivers that support 4 way handshake
1073− * offload should send this event after indicating 802.11 association with
1074− * %NL80211_CMD_CONNECT or %NL80211_CMD_ROAM. If the 4 way handshake failed
1075− * %NL80211_CMD_DISCONNECT should be indicated instead.
1076− *
1070+ * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates an 802.1X FT roam was
1071+ * completed successfully. Drivers that support 4 way handshake offload
1072+ * should send this event after indicating 802.1X FT assocation with
1073+ * %NL80211_CMD_ROAM. If the 4 way handshake failed %NL80211_CMD_DISCONNECT
1074+ * should be indicated instead.
10771075 * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request
10781076 * and RX notification. This command is used both as a request to transmit
10791077 * a control port frame and as a notification that a control port frame
@@ -2082,10 +2080,10 @@ enum nl80211_commands { · 1002 unmodified lines
20822080 * operation).
20832081 * @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information
20842082 * for the time while performing a channel switch.
2085− * @NL80211_ATTR_CSA_C_OFF_BEACON: An array of offsets (u16) to the channel
2086− * switch counters in the beacons tail (%NL80211_ATTR_BEACON_TAIL).
2087− * @NL80211_ATTR_CSA_C_OFF_PRESP: An array of offsets (u16) to the channel
2088− * switch counters in the probe response (%NL80211_ATTR_PROBE_RESP).
2083+ * @NL80211_ATTR_CNTDWN_OFFS_BEACON: An array of offsets (u16) to the channel
2084+ * switch or color change counters in the beacons tail (%NL80211_ATTR_BEACON_TAIL).
2085+ * @NL80211_ATTR_CNTDWN_OFFS_PRESP: An array of offsets (u16) to the channel
2086+ * switch or color change counters in the probe response (%NL80211_ATTR_PROBE_RESP).
20892087 *
20902088 * @NL80211_ATTR_RXMGMT_FLAGS: flags for nl80211_send_mgmt(), u32.
20912089 * As specified in the &enum nl80211_rxmgmt_flags.
@@ -2515,6 +2513,20 @@ enum nl80211_commands { · 423 unmodified lines
25152513 * @NL80211_ATTR_HE_6GHZ_CAPABILITY: HE 6 GHz Band Capability element (from
25162514 * association request when used with NL80211_CMD_NEW_STATION).
25172515 *
2516+ * @NL80211_ATTR_FILS_DISCOVERY: Optional parameter to configure FILS
2517+ * discovery. It is a nested attribute, see
2518+ * &enum nl80211_fils_discovery_attributes.
2519+ *
2520+ * @NL80211_ATTR_UNSOL_BCAST_PROBE_RESP: Optional parameter to configure
2521+ * unsolicited broadcast probe response. It is a nested attribute, see
2522+ * &enum nl80211_unsol_bcast_probe_resp_attributes.
2523+ *
2524+ * @NL80211_ATTR_S1G_CAPABILITY: S1G Capability information element (from
2525+ * association request when used with NL80211_CMD_NEW_STATION)
2526+ * @NL80211_ATTR_S1G_CAPABILITY_MASK: S1G Capability Information element
2527+ * override mask. Used with NL80211_ATTR_S1G_CAPABILITY in
2528+ * NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT.
2529+ *
25182530 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
25192531 * @NL80211_ATTR_MAX: highest attribute number currently defined
25202532 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2821,8 +2833,8 @@ enum nl80211_attrs { · 300 unmodified lines
28212833 NL80211_ATTR_CH_SWITCH_COUNT,
28222834 NL80211_ATTR_CH_SWITCH_BLOCK_TX,
28232835 NL80211_ATTR_CSA_IES,
2824− NL80211_ATTR_CSA_C_OFF_BEACON,
2825− NL80211_ATTR_CSA_C_OFF_PRESP,
2836+ NL80211_ATTR_CNTDWN_OFFS_BEACON,
2837+ NL80211_ATTR_CNTDWN_OFFS_PRESP,
28262838
28272839 NL80211_ATTR_RXMGMT_FLAGS,
28282840
@@ -2997,6 +3009,13 @@ enum nl80211_attrs { · 168 unmodified lines
29973009
29983010 NL80211_ATTR_HE_6GHZ_CAPABILITY,
29993011
3012+ NL80211_ATTR_FILS_DISCOVERY,
3013+
3014+ NL80211_ATTR_UNSOL_BCAST_PROBE_RESP,
3015+
3016+ NL80211_ATTR_S1G_CAPABILITY,
3017+ NL80211_ATTR_S1G_CAPABILITY_MASK,
3018+
30003019 /* add attributes here, update the policy in nl80211.c */
30013020
30023021 __NL80211_ATTR_AFTER_LAST,
@@ -3009,6 +3028,8 @@ enum nl80211_attrs { · 6 unmodified lines
30093028 #define NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG
30103029 #define NL80211_ATTR_IFACE_SOCKET_OWNER NL80211_ATTR_SOCKET_OWNER
30113030 #define NL80211_ATTR_SAE_DATA NL80211_ATTR_AUTH_DATA
3031+#define NL80211_ATTR_CSA_C_OFF_BEACON NL80211_ATTR_CNTDWN_OFFS_BEACON
3032+#define NL80211_ATTR_CSA_C_OFF_PRESP NL80211_ATTR_CNTDWN_OFFS_PRESP
30123033
30133034 /*
30143035 * Allow user space programs to use #ifdef on new attributes by defining them
@@ -3186,6 +3207,18 @@ enum nl80211_he_gi { · 171 unmodified lines
31863207 NL80211_RATE_INFO_HE_GI_3_2,
31873208 };
31883209
3210+/**
3211+ * enum nl80211_he_ltf - HE long training field
3212+ * @NL80211_RATE_INFO_HE_1xLTF: 3.2 usec
3213+ * @NL80211_RATE_INFO_HE_2xLTF: 6.4 usec
3214+ * @NL80211_RATE_INFO_HE_4xLTF: 12.8 usec
3215+ */
3216+enum nl80211_he_ltf {
3217+ NL80211_RATE_INFO_HE_1XLTF,
3218+ NL80211_RATE_INFO_HE_2XLTF,
3219+ NL80211_RATE_INFO_HE_4XLTF,
3220+};
3221+
31893222 /**
31903223 * enum nl80211_he_ru_alloc - HE RU allocation values
31913224 * @NL80211_RATE_INFO_HE_RU_ALLOC_26: 26-tone RU allocation
@@ -3725,6 +3758,16 @@ enum nl80211_wmm_rule { · 533 unmodified lines
37253758 * @NL80211_FREQUENCY_ATTR_NO_HE: HE operation is not allowed on this channel
37263759 * in current regulatory domain.
37273760 * @NL80211_FREQUENCY_ATTR_OFFSET: frequency offset in KHz
3761+ * @NL80211_FREQUENCY_ATTR_1MHZ: 1 MHz operation is allowed
3762+ * on this channel in current regulatory domain.
3763+ * @NL80211_FREQUENCY_ATTR_2MHZ: 2 MHz operation is allowed
3764+ * on this channel in current regulatory domain.
3765+ * @NL80211_FREQUENCY_ATTR_4MHZ: 4 MHz operation is allowed
3766+ * on this channel in current regulatory domain.
3767+ * @NL80211_FREQUENCY_ATTR_8MHZ: 8 MHz operation is allowed
3768+ * on this channel in current regulatory domain.
3769+ * @NL80211_FREQUENCY_ATTR_16MHZ: 16 MHz operation is allowed
3770+ * on this channel in current regulatory domain.
37283771 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
37293772 * currently defined
37303773 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
@@ -3756,6 +3799,11 @@ enum nl80211_frequency_attr { · 25 unmodified lines
37563799 NL80211_FREQUENCY_ATTR_WMM,
37573800 NL80211_FREQUENCY_ATTR_NO_HE,
37583801 NL80211_FREQUENCY_ATTR_OFFSET,
3802+ NL80211_FREQUENCY_ATTR_1MHZ,
3803+ NL80211_FREQUENCY_ATTR_2MHZ,
3804+ NL80211_FREQUENCY_ATTR_4MHZ,
3805+ NL80211_FREQUENCY_ATTR_8MHZ,
3806+ NL80211_FREQUENCY_ATTR_16MHZ,
37593807
37603808 /* keep last */
37613809 __NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -4049,6 +4097,7 @@ enum nl80211_user_reg_hint_type { · 287 unmodified lines
40494097 * receiving frames destined to the local BSS
40504098 * @NL80211_SURVEY_INFO_MAX: highest survey info attribute number
40514099 * currently defined
4100+ * @NL80211_SURVEY_INFO_FREQUENCY_OFFSET: center frequency offset in KHz
40524101 * @__NL80211_SURVEY_INFO_AFTER_LAST: internal use
40534102 */
40544103 enum nl80211_survey_info {
@@ -4064,6 +4113,7 @@ enum nl80211_survey_info { · 9 unmodified lines
40644113 NL80211_SURVEY_INFO_TIME_SCAN,
40654114 NL80211_SURVEY_INFO_PAD,
40664115 NL80211_SURVEY_INFO_TIME_BSS_RX,
4116+ NL80211_SURVEY_INFO_FREQUENCY_OFFSET,
40674117
40684118 /* keep last */
40694119 __NL80211_SURVEY_INFO_AFTER_LAST,
@@ -4741,6 +4791,10 @@ enum nl80211_key_attributes { · 671 unmodified lines
47414791 * @NL80211_TXRATE_VHT: VHT rates allowed for TX rate selection,
47424792 * see &struct nl80211_txrate_vht
47434793 * @NL80211_TXRATE_GI: configure GI, see &enum nl80211_txrate_gi
4794+ * @NL80211_TXRATE_HE: HE rates allowed for TX rate selection,
4795+ * see &struct nl80211_txrate_he
4796+ * @NL80211_TXRATE_HE_GI: configure HE GI, 0.8us, 1.6us and 3.2us.
4797+ * @NL80211_TXRATE_HE_LTF: configure HE LTF, 1XLTF, 2XLTF and 4XLTF.
47444798 * @__NL80211_TXRATE_AFTER_LAST: internal
47454799 * @NL80211_TXRATE_MAX: highest TX rate attribute
47464800 */
@@ -4750,6 +4804,9 @@ enum nl80211_tx_rate_attributes { · 3 unmodified lines
47504804 NL80211_TXRATE_HT,
47514805 NL80211_TXRATE_VHT,
47524806 NL80211_TXRATE_GI,
4807+ NL80211_TXRATE_HE,
4808+ NL80211_TXRATE_HE_GI,
4809+ NL80211_TXRATE_HE_LTF,
47534810
47544811 /* keep last */
47554812 __NL80211_TXRATE_AFTER_LAST,
@@ -4767,6 +4824,15 @@ struct nl80211_txrate_vht { · 11 unmodified lines
47674824 __u16 mcs[NL80211_VHT_NSS_MAX];
47684825 };
47694826
4827+#define NL80211_HE_NSS_MAX 8
4828+/**
4829+ * struct nl80211_txrate_he - HE MCS/NSS txrate bitmap
4830+ * @mcs: MCS bitmap table for each NSS (array index 0 for 1 stream, etc.)
4831+ */
4832+struct nl80211_txrate_he {
4833+ __u16 mcs[NL80211_HE_NSS_MAX];
4834+};
4835+
47704836 enum nl80211_txrate_gi {
47714837 NL80211_TXRATE_DEFAULT_GI,
47724838 NL80211_TXRATE_FORCE_SGI,
@@ -5821,6 +5887,15 @@ enum nl80211_feature_flags { · 1048 unmodified lines
58215887 * handshake with PSK in AP mode (PSK is passed as part of the start AP
58225888 * command).
58235889 *
5890+ * @NL80211_EXT_FEATURE_SAE_OFFLOAD_AP: Device wants to do SAE authentication
5891+ * in AP mode (SAE password is passed as part of the start AP command).
5892+ *
5893+ * @NL80211_EXT_FEATURE_FILS_DISCOVERY: Driver/device supports FILS discovery
5894+ * frames transmission
5895+ *
5896+ * @NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP: Driver/device supports
5897+ * unsolicited broadcast probe response transmission
5898+ *
58245899 * @NUM_NL80211_EXT_FEATURES: number of extended features.
58255900 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
58265901 */
@@ -5878,6 +5953,9 @@ enum nl80211_ext_feature_index { · 51 unmodified lines
58785953 NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS,
58795954 NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION,
58805955 NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK,
5956+ NL80211_EXT_FEATURE_SAE_OFFLOAD_AP,
5957+ NL80211_EXT_FEATURE_FILS_DISCOVERY,
5958+ NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP,
58815959
58825960 /* add new features before the definition below */
58835961 NUM_NL80211_EXT_FEATURES,
@@ -5992,6 +6070,8 @@ enum nl80211_timeout_reason { · 108 unmodified lines
59926070 * @NL80211_SCAN_FLAG_FREQ_KHZ: report scan results with
59936071 * %NL80211_ATTR_SCAN_FREQ_KHZ. This also means
59946072 * %NL80211_ATTR_SCAN_FREQUENCIES will not be included.
6073+ * @NL80211_SCAN_FLAG_COLOCATED_6GHZ: scan for colocated APs reported by
6074+ * 2.4/5 GHz APs
59956075 */
59966076 enum nl80211_scan_flags {
59976077 NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0,
@@ -6008,6 +6088,7 @@ enum nl80211_scan_flags { · 10 unmodified lines
60086088 NL80211_SCAN_FLAG_RANDOM_SN = 1<<11,
60096089 NL80211_SCAN_FLAG_MIN_PREQ_CONTENT = 1<<12,
60106090 NL80211_SCAN_FLAG_FREQ_KHZ = 1<<13,
6091+ NL80211_SCAN_FLAG_COLOCATED_6GHZ = 1<<14,
60116092 };
60126093
60136094 /**
@@ -6910,6 +6991,13 @@ enum nl80211_peer_measurement_ftm_resp { · 896 unmodified lines
69106991 *
69116992 * @NL80211_HE_OBSS_PD_ATTR_MIN_OFFSET: the OBSS PD minimum tx power offset.
69126993 * @NL80211_HE_OBSS_PD_ATTR_MAX_OFFSET: the OBSS PD maximum tx power offset.
6994+ * @NL80211_HE_OBSS_PD_ATTR_NON_SRG_MAX_OFFSET: the non-SRG OBSS PD maximum
6995+ * tx power offset.
6996+ * @NL80211_HE_OBSS_PD_ATTR_BSS_COLOR_BITMAP: bitmap that indicates the BSS color
6997+ * values used by members of the SRG.
6998+ * @NL80211_HE_OBSS_PD_ATTR_PARTIAL_BSSID_BITMAP: bitmap that indicates the partial
6999+ * BSSID values used by members of the SRG.
7000+ * @NL80211_HE_OBSS_PD_ATTR_SR_CTRL: The SR Control field of SRP element.
69137001 *
69147002 * @__NL80211_HE_OBSS_PD_ATTR_LAST: Internal
69157003 * @NL80211_HE_OBSS_PD_ATTR_MAX: highest OBSS PD attribute.
@@ -6919,6 +7007,10 @@ enum nl80211_obss_pd_attributes { · 3 unmodified lines
69197007
69207008 NL80211_HE_OBSS_PD_ATTR_MIN_OFFSET,
69217009 NL80211_HE_OBSS_PD_ATTR_MAX_OFFSET,
7010+ NL80211_HE_OBSS_PD_ATTR_NON_SRG_MAX_OFFSET,
7011+ NL80211_HE_OBSS_PD_ATTR_BSS_COLOR_BITMAP,
7012+ NL80211_HE_OBSS_PD_ATTR_PARTIAL_BSSID_BITMAP,
7013+ NL80211_HE_OBSS_PD_ATTR_SR_CTRL,
69227014
69237015 /* keep last */
69247016 __NL80211_HE_OBSS_PD_ATTR_LAST,
@@ -6972,4 +7064,64 @@ enum nl80211_iftype_akm_attributes { · 47 unmodified lines
69727064 NL80211_IFTYPE_AKM_ATTR_MAX = __NL80211_IFTYPE_AKM_ATTR_LAST - 1,
69737065 };
69747066
7067+/**
7068+ * enum nl80211_fils_discovery_attributes - FILS discovery configuration
7069+ * from IEEE Std 802.11ai-2016, Annex C.3 MIB detail.
7070+ *
7071+ * @__NL80211_FILS_DISCOVERY_ATTR_INVALID: Invalid
7072+ *
7073+ * @NL80211_FILS_DISCOVERY_ATTR_INT_MIN: Minimum packet interval (u32, TU).
7074+ * Allowed range: 0..10000 (TU = Time Unit)
7075+ * @NL80211_FILS_DISCOVERY_ATTR_INT_MAX: Maximum packet interval (u32, TU).
7076+ * Allowed range: 0..10000 (TU = Time Unit)
7077+ * @NL80211_FILS_DISCOVERY_ATTR_TMPL: Template data for FILS discovery action
7078+ * frame including the headers.
7079+ *
7080+ * @__NL80211_FILS_DISCOVERY_ATTR_LAST: Internal
7081+ * @NL80211_FILS_DISCOVERY_ATTR_MAX: highest attribute
7082+ */
7083+enum nl80211_fils_discovery_attributes {
7084+ __NL80211_FILS_DISCOVERY_ATTR_INVALID,
7085+
7086+ NL80211_FILS_DISCOVERY_ATTR_INT_MIN,
7087+ NL80211_FILS_DISCOVERY_ATTR_INT_MAX,
7088+ NL80211_FILS_DISCOVERY_ATTR_TMPL,
7089+
7090+ /* keep last */
7091+ __NL80211_FILS_DISCOVERY_ATTR_LAST,
7092+ NL80211_FILS_DISCOVERY_ATTR_MAX = __NL80211_FILS_DISCOVERY_ATTR_LAST - 1
7093+};
7094+
7095+/*
7096+ * FILS discovery template minimum length with action frame headers and
7097+ * mandatory fields.
7098+ */
7099+#define NL80211_FILS_DISCOVERY_TMPL_MIN_LEN 42
7100+
7101+/**
7102+ * enum nl80211_unsol_bcast_probe_resp_attributes - Unsolicited broadcast probe
7103+ * response configuration. Applicable only in 6GHz.
7104+ *
7105+ * @__NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INVALID: Invalid
7106+ *
7107+ * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT: Maximum packet interval (u32, TU).
7108+ * Allowed range: 0..20 (TU = Time Unit). IEEE P802.11ax/D6.0
7109+ * 26.17.2.3.2 (AP behavior for fast passive scanning).
7110+ * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL: Unsolicited broadcast probe response
7111+ * frame template (binary).
7112+ *
7113+ * @__NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST: Internal
7114+ * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX: highest attribute
7115+ */
7116+enum nl80211_unsol_bcast_probe_resp_attributes {
7117+ __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INVALID,
7118+
7119+ NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT,
7120+ NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL,
7121+
7122+ /* keep last */
7123+ __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST,
7124+ NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX =
7125+ __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST - 1
7126+};
69757127 #endif /* __LINUX_NL80211_H */
include/uapi/linux/tc_act/tc_mpls.h+1−0
@@ -10,6 +10,7 @@ · 9 unmodified lines
1010 #define TCA_MPLS_ACT_PUSH 2
1111 #define TCA_MPLS_ACT_MODIFY 3
1212 #define TCA_MPLS_ACT_DEC_TTL 4
13+#define TCA_MPLS_ACT_MAC_PUSH 5
1314
1415 struct tc_mpls {
1516 tc_gen; /* generic TC action fields. */
include/uapi/linux/tc_act/tc_vlan.h+4−0
@@ -16,6 +16,8 @@ · 15 unmodified lines
1616 #define TCA_VLAN_ACT_POP 1
1717 #define TCA_VLAN_ACT_PUSH 2
1818 #define TCA_VLAN_ACT_MODIFY 3
19+#define TCA_VLAN_ACT_POP_ETH 4
20+#define TCA_VLAN_ACT_PUSH_ETH 5
1921
2022 struct tc_vlan {
2123 tc_gen;
@@ -30,6 +32,8 @@ enum { · 8 unmodified lines
3032 TCA_VLAN_PUSH_VLAN_PROTOCOL,
3133 TCA_VLAN_PAD,
3234 TCA_VLAN_PUSH_VLAN_PRIORITY,
35+ TCA_VLAN_PUSH_ETH_DST,
36+ TCA_VLAN_PUSH_ETH_SRC,
3337 __TCA_VLAN_MAX,
3438 };
3539 #define TCA_VLAN_MAX (__TCA_VLAN_MAX - 1)
include/uapi/linux/tipc.h+2−0
@@ -254,6 +254,8 @@ static inline int tipc_aead_key_size(struct tipc_aead_key *key) · 253 unmodified lines
254254 return sizeof(*key) + key->keylen;
255255 }
256256
257+#define TIPC_REKEYING_NOW (~0U)
258+
257259 /* The macros and functions below are deprecated:
258260 */
259261
include/uapi/linux/tipc_netlink.h+2−0
@@ -165,6 +165,8 @@ enum { · 164 unmodified lines
165165 TIPC_NLA_NODE_UP, /* flag */
166166 TIPC_NLA_NODE_ID, /* data */
167167 TIPC_NLA_NODE_KEY, /* data */
168+ TIPC_NLA_NODE_KEY_MASTER, /* flag */
169+ TIPC_NLA_NODE_REKEYING, /* u32 */
168170
169171 __TIPC_NLA_NODE_MAX,
170172 TIPC_NLA_NODE_MAX = __TIPC_NLA_NODE_MAX - 1