History

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

Pull networking updates from David Miller: 1) New ipset extensions for matching on destination MAC addresses, from Stefano Brivio. 2) Add ipv4 ttl and tos, plus ipv6 flow label and hop limit offloads to nfp driver. From Stefano Brivio. 3) Implement GRO for plain UDP sockets, from Paolo Abeni. 4) Lots of work from Michał Mirosław to eliminate the VLAN_TAG_PRESENT bit so that we could support the entire vlan_tci value. 5) Rework the IPSEC policy lookups to better optimize more usecases, from Florian Westphal. 6) Infrastructure changes eliminating direct manipulation of SKB lists wherever possible, and to always use the appropriate SKB list helpers. This work is still ongoing... 7) Lots of PHY driver and state machine improvements and simplifications, from Heiner Kallweit. 8) Various TSO deferral refinements, from Eric Dumazet. 9) Add ntuple filter support to aquantia driver, from Dmitry Bogdanov. 10) Batch dropping of XDP packets in tuntap, from Jason Wang. 11) Lots of cleanups and improvements to the r8169 driver from Heiner Kallweit, including support for ->xmit_more. This driver has been getting some much needed love since he started working on it. 12) Lots of new forwarding selftests from Petr Machata. 13) Enable VXLAN learning in mlxsw driver, from Ido Schimmel. 14) Packed ring support for virtio, from Tiwei Bie. 15) Add new Aquantia AQtion USB driver, from Dmitry Bezrukov. 16) Add XDP support to dpaa2-eth driver, from Ioana Ciocoi Radulescu. 17) Implement coalescing on TCP backlog queue, from Eric Dumazet. 18) Implement carrier change in tun driver, from Nicolas Dichtel. 19) Support msg_zerocopy in UDP, from Willem de Bruijn. 20) Significantly improve garbage collection of neighbor objects when the table has many PERMANENT entries, from David Ahern. 21) Remove egdev usage from nfp and mlx5, and remove the facility completely from the tree as it no longer has any users. From Oz Shlomo and others. 22) Add a NETDEV_PRE_CHANGEADDR so that drivers can veto the change and therefore abort the operation before the commit phase (which is the NETDEV_CHANGEADDR event). From Petr Machata. 23) Add indirect call wrappers to avoid retpoline overhead, and use them in the GRO code paths. From Paolo Abeni. 24) Add support for netlink FDB get operations, from Roopa Prabhu. 25) Support bloom filter in mlxsw driver, from Nir Dotan. 26) Add SKB extension infrastructure. This consolidates the handling of the auxiliary SKB data used by IPSEC and bridge netfilter, and is designed to support the needs to MPTCP which could be integrated in the future. 27) Lots of XDP TX optimizations in mlx5 from Tariq Toukan. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1845 commits) net: dccp: fix kernel crash on module load drivers/net: appletalk/cops: remove redundant if statement and mask bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw net/net_namespace: Check the return value of register_pernet_subsys() net/netlink_compat: Fix a missing check of nla_parse_nested ieee802154: lowpan_header_create check must check daddr net/mlx4_core: drop useless LIST_HEAD mlxsw: spectrum: drop useless LIST_HEAD net/mlx5e: drop useless LIST_HEAD iptunnel: Set tun_flags in the iptunnel_metadata_reply from src net/mlx5e: fix semicolon.cocci warnings staging: octeon: fix build failure with XFRM enabled net: Revert recent Spectre-v1 patches. can: af_can: Fix Spectre v1 vulnerability packet: validate address length if non-zero nfc: af_nfc: Fix Spectre v1 vulnerability phonet: af_phonet: Fix Spectre v1 vulnerability net: core: Fix Spectre v1 vulnerability net: minor cleanup in skb_ext_add() net: drop the unused helper skb_ext_get() ...

Linus Torvalds committed 7 years ago

Commit e0c38a42 parents 7f9f852 90cadbb1515 files · +83127 −68498Browse files

Showing the changes to include/uapi/linux (25 of 1515 files). Show all

Unified · Split

25 files
  1. include/uapi/linux/bpf.h +141 −47
  2. include/uapi/linux/btf.h +33 −5
  3. include/uapi/linux/devlink.h +5 −0
  4. include/uapi/linux/ethtool.h +2 −2
  5. include/uapi/linux/if_bridge.h +21 −0
  6. include/uapi/linux/if_link.h +19 −0
  7. include/uapi/linux/if_tun.h +1 −0
  8. include/uapi/linux/ncsi.h +15 −0
  9. include/uapi/linux/neighbour.h +1 −0
  10. include/uapi/linux/net_namespace.h +2 −0
  11. include/uapi/linux/netfilter.h +0 −4
  12. include/uapi/linux/netfilter/ipset/ip_set.h +12 −7
  13. include/uapi/linux/netfilter_decnet.h +0 −10
  14. include/uapi/linux/netfilter_ipv4.h +0 −28
  15. include/uapi/linux/netfilter_ipv6.h +0 −29
  16. include/uapi/linux/nl80211.h +450 −8
  17. include/uapi/linux/pkt_cls.h +7 −0
  18. include/uapi/linux/pkt_sched.h +30 −0
  19. include/uapi/linux/ptp_clock.h +12 −0
  20. include/uapi/linux/sctp.h +12 −1
  21. include/uapi/linux/snmp.h +1 −0
  22. include/uapi/linux/tcp.h +1 −0
  23. include/uapi/linux/udp.h +1 −0
  24. include/uapi/linux/virtio_config.h +3 −0
  25. include/uapi/linux/virtio_ring.h +52 −0
include/uapi/linux/bpf.h+141−47
@@ -133,6 +133,14 @@ enum bpf_map_type { · 132 unmodified lines
133133 BPF_MAP_TYPE_STACK,
134134 };
135135
136+/* Note that tracing related programs such as
137+ * BPF_PROG_TYPE_{KPROBE,TRACEPOINT,PERF_EVENT,RAW_TRACEPOINT}
138+ * are not subject to a stable API since kernel internal data
139+ * structures can change from release to release and may
140+ * therefore break existing tracing BPF programs. Tracing BPF
141+ * programs correspond to /a/ specific kernel which is to be
142+ * analyzed, and not /a/ specific kernel /and/ all future ones.
143+ */
136144 enum bpf_prog_type {
137145 BPF_PROG_TYPE_UNSPEC,
138146 BPF_PROG_TYPE_SOCKET_FILTER,
@@ -232,6 +240,20 @@ enum bpf_attach_type { · 93 unmodified lines
232240 */
233241 #define BPF_F_STRICT_ALIGNMENT (1U << 0)
234242
243+/* If BPF_F_ANY_ALIGNMENT is used in BPF_PROF_LOAD command, the
244+ * verifier will allow any alignment whatsoever. On platforms
245+ * with strict alignment requirements for loads ands stores (such
246+ * as sparc and mips) the verifier validates that all loads and
247+ * stores provably follow this requirement. This flag turns that
248+ * checking and enforcement off.
249+ *
250+ * It is mostly used for testing when we want to validate the
251+ * context and memory access aspects of the verifier, but because
252+ * of an unaligned access the alignment check would trigger before
253+ * the one we are interested in.
254+ */
255+#define BPF_F_ANY_ALIGNMENT (1U << 1)
256+
235257 /* when bpf_ldimm64->src_reg == BPF_PSEUDO_MAP_FD, bpf_ldimm64->imm == fd */
236258 #define BPF_PSEUDO_MAP_FD 1
237259
@@ -257,9 +279,6 @@ enum bpf_attach_type { · 19 unmodified lines
257279 /* Specify numa node during map creation */
258280 #define BPF_F_NUMA_NODE (1U << 2)
259281
260−/* flags for BPF_PROG_QUERY */
261−#define BPF_F_QUERY_EFFECTIVE (1U << 0)
262−
263282 #define BPF_OBJ_NAME_LEN 16U
264283
265284 /* Flags for accessing BPF object */
@@ -269,6 +288,12 @@ enum bpf_attach_type { · 3 unmodified lines
269288 /* Flag for stack_map, store build_id+offset instead of pointer */
270289 #define BPF_F_STACK_BUILD_ID (1U << 5)
271290
291+/* Zero-initialize hash function seed. This should only be used for testing. */
292+#define BPF_F_ZERO_SEED (1U << 6)
293+
294+/* flags for BPF_PROG_QUERY */
295+#define BPF_F_QUERY_EFFECTIVE (1U << 0)
296+
272297 enum bpf_stack_build_id_status {
273298 /* user space need an empty entry to identify end of a trace */
274299 BPF_STACK_BUILD_ID_EMPTY = 0,
@@ -326,7 +351,7 @@ union bpf_attr { · 51 unmodified lines
326351 __u32 log_level; /* verbosity level of verifier */
327352 __u32 log_size; /* size of user buffer */
328353 __aligned_u64 log_buf; /* user supplied buffer */
329− __u32 kern_version; /* checked when prog_type=kprobe */
354+ __u32 kern_version; /* not used */
330355 __u32 prog_flags;
331356 char prog_name[BPF_OBJ_NAME_LEN];
332357 __u32 prog_ifindex; /* ifindex of netdev to prep for */
@@ -335,6 +360,13 @@ union bpf_attr { · 2 unmodified lines
335360 * (context accesses, allowed helpers, etc).
336361 */
337362 __u32 expected_attach_type;
363+ __u32 prog_btf_fd; /* fd pointing to BTF type data */
364+ __u32 func_info_rec_size; /* userspace bpf_func_info size */
365+ __aligned_u64 func_info; /* func info */
366+ __u32 func_info_cnt; /* number of bpf_func_info records */
367+ __u32 line_info_rec_size; /* userspace bpf_line_info size */
368+ __aligned_u64 line_info; /* line info */
369+ __u32 line_info_cnt; /* number of bpf_line_info records */
338370 };
339371
340372 struct { /* anonymous struct used by BPF_OBJ_* commands */
@@ -353,8 +385,11 @@ union bpf_attr { · 12 unmodified lines
353385 struct { /* anonymous struct used by BPF_PROG_TEST_RUN command */
354386 __u32 prog_fd;
355387 __u32 retval;
356− __u32 data_size_in;
357− __u32 data_size_out;
388+ __u32 data_size_in; /* input: len of data_in */
389+ __u32 data_size_out; /* input/output: len of data_out
390+ * returns ENOSPC if data_out
391+ * is too small.
392+ */
358393 __aligned_u64 data_in;
359394 __aligned_u64 data_out;
360395 __u32 repeat;
@@ -475,18 +510,6 @@ union bpf_attr { · 114 unmodified lines
475510 * Return
476511 * 0 on success, or a negative error in case of failure.
477512 *
478− * int bpf_map_pop_elem(struct bpf_map *map, void *value)
479− * Description
480− * Pop an element from *map*.
481− * Return
482− * 0 on success, or a negative error in case of failure.
483− *
484− * int bpf_map_peek_elem(struct bpf_map *map, void *value)
485− * Description
486− * Get an element from *map* without removing it.
487− * Return
488− * 0 on success, or a negative error in case of failure.
489− *
490513 * int bpf_probe_read(void *dst, u32 size, const void *src)
491514 * Description
492515 * For tracing programs, safely attempt to read *size* bytes from
@@ -1910,9 +1933,9 @@ union bpf_attr { · 1417 unmodified lines
19101933 * is set to metric from route (IPv4/IPv6 only), and ifindex
19111934 * is set to the device index of the nexthop from the FIB lookup.
19121935 *
1913− * *plen* argument is the size of the passed in struct.
1914− * *flags* argument can be a combination of one or more of the
1915− * following values:
1936+ * *plen* argument is the size of the passed in struct.
1937+ * *flags* argument can be a combination of one or more of the
1938+ * following values:
19161939 *
19171940 * **BPF_FIB_LOOKUP_DIRECT**
19181941 * Do a direct table lookup vs full lookup using FIB
@@ -1921,9 +1944,9 @@ union bpf_attr { · 2 unmodified lines
19211944 * Perform lookup from an egress perspective (default is
19221945 * ingress).
19231946 *
1924− * *ctx* is either **struct xdp_md** for XDP programs or
1925− * **struct sk_buff** tc cls_act programs.
1926− * Return
1947+ * *ctx* is either **struct xdp_md** for XDP programs or
1948+ * **struct sk_buff** tc cls_act programs.
1949+ * Return
19271950 * * < 0 if any input argument is invalid
19281951 * * 0 on success (packet is forwarded, nexthop neighbor exists)
19291952 * * > 0 one of **BPF_FIB_LKUP_RET_** codes explaining why the
@@ -2068,8 +2091,8 @@ union bpf_attr { · 138 unmodified lines
20682091 * translated to a keycode using the rc keymap, and reported as
20692092 * an input key down event. After a period a key up event is
20702093 * generated. This period can be extended by calling either
2071− * **bpf_rc_keydown** () again with the same values, or calling
2072− * **bpf_rc_repeat** ().
2094+ * **bpf_rc_keydown**\ () again with the same values, or calling
2095+ * **bpf_rc_repeat**\ ().
20732096 *
20742097 * Some protocols include a toggle bit, in case the button was
20752098 * released and pressed again between consecutive scancodes.
@@ -2152,21 +2175,22 @@ union bpf_attr { · 76 unmodified lines
21522175 * The *flags* meaning is specific for each map type,
21532176 * and has to be 0 for cgroup local storage.
21542177 *
2155− * Depending on the bpf program type, a local storage area
2156− * can be shared between multiple instances of the bpf program,
2178+ * Depending on the BPF program type, a local storage area
2179+ * can be shared between multiple instances of the BPF program,
21572180 * running simultaneously.
21582181 *
21592182 * A user should care about the synchronization by himself.
2160− * For example, by using the BPF_STX_XADD instruction to alter
2183+ * For example, by using the **BPF_STX_XADD** instruction to alter
21612184 * the shared data.
21622185 * Return
2163− * Pointer to the local storage area.
2186+ * A pointer to the local storage area.
21642187 *
21652188 * int bpf_sk_select_reuseport(struct sk_reuseport_md *reuse, struct bpf_map *map, void *key, u64 flags)
21662189 * Description
2167− * Select a SO_REUSEPORT sk from a BPF_MAP_TYPE_REUSEPORT_ARRAY map
2168− * It checks the selected sk is matching the incoming
2169− * request in the skb.
2190+ * Select a **SO_REUSEPORT** socket from a
2191+ * **BPF_MAP_TYPE_REUSEPORT_ARRAY** *map*.
2192+ * It checks the selected socket is matching the incoming
2193+ * request in the socket buffer.
21702194 * Return
21712195 * 0 on success, or a negative error in case of failure.
21722196 *
@@ -2174,7 +2198,7 @@ union bpf_attr { · 1 unmodified line
21742198 * Description
21752199 * Look for TCP socket matching *tuple*, optionally in a child
21762200 * network namespace *netns*. The return value must be checked,
2177− * and if non-NULL, released via **bpf_sk_release**\ ().
2201+ * and if non-**NULL**, released via **bpf_sk_release**\ ().
21782202 *
21792203 * The *ctx* should point to the context of the program, such as
21802204 * the skb or socket (depending on the hook in use). This is used
@@ -2202,15 +2226,15 @@ union bpf_attr { · 21 unmodified lines
22022226 * This helper is available only if the kernel was compiled with
22032227 * **CONFIG_NET** configuration option.
22042228 * Return
2205− * Pointer to *struct bpf_sock*, or NULL in case of failure.
2206− * For sockets with reuseport option, the *struct bpf_sock*
2207− * result is from reuse->socks[] using the hash of the tuple.
2229+ * Pointer to **struct bpf_sock**, or **NULL** in case of failure.
2230+ * For sockets with reuseport option, the **struct bpf_sock**
2231+ * result is from **reuse->socks**\ [] using the hash of the tuple.
22082232 *
22092233 * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
22102234 * Description
22112235 * Look for UDP socket matching *tuple*, optionally in a child
22122236 * network namespace *netns*. The return value must be checked,
2213− * and if non-NULL, released via **bpf_sk_release**\ ().
2237+ * and if non-**NULL**, released via **bpf_sk_release**\ ().
22142238 *
22152239 * The *ctx* should point to the context of the program, such as
22162240 * the skb or socket (depending on the hook in use). This is used
@@ -2238,33 +2262,71 @@ union bpf_attr { · 21 unmodified lines
22382262 * This helper is available only if the kernel was compiled with
22392263 * **CONFIG_NET** configuration option.
22402264 * Return
2241− * Pointer to *struct bpf_sock*, or NULL in case of failure.
2242− * For sockets with reuseport option, the *struct bpf_sock*
2243− * result is from reuse->socks[] using the hash of the tuple.
2265+ * Pointer to **struct bpf_sock**, or **NULL** in case of failure.
2266+ * For sockets with reuseport option, the **struct bpf_sock**
2267+ * result is from **reuse->socks**\ [] using the hash of the tuple.
22442268 *
2245− * int bpf_sk_release(struct bpf_sock *sk)
2269+ * int bpf_sk_release(struct bpf_sock *sock)
22462270 * Description
2247− * Release the reference held by *sock*. *sock* must be a non-NULL
2248− * pointer that was returned from bpf_sk_lookup_xxx\ ().
2271+ * Release the reference held by *sock*. *sock* must be a
2272+ * non-**NULL** pointer that was returned from
2273+ * **bpf_sk_lookup_xxx**\ ().
22492274 * Return
22502275 * 0 on success, or a negative error in case of failure.
22512276 *
2277+ * int bpf_map_pop_elem(struct bpf_map *map, void *value)
2278+ * Description
2279+ * Pop an element from *map*.
2280+ * Return
2281+ * 0 on success, or a negative error in case of failure.
2282+ *
2283+ * int bpf_map_peek_elem(struct bpf_map *map, void *value)
2284+ * Description
2285+ * Get an element from *map* without removing it.
2286+ * Return
2287+ * 0 on success, or a negative error in case of failure.
2288+ *
22522289 * int bpf_msg_push_data(struct sk_buff *skb, u32 start, u32 len, u64 flags)
22532290 * Description
2254− * For socket policies, insert *len* bytes into msg at offset
2291+ * For socket policies, insert *len* bytes into *msg* at offset
22552292 * *start*.
22562293 *
22572294 * If a program of type **BPF_PROG_TYPE_SK_MSG** is run on a
2258− * *msg* it may want to insert metadata or options into the msg.
2295+ * *msg* it may want to insert metadata or options into the *msg*.
22592296 * This can later be read and used by any of the lower layer BPF
22602297 * hooks.
22612298 *
22622299 * This helper may fail if under memory pressure (a malloc
22632300 * fails) in these cases BPF programs will get an appropriate
22642301 * error and BPF programs will need to handle them.
2302+ * Return
2303+ * 0 on success, or a negative error in case of failure.
22652304 *
2305+ * int bpf_msg_pop_data(struct sk_msg_buff *msg, u32 start, u32 pop, u64 flags)
2306+ * Description
2307+ * Will remove *pop* bytes from a *msg* starting at byte *start*.
2308+ * This may result in **ENOMEM** errors under certain situations if
2309+ * an allocation and copy are required due to a full ring buffer.
2310+ * However, the helper will try to avoid doing the allocation
2311+ * if possible. Other errors can occur if input parameters are
2312+ * invalid either due to *start* byte not being valid part of *msg*
2313+ * payload and/or *pop* value being to large.
22662314 * Return
22672315 * 0 on success, or a negative error in case of failure.
2316+ *
2317+ * int bpf_rc_pointer_rel(void *ctx, s32 rel_x, s32 rel_y)
2318+ * Description
2319+ * This helper is used in programs implementing IR decoding, to
2320+ * report a successfully decoded pointer movement.
2321+ *
2322+ * The *ctx* should point to the lirc sample as passed into
2323+ * the program.
2324+ *
2325+ * This helper is only available is the kernel was compiled with
2326+ * the **CONFIG_BPF_LIRC_MODE2** configuration option set to
2327+ * "**y**".
2328+ * Return
2329+ * 0
22682330 */
22692331 #define __BPF_FUNC_MAPPER(FN) \
22702332 FN(unspec), \
@@ -2357,7 +2419,9 @@ union bpf_attr { · 86 unmodified lines
23572419 FN(map_push_elem), \
23582420 FN(map_pop_elem), \
23592421 FN(map_peek_elem), \
2360− FN(msg_push_data),
2422+ FN(msg_push_data), \
2423+ FN(msg_pop_data), \
2424+ FN(rc_pointer_rel),
23612425
23622426 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
23632427 * function eBPF program intends to call
@@ -2474,6 +2538,8 @@ struct __sk_buff { · 110 unmodified lines
24742538
24752539 __u32 data_meta;
24762540 __bpf_md_ptr(struct bpf_flow_keys *, flow_keys);
2541+ __u64 tstamp;
2542+ __u32 wire_len;
24772543 };
24782544
24792545 struct bpf_tunnel_key {
@@ -2599,6 +2665,7 @@ struct sk_msg_md { · 119 unmodified lines
25992665 __u32 local_ip6[4]; /* Stored in network byte order */
26002666 __u32 remote_port; /* Stored in network byte order */
26012667 __u32 local_port; /* stored in host byte order */
2668+ __u32 size; /* Total size of sk_msg */
26022669 };
26032670
26042671 struct sk_reuseport_md {
@@ -2649,6 +2716,18 @@ struct bpf_prog_info { · 44 unmodified lines
26492716 __u32 nr_jited_func_lens;
26502717 __aligned_u64 jited_ksyms;
26512718 __aligned_u64 jited_func_lens;
2719+ __u32 btf_id;
2720+ __u32 func_info_rec_size;
2721+ __aligned_u64 func_info;
2722+ __u32 nr_func_info;
2723+ __u32 nr_line_info;
2724+ __aligned_u64 line_info;
2725+ __aligned_u64 jited_line_info;
2726+ __u32 nr_jited_line_info;
2727+ __u32 line_info_rec_size;
2728+ __u32 jited_line_info_rec_size;
2729+ __u32 nr_prog_tags;
2730+ __aligned_u64 prog_tags;
26522731 } __attribute__((aligned(8)));
26532732
26542733 struct bpf_map_info {
@@ -2960,4 +3039,19 @@ struct bpf_flow_keys { · 305 unmodified lines
29603039 };
29613040 };
29623041
3042+struct bpf_func_info {
3043+ __u32 insn_off;
3044+ __u32 type_id;
3045+};
3046+
3047+#define BPF_LINE_INFO_LINE_NUM(line_col) ((line_col) >> 10)
3048+#define BPF_LINE_INFO_LINE_COL(line_col) ((line_col) & 0x3ff)
3049+
3050+struct bpf_line_info {
3051+ __u32 insn_off;
3052+ __u32 file_name_off;
3053+ __u32 line_off;
3054+ __u32 line_col;
3055+};
3056+
29633057 #endif /* _UAPI__LINUX_BPF_H__ */
include/uapi/linux/btf.h+33−5
@@ -34,13 +34,16 @@ struct btf_type { · 33 unmodified lines
3434 * bits 0-15: vlen (e.g. # of struct's members)
3535 * bits 16-23: unused
3636 * bits 24-27: kind (e.g. int, ptr, array...etc)
37− * bits 28-31: unused
37+ * bits 28-30: unused
38+ * bit 31: kind_flag, currently used by
39+ * struct, union and fwd
3840 */
3941 __u32 info;
4042 /* "size" is used by INT, ENUM, STRUCT and UNION.
4143 * "size" tells the size of the type it is describing.
4244 *
43− * "type" is used by PTR, TYPEDEF, VOLATILE, CONST and RESTRICT.
45+ * "type" is used by PTR, TYPEDEF, VOLATILE, CONST, RESTRICT,
46+ * FUNC and FUNC_PROTO.
4447 * "type" is a type_id referring to another type.
4548 */
4649 union {
@@ -51,6 +54,7 @@ struct btf_type { · 4 unmodified lines
5154
5255 #define BTF_INFO_KIND(info) (((info) >> 24) & 0x0f)
5356 #define BTF_INFO_VLEN(info) ((info) & 0xffff)
57+#define BTF_INFO_KFLAG(info) ((info) >> 31)
5458
5559 #define BTF_KIND_UNKN 0 /* Unknown */
5660 #define BTF_KIND_INT 1 /* Integer */
@@ -64,8 +68,10 @@ struct btf_type { · 7 unmodified lines
6468 #define BTF_KIND_VOLATILE 9 /* Volatile */
6569 #define BTF_KIND_CONST 10 /* Const */
6670 #define BTF_KIND_RESTRICT 11 /* Restrict */
67−#define BTF_KIND_MAX 11
68−#define NR_BTF_KINDS 12
71+#define BTF_KIND_FUNC 12 /* Function */
72+#define BTF_KIND_FUNC_PROTO 13 /* Function Proto */
73+#define BTF_KIND_MAX 13
74+#define NR_BTF_KINDS 14
6975
7076 /* For some specific BTF_KIND, "struct btf_type" is immediately
7177 * followed by extra data.
@@ -107,7 +113,29 @@ struct btf_array { · 35 unmodified lines
107113 struct btf_member {
108114 __u32 name_off;
109115 __u32 type;
110− __u32 offset; /* offset in bits */
116+ /* If the type info kind_flag is set, the btf_member offset
117+ * contains both member bitfield size and bit offset. The
118+ * bitfield size is set for bitfield members. If the type
119+ * info kind_flag is not set, the offset contains only bit
120+ * offset.
121+ */
122+ __u32 offset;
123+};
124+
125+/* If the struct/union type info kind_flag is set, the
126+ * following two macros are used to access bitfield_size
127+ * and bit_offset from btf_member.offset.
128+ */
129+#define BTF_MEMBER_BITFIELD_SIZE(val) ((val) >> 24)
130+#define BTF_MEMBER_BIT_OFFSET(val) ((val) & 0xffffff)
131+
132+/* BTF_KIND_FUNC_PROTO is followed by multiple "struct btf_param".
133+ * The exact number of btf_param is stored in the vlen (of the
134+ * info in "struct btf_type").
135+ */
136+struct btf_param {
137+ __u32 name_off;
138+ __u32 type;
111139 };
112140
113141 #endif /* _UAPI__LINUX_BTF_H__ */
include/uapi/linux/devlink.h+5−0
@@ -163,6 +163,11 @@ enum devlink_param_cmode { · 162 unmodified lines
163163 DEVLINK_PARAM_CMODE_MAX = __DEVLINK_PARAM_CMODE_MAX - 1
164164 };
165165
166+enum devlink_param_fw_load_policy_value {
167+ DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER,
168+ DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH,
169+};
170+
166171 enum devlink_attr {
167172 /* don't change the order or add anything between, this is ABI! */
168173 DEVLINK_ATTR_UNSPEC,
include/uapi/linux/ethtool.h+2−2
@@ -882,7 +882,7 @@ struct ethtool_rx_flow_spec { · 881 unmodified lines
882882 __u32 location;
883883 };
884884
885−/* How rings are layed out when accessing virtual functions or
885+/* How rings are laid out when accessing virtual functions or
886886 * offloaded queues is device specific. To allow users to do flow
887887 * steering and specify these queues the ring cookie is partitioned
888888 * into a 32bit queue index with an 8 bit virtual function id.
@@ -891,7 +891,7 @@ struct ethtool_rx_flow_spec { · 2 unmodified lines
891891 * devices start supporting PCIe w/ARI. However at the moment I
892892 * do not know of any devices that support this so I do not reserve
893893 * space for this at this time. If a future patch consumes the next
894− * byte it should be aware of this possiblity.
894+ * byte it should be aware of this possibility.
895895 */
896896 #define ETHTOOL_RX_FLOW_SPEC_RING 0x00000000FFFFFFFFLL
897897 #define ETHTOOL_RX_FLOW_SPEC_RING_VF 0x000000FF00000000LL
include/uapi/linux/if_bridge.h+21−0
@@ -292,4 +292,25 @@ struct br_mcast_stats { · 291 unmodified lines
292292 __u64 mcast_bytes[BR_MCAST_DIR_SIZE];
293293 __u64 mcast_packets[BR_MCAST_DIR_SIZE];
294294 };
295+
296+/* bridge boolean options
297+ * BR_BOOLOPT_NO_LL_LEARN - disable learning from link-local packets
298+ *
299+ * IMPORTANT: if adding a new option do not forget to handle
300+ * it in br_boolopt_toggle/get and bridge sysfs
301+ */
302+enum br_boolopt_id {
303+ BR_BOOLOPT_NO_LL_LEARN,
304+ BR_BOOLOPT_MAX
305+};
306+
307+/* struct br_boolopt_multi - change multiple bridge boolean options
308+ *
309+ * @optval: new option values (bit per option)
310+ * @optmask: options to change (bit per option)
311+ */
312+struct br_boolopt_multi {
313+ __u32 optval;
314+ __u32 optmask;
315+};
295316 #endif /* _UAPI_LINUX_IF_BRIDGE_H */
include/uapi/linux/if_link.h+19−0
@@ -288,6 +288,7 @@ enum { · 287 unmodified lines
288288 IFLA_BR_MCAST_IGMP_VERSION,
289289 IFLA_BR_MCAST_MLD_VERSION,
290290 IFLA_BR_VLAN_STATS_PER_PORT,
291+ IFLA_BR_MULTI_BOOLOPT,
291292 __IFLA_BR_MAX,
292293 };
293294
@@ -533,6 +534,7 @@ enum { · 239 unmodified lines
533534 IFLA_VXLAN_LABEL,
534535 IFLA_VXLAN_GPE,
535536 IFLA_VXLAN_TTL_INHERIT,
537+ IFLA_VXLAN_DF,
536538 __IFLA_VXLAN_MAX
537539 };
538540 #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
@@ -542,6 +544,14 @@ struct ifla_vxlan_port_range { · 3 unmodified lines
542544 __be16 high;
543545 };
544546
547+enum ifla_vxlan_df {
548+ VXLAN_DF_UNSET = 0,
549+ VXLAN_DF_SET,
550+ VXLAN_DF_INHERIT,
551+ __VXLAN_DF_END,
552+ VXLAN_DF_MAX = __VXLAN_DF_END - 1,
553+};
554+
545555 /* GENEVE section */
546556 enum {
547557 IFLA_GENEVE_UNSPEC,
@@ -557,10 +567,19 @@ enum { · 9 unmodified lines
557567 IFLA_GENEVE_UDP_ZERO_CSUM6_RX,
558568 IFLA_GENEVE_LABEL,
559569 IFLA_GENEVE_TTL_INHERIT,
570+ IFLA_GENEVE_DF,
560571 __IFLA_GENEVE_MAX
561572 };
562573 #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
563574
575+enum ifla_geneve_df {
576+ GENEVE_DF_UNSET = 0,
577+ GENEVE_DF_SET,
578+ GENEVE_DF_INHERIT,
579+ __GENEVE_DF_END,
580+ GENEVE_DF_MAX = __GENEVE_DF_END - 1,
581+};
582+
564583 /* PPP section */
565584 enum {
566585 IFLA_PPP_UNSPEC,
include/uapi/linux/if_tun.h+1−0
@@ -59,6 +59,7 @@ · 58 unmodified lines
5959 #define TUNGETVNETBE _IOR('T', 223, int)
6060 #define TUNSETSTEERINGEBPF _IOR('T', 224, int)
6161 #define TUNSETFILTEREBPF _IOR('T', 225, int)
62+#define TUNSETCARRIER _IOW('T', 226, int)
6263
6364 /* TUNSETIFF ifr flags */
6465 #define IFF_TUN 0x0001
include/uapi/linux/ncsi.h+15−0
@@ -26,6 +26,12 @@ · 25 unmodified lines
2626 * @NCSI_CMD_SEND_CMD: send NC-SI command to network card.
2727 * Requires NCSI_ATTR_IFINDEX, NCSI_ATTR_PACKAGE_ID
2828 * and NCSI_ATTR_CHANNEL_ID.
29+ * @NCSI_CMD_SET_PACKAGE_MASK: set a whitelist of allowed packages.
30+ * Requires NCSI_ATTR_IFINDEX and NCSI_ATTR_PACKAGE_MASK.
31+ * @NCSI_CMD_SET_CHANNEL_MASK: set a whitelist of allowed channels.
32+ * Requires NCSI_ATTR_IFINDEX, NCSI_ATTR_PACKAGE_ID, and
33+ * NCSI_ATTR_CHANNEL_MASK. If NCSI_ATTR_CHANNEL_ID is present it sets
34+ * the primary channel.
2935 * @NCSI_CMD_MAX: highest command number
3036 */
3137 enum ncsi_nl_commands {
@@ -34,6 +40,8 @@ enum ncsi_nl_commands { · 2 unmodified lines
3440 NCSI_CMD_SET_INTERFACE,
3541 NCSI_CMD_CLEAR_INTERFACE,
3642 NCSI_CMD_SEND_CMD,
43+ NCSI_CMD_SET_PACKAGE_MASK,
44+ NCSI_CMD_SET_CHANNEL_MASK,
3745
3846 __NCSI_CMD_AFTER_LAST,
3947 NCSI_CMD_MAX = __NCSI_CMD_AFTER_LAST - 1
@@ -48,6 +56,10 @@ enum ncsi_nl_commands { · 8 unmodified lines
4856 * @NCSI_ATTR_PACKAGE_ID: package ID
4957 * @NCSI_ATTR_CHANNEL_ID: channel ID
5058 * @NCSI_ATTR_DATA: command payload
59+ * @NCSI_ATTR_MULTI_FLAG: flag to signal that multi-mode should be enabled with
60+ * NCSI_CMD_SET_PACKAGE_MASK or NCSI_CMD_SET_CHANNEL_MASK.
61+ * @NCSI_ATTR_PACKAGE_MASK: 32-bit mask of allowed packages.
62+ * @NCSI_ATTR_CHANNEL_MASK: 32-bit mask of allowed channels.
5163 * @NCSI_ATTR_MAX: highest attribute number
5264 */
5365 enum ncsi_nl_attrs {
@@ -57,6 +69,9 @@ enum ncsi_nl_attrs { · 3 unmodified lines
5769 NCSI_ATTR_PACKAGE_ID,
5870 NCSI_ATTR_CHANNEL_ID,
5971 NCSI_ATTR_DATA,
72+ NCSI_ATTR_MULTI_FLAG,
73+ NCSI_ATTR_PACKAGE_MASK,
74+ NCSI_ATTR_CHANNEL_MASK,
6075
6176 __NCSI_ATTR_AFTER_LAST,
6277 NCSI_ATTR_MAX = __NCSI_ATTR_AFTER_LAST - 1
include/uapi/linux/neighbour.h+1−0
@@ -28,6 +28,7 @@ enum { · 27 unmodified lines
2828 NDA_MASTER,
2929 NDA_LINK_NETNSID,
3030 NDA_SRC_VNI,
31+ NDA_PROTOCOL, /* Originator of entry */
3132 __NDA_MAX
3233 };
3334
include/uapi/linux/net_namespace.h+2−0
@@ -16,6 +16,8 @@ enum { · 15 unmodified lines
1616 NETNSA_NSID,
1717 NETNSA_PID,
1818 NETNSA_FD,
19+ NETNSA_TARGET_NSID,
20+ NETNSA_CURRENT_NSID,
1921 __NETNSA_MAX,
2022 };
2123
include/uapi/linux/netfilter.h+0−4
@@ -34,10 +34,6 @@ · 33 unmodified lines
3434
3535 /* only for userspace compatibility */
3636 #ifndef __KERNEL__
37−/* Generic cache responses from hook functions.
38− <= 0x2000 is used for protocol-flags. */
39−#define NFC_UNKNOWN 0x4000
40−#define NFC_ALTERED 0x8000
4137
4238 /* NF_VERDICT_BITS should be 8 now, but userspace might break if this changes */
4339 #define NF_VERDICT_BITS 16
include/uapi/linux/netfilter/ipset/ip_set.h+12−7
@@ -13,8 +13,9 @@ · 12 unmodified lines
1313
1414 #include <linux/types.h>
1515
16−/* The protocol version */
17−#define IPSET_PROTOCOL 6
16+/* The protocol versions */
17+#define IPSET_PROTOCOL 7
18+#define IPSET_PROTOCOL_MIN 6
1819
1920 /* The max length of strings including NUL: set and type identifiers */
2021 #define IPSET_MAXNAMELEN 32
@@ -38,17 +39,19 @@ enum ipset_cmd { · 17 unmodified lines
3839 IPSET_CMD_TEST, /* 11: Test an element in a set */
3940 IPSET_CMD_HEADER, /* 12: Get set header data only */
4041 IPSET_CMD_TYPE, /* 13: Get set type */
42+ IPSET_CMD_GET_BYNAME, /* 14: Get set index by name */
43+ IPSET_CMD_GET_BYINDEX, /* 15: Get set name by index */
4144 IPSET_MSG_MAX, /* Netlink message commands */
4245
4346 /* Commands in userspace: */
44− IPSET_CMD_RESTORE = IPSET_MSG_MAX, /* 14: Enter restore mode */
45− IPSET_CMD_HELP, /* 15: Get help */
46− IPSET_CMD_VERSION, /* 16: Get program version */
47− IPSET_CMD_QUIT, /* 17: Quit from interactive mode */
47+ IPSET_CMD_RESTORE = IPSET_MSG_MAX, /* 16: Enter restore mode */
48+ IPSET_CMD_HELP, /* 17: Get help */
49+ IPSET_CMD_VERSION, /* 18: Get program version */
50+ IPSET_CMD_QUIT, /* 19: Quit from interactive mode */
4851
4952 IPSET_CMD_MAX,
5053
51− IPSET_CMD_COMMIT = IPSET_CMD_MAX, /* 18: Commit buffered commands */
54+ IPSET_CMD_COMMIT = IPSET_CMD_MAX, /* 20: Commit buffered commands */
5255 };
5356
5457 /* Attributes at command level */
@@ -66,6 +69,7 @@ enum { · 11 unmodified lines
6669 IPSET_ATTR_LINENO, /* 9: Restore lineno */
6770 IPSET_ATTR_PROTOCOL_MIN, /* 10: Minimal supported version number */
6871 IPSET_ATTR_REVISION_MIN = IPSET_ATTR_PROTOCOL_MIN, /* type rev min */
72+ IPSET_ATTR_INDEX, /* 11: Kernel index of set */
6973 __IPSET_ATTR_CMD_MAX,
7074 };
7175 #define IPSET_ATTR_CMD_MAX (__IPSET_ATTR_CMD_MAX - 1)
@@ -223,6 +227,7 @@ enum ipset_adt { · 151 unmodified lines
223227
224228 /* Sets are identified by an index in kernel space. Tweak with ip_set_id_t
225229 * and IPSET_INVALID_ID if you want to increase the max number of sets.
230+ * Also, IPSET_ATTR_INDEX must be changed.
226231 */
227232 typedef __u16 ip_set_id_t;
228233
include/uapi/linux/netfilter_decnet.h+0−10
@@ -15,16 +15,6 @@ · 14 unmodified lines
1515
1616 #include <limits.h> /* for INT_MIN, INT_MAX */
1717
18−/* IP Cache bits. */
19−/* Src IP address. */
20−#define NFC_DN_SRC 0x0001
21−/* Dest IP address. */
22−#define NFC_DN_DST 0x0002
23−/* Input device. */
24−#define NFC_DN_IF_IN 0x0004
25−/* Output device. */
26−#define NFC_DN_IF_OUT 0x0008
27−
2818 /* kernel define is in netfilter_defs.h */
2919 #define NF_DN_NUMHOOKS 7
3020 #endif /* ! __KERNEL__ */
include/uapi/linux/netfilter_ipv4.h+0−28
@@ -13,34 +13,6 @@ · 12 unmodified lines
1313
1414 #include <limits.h> /* for INT_MIN, INT_MAX */
1515
16−/* IP Cache bits. */
17−/* Src IP address. */
18−#define NFC_IP_SRC 0x0001
19−/* Dest IP address. */
20−#define NFC_IP_DST 0x0002
21−/* Input device. */
22−#define NFC_IP_IF_IN 0x0004
23−/* Output device. */
24−#define NFC_IP_IF_OUT 0x0008
25−/* TOS. */
26−#define NFC_IP_TOS 0x0010
27−/* Protocol. */
28−#define NFC_IP_PROTO 0x0020
29−/* IP options. */
30−#define NFC_IP_OPTIONS 0x0040
31−/* Frag & flags. */
32−#define NFC_IP_FRAG 0x0080
33−
34−/* Per-protocol information: only matters if proto match. */
35−/* TCP flags. */
36−#define NFC_IP_TCPFLAGS 0x0100
37−/* Source port. */
38−#define NFC_IP_SRC_PT 0x0200
39−/* Dest port. */
40−#define NFC_IP_DST_PT 0x0400
41−/* Something else about the proto */
42−#define NFC_IP_PROTO_UNKNOWN 0x2000
43−
4416 /* IP Hooks */
4517 /* After promisc drops, checksum checks. */
4618 #define NF_IP_PRE_ROUTING 0
include/uapi/linux/netfilter_ipv6.h+0−29
@@ -16,35 +16,6 @@ · 15 unmodified lines
1616
1717 #include <limits.h> /* for INT_MIN, INT_MAX */
1818
19−/* IP Cache bits. */
20−/* Src IP address. */
21−#define NFC_IP6_SRC 0x0001
22−/* Dest IP address. */
23−#define NFC_IP6_DST 0x0002
24−/* Input device. */
25−#define NFC_IP6_IF_IN 0x0004
26−/* Output device. */
27−#define NFC_IP6_IF_OUT 0x0008
28−/* TOS. */
29−#define NFC_IP6_TOS 0x0010
30−/* Protocol. */
31−#define NFC_IP6_PROTO 0x0020
32−/* IP options. */
33−#define NFC_IP6_OPTIONS 0x0040
34−/* Frag & flags. */
35−#define NFC_IP6_FRAG 0x0080
36−
37−
38−/* Per-protocol information: only matters if proto match. */
39−/* TCP flags. */
40−#define NFC_IP6_TCPFLAGS 0x0100
41−/* Source port. */
42−#define NFC_IP6_SRC_PT 0x0200
43−/* Dest port. */
44−#define NFC_IP6_DST_PT 0x0400
45−/* Something else about the proto */
46−#define NFC_IP6_PROTO_UNKNOWN 0x2000
47−
4819 /* IP6 Hooks */
4920 /* After promisc drops, checksum checks. */
5021 #define NF_IP6_PRE_ROUTING 0
include/uapi/linux/nl80211.h+450−8
@@ -1036,6 +1036,35 @@ · 1035 unmodified lines
10361036 * @NL80211_CMD_GET_FTM_RESPONDER_STATS: Retrieve FTM responder statistics, in
10371037 * the %NL80211_ATTR_FTM_RESPONDER_STATS attribute.
10381038 *
1039+ * @NL80211_CMD_PEER_MEASUREMENT_START: start a (set of) peer measurement(s)
1040+ * with the given parameters, which are encapsulated in the nested
1041+ * %NL80211_ATTR_PEER_MEASUREMENTS attribute. Optionally, MAC address
1042+ * randomization may be enabled and configured by specifying the
1043+ * %NL80211_ATTR_MAC and %NL80211_ATTR_MAC_MASK attributes.
1044+ * If a timeout is requested, use the %NL80211_ATTR_TIMEOUT attribute.
1045+ * A u64 cookie for further %NL80211_ATTR_COOKIE use is is returned in
1046+ * the netlink extended ack message.
1047+ *
1048+ * To cancel a measurement, close the socket that requested it.
1049+ *
1050+ * Measurement results are reported to the socket that requested the
1051+ * measurement using @NL80211_CMD_PEER_MEASUREMENT_RESULT when they
1052+ * become available, so applications must ensure a large enough socket
1053+ * buffer size.
1054+ *
1055+ * Depending on driver support it may or may not be possible to start
1056+ * multiple concurrent measurements.
1057+ * @NL80211_CMD_PEER_MEASUREMENT_RESULT: This command number is used for the
1058+ * result notification from the driver to the requesting socket.
1059+ * @NL80211_CMD_PEER_MEASUREMENT_COMPLETE: Notification only, indicating that
1060+ * the measurement completed, using the measurement cookie
1061+ * (%NL80211_ATTR_COOKIE).
1062+ *
1063+ * @NL80211_CMD_NOTIFY_RADAR: Notify the kernel that a radar signal was
1064+ * detected and reported by a neighboring device on the channel
1065+ * indicated by %NL80211_ATTR_WIPHY_FREQ and other attributes
1066+ * determining the width and type.
1067+ *
10391068 * @NL80211_CMD_MAX: highest used command number
10401069 * @__NL80211_CMD_AFTER_LAST: internal use
10411070 */
@@ -1250,6 +1279,12 @@ enum nl80211_commands { · 208 unmodified lines
12501279
12511280 NL80211_CMD_GET_FTM_RESPONDER_STATS,
12521281
1282+ NL80211_CMD_PEER_MEASUREMENT_START,
1283+ NL80211_CMD_PEER_MEASUREMENT_RESULT,
1284+ NL80211_CMD_PEER_MEASUREMENT_COMPLETE,
1285+
1286+ NL80211_CMD_NOTIFY_RADAR,
1287+
12531288 /* add new commands above here */
12541289
12551290 /* used to define NL80211_CMD_MAX below */
@@ -1706,7 +1741,7 @@ enum nl80211_commands { · 450 unmodified lines
17061741 * the values passed in @NL80211_ATTR_SCAN_SSIDS (eg. if an SSID
17071742 * is included in the probe request, but the match attributes
17081743 * will never let it go through), -EINVAL may be returned.
1709− * If ommited, no filtering is done.
1744+ * If omitted, no filtering is done.
17101745 *
17111746 * @NL80211_ATTR_INTERFACE_COMBINATIONS: Nested attribute listing the supported
17121747 * interface combinations. In each nested item, it contains attributes
@@ -1811,7 +1846,7 @@ enum nl80211_commands { · 98 unmodified lines
18111846 *
18121847 * @NL80211_ATTR_INACTIVITY_TIMEOUT: timeout value in seconds, this can be
18131848 * used by the drivers which has MLME in firmware and does not have support
1814− * to report per station tx/rx activity to free up the staion entry from
1849+ * to report per station tx/rx activity to free up the station entry from
18151850 * the list. This needs to be used when the driver advertises the
18161851 * capability to timeout the stations.
18171852 *
@@ -2172,7 +2207,7 @@ enum nl80211_commands { · 354 unmodified lines
21722207 *
21732208 * @NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST: When present the RSSI level for BSSs in
21742209 * the specified band is to be adjusted before doing
2175− * %NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI based comparision to figure out
2210+ * %NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI based comparison to figure out
21762211 * better BSSs. The attribute value is a packed structure
21772212 * value as specified by &struct nl80211_bss_select_rssi_adjust.
21782213 *
@@ -2254,6 +2289,16 @@ enum nl80211_commands { · 75 unmodified lines
22542289 * @NL80211_ATTR_FTM_RESPONDER_STATS: Nested attribute with FTM responder
22552290 * statistics, see &enum nl80211_ftm_responder_stats.
22562291 *
2292+ * @NL80211_ATTR_TIMEOUT: Timeout for the given operation in milliseconds (u32),
2293+ * if the attribute is not given no timeout is requested. Note that 0 is an
2294+ * invalid value.
2295+ *
2296+ * @NL80211_ATTR_PEER_MEASUREMENTS: peer measurements request (and result)
2297+ * data, uses nested attributes specified in
2298+ * &enum nl80211_peer_measurement_attrs.
2299+ * This is also used for capability advertisement in the wiphy information,
2300+ * with the appropriate sub-attributes.
2301+ *
22572302 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
22582303 * @NL80211_ATTR_MAX: highest attribute number currently defined
22592304 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2699,6 +2744,10 @@ enum nl80211_attrs { · 439 unmodified lines
26992744
27002745 NL80211_ATTR_FTM_RESPONDER_STATS,
27012746
2747+ NL80211_ATTR_TIMEOUT,
2748+
2749+ NL80211_ATTR_PEER_MEASUREMENTS,
2750+
27022751 /* add attributes here, update the policy in nl80211.c */
27032752
27042753 __NL80211_ATTR_AFTER_LAST,
@@ -3074,6 +3123,8 @@ enum nl80211_sta_bss_param { · 369 unmodified lines
30743123 * with an FCS error (u32, from this station). This count may not include
30753124 * some packets with an FCS error due to TA corruption. Hence this counter
30763125 * might not be fully accurate.
3126+ * @NL80211_STA_INFO_CONNECTED_TO_GATE: set to true if STA has a path to a
3127+ * mesh gate (u8, 0 or 1)
30773128 * @__NL80211_STA_INFO_AFTER_LAST: internal
30783129 * @NL80211_STA_INFO_MAX: highest possible station info attribute
30793130 */
@@ -3116,6 +3167,7 @@ enum nl80211_sta_info { · 36 unmodified lines
31163167 NL80211_STA_INFO_ACK_SIGNAL_AVG,
31173168 NL80211_STA_INFO_RX_MPDUS,
31183169 NL80211_STA_INFO_FCS_ERROR_COUNT,
3170+ NL80211_STA_INFO_CONNECTED_TO_GATE,
31193171
31203172 /* keep last */
31213173 __NL80211_STA_INFO_AFTER_LAST,
@@ -3895,6 +3947,11 @@ enum nl80211_mesh_power_mode { · 773 unmodified lines
38953947 * remove it from the STA's list of peers. You may set this to 0 to disable
38963948 * the removal of the STA. Default is 30 minutes.
38973949 *
3950+ * @NL80211_MESHCONF_CONNECTED_TO_GATE: If set to true then this mesh STA
3951+ * will advertise that it is connected to a gate in the mesh formation
3952+ * field. If left unset then the mesh formation field will only
3953+ * advertise such if there is an active root mesh path.
3954+ *
38983955 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
38993956 */
39003957 enum nl80211_meshconf_params {
@@ -3927,6 +3984,7 @@ enum nl80211_meshconf_params { · 26 unmodified lines
39273984 NL80211_MESHCONF_POWER_MODE,
39283985 NL80211_MESHCONF_AWAKE_WINDOW,
39293986 NL80211_MESHCONF_PLINK_TIMEOUT,
3987+ NL80211_MESHCONF_CONNECTED_TO_GATE,
39303988
39313989 /* keep last */
39323990 __NL80211_MESHCONF_ATTR_AFTER_LAST,
@@ -4859,7 +4917,7 @@ enum nl80211_iface_limit_attrs { · 926 unmodified lines
48594917 * numbers = [ #{STA} <= 1, #{P2P-client,P2P-GO} <= 3 ], max = 4
48604918 * => allows a STA plus three P2P interfaces
48614919 *
4862− * The list of these four possiblities could completely be contained
4920+ * The list of these four possibilities could completely be contained
48634921 * within the %NL80211_ATTR_INTERFACE_COMBINATIONS attribute to indicate
48644922 * that any of these groups must match.
48654923 *
@@ -4889,7 +4947,7 @@ enum nl80211_if_combination_attrs { · 23 unmodified lines
48894947 * enum nl80211_plink_state - state of a mesh peer link finite state machine
48904948 *
48914949 * @NL80211_PLINK_LISTEN: initial state, considered the implicit
4892− * state of non existant mesh peer links
4950+ * state of non existent mesh peer links
48934951 * @NL80211_PLINK_OPN_SNT: mesh plink open frame has been sent to
48944952 * this mesh peer
48954953 * @NL80211_PLINK_OPN_RCVD: mesh plink open frame has been received
@@ -5381,7 +5439,7 @@ enum nl80211_timeout_reason { · 485 unmodified lines
53815439 * request parameters IE in the probe request
53825440 * @NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP: accept broadcast probe responses
53835441 * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE: send probe request frames at
5384− * rate of at least 5.5M. In case non OCE AP is dicovered in the channel,
5442+ * rate of at least 5.5M. In case non OCE AP is discovered in the channel,
53855443 * only the first probe req in the channel will be sent in high rate.
53865444 * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION: allow probe request
53875445 * tx deferral (dot11FILSProbeDelay shall be set to 15ms)
@@ -5842,9 +5900,11 @@ enum nl80211_external_auth_action { · 454 unmodified lines
58425900 * @__NL80211_FTM_RESP_ATTR_INVALID: Invalid
58435901 * @NL80211_FTM_RESP_ATTR_ENABLED: FTM responder is enabled
58445902 * @NL80211_FTM_RESP_ATTR_LCI: The content of Measurement Report Element
5845− * (9.4.2.22 in 802.11-2016) with type 8 - LCI (9.4.2.22.10)
5903+ * (9.4.2.22 in 802.11-2016) with type 8 - LCI (9.4.2.22.10),
5904+ * i.e. starting with the measurement token
58465905 * @NL80211_FTM_RESP_ATTR_CIVIC: The content of Measurement Report Element
5847− * (9.4.2.22 in 802.11-2016) with type 11 - Civic (Section 9.4.2.22.13)
5906+ * (9.4.2.22 in 802.11-2016) with type 11 - Civic (Section 9.4.2.22.13),
5907+ * i.e. starting with the measurement token
58485908 * @__NL80211_FTM_RESP_ATTR_LAST: Internal
58495909 * @NL80211_FTM_RESP_ATTR_MAX: highest FTM responder attribute.
58505910 */
@@ -5906,4 +5966,386 @@ enum nl80211_ftm_responder_stats { · 55 unmodified lines
59065966 NL80211_FTM_STATS_MAX = __NL80211_FTM_STATS_AFTER_LAST - 1
59075967 };
59085968
5969+/**
5970+ * enum nl80211_preamble - frame preamble types
5971+ * @NL80211_PREAMBLE_LEGACY: legacy (HR/DSSS, OFDM, ERP PHY) preamble
5972+ * @NL80211_PREAMBLE_HT: HT preamble
5973+ * @NL80211_PREAMBLE_VHT: VHT preamble
5974+ * @NL80211_PREAMBLE_DMG: DMG preamble
5975+ */
5976+enum nl80211_preamble {
5977+ NL80211_PREAMBLE_LEGACY,
5978+ NL80211_PREAMBLE_HT,
5979+ NL80211_PREAMBLE_VHT,
5980+ NL80211_PREAMBLE_DMG,
5981+};
5982+
5983+/**
5984+ * enum nl80211_peer_measurement_type - peer measurement types
5985+ * @NL80211_PMSR_TYPE_INVALID: invalid/unused, needed as we use
5986+ * these numbers also for attributes
5987+ *
5988+ * @NL80211_PMSR_TYPE_FTM: flight time measurement
5989+ *
5990+ * @NUM_NL80211_PMSR_TYPES: internal
5991+ * @NL80211_PMSR_TYPE_MAX: highest type number
5992+ */
5993+enum nl80211_peer_measurement_type {
5994+ NL80211_PMSR_TYPE_INVALID,
5995+
5996+ NL80211_PMSR_TYPE_FTM,
5997+
5998+ NUM_NL80211_PMSR_TYPES,
5999+ NL80211_PMSR_TYPE_MAX = NUM_NL80211_PMSR_TYPES - 1
6000+};
6001+
6002+/**
6003+ * enum nl80211_peer_measurement_status - peer measurement status
6004+ * @NL80211_PMSR_STATUS_SUCCESS: measurement completed successfully
6005+ * @NL80211_PMSR_STATUS_REFUSED: measurement was locally refused
6006+ * @NL80211_PMSR_STATUS_TIMEOUT: measurement timed out
6007+ * @NL80211_PMSR_STATUS_FAILURE: measurement failed, a type-dependent
6008+ * reason may be available in the response data
6009+ */
6010+enum nl80211_peer_measurement_status {
6011+ NL80211_PMSR_STATUS_SUCCESS,
6012+ NL80211_PMSR_STATUS_REFUSED,
6013+ NL80211_PMSR_STATUS_TIMEOUT,
6014+ NL80211_PMSR_STATUS_FAILURE,
6015+};
6016+
6017+/**
6018+ * enum nl80211_peer_measurement_req - peer measurement request attributes
6019+ * @__NL80211_PMSR_REQ_ATTR_INVALID: invalid
6020+ *
6021+ * @NL80211_PMSR_REQ_ATTR_DATA: This is a nested attribute with measurement
6022+ * type-specific request data inside. The attributes used are from the
6023+ * enums named nl80211_peer_measurement_<type>_req.
6024+ * @NL80211_PMSR_REQ_ATTR_GET_AP_TSF: include AP TSF timestamp, if supported
6025+ * (flag attribute)
6026+ *
6027+ * @NUM_NL80211_PMSR_REQ_ATTRS: internal
6028+ * @NL80211_PMSR_REQ_ATTR_MAX: highest attribute number
6029+ */
6030+enum nl80211_peer_measurement_req {
6031+ __NL80211_PMSR_REQ_ATTR_INVALID,
6032+
6033+ NL80211_PMSR_REQ_ATTR_DATA,
6034+ NL80211_PMSR_REQ_ATTR_GET_AP_TSF,
6035+
6036+ /* keep last */
6037+ NUM_NL80211_PMSR_REQ_ATTRS,
6038+ NL80211_PMSR_REQ_ATTR_MAX = NUM_NL80211_PMSR_REQ_ATTRS - 1
6039+};
6040+
6041+/**
6042+ * enum nl80211_peer_measurement_resp - peer measurement response attributes
6043+ * @__NL80211_PMSR_RESP_ATTR_INVALID: invalid
6044+ *
6045+ * @NL80211_PMSR_RESP_ATTR_DATA: This is a nested attribute with measurement
6046+ * type-specific results inside. The attributes used are from the enums
6047+ * named nl80211_peer_measurement_<type>_resp.
6048+ * @NL80211_PMSR_RESP_ATTR_STATUS: u32 value with the measurement status
6049+ * (using values from &enum nl80211_peer_measurement_status.)
6050+ * @NL80211_PMSR_RESP_ATTR_HOST_TIME: host time (%CLOCK_BOOTTIME) when the
6051+ * result was measured; this value is not expected to be accurate to
6052+ * more than 20ms. (u64, nanoseconds)
6053+ * @NL80211_PMSR_RESP_ATTR_AP_TSF: TSF of the AP that the interface
6054+ * doing the measurement is connected to when the result was measured.
6055+ * This shall be accurately reported if supported and requested
6056+ * (u64, usec)
6057+ * @NL80211_PMSR_RESP_ATTR_FINAL: If results are sent to the host partially
6058+ * (*e.g. with FTM per-burst data) this flag will be cleared on all but
6059+ * the last result; if all results are combined it's set on the single
6060+ * result.
6061+ * @NL80211_PMSR_RESP_ATTR_PAD: padding for 64-bit attributes, ignore
6062+ *
6063+ * @NUM_NL80211_PMSR_RESP_ATTRS: internal
6064+ * @NL80211_PMSR_RESP_ATTR_MAX: highest attribute number
6065+ */
6066+enum nl80211_peer_measurement_resp {
6067+ __NL80211_PMSR_RESP_ATTR_INVALID,
6068+
6069+ NL80211_PMSR_RESP_ATTR_DATA,
6070+ NL80211_PMSR_RESP_ATTR_STATUS,
6071+ NL80211_PMSR_RESP_ATTR_HOST_TIME,
6072+ NL80211_PMSR_RESP_ATTR_AP_TSF,
6073+ NL80211_PMSR_RESP_ATTR_FINAL,
6074+ NL80211_PMSR_RESP_ATTR_PAD,
6075+
6076+ /* keep last */
6077+ NUM_NL80211_PMSR_RESP_ATTRS,
6078+ NL80211_PMSR_RESP_ATTR_MAX = NUM_NL80211_PMSR_RESP_ATTRS - 1
6079+};
6080+
6081+/**
6082+ * enum nl80211_peer_measurement_peer_attrs - peer attributes for measurement
6083+ * @__NL80211_PMSR_PEER_ATTR_INVALID: invalid
6084+ *
6085+ * @NL80211_PMSR_PEER_ATTR_ADDR: peer's MAC address
6086+ * @NL80211_PMSR_PEER_ATTR_CHAN: channel definition, nested, using top-level
6087+ * attributes like %NL80211_ATTR_WIPHY_FREQ etc.
6088+ * @NL80211_PMSR_PEER_ATTR_REQ: This is a nested attribute indexed by
6089+ * measurement type, with attributes from the
6090+ * &enum nl80211_peer_measurement_req inside.
6091+ * @NL80211_PMSR_PEER_ATTR_RESP: This is a nested attribute indexed by
6092+ * measurement type, with attributes from the
6093+ * &enum nl80211_peer_measurement_resp inside.
6094+ *
6095+ * @NUM_NL80211_PMSR_PEER_ATTRS: internal
6096+ * @NL80211_PMSR_PEER_ATTR_MAX: highest attribute number
6097+ */
6098+enum nl80211_peer_measurement_peer_attrs {
6099+ __NL80211_PMSR_PEER_ATTR_INVALID,
6100+
6101+ NL80211_PMSR_PEER_ATTR_ADDR,
6102+ NL80211_PMSR_PEER_ATTR_CHAN,
6103+ NL80211_PMSR_PEER_ATTR_REQ,
6104+ NL80211_PMSR_PEER_ATTR_RESP,
6105+
6106+ /* keep last */
6107+ NUM_NL80211_PMSR_PEER_ATTRS,
6108+ NL80211_PMSR_PEER_ATTR_MAX = NUM_NL80211_PMSR_PEER_ATTRS - 1,
6109+};
6110+
6111+/**
6112+ * enum nl80211_peer_measurement_attrs - peer measurement attributes
6113+ * @__NL80211_PMSR_ATTR_INVALID: invalid
6114+ *
6115+ * @NL80211_PMSR_ATTR_MAX_PEERS: u32 attribute used for capability
6116+ * advertisement only, indicates the maximum number of peers
6117+ * measurements can be done with in a single request
6118+ * @NL80211_PMSR_ATTR_REPORT_AP_TSF: flag attribute in capability
6119+ * indicating that the connected AP's TSF can be reported in
6120+ * measurement results
6121+ * @NL80211_PMSR_ATTR_RANDOMIZE_MAC_ADDR: flag attribute in capability
6122+ * indicating that MAC address randomization is supported.
6123+ * @NL80211_PMSR_ATTR_TYPE_CAPA: capabilities reported by the device,
6124+ * this contains a nesting indexed by measurement type, and
6125+ * type-specific capabilities inside, which are from the enums
6126+ * named nl80211_peer_measurement_<type>_capa.
6127+ * @NL80211_PMSR_ATTR_PEERS: nested attribute, the nesting index is
6128+ * meaningless, just a list of peers to measure with, with the
6129+ * sub-attributes taken from
6130+ * &enum nl80211_peer_measurement_peer_attrs.
6131+ *
6132+ * @NUM_NL80211_PMSR_ATTR: internal
6133+ * @NL80211_PMSR_ATTR_MAX: highest attribute number
6134+ */
6135+enum nl80211_peer_measurement_attrs {
6136+ __NL80211_PMSR_ATTR_INVALID,
6137+
6138+ NL80211_PMSR_ATTR_MAX_PEERS,
6139+ NL80211_PMSR_ATTR_REPORT_AP_TSF,
6140+ NL80211_PMSR_ATTR_RANDOMIZE_MAC_ADDR,
6141+ NL80211_PMSR_ATTR_TYPE_CAPA,
6142+ NL80211_PMSR_ATTR_PEERS,
6143+
6144+ /* keep last */
6145+ NUM_NL80211_PMSR_ATTR,
6146+ NL80211_PMSR_ATTR_MAX = NUM_NL80211_PMSR_ATTR - 1
6147+};
6148+
6149+/**
6150+ * enum nl80211_peer_measurement_ftm_capa - FTM capabilities
6151+ * @__NL80211_PMSR_FTM_CAPA_ATTR_INVALID: invalid
6152+ *
6153+ * @NL80211_PMSR_FTM_CAPA_ATTR_ASAP: flag attribute indicating ASAP mode
6154+ * is supported
6155+ * @NL80211_PMSR_FTM_CAPA_ATTR_NON_ASAP: flag attribute indicating non-ASAP
6156+ * mode is supported
6157+ * @NL80211_PMSR_FTM_CAPA_ATTR_REQ_LCI: flag attribute indicating if LCI
6158+ * data can be requested during the measurement
6159+ * @NL80211_PMSR_FTM_CAPA_ATTR_REQ_CIVICLOC: flag attribute indicating if civic
6160+ * location data can be requested during the measurement
6161+ * @NL80211_PMSR_FTM_CAPA_ATTR_PREAMBLES: u32 bitmap attribute of bits
6162+ * from &enum nl80211_preamble.
6163+ * @NL80211_PMSR_FTM_CAPA_ATTR_BANDWIDTHS: bitmap of values from
6164+ * &enum nl80211_chan_width indicating the supported channel
6165+ * bandwidths for FTM. Note that a higher channel bandwidth may be
6166+ * configured to allow for other measurements types with different
6167+ * bandwidth requirement in the same measurement.
6168+ * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_BURSTS_EXPONENT: u32 attribute indicating
6169+ * the maximum bursts exponent that can be used (if not present anything
6170+ * is valid)
6171+ * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST: u32 attribute indicating
6172+ * the maximum FTMs per burst (if not present anything is valid)
6173+ *
6174+ * @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal
6175+ * @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number
6176+ */
6177+enum nl80211_peer_measurement_ftm_capa {
6178+ __NL80211_PMSR_FTM_CAPA_ATTR_INVALID,
6179+
6180+ NL80211_PMSR_FTM_CAPA_ATTR_ASAP,
6181+ NL80211_PMSR_FTM_CAPA_ATTR_NON_ASAP,
6182+ NL80211_PMSR_FTM_CAPA_ATTR_REQ_LCI,
6183+ NL80211_PMSR_FTM_CAPA_ATTR_REQ_CIVICLOC,
6184+ NL80211_PMSR_FTM_CAPA_ATTR_PREAMBLES,
6185+ NL80211_PMSR_FTM_CAPA_ATTR_BANDWIDTHS,
6186+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_BURSTS_EXPONENT,
6187+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST,
6188+
6189+ /* keep last */
6190+ NUM_NL80211_PMSR_FTM_CAPA_ATTR,
6191+ NL80211_PMSR_FTM_CAPA_ATTR_MAX = NUM_NL80211_PMSR_FTM_CAPA_ATTR - 1
6192+};
6193+
6194+/**
6195+ * enum nl80211_peer_measurement_ftm_req - FTM request attributes
6196+ * @__NL80211_PMSR_FTM_REQ_ATTR_INVALID: invalid
6197+ *
6198+ * @NL80211_PMSR_FTM_REQ_ATTR_ASAP: ASAP mode requested (flag)
6199+ * @NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE: preamble type (see
6200+ * &enum nl80211_preamble), optional for DMG (u32)
6201+ * @NL80211_PMSR_FTM_REQ_ATTR_NUM_BURSTS_EXP: number of bursts exponent as in
6202+ * 802.11-2016 9.4.2.168 "Fine Timing Measurement Parameters element"
6203+ * (u8, 0-15, optional with default 15 i.e. "no preference")
6204+ * @NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD: interval between bursts in units
6205+ * of 100ms (u16, optional with default 0)
6206+ * @NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION: burst duration, as in 802.11-2016
6207+ * Table 9-257 "Burst Duration field encoding" (u8, 0-15, optional with
6208+ * default 15 i.e. "no preference")
6209+ * @NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST: number of successful FTM frames
6210+ * requested per burst
6211+ * (u8, 0-31, optional with default 0 i.e. "no preference")
6212+ * @NL80211_PMSR_FTM_REQ_ATTR_NUM_FTMR_RETRIES: number of FTMR frame retries
6213+ * (u8, default 3)
6214+ * @NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI: request LCI data (flag)
6215+ * @NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC: request civic location data
6216+ * (flag)
6217+ *
6218+ * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
6219+ * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
6220+ */
6221+enum nl80211_peer_measurement_ftm_req {
6222+ __NL80211_PMSR_FTM_REQ_ATTR_INVALID,
6223+
6224+ NL80211_PMSR_FTM_REQ_ATTR_ASAP,
6225+ NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE,
6226+ NL80211_PMSR_FTM_REQ_ATTR_NUM_BURSTS_EXP,
6227+ NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD,
6228+ NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION,
6229+ NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST,
6230+ NL80211_PMSR_FTM_REQ_ATTR_NUM_FTMR_RETRIES,
6231+ NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI,
6232+ NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC,
6233+
6234+ /* keep last */
6235+ NUM_NL80211_PMSR_FTM_REQ_ATTR,
6236+ NL80211_PMSR_FTM_REQ_ATTR_MAX = NUM_NL80211_PMSR_FTM_REQ_ATTR - 1
6237+};
6238+
6239+/**
6240+ * enum nl80211_peer_measurement_ftm_failure_reasons - FTM failure reasons
6241+ * @NL80211_PMSR_FTM_FAILURE_UNSPECIFIED: unspecified failure, not used
6242+ * @NL80211_PMSR_FTM_FAILURE_NO_RESPONSE: no response from the FTM responder
6243+ * @NL80211_PMSR_FTM_FAILURE_REJECTED: FTM responder rejected measurement
6244+ * @NL80211_PMSR_FTM_FAILURE_WRONG_CHANNEL: we already know the peer is
6245+ * on a different channel, so can't measure (if we didn't know, we'd
6246+ * try and get no response)
6247+ * @NL80211_PMSR_FTM_FAILURE_PEER_NOT_CAPABLE: peer can't actually do FTM
6248+ * @NL80211_PMSR_FTM_FAILURE_INVALID_TIMESTAMP: invalid T1/T4 timestamps
6249+ * received
6250+ * @NL80211_PMSR_FTM_FAILURE_PEER_BUSY: peer reports busy, you may retry
6251+ * later (see %NL80211_PMSR_FTM_RESP_ATTR_BUSY_RETRY_TIME)
6252+ * @NL80211_PMSR_FTM_FAILURE_BAD_CHANGED_PARAMS: parameters were changed
6253+ * by the peer and are no longer supported
6254+ */
6255+enum nl80211_peer_measurement_ftm_failure_reasons {
6256+ NL80211_PMSR_FTM_FAILURE_UNSPECIFIED,
6257+ NL80211_PMSR_FTM_FAILURE_NO_RESPONSE,
6258+ NL80211_PMSR_FTM_FAILURE_REJECTED,
6259+ NL80211_PMSR_FTM_FAILURE_WRONG_CHANNEL,
6260+ NL80211_PMSR_FTM_FAILURE_PEER_NOT_CAPABLE,
6261+ NL80211_PMSR_FTM_FAILURE_INVALID_TIMESTAMP,
6262+ NL80211_PMSR_FTM_FAILURE_PEER_BUSY,
6263+ NL80211_PMSR_FTM_FAILURE_BAD_CHANGED_PARAMS,
6264+};
6265+
6266+/**
6267+ * enum nl80211_peer_measurement_ftm_resp - FTM response attributes
6268+ * @__NL80211_PMSR_FTM_RESP_ATTR_INVALID: invalid
6269+ *
6270+ * @NL80211_PMSR_FTM_RESP_ATTR_FAIL_REASON: FTM-specific failure reason
6271+ * (u32, optional)
6272+ * @NL80211_PMSR_FTM_RESP_ATTR_BURST_INDEX: optional, if bursts are reported
6273+ * as separate results then it will be the burst index 0...(N-1) and
6274+ * the top level will indicate partial results (u32)
6275+ * @NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_ATTEMPTS: number of FTM Request frames
6276+ * transmitted (u32, optional)
6277+ * @NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_SUCCESSES: number of FTM Request frames
6278+ * that were acknowleged (u32, optional)
6279+ * @NL80211_PMSR_FTM_RESP_ATTR_BUSY_RETRY_TIME: retry time received from the
6280+ * busy peer (u32, seconds)
6281+ * @NL80211_PMSR_FTM_RESP_ATTR_NUM_BURSTS_EXP: actual number of bursts exponent
6282+ * used by the responder (similar to request, u8)
6283+ * @NL80211_PMSR_FTM_RESP_ATTR_BURST_DURATION: actual burst duration used by
6284+ * the responder (similar to request, u8)
6285+ * @NL80211_PMSR_FTM_RESP_ATTR_FTMS_PER_BURST: actual FTMs per burst used
6286+ * by the responder (similar to request, u8)
6287+ * @NL80211_PMSR_FTM_RESP_ATTR_RSSI_AVG: average RSSI across all FTM action
6288+ * frames (optional, s32, 1/2 dBm)
6289+ * @NL80211_PMSR_FTM_RESP_ATTR_RSSI_SPREAD: RSSI spread across all FTM action
6290+ * frames (optional, s32, 1/2 dBm)
6291+ * @NL80211_PMSR_FTM_RESP_ATTR_TX_RATE: bitrate we used for the response to the
6292+ * FTM action frame (optional, nested, using &enum nl80211_rate_info
6293+ * attributes)
6294+ * @NL80211_PMSR_FTM_RESP_ATTR_RX_RATE: bitrate the responder used for the FTM
6295+ * action frame (optional, nested, using &enum nl80211_rate_info attrs)
6296+ * @NL80211_PMSR_FTM_RESP_ATTR_RTT_AVG: average RTT (s64, picoseconds, optional
6297+ * but one of RTT/DIST must be present)
6298+ * @NL80211_PMSR_FTM_RESP_ATTR_RTT_VARIANCE: RTT variance (u64, ps^2, note that
6299+ * standard deviation is the square root of variance, optional)
6300+ * @NL80211_PMSR_FTM_RESP_ATTR_RTT_SPREAD: RTT spread (u64, picoseconds,
6301+ * optional)
6302+ * @NL80211_PMSR_FTM_RESP_ATTR_DIST_AVG: average distance (s64, mm, optional
6303+ * but one of RTT/DIST must be present)
6304+ * @NL80211_PMSR_FTM_RESP_ATTR_DIST_VARIANCE: distance variance (u64, mm^2, note
6305+ * that standard deviation is the square root of variance, optional)
6306+ * @NL80211_PMSR_FTM_RESP_ATTR_DIST_SPREAD: distance spread (u64, mm, optional)
6307+ * @NL80211_PMSR_FTM_RESP_ATTR_LCI: LCI data from peer (binary, optional);
6308+ * this is the contents of the Measurement Report Element (802.11-2016
6309+ * 9.4.2.22.1) starting with the Measurement Token, with Measurement
6310+ * Type 8.
6311+ * @NL80211_PMSR_FTM_RESP_ATTR_CIVICLOC: civic location data from peer
6312+ * (binary, optional);
6313+ * this is the contents of the Measurement Report Element (802.11-2016
6314+ * 9.4.2.22.1) starting with the Measurement Token, with Measurement
6315+ * Type 11.
6316+ * @NL80211_PMSR_FTM_RESP_ATTR_PAD: ignore, for u64/s64 padding only
6317+ *
6318+ * @NUM_NL80211_PMSR_FTM_RESP_ATTR: internal
6319+ * @NL80211_PMSR_FTM_RESP_ATTR_MAX: highest attribute number
6320+ */
6321+enum nl80211_peer_measurement_ftm_resp {
6322+ __NL80211_PMSR_FTM_RESP_ATTR_INVALID,
6323+
6324+ NL80211_PMSR_FTM_RESP_ATTR_FAIL_REASON,
6325+ NL80211_PMSR_FTM_RESP_ATTR_BURST_INDEX,
6326+ NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_ATTEMPTS,
6327+ NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_SUCCESSES,
6328+ NL80211_PMSR_FTM_RESP_ATTR_BUSY_RETRY_TIME,
6329+ NL80211_PMSR_FTM_RESP_ATTR_NUM_BURSTS_EXP,
6330+ NL80211_PMSR_FTM_RESP_ATTR_BURST_DURATION,
6331+ NL80211_PMSR_FTM_RESP_ATTR_FTMS_PER_BURST,
6332+ NL80211_PMSR_FTM_RESP_ATTR_RSSI_AVG,
6333+ NL80211_PMSR_FTM_RESP_ATTR_RSSI_SPREAD,
6334+ NL80211_PMSR_FTM_RESP_ATTR_TX_RATE,
6335+ NL80211_PMSR_FTM_RESP_ATTR_RX_RATE,
6336+ NL80211_PMSR_FTM_RESP_ATTR_RTT_AVG,
6337+ NL80211_PMSR_FTM_RESP_ATTR_RTT_VARIANCE,
6338+ NL80211_PMSR_FTM_RESP_ATTR_RTT_SPREAD,
6339+ NL80211_PMSR_FTM_RESP_ATTR_DIST_AVG,
6340+ NL80211_PMSR_FTM_RESP_ATTR_DIST_VARIANCE,
6341+ NL80211_PMSR_FTM_RESP_ATTR_DIST_SPREAD,
6342+ NL80211_PMSR_FTM_RESP_ATTR_LCI,
6343+ NL80211_PMSR_FTM_RESP_ATTR_CIVICLOC,
6344+ NL80211_PMSR_FTM_RESP_ATTR_PAD,
6345+
6346+ /* keep last */
6347+ NUM_NL80211_PMSR_FTM_RESP_ATTR,
6348+ NL80211_PMSR_FTM_RESP_ATTR_MAX = NUM_NL80211_PMSR_FTM_RESP_ATTR - 1
6349+};
6350+
59096351 #endif /* __LINUX_NL80211_H */
include/uapi/linux/pkt_cls.h+7−0
@@ -485,6 +485,11 @@ enum { · 484 unmodified lines
485485
486486 TCA_FLOWER_IN_HW_COUNT,
487487
488+ TCA_FLOWER_KEY_PORT_SRC_MIN, /* be16 */
489+ TCA_FLOWER_KEY_PORT_SRC_MAX, /* be16 */
490+ TCA_FLOWER_KEY_PORT_DST_MIN, /* be16 */
491+ TCA_FLOWER_KEY_PORT_DST_MAX, /* be16 */
492+
488493 __TCA_FLOWER_MAX,
489494 };
490495
@@ -518,6 +523,8 @@ enum { · 27 unmodified lines
518523 TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST = (1 << 1),
519524 };
520525
526+#define TCA_FLOWER_MASK_FLAGS_RANGE (1 << 0) /* Range-based match */
527+
521528 /* Match-all classifier */
522529
523530 enum {
include/uapi/linux/pkt_sched.h+30−0
@@ -291,11 +291,38 @@ enum { · 290 unmodified lines
291291 TCA_GRED_DPS,
292292 TCA_GRED_MAX_P,
293293 TCA_GRED_LIMIT,
294+ TCA_GRED_VQ_LIST, /* nested TCA_GRED_VQ_ENTRY */
294295 __TCA_GRED_MAX,
295296 };
296297
297298 #define TCA_GRED_MAX (__TCA_GRED_MAX - 1)
298299
300+enum {
301+ TCA_GRED_VQ_ENTRY_UNSPEC,
302+ TCA_GRED_VQ_ENTRY, /* nested TCA_GRED_VQ_* */
303+ __TCA_GRED_VQ_ENTRY_MAX,
304+};
305+#define TCA_GRED_VQ_ENTRY_MAX (__TCA_GRED_VQ_ENTRY_MAX - 1)
306+
307+enum {
308+ TCA_GRED_VQ_UNSPEC,
309+ TCA_GRED_VQ_PAD,
310+ TCA_GRED_VQ_DP, /* u32 */
311+ TCA_GRED_VQ_STAT_BYTES, /* u64 */
312+ TCA_GRED_VQ_STAT_PACKETS, /* u32 */
313+ TCA_GRED_VQ_STAT_BACKLOG, /* u32 */
314+ TCA_GRED_VQ_STAT_PROB_DROP, /* u32 */
315+ TCA_GRED_VQ_STAT_PROB_MARK, /* u32 */
316+ TCA_GRED_VQ_STAT_FORCED_DROP, /* u32 */
317+ TCA_GRED_VQ_STAT_FORCED_MARK, /* u32 */
318+ TCA_GRED_VQ_STAT_PDROP, /* u32 */
319+ TCA_GRED_VQ_STAT_OTHER, /* u32 */
320+ TCA_GRED_VQ_FLAGS, /* u32 */
321+ __TCA_GRED_VQ_MAX
322+};
323+
324+#define TCA_GRED_VQ_MAX (__TCA_GRED_VQ_MAX - 1)
325+
299326 struct tc_gred_qopt {
300327 __u32 limit; /* HARD maximal queue length (bytes) */
301328 __u32 qth_min; /* Min average length threshold (bytes) */
@@ -864,6 +891,8 @@ enum { · 562 unmodified lines
864891
865892 TCA_FQ_LOW_RATE_THRESHOLD, /* per packet delay under this rate */
866893
894+ TCA_FQ_CE_THRESHOLD, /* DCTCP-like CE-marking threshold */
895+
867896 __TCA_FQ_MAX
868897 };
869898
@@ -882,6 +911,7 @@ struct tc_fq_qd_stats { · 12 unmodified lines
882911 __u32 inactive_flows;
883912 __u32 throttled_flows;
884913 __u32 unthrottle_latency_ns;
914+ __u64 ce_mark; /* packets above ce_threshold */
885915 };
886916
887917 /* Heavy-Hitter Filter */
include/uapi/linux/ptp_clock.h+12−0
@@ -84,6 +84,16 @@ struct ptp_sys_offset { · 83 unmodified lines
8484 struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1];
8585 };
8686
87+struct ptp_sys_offset_extended {
88+ unsigned int n_samples; /* Desired number of measurements. */
89+ unsigned int rsv[3]; /* Reserved for future use. */
90+ /*
91+ * Array of [system, phc, system] time stamps. The kernel will provide
92+ * 3*n_samples time stamps.
93+ */
94+ struct ptp_clock_time ts[PTP_MAX_SAMPLES][3];
95+};
96+
8797 struct ptp_sys_offset_precise {
8898 struct ptp_clock_time device;
8999 struct ptp_clock_time sys_realtime;
@@ -136,6 +146,8 @@ struct ptp_pin_desc { · 46 unmodified lines
136146 #define PTP_PIN_SETFUNC _IOW(PTP_CLK_MAGIC, 7, struct ptp_pin_desc)
137147 #define PTP_SYS_OFFSET_PRECISE \
138148 _IOWR(PTP_CLK_MAGIC, 8, struct ptp_sys_offset_precise)
149+#define PTP_SYS_OFFSET_EXTENDED \
150+ _IOW(PTP_CLK_MAGIC, 9, struct ptp_sys_offset_extended)
139151
140152 struct ptp_extts_event {
141153 struct ptp_clock_time t; /* Time event occured. */
include/uapi/linux/sctp.h+12−1
@@ -129,6 +129,7 @@ typedef __s32 sctp_assoc_t; · 128 unmodified lines
129129 #define SCTP_STREAM_SCHEDULER_VALUE 124
130130 #define SCTP_INTERLEAVING_SUPPORTED 125
131131 #define SCTP_SENDMSG_CONNECT 126
132+#define SCTP_EVENT 127
132133
133134 /* PR-SCTP policies */
134135 #define SCTP_PR_SCTP_NONE 0x0000
@@ -632,7 +633,9 @@ union sctp_notification { · 497 unmodified lines
632633 */
633634
634635 enum sctp_sn_type {
635− SCTP_SN_TYPE_BASE = (1<<15),
636+ SCTP_SN_TYPE_BASE = (1<<15),
637+ SCTP_DATA_IO_EVENT = SCTP_SN_TYPE_BASE,
638+#define SCTP_DATA_IO_EVENT SCTP_DATA_IO_EVENT
636639 SCTP_ASSOC_CHANGE,
637640 #define SCTP_ASSOC_CHANGE SCTP_ASSOC_CHANGE
638641 SCTP_PEER_ADDR_CHANGE,
@@ -657,6 +660,8 @@ enum sctp_sn_type { · 18 unmodified lines
657660 #define SCTP_ASSOC_RESET_EVENT SCTP_ASSOC_RESET_EVENT
658661 SCTP_STREAM_CHANGE_EVENT,
659662 #define SCTP_STREAM_CHANGE_EVENT SCTP_STREAM_CHANGE_EVENT
663+ SCTP_SN_TYPE_MAX = SCTP_STREAM_CHANGE_EVENT,
664+#define SCTP_SN_TYPE_MAX SCTP_SN_TYPE_MAX
660665 };
661666
662667 /* Notification error codes used to fill up the error fields in some
@@ -1150,6 +1155,12 @@ struct sctp_add_streams { · 487 unmodified lines
11501155 uint16_t sas_outstrms;
11511156 };
11521157
1158+struct sctp_event {
1159+ sctp_assoc_t se_assoc_id;
1160+ uint16_t se_type;
1161+ uint8_t se_on;
1162+};
1163+
11531164 /* SCTP Stream schedulers */
11541165 enum sctp_sched_type {
11551166 SCTP_SS_FCFS,
include/uapi/linux/snmp.h+1−0
@@ -243,6 +243,7 @@ enum · 242 unmodified lines
243243 LINUX_MIB_TCPREQQFULLDROP, /* TCPReqQFullDrop */
244244 LINUX_MIB_TCPRETRANSFAIL, /* TCPRetransFail */
245245 LINUX_MIB_TCPRCVCOALESCE, /* TCPRcvCoalesce */
246+ LINUX_MIB_TCPBACKLOGCOALESCE, /* TCPBacklogCoalesce */
246247 LINUX_MIB_TCPOFOQUEUE, /* TCPOFOQueue */
247248 LINUX_MIB_TCPOFODROP, /* TCPOFODrop */
248249 LINUX_MIB_TCPOFOMERGE, /* TCPOFOMerge */
include/uapi/linux/tcp.h+1−0
@@ -266,6 +266,7 @@ enum { · 265 unmodified lines
266266 TCP_NLA_BYTES_RETRANS, /* Data bytes retransmitted */
267267 TCP_NLA_DSACK_DUPS, /* DSACK blocks received */
268268 TCP_NLA_REORD_SEEN, /* reordering events seen */
269+ TCP_NLA_SRTT, /* smoothed RTT in usecs */
269270 };
270271
271272 /* for TCP_MD5SIG socket option */
include/uapi/linux/udp.h+1−0
@@ -33,6 +33,7 @@ struct udphdr { · 32 unmodified lines
3333 #define UDP_NO_CHECK6_TX 101 /* Disable sending checksum for UDP6X */
3434 #define UDP_NO_CHECK6_RX 102 /* Disable accpeting checksum for UDP6 */
3535 #define UDP_SEGMENT 103 /* Set GSO segmentation size */
36+#define UDP_GRO 104 /* This socket can receive UDP GRO packets */
3637
3738 /* UDP encapsulation types */
3839 #define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
include/uapi/linux/virtio_config.h+3−0
@@ -75,6 +75,9 @@ · 74 unmodified lines
7575 */
7676 #define VIRTIO_F_IOMMU_PLATFORM 33
7777
78+/* This feature indicates support for the packed virtqueue layout. */
79+#define VIRTIO_F_RING_PACKED 34
80+
7881 /*
7982 * Does the device support Single Root I/O Virtualization?
8083 */
include/uapi/linux/virtio_ring.h+52−0
@@ -44,6 +44,13 @@ · 43 unmodified lines
4444 /* This means the buffer contains a list of buffer descriptors. */
4545 #define VRING_DESC_F_INDIRECT 4
4646
47+/*
48+ * Mark a descriptor as available or used in packed ring.
49+ * Notice: they are defined as shifts instead of shifted values.
50+ */
51+#define VRING_PACKED_DESC_F_AVAIL 7
52+#define VRING_PACKED_DESC_F_USED 15
53+
4754 /* The Host uses this in used->flags to advise the Guest: don't kick me when
4855 * you add a buffer. It's unreliable, so it's simply an optimization. Guest
4956 * will still kick if it's out of buffers. */
@@ -53,6 +60,23 @@ · 3 unmodified lines
5360 * optimization. */
5461 #define VRING_AVAIL_F_NO_INTERRUPT 1
5562
63+/* Enable events in packed ring. */
64+#define VRING_PACKED_EVENT_FLAG_ENABLE 0x0
65+/* Disable events in packed ring. */
66+#define VRING_PACKED_EVENT_FLAG_DISABLE 0x1
67+/*
68+ * Enable events for a specific descriptor in packed ring.
69+ * (as specified by Descriptor Ring Change Event Offset/Wrap Counter).
70+ * Only valid if VIRTIO_RING_F_EVENT_IDX has been negotiated.
71+ */
72+#define VRING_PACKED_EVENT_FLAG_DESC 0x2
73+
74+/*
75+ * Wrap counter bit shift in event suppression structure
76+ * of packed ring.
77+ */
78+#define VRING_PACKED_EVENT_F_WRAP_CTR 15
79+
5680 /* We support indirect buffer descriptors */
5781 #define VIRTIO_RING_F_INDIRECT_DESC 28
5882
@@ -171,4 +195,32 @@ static inline int vring_need_event(__u16 event_idx, __u16 new_idx, __u16 old) · 112 unmodified lines
171195 return (__u16)(new_idx - event_idx - 1) < (__u16)(new_idx - old);
172196 }
173197
198+struct vring_packed_desc_event {
199+ /* Descriptor Ring Change Event Offset/Wrap Counter. */
200+ __le16 off_wrap;
201+ /* Descriptor Ring Change Event Flags. */
202+ __le16 flags;
203+};
204+
205+struct vring_packed_desc {
206+ /* Buffer Address. */
207+ __le64 addr;
208+ /* Buffer Length. */
209+ __le32 len;
210+ /* Buffer ID. */
211+ __le16 id;
212+ /* The flags depending on descriptor type. */
213+ __le16 flags;
214+};
215+
216+struct vring_packed {
217+ unsigned int num;
218+
219+ struct vring_packed_desc *desc;
220+
221+ struct vring_packed_desc_event *driver;
222+
223+ struct vring_packed_desc_event *device;
224+};
225+
174226 #endif /* _UAPI_LINUX_VIRTIO_RING_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t