History

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

Pull networking updates from David Miller: 1) Support 6Ghz band in ath11k driver, from Rajkumar Manoharan. 2) Support UDP segmentation in code TSO code, from Eric Dumazet. 3) Allow flashing different flash images in cxgb4 driver, from Vishal Kulkarni. 4) Add drop frames counter and flow status to tc flower offloading, from Po Liu. 5) Support n-tuple filters in cxgb4, from Vishal Kulkarni. 6) Various new indirect call avoidance, from Eric Dumazet and Brian Vazquez. 7) Fix BPF verifier failures on 32-bit pointer arithmetic, from Yonghong Song. 8) Support querying and setting hardware address of a port function via devlink, use this in mlx5, from Parav Pandit. 9) Support hw ipsec offload on bonding slaves, from Jarod Wilson. 10) Switch qca8k driver over to phylink, from Jonathan McDowell. 11) In bpftool, show list of processes holding BPF FD references to maps, programs, links, and btf objects. From Andrii Nakryiko. 12) Several conversions over to generic power management, from Vaibhav Gupta. 13) Add support for SO_KEEPALIVE et al. to bpf_setsockopt(), from Dmitry Yakunin. 14) Various https url conversions, from Alexander A. Klimov. 15) Timestamping and PHC support for mscc PHY driver, from Antoine Tenart. 16) Support bpf iterating over tcp and udp sockets, from Yonghong Song. 17) Support 5GBASE-T i40e NICs, from Aleksandr Loktionov. 18) Add kTLS RX HW offload support to mlx5e, from Tariq Toukan. 19) Fix the ->ndo_start_xmit() return type to be netdev_tx_t in several drivers. From Luc Van Oostenryck. 20) XDP support for xen-netfront, from Denis Kirjanov. 21) Support receive buffer autotuning in MPTCP, from Florian Westphal. 22) Support EF100 chip in sfc driver, from Edward Cree. 23) Add XDP support to mvpp2 driver, from Matteo Croce. 24) Support MPTCP in sock_diag, from Paolo Abeni. 25) Commonize UDP tunnel offloading code by creating udp_tunnel_nic infrastructure, from Jakub Kicinski. 26) Several pci_ --> dma_ API conversions, from Christophe JAILLET. 27) Add FLOW_ACTION_POLICE support to mlxsw, from Ido Schimmel. 28) Add SK_LOOKUP bpf program type, from Jakub Sitnicki. 29) Refactor a lot of networking socket option handling code in order to avoid set_fs() calls, from Christoph Hellwig. 30) Add rfc4884 support to icmp code, from Willem de Bruijn. 31) Support TBF offload in dpaa2-eth driver, from Ioana Ciornei. 32) Support XDP_REDIRECT in qede driver, from Alexander Lobakin. 33) Support PCI relaxed ordering in mlx5 driver, from Aya Levin. 34) Support TCP syncookies in MPTCP, from Flowian Westphal. 35) Fix several tricky cases of PMTU handling wrt. briding, from Stefano Brivio. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2056 commits) net: thunderx: initialize VF's mailbox mutex before first usage usb: hso: remove bogus check for EINPROGRESS usb: hso: no complaint about kmalloc failure hso: fix bailout in error case of probe ip_tunnel_core: Fix build for archs without _HAVE_ARCH_IPV6_CSUM selftests/net: relax cpu affinity requirement in msg_zerocopy test mptcp: be careful on subflow creation selftests: rtnetlink: make kci_test_encap() return sub-test result selftests: rtnetlink: correct the final return value for the test net: dsa: sja1105: use detected device id instead of DT one on mismatch tipc: set ub->ifindex for local ipv6 address ipv6: add ipv6_dev_find() net: openvswitch: silence suspicious RCU usage warning Revert "vxlan: fix tos value before xmit" ptp: only allow phase values lower than 1 period farsync: switch from 'pci_' to 'dma_' API wan: wanxl: switch from 'pci_' to 'dma_' API hv_netvsc: do not use VF device if link is down dpaa2-eth: Fix passing zero to 'PTR_ERR' warning net: macb: Properly handle phylink on at91sam9x ...

Linus Torvalds committed 6 years ago

Commit 47ec5302 parents 8186749 c1055b72088 files · +117531 −41040Browse files

Showing the changes to include/uapi/linux (36 of 2088 files). Show all

Unified · Split

36 files
  1. include/uapi/linux/atmioc.h +1 −1
  2. include/uapi/linux/batadv_packet.h +25 −25
  3. include/uapi/linux/batman_adv.h +4 −3
  4. include/uapi/linux/bpf.h +289 −104
  5. include/uapi/linux/caif/caif_socket.h +1 −1
  6. include/uapi/linux/devlink.h +15 −0
  7. include/uapi/linux/errqueue.h +13 −1
  8. include/uapi/linux/ethtool.h +87 −0
  9. include/uapi/linux/ethtool_netlink.h +57 −0
  10. include/uapi/linux/hsr_netlink.h +1 −1
  11. include/uapi/linux/icmp.h +22 −0
  12. include/uapi/linux/icmpv6.h +1 −0
  13. include/uapi/linux/if_bridge.h +75 −0
  14. include/uapi/linux/if_link.h +22 −1
  15. include/uapi/linux/if_xdp.h +4 −1
  16. include/uapi/linux/in.h +1 −0
  17. include/uapi/linux/in6.h +1 −0
  18. include/uapi/linux/inet_diag.h +1 −0
  19. include/uapi/linux/mdio.h +26 −0
  20. include/uapi/linux/mptcp.h +17 −0
  21. include/uapi/linux/mrp_bridge.h +38 −0
  22. include/uapi/linux/neighbour.h +24 −0
  23. include/uapi/linux/netfilter/nf_tables.h +14 −0
  24. include/uapi/linux/netfilter/xt_connmark.h +1 −1
  25. include/uapi/linux/nl80211.h +72 −22
  26. include/uapi/linux/openvswitch.h +2 −1
  27. include/uapi/linux/pkt_cls.h +3 −0
  28. include/uapi/linux/pkt_sched.h +2 −0
  29. include/uapi/linux/ptp_clock.h +30 −4
  30. include/uapi/linux/rtnetlink.h +24 −22
  31. include/uapi/linux/seg6_iptunnel.h +0 −21
  32. include/uapi/linux/snmp.h +1 −0
  33. include/uapi/linux/tcp.h +1 −0
  34. include/uapi/linux/wireless.h +1 −1
  35. include/uapi/linux/xdp_diag.h +11 −0
  36. include/uapi/linux/xfrm.h +1 −0
include/uapi/linux/atmioc.h+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
5 5
6 6
7/*7/*
8 * See http://icawww1.epfl.ch/linux-atm/magic.html for the complete list of8 * See https://icawww1.epfl.ch/linux-atm/magic.html for the complete list of
9 * "magic" ioctl numbers.9 * "magic" ioctl numbers.
10 */10 */
11 11
include/uapi/linux/batadv_packet.h+25−25
@@ -72,8 +72,8 @@ enum batadv_subtype { · 71 unmodified lines
72 72
73/**73/**
74 * enum batadv_iv_flags - flags used in B.A.T.M.A.N. IV OGM packets74 * enum batadv_iv_flags - flags used in B.A.T.M.A.N. IV OGM packets
75 * @BATADV_NOT_BEST_NEXT_HOP: flag is set when ogm packet is forwarded and was75 * @BATADV_NOT_BEST_NEXT_HOP: flag is set when the ogm packet is forwarded and
76 * previously received from someone else than the best neighbor.76 * was previously received from someone other than the best neighbor.
77 * @BATADV_PRIMARIES_FIRST_HOP: flag unused.77 * @BATADV_PRIMARIES_FIRST_HOP: flag unused.
78 * @BATADV_DIRECTLINK: flag is for the first hop or if rebroadcasted from a78 * @BATADV_DIRECTLINK: flag is for the first hop or if rebroadcasted from a
79 * one hop neighbor on the interface where it was originally received.79 * one hop neighbor on the interface where it was originally received.
@@ -195,8 +195,8 @@ struct batadv_bla_claim_dst { · 115 unmodified lines
195/**195/**
196 * struct batadv_ogm_packet - ogm (routing protocol) packet196 * struct batadv_ogm_packet - ogm (routing protocol) packet
197 * @packet_type: batman-adv packet type, part of the general header197 * @packet_type: batman-adv packet type, part of the general header
198 * @version: batman-adv protocol version, part of the genereal header198 * @version: batman-adv protocol version, part of the general header
199 * @ttl: time to live for this packet, part of the genereal header199 * @ttl: time to live for this packet, part of the general header
200 * @flags: contains routing relevant flags - see enum batadv_iv_flags200 * @flags: contains routing relevant flags - see enum batadv_iv_flags
201 * @seqno: sequence identification201 * @seqno: sequence identification
202 * @orig: address of the source node202 * @orig: address of the source node
@@ -247,7 +247,7 @@ struct batadv_ogm2_packet { · 44 unmodified lines
247/**247/**
248 * struct batadv_elp_packet - elp (neighbor discovery) packet248 * struct batadv_elp_packet - elp (neighbor discovery) packet
249 * @packet_type: batman-adv packet type, part of the general header249 * @packet_type: batman-adv packet type, part of the general header
250 * @version: batman-adv protocol version, part of the genereal header250 * @version: batman-adv protocol version, part of the general header
251 * @orig: originator mac address251 * @orig: originator mac address
252 * @seqno: sequence number252 * @seqno: sequence number
253 * @elp_interval: currently used ELP sending interval in ms253 * @elp_interval: currently used ELP sending interval in ms
@@ -265,15 +265,15 @@ struct batadv_elp_packet { · 11 unmodified lines
265/**265/**
266 * struct batadv_icmp_header - common members among all the ICMP packets266 * struct batadv_icmp_header - common members among all the ICMP packets
267 * @packet_type: batman-adv packet type, part of the general header267 * @packet_type: batman-adv packet type, part of the general header
268 * @version: batman-adv protocol version, part of the genereal header268 * @version: batman-adv protocol version, part of the general header
269 * @ttl: time to live for this packet, part of the genereal header269 * @ttl: time to live for this packet, part of the general header
270 * @msg_type: ICMP packet type270 * @msg_type: ICMP packet type
271 * @dst: address of the destination node271 * @dst: address of the destination node
272 * @orig: address of the source node272 * @orig: address of the source node
273 * @uid: local ICMP socket identifier273 * @uid: local ICMP socket identifier
274 * @align: not used - useful for alignment purposes only274 * @align: not used - useful for alignment purposes only
275 *275 *
276 * This structure is used for ICMP packets parsing only and it is never sent276 * This structure is used for ICMP packet parsing only and it is never sent
277 * over the wire. The alignment field at the end is there to ensure that277 * over the wire. The alignment field at the end is there to ensure that
278 * members are padded the same way as they are in real packets.278 * members are padded the same way as they are in real packets.
279 */279 */
@@ -291,8 +291,8 @@ struct batadv_icmp_header { · 11 unmodified lines
291/**291/**
292 * struct batadv_icmp_packet - ICMP packet292 * struct batadv_icmp_packet - ICMP packet
293 * @packet_type: batman-adv packet type, part of the general header293 * @packet_type: batman-adv packet type, part of the general header
294 * @version: batman-adv protocol version, part of the genereal header294 * @version: batman-adv protocol version, part of the general header
295 * @ttl: time to live for this packet, part of the genereal header295 * @ttl: time to live for this packet, part of the general header
296 * @msg_type: ICMP packet type296 * @msg_type: ICMP packet type
297 * @dst: address of the destination node297 * @dst: address of the destination node
298 * @orig: address of the source node298 * @orig: address of the source node
@@ -315,8 +315,8 @@ struct batadv_icmp_packet { · 16 unmodified lines
315/**315/**
316 * struct batadv_icmp_tp_packet - ICMP TP Meter packet316 * struct batadv_icmp_tp_packet - ICMP TP Meter packet
317 * @packet_type: batman-adv packet type, part of the general header317 * @packet_type: batman-adv packet type, part of the general header
318 * @version: batman-adv protocol version, part of the genereal header318 * @version: batman-adv protocol version, part of the general header
319 * @ttl: time to live for this packet, part of the genereal header319 * @ttl: time to live for this packet, part of the general header
320 * @msg_type: ICMP packet type320 * @msg_type: ICMP packet type
321 * @dst: address of the destination node321 * @dst: address of the destination node
322 * @orig: address of the source node322 * @orig: address of the source node
@@ -358,8 +358,8 @@ enum batadv_icmp_tp_subtype { · 35 unmodified lines
358/**358/**
359 * struct batadv_icmp_packet_rr - ICMP RouteRecord packet359 * struct batadv_icmp_packet_rr - ICMP RouteRecord packet
360 * @packet_type: batman-adv packet type, part of the general header360 * @packet_type: batman-adv packet type, part of the general header
361 * @version: batman-adv protocol version, part of the genereal header361 * @version: batman-adv protocol version, part of the general header
362 * @ttl: time to live for this packet, part of the genereal header362 * @ttl: time to live for this packet, part of the general header
363 * @msg_type: ICMP packet type363 * @msg_type: ICMP packet type
364 * @dst: address of the destination node364 * @dst: address of the destination node
365 * @orig: address of the source node365 * @orig: address of the source node
@@ -397,8 +397,8 @@ struct batadv_icmp_packet_rr { · 31 unmodified lines
397/**397/**
398 * struct batadv_unicast_packet - unicast packet for network payload398 * struct batadv_unicast_packet - unicast packet for network payload
399 * @packet_type: batman-adv packet type, part of the general header399 * @packet_type: batman-adv packet type, part of the general header
400 * @version: batman-adv protocol version, part of the genereal header400 * @version: batman-adv protocol version, part of the general header
401 * @ttl: time to live for this packet, part of the genereal header401 * @ttl: time to live for this packet, part of the general header
402 * @ttvn: translation table version number402 * @ttvn: translation table version number
403 * @dest: originator destination of the unicast packet403 * @dest: originator destination of the unicast packet
404 */404 */
@@ -433,8 +433,8 @@ struct batadv_unicast_4addr_packet { · 28 unmodified lines
433/**433/**
434 * struct batadv_frag_packet - fragmented packet434 * struct batadv_frag_packet - fragmented packet
435 * @packet_type: batman-adv packet type, part of the general header435 * @packet_type: batman-adv packet type, part of the general header
436 * @version: batman-adv protocol version, part of the genereal header436 * @version: batman-adv protocol version, part of the general header
437 * @ttl: time to live for this packet, part of the genereal header437 * @ttl: time to live for this packet, part of the general header
438 * @dest: final destination used when routing fragments438 * @dest: final destination used when routing fragments
439 * @orig: originator of the fragment used when merging the packet439 * @orig: originator of the fragment used when merging the packet
440 * @no: fragment number within this sequence440 * @no: fragment number within this sequence
@@ -467,8 +467,8 @@ struct batadv_frag_packet { · 26 unmodified lines
467/**467/**
468 * struct batadv_bcast_packet - broadcast packet for network payload468 * struct batadv_bcast_packet - broadcast packet for network payload
469 * @packet_type: batman-adv packet type, part of the general header469 * @packet_type: batman-adv packet type, part of the general header
470 * @version: batman-adv protocol version, part of the genereal header470 * @version: batman-adv protocol version, part of the general header
471 * @ttl: time to live for this packet, part of the genereal header471 * @ttl: time to live for this packet, part of the general header
472 * @reserved: reserved byte for alignment472 * @reserved: reserved byte for alignment
473 * @seqno: sequence identification473 * @seqno: sequence identification
474 * @orig: originator of the broadcast packet474 * @orig: originator of the broadcast packet
@@ -488,10 +488,10 @@ struct batadv_bcast_packet { · 13 unmodified lines
488/**488/**
489 * struct batadv_coded_packet - network coded packet489 * struct batadv_coded_packet - network coded packet
490 * @packet_type: batman-adv packet type, part of the general header490 * @packet_type: batman-adv packet type, part of the general header
491 * @version: batman-adv protocol version, part of the genereal header491 * @version: batman-adv protocol version, part of the general header
492 * @ttl: time to live for this packet, part of the genereal header492 * @ttl: time to live for this packet, part of the general header
493 * @first_source: original source of first included packet493 * @first_source: original source of first included packet
494 * @first_orig_dest: original destinal of first included packet494 * @first_orig_dest: original destination of first included packet
495 * @first_crc: checksum of first included packet495 * @first_crc: checksum of first included packet
496 * @first_ttvn: tt-version number of first included packet496 * @first_ttvn: tt-version number of first included packet
497 * @second_ttl: ttl of second packet497 * @second_ttl: ttl of second packet
@@ -523,8 +523,8 @@ struct batadv_coded_packet { · 25 unmodified lines
523/**523/**
524 * struct batadv_unicast_tvlv_packet - generic unicast packet with tvlv payload524 * struct batadv_unicast_tvlv_packet - generic unicast packet with tvlv payload
525 * @packet_type: batman-adv packet type, part of the general header525 * @packet_type: batman-adv packet type, part of the general header
526 * @version: batman-adv protocol version, part of the genereal header526 * @version: batman-adv protocol version, part of the general header
527 * @ttl: time to live for this packet, part of the genereal header527 * @ttl: time to live for this packet, part of the general header
528 * @reserved: reserved field (for packet alignment)528 * @reserved: reserved field (for packet alignment)
529 * @src: address of the source529 * @src: address of the source
530 * @dst: address of the destination530 * @dst: address of the destination
include/uapi/linux/batman_adv.h+4−3
@@ -69,7 +69,7 @@ enum batadv_tt_client_flags { · 68 unmodified lines
69 69
70 /**70 /**
71 * @BATADV_TT_CLIENT_TEMP: this global client has been detected to be71 * @BATADV_TT_CLIENT_TEMP: this global client has been detected to be
72 * part of the network but no nnode has already announced it72 * part of the network but no node has already announced it
73 */73 */
74 BATADV_TT_CLIENT_TEMP = (1 << 11),74 BATADV_TT_CLIENT_TEMP = (1 << 11),
75};75};
@@ -131,7 +131,7 @@ enum batadv_gw_modes { · 55 unmodified lines
131 /** @BATADV_GW_MODE_CLIENT: send DHCP requests to gw servers */131 /** @BATADV_GW_MODE_CLIENT: send DHCP requests to gw servers */
132 BATADV_GW_MODE_CLIENT,132 BATADV_GW_MODE_CLIENT,
133 133
134 /** @BATADV_GW_MODE_SERVER: announce itself as gatway server */134 /** @BATADV_GW_MODE_SERVER: announce itself as gateway server */
135 BATADV_GW_MODE_SERVER,135 BATADV_GW_MODE_SERVER,
136};136};
137 137
@@ -427,7 +427,8 @@ enum batadv_nl_attrs { · 289 unmodified lines
427 427
428 /**428 /**
429 * @BATADV_ATTR_HOP_PENALTY: defines the penalty which will be applied429 * @BATADV_ATTR_HOP_PENALTY: defines the penalty which will be applied
430 * to an originator message's tq-field on every hop.430 * to an originator message's tq-field on every hop and/or per
431 * hard interface
431 */432 */
432 BATADV_ATTR_HOP_PENALTY,433 BATADV_ATTR_HOP_PENALTY,
433 434
include/uapi/linux/bpf.h+289−104
@@ -117,6 +117,7 @@ enum bpf_cmd { · 116 unmodified lines
117 BPF_LINK_GET_NEXT_ID,117 BPF_LINK_GET_NEXT_ID,
118 BPF_ENABLE_STATS,118 BPF_ENABLE_STATS,
119 BPF_ITER_CREATE,119 BPF_ITER_CREATE,
120 BPF_LINK_DETACH,
120};121};
121 122
122enum bpf_map_type {123enum bpf_map_type {
@@ -189,6 +190,7 @@ enum bpf_prog_type { · 66 unmodified lines
189 BPF_PROG_TYPE_STRUCT_OPS,190 BPF_PROG_TYPE_STRUCT_OPS,
190 BPF_PROG_TYPE_EXT,191 BPF_PROG_TYPE_EXT,
191 BPF_PROG_TYPE_LSM,192 BPF_PROG_TYPE_LSM,
193 BPF_PROG_TYPE_SK_LOOKUP,
192};194};
193 195
194enum bpf_attach_type {196enum bpf_attach_type {
@@ -226,6 +228,10 @@ enum bpf_attach_type { · 31 unmodified lines
226 BPF_CGROUP_INET4_GETSOCKNAME,228 BPF_CGROUP_INET4_GETSOCKNAME,
227 BPF_CGROUP_INET6_GETSOCKNAME,229 BPF_CGROUP_INET6_GETSOCKNAME,
228 BPF_XDP_DEVMAP,230 BPF_XDP_DEVMAP,
231 BPF_CGROUP_INET_SOCK_RELEASE,
232 BPF_XDP_CPUMAP,
233 BPF_SK_LOOKUP,
234 BPF_XDP,
229 __MAX_BPF_ATTACH_TYPE235 __MAX_BPF_ATTACH_TYPE
230};236};
231 237
@@ -238,10 +244,18 @@ enum bpf_link_type { · 6 unmodified lines
238 BPF_LINK_TYPE_CGROUP = 3,244 BPF_LINK_TYPE_CGROUP = 3,
239 BPF_LINK_TYPE_ITER = 4,245 BPF_LINK_TYPE_ITER = 4,
240 BPF_LINK_TYPE_NETNS = 5,246 BPF_LINK_TYPE_NETNS = 5,
247 BPF_LINK_TYPE_XDP = 6,
241 248
242 MAX_BPF_LINK_TYPE,249 MAX_BPF_LINK_TYPE,
243};250};
244 251
252enum bpf_iter_link_info {
253 BPF_ITER_LINK_UNSPEC = 0,
254 BPF_ITER_LINK_MAP_FD = 1,
255
256 MAX_BPF_ITER_LINK_INFO,
257};
258
245/* cgroup-bpf attach flags used in BPF_PROG_ATTACH command259/* cgroup-bpf attach flags used in BPF_PROG_ATTACH command
246 *260 *
247 * NONE(default): No further bpf programs allowed in the subtree.261 * NONE(default): No further bpf programs allowed in the subtree.
@@ -603,7 +617,10 @@ union bpf_attr { · 355 unmodified lines
603 617
604 struct { /* struct used by BPF_LINK_CREATE command */618 struct { /* struct used by BPF_LINK_CREATE command */
605 __u32 prog_fd; /* eBPF program to attach */619 __u32 prog_fd; /* eBPF program to attach */
606 __u32 target_fd; /* object to attach to */620 union {
621 __u32 target_fd; /* object to attach to */
622 __u32 target_ifindex; /* target ifindex */
623 };
607 __u32 attach_type; /* attach type */624 __u32 attach_type; /* attach type */
608 __u32 flags; /* extra flags */625 __u32 flags; /* extra flags */
609 } link_create;626 } link_create;
@@ -618,6 +635,10 @@ union bpf_attr { · 8 unmodified lines
618 __u32 old_prog_fd;635 __u32 old_prog_fd;
619 } link_update;636 } link_update;
620 637
638 struct {
639 __u32 link_fd;
640 } link_detach;
641
621 struct { /* struct used by BPF_ENABLE_STATS command */642 struct { /* struct used by BPF_ENABLE_STATS command */
622 __u32 type;643 __u32 type;
623 } enable_stats;644 } enable_stats;
@@ -653,7 +674,7 @@ union bpf_attr { · 29 unmodified lines
653 * Map value associated to *key*, or **NULL** if no entry was674 * Map value associated to *key*, or **NULL** if no entry was
654 * found.675 * found.
655 *676 *
656 * int bpf_map_update_elem(struct bpf_map *map, const void *key, const void *value, u64 flags)677 * long bpf_map_update_elem(struct bpf_map *map, const void *key, const void *value, u64 flags)
657 * Description678 * Description
658 * Add or update the value of the entry associated to *key* in679 * Add or update the value of the entry associated to *key* in
659 * *map* with *value*. *flags* is one of:680 * *map* with *value*. *flags* is one of:
@@ -671,13 +692,13 @@ union bpf_attr { · 11 unmodified lines
671 * Return692 * Return
672 * 0 on success, or a negative error in case of failure.693 * 0 on success, or a negative error in case of failure.
673 *694 *
674 * int bpf_map_delete_elem(struct bpf_map *map, const void *key)695 * long bpf_map_delete_elem(struct bpf_map *map, const void *key)
675 * Description696 * Description
676 * Delete entry with *key* from *map*.697 * Delete entry with *key* from *map*.
677 * Return698 * Return
678 * 0 on success, or a negative error in case of failure.699 * 0 on success, or a negative error in case of failure.
679 *700 *
680 * int bpf_probe_read(void *dst, u32 size, const void *unsafe_ptr)701 * long bpf_probe_read(void *dst, u32 size, const void *unsafe_ptr)
681 * Description702 * Description
682 * For tracing programs, safely attempt to read *size* bytes from703 * For tracing programs, safely attempt to read *size* bytes from
683 * kernel space address *unsafe_ptr* and store the data in *dst*.704 * kernel space address *unsafe_ptr* and store the data in *dst*.
@@ -695,7 +716,7 @@ union bpf_attr { · 11 unmodified lines
695 * Return716 * Return
696 * Current *ktime*.717 * Current *ktime*.
697 *718 *
698 * int bpf_trace_printk(const char *fmt, u32 fmt_size, ...)719 * long bpf_trace_printk(const char *fmt, u32 fmt_size, ...)
699 * Description720 * Description
700 * This helper is a "printk()-like" facility for debugging. It721 * This helper is a "printk()-like" facility for debugging. It
701 * prints a message defined by format *fmt* (of size *fmt_size*)722 * prints a message defined by format *fmt* (of size *fmt_size*)
@@ -775,7 +796,7 @@ union bpf_attr { · 73 unmodified lines
775 * Return796 * Return
776 * The SMP id of the processor running the program.797 * The SMP id of the processor running the program.
777 *798 *
778 * int bpf_skb_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len, u64 flags)799 * long bpf_skb_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len, u64 flags)
779 * Description800 * Description
780 * Store *len* bytes from address *from* into the packet801 * Store *len* bytes from address *from* into the packet
781 * associated to *skb*, at *offset*. *flags* are a combination of802 * associated to *skb*, at *offset*. *flags* are a combination of
@@ -792,7 +813,7 @@ union bpf_attr { · 10 unmodified lines
792 * Return813 * Return
793 * 0 on success, or a negative error in case of failure.814 * 0 on success, or a negative error in case of failure.
794 *815 *
795 * int bpf_l3_csum_replace(struct sk_buff *skb, u32 offset, u64 from, u64 to, u64 size)816 * long bpf_l3_csum_replace(struct sk_buff *skb, u32 offset, u64 from, u64 to, u64 size)
796 * Description817 * Description
797 * Recompute the layer 3 (e.g. IP) checksum for the packet818 * Recompute the layer 3 (e.g. IP) checksum for the packet
798 * associated to *skb*. Computation is incremental, so the helper819 * associated to *skb*. Computation is incremental, so the helper
@@ -817,7 +838,7 @@ union bpf_attr { · 18 unmodified lines
817 * Return838 * Return
818 * 0 on success, or a negative error in case of failure.839 * 0 on success, or a negative error in case of failure.
819 *840 *
820 * int bpf_l4_csum_replace(struct sk_buff *skb, u32 offset, u64 from, u64 to, u64 flags)841 * long bpf_l4_csum_replace(struct sk_buff *skb, u32 offset, u64 from, u64 to, u64 flags)
821 * Description842 * Description
822 * Recompute the layer 4 (e.g. TCP, UDP or ICMP) checksum for the843 * Recompute the layer 4 (e.g. TCP, UDP or ICMP) checksum for the
823 * packet associated to *skb*. Computation is incremental, so the844 * packet associated to *skb*. Computation is incremental, so the
@@ -849,7 +870,7 @@ union bpf_attr { · 25 unmodified lines
849 * Return870 * Return
850 * 0 on success, or a negative error in case of failure.871 * 0 on success, or a negative error in case of failure.
851 *872 *
852 * int bpf_tail_call(void *ctx, struct bpf_map *prog_array_map, u32 index)873 * long bpf_tail_call(void *ctx, struct bpf_map *prog_array_map, u32 index)
853 * Description874 * Description
854 * This special helper is used to trigger a "tail call", or in875 * This special helper is used to trigger a "tail call", or in
855 * other words, to jump into another eBPF program. The same stack876 * other words, to jump into another eBPF program. The same stack
@@ -880,7 +901,7 @@ union bpf_attr { · 24 unmodified lines
880 * Return901 * Return
881 * 0 on success, or a negative error in case of failure.902 * 0 on success, or a negative error in case of failure.
882 *903 *
883 * int bpf_clone_redirect(struct sk_buff *skb, u32 ifindex, u64 flags)904 * long bpf_clone_redirect(struct sk_buff *skb, u32 ifindex, u64 flags)
884 * Description905 * Description
885 * Clone and redirect the packet associated to *skb* to another906 * Clone and redirect the packet associated to *skb* to another
886 * net device of index *ifindex*. Both ingress and egress907 * net device of index *ifindex*. Both ingress and egress
@@ -916,7 +937,7 @@ union bpf_attr { · 29 unmodified lines
916 * A 64-bit integer containing the current GID and UID, and937 * A 64-bit integer containing the current GID and UID, and
917 * created as such: *current_gid* **<< 32 \|** *current_uid*.938 * created as such: *current_gid* **<< 32 \|** *current_uid*.
918 *939 *
919 * int bpf_get_current_comm(void *buf, u32 size_of_buf)940 * long bpf_get_current_comm(void *buf, u32 size_of_buf)
920 * Description941 * Description
921 * Copy the **comm** attribute of the current task into *buf* of942 * Copy the **comm** attribute of the current task into *buf* of
922 * *size_of_buf*. The **comm** attribute contains the name of943 * *size_of_buf*. The **comm** attribute contains the name of
@@ -953,7 +974,7 @@ union bpf_attr { · 30 unmodified lines
953 * Return974 * Return
954 * The classid, or 0 for the default unconfigured classid.975 * The classid, or 0 for the default unconfigured classid.
955 *976 *
956 * int bpf_skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci)977 * long bpf_skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci)
957 * Description978 * Description
958 * Push a *vlan_tci* (VLAN tag control information) of protocol979 * Push a *vlan_tci* (VLAN tag control information) of protocol
959 * *vlan_proto* to the packet associated to *skb*, then update980 * *vlan_proto* to the packet associated to *skb*, then update
@@ -969,7 +990,7 @@ union bpf_attr { · 9 unmodified lines
969 * Return990 * Return
970 * 0 on success, or a negative error in case of failure.991 * 0 on success, or a negative error in case of failure.
971 *992 *
972 * int bpf_skb_vlan_pop(struct sk_buff *skb)993 * long bpf_skb_vlan_pop(struct sk_buff *skb)
973 * Description994 * Description
974 * Pop a VLAN header from the packet associated to *skb*.995 * Pop a VLAN header from the packet associated to *skb*.
975 *996 *
@@ -981,7 +1002,7 @@ union bpf_attr { · 5 unmodified lines
981 * Return1002 * Return
982 * 0 on success, or a negative error in case of failure.1003 * 0 on success, or a negative error in case of failure.
983 *1004 *
984 * int bpf_skb_get_tunnel_key(struct sk_buff *skb, struct bpf_tunnel_key *key, u32 size, u64 flags)1005 * long bpf_skb_get_tunnel_key(struct sk_buff *skb, struct bpf_tunnel_key *key, u32 size, u64 flags)
985 * Description1006 * Description
986 * Get tunnel metadata. This helper takes a pointer *key* to an1007 * Get tunnel metadata. This helper takes a pointer *key* to an
987 * empty **struct bpf_tunnel_key** of **size**, that will be1008 * empty **struct bpf_tunnel_key** of **size**, that will be
@@ -1032,7 +1053,7 @@ union bpf_attr { · 44 unmodified lines
1032 * Return1053 * Return
1033 * 0 on success, or a negative error in case of failure.1054 * 0 on success, or a negative error in case of failure.
1034 *1055 *
1035 * int bpf_skb_set_tunnel_key(struct sk_buff *skb, struct bpf_tunnel_key *key, u32 size, u64 flags)1056 * long bpf_skb_set_tunnel_key(struct sk_buff *skb, struct bpf_tunnel_key *key, u32 size, u64 flags)
1036 * Description1057 * Description
1037 * Populate tunnel metadata for packet associated to *skb.* The1058 * Populate tunnel metadata for packet associated to *skb.* The
1038 * tunnel metadata is set to the contents of *key*, of *size*. The1059 * tunnel metadata is set to the contents of *key*, of *size*. The
@@ -1098,7 +1119,7 @@ union bpf_attr { · 59 unmodified lines
1098 * The value of the perf event counter read from the map, or a1119 * The value of the perf event counter read from the map, or a
1099 * negative error code in case of failure.1120 * negative error code in case of failure.
1100 *1121 *
1101 * int bpf_redirect(u32 ifindex, u64 flags)1122 * long bpf_redirect(u32 ifindex, u64 flags)
1102 * Description1123 * Description
1103 * Redirect the packet to another net device of index *ifindex*.1124 * Redirect the packet to another net device of index *ifindex*.
1104 * This helper is somewhat similar to **bpf_clone_redirect**\1125 * This helper is somewhat similar to **bpf_clone_redirect**\
@@ -1145,7 +1166,7 @@ union bpf_attr { · 40 unmodified lines
1145 * The realm of the route for the packet associated to *skb*, or 01166 * The realm of the route for the packet associated to *skb*, or 0
1146 * if none was found.1167 * if none was found.
1147 *1168 *
1148 * int bpf_perf_event_output(void *ctx, struct bpf_map *map, u64 flags, void *data, u64 size)1169 * long bpf_perf_event_output(void *ctx, struct bpf_map *map, u64 flags, void *data, u64 size)
1149 * Description1170 * Description
1150 * Write raw *data* blob into a special BPF perf event held by1171 * Write raw *data* blob into a special BPF perf event held by
1151 * *map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. This perf1172 * *map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. This perf
@@ -1190,7 +1211,7 @@ union bpf_attr { · 38 unmodified lines
1190 * Return1211 * Return
1191 * 0 on success, or a negative error in case of failure.1212 * 0 on success, or a negative error in case of failure.
1192 *1213 *
1193 * int bpf_skb_load_bytes(const void *skb, u32 offset, void *to, u32 len)1214 * long bpf_skb_load_bytes(const void *skb, u32 offset, void *to, u32 len)
1194 * Description1215 * Description
1195 * This helper was provided as an easy way to load data from a1216 * This helper was provided as an easy way to load data from a
1196 * packet. It can be used to load *len* bytes from *offset* from1217 * packet. It can be used to load *len* bytes from *offset* from
@@ -1207,7 +1228,7 @@ union bpf_attr { · 10 unmodified lines
1207 * Return1228 * Return
1208 * 0 on success, or a negative error in case of failure.1229 * 0 on success, or a negative error in case of failure.
1209 *1230 *
1210 * int bpf_get_stackid(void *ctx, struct bpf_map *map, u64 flags)1231 * long bpf_get_stackid(void *ctx, struct bpf_map *map, u64 flags)
1211 * Description1232 * Description
1212 * Walk a user or a kernel stack and return its id. To achieve1233 * Walk a user or a kernel stack and return its id. To achieve
1213 * this, the helper needs *ctx*, which is a pointer to the context1234 * this, the helper needs *ctx*, which is a pointer to the context
@@ -1276,7 +1297,7 @@ union bpf_attr { · 62 unmodified lines
1276 * The checksum result, or a negative error code in case of1297 * The checksum result, or a negative error code in case of
1277 * failure.1298 * failure.
1278 *1299 *
1279 * int bpf_skb_get_tunnel_opt(struct sk_buff *skb, void *opt, u32 size)1300 * long bpf_skb_get_tunnel_opt(struct sk_buff *skb, void *opt, u32 size)
1280 * Description1301 * Description
1281 * Retrieve tunnel options metadata for the packet associated to1302 * Retrieve tunnel options metadata for the packet associated to
1282 * *skb*, and store the raw tunnel option data to the buffer *opt*1303 * *skb*, and store the raw tunnel option data to the buffer *opt*
@@ -1294,7 +1315,7 @@ union bpf_attr { · 11 unmodified lines
1294 * Return1315 * Return
1295 * The size of the option data retrieved.1316 * The size of the option data retrieved.
1296 *1317 *
1297 * int bpf_skb_set_tunnel_opt(struct sk_buff *skb, void *opt, u32 size)1318 * long bpf_skb_set_tunnel_opt(struct sk_buff *skb, void *opt, u32 size)
1298 * Description1319 * Description
1299 * Set tunnel options metadata for the packet associated to *skb*1320 * Set tunnel options metadata for the packet associated to *skb*
1300 * to the option data contained in the raw buffer *opt* of *size*.1321 * to the option data contained in the raw buffer *opt* of *size*.
@@ -1304,7 +1325,7 @@ union bpf_attr { · 3 unmodified lines
1304 * Return1325 * Return
1305 * 0 on success, or a negative error in case of failure.1326 * 0 on success, or a negative error in case of failure.
1306 *1327 *
1307 * int bpf_skb_change_proto(struct sk_buff *skb, __be16 proto, u64 flags)1328 * long bpf_skb_change_proto(struct sk_buff *skb, __be16 proto, u64 flags)
1308 * Description1329 * Description
1309 * Change the protocol of the *skb* to *proto*. Currently1330 * Change the protocol of the *skb* to *proto*. Currently
1310 * supported are transition from IPv4 to IPv6, and from IPv6 to1331 * supported are transition from IPv4 to IPv6, and from IPv6 to
@@ -1331,7 +1352,7 @@ union bpf_attr { · 20 unmodified lines
1331 * Return1352 * Return
1332 * 0 on success, or a negative error in case of failure.1353 * 0 on success, or a negative error in case of failure.
1333 *1354 *
1334 * int bpf_skb_change_type(struct sk_buff *skb, u32 type)1355 * long bpf_skb_change_type(struct sk_buff *skb, u32 type)
1335 * Description1356 * Description
1336 * Change the packet type for the packet associated to *skb*. This1357 * Change the packet type for the packet associated to *skb*. This
1337 * comes down to setting *skb*\ **->pkt_type** to *type*, except1358 * comes down to setting *skb*\ **->pkt_type** to *type*, except
@@ -1358,7 +1379,7 @@ union bpf_attr { · 20 unmodified lines
1358 * Return1379 * Return
1359 * 0 on success, or a negative error in case of failure.1380 * 0 on success, or a negative error in case of failure.
1360 *1381 *
1361 * int bpf_skb_under_cgroup(struct sk_buff *skb, struct bpf_map *map, u32 index)1382 * long bpf_skb_under_cgroup(struct sk_buff *skb, struct bpf_map *map, u32 index)
1362 * Description1383 * Description
1363 * Check whether *skb* is a descendant of the cgroup2 held by1384 * Check whether *skb* is a descendant of the cgroup2 held by
1364 * *map* of type **BPF_MAP_TYPE_CGROUP_ARRAY**, at *index*.1385 * *map* of type **BPF_MAP_TYPE_CGROUP_ARRAY**, at *index*.
@@ -1389,7 +1410,7 @@ union bpf_attr { · 24 unmodified lines
1389 * Return1410 * Return
1390 * A pointer to the current task struct.1411 * A pointer to the current task struct.
1391 *1412 *
1392 * int bpf_probe_write_user(void *dst, const void *src, u32 len)1413 * long bpf_probe_write_user(void *dst, const void *src, u32 len)
1393 * Description1414 * Description
1394 * Attempt in a safe way to write *len* bytes from the buffer1415 * Attempt in a safe way to write *len* bytes from the buffer
1395 * *src* to *dst* in memory. It only works for threads that are in1416 * *src* to *dst* in memory. It only works for threads that are in
@@ -1408,7 +1429,7 @@ union bpf_attr { · 12 unmodified lines
1408 * Return1429 * Return
1409 * 0 on success, or a negative error in case of failure.1430 * 0 on success, or a negative error in case of failure.
1410 *1431 *
1411 * int bpf_current_task_under_cgroup(struct bpf_map *map, u32 index)1432 * long bpf_current_task_under_cgroup(struct bpf_map *map, u32 index)
1412 * Description1433 * Description
1413 * Check whether the probe is being run is the context of a given1434 * Check whether the probe is being run is the context of a given
1414 * subset of the cgroup2 hierarchy. The cgroup2 to test is held by1435 * subset of the cgroup2 hierarchy. The cgroup2 to test is held by
@@ -1420,7 +1441,7 @@ union bpf_attr { · 5 unmodified lines
1420 * * 1, if the *skb* task does not belong to the cgroup2.1441 * * 1, if the *skb* task does not belong to the cgroup2.
1421 * * A negative error code, if an error occurred.1442 * * A negative error code, if an error occurred.
1422 *1443 *
1423 * int bpf_skb_change_tail(struct sk_buff *skb, u32 len, u64 flags)1444 * long bpf_skb_change_tail(struct sk_buff *skb, u32 len, u64 flags)
1424 * Description1445 * Description
1425 * Resize (trim or grow) the packet associated to *skb* to the1446 * Resize (trim or grow) the packet associated to *skb* to the
1426 * new *len*. The *flags* are reserved for future usage, and must1447 * new *len*. The *flags* are reserved for future usage, and must
@@ -1444,7 +1465,7 @@ union bpf_attr { · 17 unmodified lines
1444 * Return1465 * Return
1445 * 0 on success, or a negative error in case of failure.1466 * 0 on success, or a negative error in case of failure.
1446 *1467 *
1447 * int bpf_skb_pull_data(struct sk_buff *skb, u32 len)1468 * long bpf_skb_pull_data(struct sk_buff *skb, u32 len)
1448 * Description1469 * Description
1449 * Pull in non-linear data in case the *skb* is non-linear and not1470 * Pull in non-linear data in case the *skb* is non-linear and not
1450 * all of *len* are part of the linear section. Make *len* bytes1471 * all of *len* are part of the linear section. Make *len* bytes
@@ -1500,7 +1521,7 @@ union bpf_attr { · 49 unmodified lines
1500 * recalculation the next time the kernel tries to access this1521 * recalculation the next time the kernel tries to access this
1501 * hash or when the **bpf_get_hash_recalc**\ () helper is called.1522 * hash or when the **bpf_get_hash_recalc**\ () helper is called.
1502 *1523 *
1503 * int bpf_get_numa_node_id(void)1524 * long bpf_get_numa_node_id(void)
1504 * Description1525 * Description
1505 * Return the id of the current NUMA node. The primary use case1526 * Return the id of the current NUMA node. The primary use case
1506 * for this helper is the selection of sockets for the local NUMA1527 * for this helper is the selection of sockets for the local NUMA
@@ -1511,7 +1532,7 @@ union bpf_attr { · 4 unmodified lines
1511 * Return1532 * Return
1512 * The id of current NUMA node.1533 * The id of current NUMA node.
1513 *1534 *
1514 * int bpf_skb_change_head(struct sk_buff *skb, u32 len, u64 flags)1535 * long bpf_skb_change_head(struct sk_buff *skb, u32 len, u64 flags)
1515 * Description1536 * Description
1516 * Grows headroom of packet associated to *skb* and adjusts the1537 * Grows headroom of packet associated to *skb* and adjusts the
1517 * offset of the MAC header accordingly, adding *len* bytes of1538 * offset of the MAC header accordingly, adding *len* bytes of
@@ -1532,7 +1553,7 @@ union bpf_attr { · 14 unmodified lines
1532 * Return1553 * Return
1533 * 0 on success, or a negative error in case of failure.1554 * 0 on success, or a negative error in case of failure.
1534 *1555 *
1535 * int bpf_xdp_adjust_head(struct xdp_buff *xdp_md, int delta)1556 * long bpf_xdp_adjust_head(struct xdp_buff *xdp_md, int delta)
1536 * Description1557 * Description
1537 * Adjust (move) *xdp_md*\ **->data** by *delta* bytes. Note that1558 * Adjust (move) *xdp_md*\ **->data** by *delta* bytes. Note that
1538 * it is possible to use a negative value for *delta*. This helper1559 * it is possible to use a negative value for *delta*. This helper
@@ -1547,7 +1568,7 @@ union bpf_attr { · 8 unmodified lines
1547 * Return1568 * Return
1548 * 0 on success, or a negative error in case of failure.1569 * 0 on success, or a negative error in case of failure.
1549 *1570 *
1550 * int bpf_probe_read_str(void *dst, u32 size, const void *unsafe_ptr)1571 * long bpf_probe_read_str(void *dst, u32 size, const void *unsafe_ptr)
1551 * Description1572 * Description
1552 * Copy a NUL terminated string from an unsafe kernel address1573 * Copy a NUL terminated string from an unsafe kernel address
1553 * *unsafe_ptr* to *dst*. See **bpf_probe_read_kernel_str**\ () for1574 * *unsafe_ptr* to *dst*. See **bpf_probe_read_kernel_str**\ () for
@@ -1595,14 +1616,14 @@ union bpf_attr { · 41 unmodified lines
1595 * is returned (note that **overflowuid** might also be the actual1616 * is returned (note that **overflowuid** might also be the actual
1596 * UID value for the socket).1617 * UID value for the socket).
1597 *1618 *
1598 * u32 bpf_set_hash(struct sk_buff *skb, u32 hash)1619 * long bpf_set_hash(struct sk_buff *skb, u32 hash)
1599 * Description1620 * Description
1600 * Set the full hash for *skb* (set the field *skb*\ **->hash**)1621 * Set the full hash for *skb* (set the field *skb*\ **->hash**)
1601 * to value *hash*.1622 * to value *hash*.
1602 * Return1623 * Return
1603 * 01624 * 0
1604 *1625 *
1605 * int bpf_setsockopt(void *bpf_socket, int level, int optname, void *optval, int optlen)1626 * long bpf_setsockopt(void *bpf_socket, int level, int optname, void *optval, int optlen)
1606 * Description1627 * Description
1607 * Emulate a call to **setsockopt()** on the socket associated to1628 * Emulate a call to **setsockopt()** on the socket associated to
1608 * *bpf_socket*, which must be a full socket. The *level* at1629 * *bpf_socket*, which must be a full socket. The *level* at
@@ -1621,16 +1642,19 @@ union bpf_attr { · 12 unmodified lines
1621 *1642 *
1622 * * **SOL_SOCKET**, which supports the following *optname*\ s:1643 * * **SOL_SOCKET**, which supports the following *optname*\ s:
1623 * **SO_RCVBUF**, **SO_SNDBUF**, **SO_MAX_PACING_RATE**,1644 * **SO_RCVBUF**, **SO_SNDBUF**, **SO_MAX_PACING_RATE**,
1624 * **SO_PRIORITY**, **SO_RCVLOWAT**, **SO_MARK**.1645 * **SO_PRIORITY**, **SO_RCVLOWAT**, **SO_MARK**,
1646 * **SO_BINDTODEVICE**, **SO_KEEPALIVE**.
1625 * * **IPPROTO_TCP**, which supports the following *optname*\ s:1647 * * **IPPROTO_TCP**, which supports the following *optname*\ s:
1626 * **TCP_CONGESTION**, **TCP_BPF_IW**,1648 * **TCP_CONGESTION**, **TCP_BPF_IW**,
1627 * **TCP_BPF_SNDCWND_CLAMP**.1649 * **TCP_BPF_SNDCWND_CLAMP**, **TCP_SAVE_SYN**,
1650 * **TCP_KEEPIDLE**, **TCP_KEEPINTVL**, **TCP_KEEPCNT**,
1651 * **TCP_SYNCNT**, **TCP_USER_TIMEOUT**.
1628 * * **IPPROTO_IP**, which supports *optname* **IP_TOS**.1652 * * **IPPROTO_IP**, which supports *optname* **IP_TOS**.
1629 * * **IPPROTO_IPV6**, which supports *optname* **IPV6_TCLASS**.1653 * * **IPPROTO_IPV6**, which supports *optname* **IPV6_TCLASS**.
1630 * Return1654 * Return
1631 * 0 on success, or a negative error in case of failure.1655 * 0 on success, or a negative error in case of failure.
1632 *1656 *
1633 * int bpf_skb_adjust_room(struct sk_buff *skb, s32 len_diff, u32 mode, u64 flags)1657 * long bpf_skb_adjust_room(struct sk_buff *skb, s32 len_diff, u32 mode, u64 flags)
1634 * Description1658 * Description
1635 * Grow or shrink the room for data in the packet associated to1659 * Grow or shrink the room for data in the packet associated to
1636 * *skb* by *len_diff*, and according to the selected *mode*.1660 * *skb* by *len_diff*, and according to the selected *mode*.
@@ -1676,7 +1700,7 @@ union bpf_attr { · 39 unmodified lines
1676 * Return1700 * Return
1677 * 0 on success, or a negative error in case of failure.1701 * 0 on success, or a negative error in case of failure.
1678 *1702 *
1679 * int bpf_redirect_map(struct bpf_map *map, u32 key, u64 flags)1703 * long bpf_redirect_map(struct bpf_map *map, u32 key, u64 flags)
1680 * Description1704 * Description
1681 * Redirect the packet to the endpoint referenced by *map* at1705 * Redirect the packet to the endpoint referenced by *map* at
1682 * index *key*. Depending on its type, this *map* can contain1706 * index *key*. Depending on its type, this *map* can contain
@@ -1697,7 +1721,7 @@ union bpf_attr { · 14 unmodified lines
1697 * **XDP_REDIRECT** on success, or the value of the two lower bits1721 * **XDP_REDIRECT** on success, or the value of the two lower bits
1698 * of the *flags* argument on error.1722 * of the *flags* argument on error.
1699 *1723 *
1700 * int bpf_sk_redirect_map(struct sk_buff *skb, struct bpf_map *map, u32 key, u64 flags)1724 * long bpf_sk_redirect_map(struct sk_buff *skb, struct bpf_map *map, u32 key, u64 flags)
1701 * Description1725 * Description
1702 * Redirect the packet to the socket referenced by *map* (of type1726 * Redirect the packet to the socket referenced by *map* (of type
1703 * **BPF_MAP_TYPE_SOCKMAP**) at index *key*. Both ingress and1727 * **BPF_MAP_TYPE_SOCKMAP**) at index *key*. Both ingress and
@@ -1708,7 +1732,7 @@ union bpf_attr { · 4 unmodified lines
1708 * Return1732 * Return
1709 * **SK_PASS** on success, or **SK_DROP** on error.1733 * **SK_PASS** on success, or **SK_DROP** on error.
1710 *1734 *
1711 * int bpf_sock_map_update(struct bpf_sock_ops *skops, struct bpf_map *map, void *key, u64 flags)1735 * long bpf_sock_map_update(struct bpf_sock_ops *skops, struct bpf_map *map, void *key, u64 flags)
1712 * Description1736 * Description
1713 * Add an entry to, or update a *map* referencing sockets. The1737 * Add an entry to, or update a *map* referencing sockets. The
1714 * *skops* is used as a new value for the entry associated to1738 * *skops* is used as a new value for the entry associated to
@@ -1727,7 +1751,7 @@ union bpf_attr { · 12 unmodified lines
1727 * Return1751 * Return
1728 * 0 on success, or a negative error in case of failure.1752 * 0 on success, or a negative error in case of failure.
1729 *1753 *
1730 * int bpf_xdp_adjust_meta(struct xdp_buff *xdp_md, int delta)1754 * long bpf_xdp_adjust_meta(struct xdp_buff *xdp_md, int delta)
1731 * Description1755 * Description
1732 * Adjust the address pointed by *xdp_md*\ **->data_meta** by1756 * Adjust the address pointed by *xdp_md*\ **->data_meta** by
1733 * *delta* (which can be positive or negative). Note that this1757 * *delta* (which can be positive or negative). Note that this
@@ -1756,7 +1780,7 @@ union bpf_attr { · 22 unmodified lines
1756 * Return1780 * Return
1757 * 0 on success, or a negative error in case of failure.1781 * 0 on success, or a negative error in case of failure.
1758 *1782 *
1759 * int bpf_perf_event_read_value(struct bpf_map *map, u64 flags, struct bpf_perf_event_value *buf, u32 buf_size)1783 * long bpf_perf_event_read_value(struct bpf_map *map, u64 flags, struct bpf_perf_event_value *buf, u32 buf_size)
1760 * Description1784 * Description
1761 * Read the value of a perf event counter, and store it into *buf*1785 * Read the value of a perf event counter, and store it into *buf*
1762 * of size *buf_size*. This helper relies on a *map* of type1786 * of size *buf_size*. This helper relies on a *map* of type
@@ -1806,7 +1830,7 @@ union bpf_attr { · 43 unmodified lines
1806 * Return1830 * Return
1807 * 0 on success, or a negative error in case of failure.1831 * 0 on success, or a negative error in case of failure.
1808 *1832 *
1809 * int bpf_perf_prog_read_value(struct bpf_perf_event_data *ctx, struct bpf_perf_event_value *buf, u32 buf_size)1833 * long bpf_perf_prog_read_value(struct bpf_perf_event_data *ctx, struct bpf_perf_event_value *buf, u32 buf_size)
1810 * Description1834 * Description
1811 * For en eBPF program attached to a perf event, retrieve the1835 * For en eBPF program attached to a perf event, retrieve the
1812 * value of the event counter associated to *ctx* and store it in1836 * value of the event counter associated to *ctx* and store it in
@@ -1817,7 +1841,7 @@ union bpf_attr { · 4 unmodified lines
1817 * Return1841 * Return
1818 * 0 on success, or a negative error in case of failure.1842 * 0 on success, or a negative error in case of failure.
1819 *1843 *
1820 * int bpf_getsockopt(void *bpf_socket, int level, int optname, void *optval, int optlen)1844 * long bpf_getsockopt(void *bpf_socket, int level, int optname, void *optval, int optlen)
1821 * Description1845 * Description
1822 * Emulate a call to **getsockopt()** on the socket associated to1846 * Emulate a call to **getsockopt()** on the socket associated to
1823 * *bpf_socket*, which must be a full socket. The *level* at1847 * *bpf_socket*, which must be a full socket. The *level* at
@@ -1842,7 +1866,7 @@ union bpf_attr { · 18 unmodified lines
1842 * Return1866 * Return
1843 * 0 on success, or a negative error in case of failure.1867 * 0 on success, or a negative error in case of failure.
1844 *1868 *
1845 * int bpf_override_return(struct pt_regs *regs, u64 rc)1869 * long bpf_override_return(struct pt_regs *regs, u64 rc)
1846 * Description1870 * Description
1847 * Used for error injection, this helper uses kprobes to override1871 * Used for error injection, this helper uses kprobes to override
1848 * the return value of the probed function, and to set it to *rc*.1872 * the return value of the probed function, and to set it to *rc*.
@@ -1867,7 +1891,7 @@ union bpf_attr { · 18 unmodified lines
1867 * Return1891 * Return
1868 * 01892 * 0
1869 *1893 *
1870 * int bpf_sock_ops_cb_flags_set(struct bpf_sock_ops *bpf_sock, int argval)1894 * long bpf_sock_ops_cb_flags_set(struct bpf_sock_ops *bpf_sock, int argval)
1871 * Description1895 * Description
1872 * Attempt to set the value of the **bpf_sock_ops_cb_flags** field1896 * Attempt to set the value of the **bpf_sock_ops_cb_flags** field
1873 * for the full TCP socket associated to *bpf_sock_ops* to1897 * for the full TCP socket associated to *bpf_sock_ops* to
@@ -1911,7 +1935,7 @@ union bpf_attr { · 37 unmodified lines
1911 * be set is returned (which comes down to 0 if all bits were set1935 * be set is returned (which comes down to 0 if all bits were set
1912 * as required).1936 * as required).
1913 *1937 *
1914 * int bpf_msg_redirect_map(struct sk_msg_buff *msg, struct bpf_map *map, u32 key, u64 flags)1938 * long bpf_msg_redirect_map(struct sk_msg_buff *msg, struct bpf_map *map, u32 key, u64 flags)
1915 * Description1939 * Description
1916 * This helper is used in programs implementing policies at the1940 * This helper is used in programs implementing policies at the
1917 * socket level. If the message *msg* is allowed to pass (i.e. if1941 * socket level. If the message *msg* is allowed to pass (i.e. if
@@ -1925,7 +1949,7 @@ union bpf_attr { · 7 unmodified lines
1925 * Return1949 * Return
1926 * **SK_PASS** on success, or **SK_DROP** on error.1950 * **SK_PASS** on success, or **SK_DROP** on error.
1927 *1951 *
1928 * int bpf_msg_apply_bytes(struct sk_msg_buff *msg, u32 bytes)1952 * long bpf_msg_apply_bytes(struct sk_msg_buff *msg, u32 bytes)
1929 * Description1953 * Description
1930 * For socket policies, apply the verdict of the eBPF program to1954 * For socket policies, apply the verdict of the eBPF program to
1931 * the next *bytes* (number of bytes) of message *msg*.1955 * the next *bytes* (number of bytes) of message *msg*.
@@ -1959,7 +1983,7 @@ union bpf_attr { · 27 unmodified lines
1959 * Return1983 * Return
1960 * 01984 * 0
1961 *1985 *
1962 * int bpf_msg_cork_bytes(struct sk_msg_buff *msg, u32 bytes)1986 * long bpf_msg_cork_bytes(struct sk_msg_buff *msg, u32 bytes)
1963 * Description1987 * Description
1964 * For socket policies, prevent the execution of the verdict eBPF1988 * For socket policies, prevent the execution of the verdict eBPF
1965 * program for message *msg* until *bytes* (byte number) have been1989 * program for message *msg* until *bytes* (byte number) have been
@@ -1977,7 +2001,7 @@ union bpf_attr { · 11 unmodified lines
1977 * Return2001 * Return
1978 * 02002 * 0
1979 *2003 *
1980 * int bpf_msg_pull_data(struct sk_msg_buff *msg, u32 start, u32 end, u64 flags)2004 * long bpf_msg_pull_data(struct sk_msg_buff *msg, u32 start, u32 end, u64 flags)
1981 * Description2005 * Description
1982 * For socket policies, pull in non-linear data from user space2006 * For socket policies, pull in non-linear data from user space
1983 * for *msg* and set pointers *msg*\ **->data** and *msg*\2007 * for *msg* and set pointers *msg*\ **->data** and *msg*\
@@ -2008,7 +2032,7 @@ union bpf_attr { · 24 unmodified lines
2008 * Return2032 * Return
2009 * 0 on success, or a negative error in case of failure.2033 * 0 on success, or a negative error in case of failure.
2010 *2034 *
2011 * int bpf_bind(struct bpf_sock_addr *ctx, struct sockaddr *addr, int addr_len)2035 * long bpf_bind(struct bpf_sock_addr *ctx, struct sockaddr *addr, int addr_len)
2012 * Description2036 * Description
2013 * Bind the socket associated to *ctx* to the address pointed by2037 * Bind the socket associated to *ctx* to the address pointed by
2014 * *addr*, of length *addr_len*. This allows for making outgoing2038 * *addr*, of length *addr_len*. This allows for making outgoing
@@ -2026,7 +2050,7 @@ union bpf_attr { · 11 unmodified lines
2026 * Return2050 * Return
2027 * 0 on success, or a negative error in case of failure.2051 * 0 on success, or a negative error in case of failure.
2028 *2052 *
2029 * int bpf_xdp_adjust_tail(struct xdp_buff *xdp_md, int delta)2053 * long bpf_xdp_adjust_tail(struct xdp_buff *xdp_md, int delta)
2030 * Description2054 * Description
2031 * Adjust (move) *xdp_md*\ **->data_end** by *delta* bytes. It is2055 * Adjust (move) *xdp_md*\ **->data_end** by *delta* bytes. It is
2032 * possible to both shrink and grow the packet tail.2056 * possible to both shrink and grow the packet tail.
@@ -2040,7 +2064,7 @@ union bpf_attr { · 7 unmodified lines
2040 * Return2064 * Return
2041 * 0 on success, or a negative error in case of failure.2065 * 0 on success, or a negative error in case of failure.
2042 *2066 *
2043 * int bpf_skb_get_xfrm_state(struct sk_buff *skb, u32 index, struct bpf_xfrm_state *xfrm_state, u32 size, u64 flags)2067 * long bpf_skb_get_xfrm_state(struct sk_buff *skb, u32 index, struct bpf_xfrm_state *xfrm_state, u32 size, u64 flags)
2044 * Description2068 * Description
2045 * Retrieve the XFRM state (IP transform framework, see also2069 * Retrieve the XFRM state (IP transform framework, see also
2046 * **ip-xfrm(8)**) at *index* in XFRM "security path" for *skb*.2070 * **ip-xfrm(8)**) at *index* in XFRM "security path" for *skb*.
@@ -2056,7 +2080,7 @@ union bpf_attr { · 9 unmodified lines
2056 * Return2080 * Return
2057 * 0 on success, or a negative error in case of failure.2081 * 0 on success, or a negative error in case of failure.
2058 *2082 *
2059 * int bpf_get_stack(void *ctx, void *buf, u32 size, u64 flags)2083 * long bpf_get_stack(void *ctx, void *buf, u32 size, u64 flags)
2060 * Description2084 * Description
2061 * Return a user or a kernel stack in bpf program provided buffer.2085 * Return a user or a kernel stack in bpf program provided buffer.
2062 * To achieve this, the helper needs *ctx*, which is a pointer2086 * To achieve this, the helper needs *ctx*, which is a pointer
@@ -2089,7 +2113,7 @@ union bpf_attr { · 26 unmodified lines
2089 * A non-negative value equal to or less than *size* on success,2113 * A non-negative value equal to or less than *size* on success,
2090 * or a negative error in case of failure.2114 * or a negative error in case of failure.
2091 *2115 *
2092 * int bpf_skb_load_bytes_relative(const void *skb, u32 offset, void *to, u32 len, u32 start_header)2116 * long bpf_skb_load_bytes_relative(const void *skb, u32 offset, void *to, u32 len, u32 start_header)
2093 * Description2117 * Description
2094 * This helper is similar to **bpf_skb_load_bytes**\ () in that2118 * This helper is similar to **bpf_skb_load_bytes**\ () in that
2095 * it provides an easy way to load *len* bytes from *offset*2119 * it provides an easy way to load *len* bytes from *offset*
@@ -2111,7 +2135,7 @@ union bpf_attr { · 15 unmodified lines
2111 * Return2135 * Return
2112 * 0 on success, or a negative error in case of failure.2136 * 0 on success, or a negative error in case of failure.
2113 *2137 *
2114 * int bpf_fib_lookup(void *ctx, struct bpf_fib_lookup *params, int plen, u32 flags)2138 * long bpf_fib_lookup(void *ctx, struct bpf_fib_lookup *params, int plen, u32 flags)
2115 * Description2139 * Description
2116 * Do FIB lookup in kernel tables using parameters in *params*.2140 * Do FIB lookup in kernel tables using parameters in *params*.
2117 * If lookup is successful and result shows packet is to be2141 * If lookup is successful and result shows packet is to be
@@ -2142,7 +2166,7 @@ union bpf_attr { · 24 unmodified lines
2142 * * > 0 one of **BPF_FIB_LKUP_RET_** codes explaining why the2166 * * > 0 one of **BPF_FIB_LKUP_RET_** codes explaining why the
2143 * packet is not forwarded or needs assist from full stack2167 * packet is not forwarded or needs assist from full stack
2144 *2168 *
2145 * int bpf_sock_hash_update(struct bpf_sock_ops *skops, struct bpf_map *map, void *key, u64 flags)2169 * long bpf_sock_hash_update(struct bpf_sock_ops *skops, struct bpf_map *map, void *key, u64 flags)
2146 * Description2170 * Description
2147 * Add an entry to, or update a sockhash *map* referencing sockets.2171 * Add an entry to, or update a sockhash *map* referencing sockets.
2148 * The *skops* is used as a new value for the entry associated to2172 * The *skops* is used as a new value for the entry associated to
@@ -2161,7 +2185,7 @@ union bpf_attr { · 12 unmodified lines
2161 * Return2185 * Return
2162 * 0 on success, or a negative error in case of failure.2186 * 0 on success, or a negative error in case of failure.
2163 *2187 *
2164 * int bpf_msg_redirect_hash(struct sk_msg_buff *msg, struct bpf_map *map, void *key, u64 flags)2188 * long bpf_msg_redirect_hash(struct sk_msg_buff *msg, struct bpf_map *map, void *key, u64 flags)
2165 * Description2189 * Description
2166 * This helper is used in programs implementing policies at the2190 * This helper is used in programs implementing policies at the
2167 * socket level. If the message *msg* is allowed to pass (i.e. if2191 * socket level. If the message *msg* is allowed to pass (i.e. if
@@ -2175,7 +2199,7 @@ union bpf_attr { · 7 unmodified lines
2175 * Return2199 * Return
2176 * **SK_PASS** on success, or **SK_DROP** on error.2200 * **SK_PASS** on success, or **SK_DROP** on error.
2177 *2201 *
2178 * int bpf_sk_redirect_hash(struct sk_buff *skb, struct bpf_map *map, void *key, u64 flags)2202 * long bpf_sk_redirect_hash(struct sk_buff *skb, struct bpf_map *map, void *key, u64 flags)
2179 * Description2203 * Description
2180 * This helper is used in programs implementing policies at the2204 * This helper is used in programs implementing policies at the
2181 * skb socket level. If the sk_buff *skb* is allowed to pass (i.e.2205 * skb socket level. If the sk_buff *skb* is allowed to pass (i.e.
@@ -2189,7 +2213,7 @@ union bpf_attr { · 7 unmodified lines
2189 * Return2213 * Return
2190 * **SK_PASS** on success, or **SK_DROP** on error.2214 * **SK_PASS** on success, or **SK_DROP** on error.
2191 *2215 *
2192 * int bpf_lwt_push_encap(struct sk_buff *skb, u32 type, void *hdr, u32 len)2216 * long bpf_lwt_push_encap(struct sk_buff *skb, u32 type, void *hdr, u32 len)
2193 * Description2217 * Description
2194 * Encapsulate the packet associated to *skb* within a Layer 32218 * Encapsulate the packet associated to *skb* within a Layer 3
2195 * protocol header. This header is provided in the buffer at2219 * protocol header. This header is provided in the buffer at
@@ -2226,7 +2250,7 @@ union bpf_attr { · 30 unmodified lines
2226 * Return2250 * Return
2227 * 0 on success, or a negative error in case of failure.2251 * 0 on success, or a negative error in case of failure.
2228 *2252 *
2229 * int bpf_lwt_seg6_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len)2253 * long bpf_lwt_seg6_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len)
2230 * Description2254 * Description
2231 * Store *len* bytes from address *from* into the packet2255 * Store *len* bytes from address *from* into the packet
2232 * associated to *skb*, at *offset*. Only the flags, tag and TLVs2256 * associated to *skb*, at *offset*. Only the flags, tag and TLVs
@@ -2241,7 +2265,7 @@ union bpf_attr { · 8 unmodified lines
2241 * Return2265 * Return
2242 * 0 on success, or a negative error in case of failure.2266 * 0 on success, or a negative error in case of failure.
2243 *2267 *
2244 * int bpf_lwt_seg6_adjust_srh(struct sk_buff *skb, u32 offset, s32 delta)2268 * long bpf_lwt_seg6_adjust_srh(struct sk_buff *skb, u32 offset, s32 delta)
2245 * Description2269 * Description
2246 * Adjust the size allocated to TLVs in the outermost IPv62270 * Adjust the size allocated to TLVs in the outermost IPv6
2247 * Segment Routing Header contained in the packet associated to2271 * Segment Routing Header contained in the packet associated to
@@ -2257,7 +2281,7 @@ union bpf_attr { · 9 unmodified lines
2257 * Return2281 * Return
2258 * 0 on success, or a negative error in case of failure.2282 * 0 on success, or a negative error in case of failure.
2259 *2283 *
2260 * int bpf_lwt_seg6_action(struct sk_buff *skb, u32 action, void *param, u32 param_len)2284 * long bpf_lwt_seg6_action(struct sk_buff *skb, u32 action, void *param, u32 param_len)
2261 * Description2285 * Description
2262 * Apply an IPv6 Segment Routing action of type *action* to the2286 * Apply an IPv6 Segment Routing action of type *action* to the
2263 * packet associated to *skb*. Each action takes a parameter2287 * packet associated to *skb*. Each action takes a parameter
@@ -2286,7 +2310,7 @@ union bpf_attr { · 22 unmodified lines
2286 * Return2310 * Return
2287 * 0 on success, or a negative error in case of failure.2311 * 0 on success, or a negative error in case of failure.
2288 *2312 *
2289 * int bpf_rc_repeat(void *ctx)2313 * long bpf_rc_repeat(void *ctx)
2290 * Description2314 * Description
2291 * This helper is used in programs implementing IR decoding, to2315 * This helper is used in programs implementing IR decoding, to
2292 * report a successfully decoded repeat key message. This delays2316 * report a successfully decoded repeat key message. This delays
@@ -2305,7 +2329,7 @@ union bpf_attr { · 12 unmodified lines
2305 * Return2329 * Return
2306 * 02330 * 0
2307 *2331 *
2308 * int bpf_rc_keydown(void *ctx, u32 protocol, u64 scancode, u32 toggle)2332 * long bpf_rc_keydown(void *ctx, u32 protocol, u64 scancode, u32 toggle)
2309 * Description2333 * Description
2310 * This helper is used in programs implementing IR decoding, to2334 * This helper is used in programs implementing IR decoding, to
2311 * report a successfully decoded key press with *scancode*,2335 * report a successfully decoded key press with *scancode*,
@@ -2370,7 +2394,7 @@ union bpf_attr { · 58 unmodified lines
2370 * Return2394 * Return
2371 * A pointer to the local storage area.2395 * A pointer to the local storage area.
2372 *2396 *
2373 * int bpf_sk_select_reuseport(struct sk_reuseport_md *reuse, struct bpf_map *map, void *key, u64 flags)2397 * long bpf_sk_select_reuseport(struct sk_reuseport_md *reuse, struct bpf_map *map, void *key, u64 flags)
2374 * Description2398 * Description
2375 * Select a **SO_REUSEPORT** socket from a2399 * Select a **SO_REUSEPORT** socket from a
2376 * **BPF_MAP_TYPE_REUSEPORT_ARRAY** *map*.2400 * **BPF_MAP_TYPE_REUSEPORT_ARRAY** *map*.
@@ -2415,7 +2439,7 @@ union bpf_attr { · 38 unmodified lines
2415 * Look for an IPv6 socket.2439 * Look for an IPv6 socket.
2416 *2440 *
2417 * If the *netns* is a negative signed 32-bit integer, then the2441 * If the *netns* is a negative signed 32-bit integer, then the
2418 * socket lookup table in the netns associated with the *ctx* will2442 * socket lookup table in the netns associated with the *ctx*
2419 * will be used. For the TC hooks, this is the netns of the device2443 * will be used. For the TC hooks, this is the netns of the device
2420 * in the skb. For socket hooks, this is the netns of the socket.2444 * in the skb. For socket hooks, this is the netns of the socket.
2421 * If *netns* is any other signed 32-bit value greater than or2445 * If *netns* is any other signed 32-bit value greater than or
@@ -2452,7 +2476,7 @@ union bpf_attr { · 30 unmodified lines
2452 * Look for an IPv6 socket.2476 * Look for an IPv6 socket.
2453 *2477 *
2454 * If the *netns* is a negative signed 32-bit integer, then the2478 * If the *netns* is a negative signed 32-bit integer, then the
2455 * socket lookup table in the netns associated with the *ctx* will2479 * socket lookup table in the netns associated with the *ctx*
2456 * will be used. For the TC hooks, this is the netns of the device2480 * will be used. For the TC hooks, this is the netns of the device
2457 * in the skb. For socket hooks, this is the netns of the socket.2481 * in the skb. For socket hooks, this is the netns of the socket.
2458 * If *netns* is any other signed 32-bit value greater than or2482 * If *netns* is any other signed 32-bit value greater than or
@@ -2471,7 +2495,7 @@ union bpf_attr { · 12 unmodified lines
2471 * result is from *reuse*\ **->socks**\ [] using the hash of the2495 * result is from *reuse*\ **->socks**\ [] using the hash of the
2472 * tuple.2496 * tuple.
2473 *2497 *
2474 * int bpf_sk_release(struct bpf_sock *sock)2498 * long bpf_sk_release(struct bpf_sock *sock)
2475 * Description2499 * Description
2476 * Release the reference held by *sock*. *sock* must be a2500 * Release the reference held by *sock*. *sock* must be a
2477 * non-**NULL** pointer that was returned from2501 * non-**NULL** pointer that was returned from
@@ -2479,7 +2503,7 @@ union bpf_attr { · 1 unmodified line
2479 * Return2503 * Return
2480 * 0 on success, or a negative error in case of failure.2504 * 0 on success, or a negative error in case of failure.
2481 *2505 *
2482 * int bpf_map_push_elem(struct bpf_map *map, const void *value, u64 flags)2506 * long bpf_map_push_elem(struct bpf_map *map, const void *value, u64 flags)
2483 * Description2507 * Description
2484 * Push an element *value* in *map*. *flags* is one of:2508 * Push an element *value* in *map*. *flags* is one of:
2485 *2509 *
@@ -2489,19 +2513,19 @@ union bpf_attr { · 3 unmodified lines
2489 * Return2513 * Return
2490 * 0 on success, or a negative error in case of failure.2514 * 0 on success, or a negative error in case of failure.
2491 *2515 *
2492 * int bpf_map_pop_elem(struct bpf_map *map, void *value)2516 * long bpf_map_pop_elem(struct bpf_map *map, void *value)
2493 * Description2517 * Description
2494 * Pop an element from *map*.2518 * Pop an element from *map*.
2495 * Return2519 * Return
2496 * 0 on success, or a negative error in case of failure.2520 * 0 on success, or a negative error in case of failure.
2497 *2521 *
2498 * int bpf_map_peek_elem(struct bpf_map *map, void *value)2522 * long bpf_map_peek_elem(struct bpf_map *map, void *value)
2499 * Description2523 * Description
2500 * Get an element from *map* without removing it.2524 * Get an element from *map* without removing it.
2501 * Return2525 * Return
2502 * 0 on success, or a negative error in case of failure.2526 * 0 on success, or a negative error in case of failure.
2503 *2527 *
2504 * int bpf_msg_push_data(struct sk_msg_buff *msg, u32 start, u32 len, u64 flags)2528 * long bpf_msg_push_data(struct sk_msg_buff *msg, u32 start, u32 len, u64 flags)
2505 * Description2529 * Description
2506 * For socket policies, insert *len* bytes into *msg* at offset2530 * For socket policies, insert *len* bytes into *msg* at offset
2507 * *start*.2531 * *start*.
@@ -2517,7 +2541,7 @@ union bpf_attr { · 9 unmodified lines
2517 * Return2541 * Return
2518 * 0 on success, or a negative error in case of failure.2542 * 0 on success, or a negative error in case of failure.
2519 *2543 *
2520 * int bpf_msg_pop_data(struct sk_msg_buff *msg, u32 start, u32 len, u64 flags)2544 * long bpf_msg_pop_data(struct sk_msg_buff *msg, u32 start, u32 len, u64 flags)
2521 * Description2545 * Description
2522 * Will remove *len* bytes from a *msg* starting at byte *start*.2546 * Will remove *len* bytes from a *msg* starting at byte *start*.
2523 * This may result in **ENOMEM** errors under certain situations if2547 * This may result in **ENOMEM** errors under certain situations if
@@ -2529,7 +2553,7 @@ union bpf_attr { · 5 unmodified lines
2529 * Return2553 * Return
2530 * 0 on success, or a negative error in case of failure.2554 * 0 on success, or a negative error in case of failure.
2531 *2555 *
2532 * int bpf_rc_pointer_rel(void *ctx, s32 rel_x, s32 rel_y)2556 * long bpf_rc_pointer_rel(void *ctx, s32 rel_x, s32 rel_y)
2533 * Description2557 * Description
2534 * This helper is used in programs implementing IR decoding, to2558 * This helper is used in programs implementing IR decoding, to
2535 * report a successfully decoded pointer movement.2559 * report a successfully decoded pointer movement.
@@ -2543,7 +2567,7 @@ union bpf_attr { · 7 unmodified lines
2543 * Return2567 * Return
2544 * 02568 * 0
2545 *2569 *
2546 * int bpf_spin_lock(struct bpf_spin_lock *lock)2570 * long bpf_spin_lock(struct bpf_spin_lock *lock)
2547 * Description2571 * Description
2548 * Acquire a spinlock represented by the pointer *lock*, which is2572 * Acquire a spinlock represented by the pointer *lock*, which is
2549 * stored as part of a value of a map. Taking the lock allows to2573 * stored as part of a value of a map. Taking the lock allows to
@@ -2591,7 +2615,7 @@ union bpf_attr { · 41 unmodified lines
2591 * Return2615 * Return
2592 * 02616 * 0
2593 *2617 *
2594 * int bpf_spin_unlock(struct bpf_spin_lock *lock)2618 * long bpf_spin_unlock(struct bpf_spin_lock *lock)
2595 * Description2619 * Description
2596 * Release the *lock* previously locked by a call to2620 * Release the *lock* previously locked by a call to
2597 * **bpf_spin_lock**\ (\ *lock*\ ).2621 * **bpf_spin_lock**\ (\ *lock*\ ).
@@ -2614,7 +2638,7 @@ union bpf_attr { · 16 unmodified lines
2614 * A **struct bpf_tcp_sock** pointer on success, or **NULL** in2638 * A **struct bpf_tcp_sock** pointer on success, or **NULL** in
2615 * case of failure.2639 * case of failure.
2616 *2640 *
2617 * int bpf_skb_ecn_set_ce(struct sk_buff *skb)2641 * long bpf_skb_ecn_set_ce(struct sk_buff *skb)
2618 * Description2642 * Description
2619 * Set ECN (Explicit Congestion Notification) field of IP header2643 * Set ECN (Explicit Congestion Notification) field of IP header
2620 * to **CE** (Congestion Encountered) if current value is **ECT**2644 * to **CE** (Congestion Encountered) if current value is **ECT**
@@ -2651,7 +2675,7 @@ union bpf_attr { · 30 unmodified lines
2651 * result is from *reuse*\ **->socks**\ [] using the hash of the2675 * result is from *reuse*\ **->socks**\ [] using the hash of the
2652 * tuple.2676 * tuple.
2653 *2677 *
2654 * int bpf_tcp_check_syncookie(struct bpf_sock *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)2678 * long bpf_tcp_check_syncookie(struct bpf_sock *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
2655 * Description2679 * Description
2656 * Check whether *iph* and *th* contain a valid SYN cookie ACK for2680 * Check whether *iph* and *th* contain a valid SYN cookie ACK for
2657 * the listening socket in *sk*.2681 * the listening socket in *sk*.
@@ -2666,7 +2690,7 @@ union bpf_attr { · 8 unmodified lines
2666 * 0 if *iph* and *th* are a valid SYN cookie ACK, or a negative2690 * 0 if *iph* and *th* are a valid SYN cookie ACK, or a negative
2667 * error otherwise.2691 * error otherwise.
2668 *2692 *
2669 * int bpf_sysctl_get_name(struct bpf_sysctl *ctx, char *buf, size_t buf_len, u64 flags)2693 * long bpf_sysctl_get_name(struct bpf_sysctl *ctx, char *buf, size_t buf_len, u64 flags)
2670 * Description2694 * Description
2671 * Get name of sysctl in /proc/sys/ and copy it into provided by2695 * Get name of sysctl in /proc/sys/ and copy it into provided by
2672 * program buffer *buf* of size *buf_len*.2696 * program buffer *buf* of size *buf_len*.
@@ -2682,7 +2706,7 @@ union bpf_attr { · 9 unmodified lines
2682 * **-E2BIG** if the buffer wasn't big enough (*buf* will contain2706 * **-E2BIG** if the buffer wasn't big enough (*buf* will contain
2683 * truncated name in this case).2707 * truncated name in this case).
2684 *2708 *
2685 * int bpf_sysctl_get_current_value(struct bpf_sysctl *ctx, char *buf, size_t buf_len)2709 * long bpf_sysctl_get_current_value(struct bpf_sysctl *ctx, char *buf, size_t buf_len)
2686 * Description2710 * Description
2687 * Get current value of sysctl as it is presented in /proc/sys2711 * Get current value of sysctl as it is presented in /proc/sys
2688 * (incl. newline, etc), and copy it as a string into provided2712 * (incl. newline, etc), and copy it as a string into provided
@@ -2701,7 +2725,7 @@ union bpf_attr { · 12 unmodified lines
2701 * **-EINVAL** if current value was unavailable, e.g. because2725 * **-EINVAL** if current value was unavailable, e.g. because
2702 * sysctl is uninitialized and read returns -EIO for it.2726 * sysctl is uninitialized and read returns -EIO for it.
2703 *2727 *
2704 * int bpf_sysctl_get_new_value(struct bpf_sysctl *ctx, char *buf, size_t buf_len)2728 * long bpf_sysctl_get_new_value(struct bpf_sysctl *ctx, char *buf, size_t buf_len)
2705 * Description2729 * Description
2706 * Get new value being written by user space to sysctl (before2730 * Get new value being written by user space to sysctl (before
2707 * the actual write happens) and copy it as a string into2731 * the actual write happens) and copy it as a string into
@@ -2718,7 +2742,7 @@ union bpf_attr { · 10 unmodified lines
2718 *2742 *
2719 * **-EINVAL** if sysctl is being read.2743 * **-EINVAL** if sysctl is being read.
2720 *2744 *
2721 * int bpf_sysctl_set_new_value(struct bpf_sysctl *ctx, const char *buf, size_t buf_len)2745 * long bpf_sysctl_set_new_value(struct bpf_sysctl *ctx, const char *buf, size_t buf_len)
2722 * Description2746 * Description
2723 * Override new value being written by user space to sysctl with2747 * Override new value being written by user space to sysctl with
2724 * value provided by program in buffer *buf* of size *buf_len*.2748 * value provided by program in buffer *buf* of size *buf_len*.
@@ -2735,7 +2759,7 @@ union bpf_attr { · 10 unmodified lines
2735 *2759 *
2736 * **-EINVAL** if sysctl is being read.2760 * **-EINVAL** if sysctl is being read.
2737 *2761 *
2738 * int bpf_strtol(const char *buf, size_t buf_len, u64 flags, long *res)2762 * long bpf_strtol(const char *buf, size_t buf_len, u64 flags, long *res)
2739 * Description2763 * Description
2740 * Convert the initial part of the string from buffer *buf* of2764 * Convert the initial part of the string from buffer *buf* of
2741 * size *buf_len* to a long integer according to the given base2765 * size *buf_len* to a long integer according to the given base
@@ -2759,7 +2783,7 @@ union bpf_attr { · 17 unmodified lines
2759 *2783 *
2760 * **-ERANGE** if resulting value was out of range.2784 * **-ERANGE** if resulting value was out of range.
2761 *2785 *
2762 * int bpf_strtoul(const char *buf, size_t buf_len, u64 flags, unsigned long *res)2786 * long bpf_strtoul(const char *buf, size_t buf_len, u64 flags, unsigned long *res)
2763 * Description2787 * Description
2764 * Convert the initial part of the string from buffer *buf* of2788 * Convert the initial part of the string from buffer *buf* of
2765 * size *buf_len* to an unsigned long integer according to the2789 * size *buf_len* to an unsigned long integer according to the
@@ -2810,7 +2834,7 @@ union bpf_attr { · 44 unmodified lines
2810 * **NULL** if not found or there was an error in adding2834 * **NULL** if not found or there was an error in adding
2811 * a new bpf-local-storage.2835 * a new bpf-local-storage.
2812 *2836 *
2813 * int bpf_sk_storage_delete(struct bpf_map *map, struct bpf_sock *sk)2837 * long bpf_sk_storage_delete(struct bpf_map *map, struct bpf_sock *sk)
2814 * Description2838 * Description
2815 * Delete a bpf-local-storage from a *sk*.2839 * Delete a bpf-local-storage from a *sk*.
2816 * Return2840 * Return
@@ -2818,7 +2842,7 @@ union bpf_attr { · 1 unmodified line
2818 *2842 *
2819 * **-ENOENT** if the bpf-local-storage cannot be found.2843 * **-ENOENT** if the bpf-local-storage cannot be found.
2820 *2844 *
2821 * int bpf_send_signal(u32 sig)2845 * long bpf_send_signal(u32 sig)
2822 * Description2846 * Description
2823 * Send signal *sig* to the process of the current task.2847 * Send signal *sig* to the process of the current task.
2824 * The signal may be delivered to any of this process's threads.2848 * The signal may be delivered to any of this process's threads.
@@ -2859,7 +2883,7 @@ union bpf_attr { · 34 unmodified lines
2859 *2883 *
2860 * **-EPROTONOSUPPORT** IP packet version is not 4 or 62884 * **-EPROTONOSUPPORT** IP packet version is not 4 or 6
2861 *2885 *
2862 * int bpf_skb_output(void *ctx, struct bpf_map *map, u64 flags, void *data, u64 size)2886 * long bpf_skb_output(void *ctx, struct bpf_map *map, u64 flags, void *data, u64 size)
2863 * Description2887 * Description
2864 * Write raw *data* blob into a special BPF perf event held by2888 * Write raw *data* blob into a special BPF perf event held by
2865 * *map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. This perf2889 * *map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. This perf
@@ -2883,21 +2907,21 @@ union bpf_attr { · 17 unmodified lines
2883 * Return2907 * Return
2884 * 0 on success, or a negative error in case of failure.2908 * 0 on success, or a negative error in case of failure.
2885 *2909 *
2886 * int bpf_probe_read_user(void *dst, u32 size, const void *unsafe_ptr)2910 * long bpf_probe_read_user(void *dst, u32 size, const void *unsafe_ptr)
2887 * Description2911 * Description
2888 * Safely attempt to read *size* bytes from user space address2912 * Safely attempt to read *size* bytes from user space address
2889 * *unsafe_ptr* and store the data in *dst*.2913 * *unsafe_ptr* and store the data in *dst*.
2890 * Return2914 * Return
2891 * 0 on success, or a negative error in case of failure.2915 * 0 on success, or a negative error in case of failure.
2892 *2916 *
2893 * int bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr)2917 * long bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr)
2894 * Description2918 * Description
2895 * Safely attempt to read *size* bytes from kernel space address2919 * Safely attempt to read *size* bytes from kernel space address
2896 * *unsafe_ptr* and store the data in *dst*.2920 * *unsafe_ptr* and store the data in *dst*.
2897 * Return2921 * Return
2898 * 0 on success, or a negative error in case of failure.2922 * 0 on success, or a negative error in case of failure.
2899 *2923 *
2900 * int bpf_probe_read_user_str(void *dst, u32 size, const void *unsafe_ptr)2924 * long bpf_probe_read_user_str(void *dst, u32 size, const void *unsafe_ptr)
2901 * Description2925 * Description
2902 * Copy a NUL terminated string from an unsafe user address2926 * Copy a NUL terminated string from an unsafe user address
2903 * *unsafe_ptr* to *dst*. The *size* should include the2927 * *unsafe_ptr* to *dst*. The *size* should include the
@@ -2941,7 +2965,7 @@ union bpf_attr { · 37 unmodified lines
2941 * including the trailing NUL character. On error, a negative2965 * including the trailing NUL character. On error, a negative
2942 * value.2966 * value.
2943 *2967 *
2944 * int bpf_probe_read_kernel_str(void *dst, u32 size, const void *unsafe_ptr)2968 * long bpf_probe_read_kernel_str(void *dst, u32 size, const void *unsafe_ptr)
2945 * Description2969 * Description
2946 * Copy a NUL terminated string from an unsafe kernel address *unsafe_ptr*2970 * Copy a NUL terminated string from an unsafe kernel address *unsafe_ptr*
2947 * to *dst*. Same semantics as with **bpf_probe_read_user_str**\ () apply.2971 * to *dst*. Same semantics as with **bpf_probe_read_user_str**\ () apply.
@@ -2949,14 +2973,14 @@ union bpf_attr { · 1 unmodified line
2949 * On success, the strictly positive length of the string, including2973 * On success, the strictly positive length of the string, including
2950 * the trailing NUL character. On error, a negative value.2974 * the trailing NUL character. On error, a negative value.
2951 *2975 *
2952 * int bpf_tcp_send_ack(void *tp, u32 rcv_nxt)2976 * long bpf_tcp_send_ack(void *tp, u32 rcv_nxt)
2953 * Description2977 * Description
2954 * Send out a tcp-ack. *tp* is the in-kernel struct **tcp_sock**.2978 * Send out a tcp-ack. *tp* is the in-kernel struct **tcp_sock**.
2955 * *rcv_nxt* is the ack_seq to be sent out.2979 * *rcv_nxt* is the ack_seq to be sent out.
2956 * Return2980 * Return
2957 * 0 on success, or a negative error in case of failure.2981 * 0 on success, or a negative error in case of failure.
2958 *2982 *
2959 * int bpf_send_signal_thread(u32 sig)2983 * long bpf_send_signal_thread(u32 sig)
2960 * Description2984 * Description
2961 * Send signal *sig* to the thread corresponding to the current task.2985 * Send signal *sig* to the thread corresponding to the current task.
2962 * Return2986 * Return
@@ -2976,7 +3000,7 @@ union bpf_attr { · 13 unmodified lines
2976 * Return3000 * Return
2977 * The 64 bit jiffies3001 * The 64 bit jiffies
2978 *3002 *
2979 * int bpf_read_branch_records(struct bpf_perf_event_data *ctx, void *buf, u32 size, u64 flags)3003 * long bpf_read_branch_records(struct bpf_perf_event_data *ctx, void *buf, u32 size, u64 flags)
2980 * Description3004 * Description
2981 * For an eBPF program attached to a perf event, retrieve the3005 * For an eBPF program attached to a perf event, retrieve the
2982 * branch records (**struct perf_branch_entry**) associated to *ctx*3006 * branch records (**struct perf_branch_entry**) associated to *ctx*
@@ -2995,7 +3019,7 @@ union bpf_attr { · 12 unmodified lines
2995 *3019 *
2996 * **-ENOENT** if architecture does not support branch records.3020 * **-ENOENT** if architecture does not support branch records.
2997 *3021 *
2998 * int bpf_get_ns_current_pid_tgid(u64 dev, u64 ino, struct bpf_pidns_info *nsdata, u32 size)3022 * long bpf_get_ns_current_pid_tgid(u64 dev, u64 ino, struct bpf_pidns_info *nsdata, u32 size)
2999 * Description3023 * Description
3000 * Returns 0 on success, values for *pid* and *tgid* as seen from the current3024 * Returns 0 on success, values for *pid* and *tgid* as seen from the current
3001 * *namespace* will be returned in *nsdata*.3025 * *namespace* will be returned in *nsdata*.
@@ -3007,7 +3031,7 @@ union bpf_attr { · 5 unmodified lines
3007 *3031 *
3008 * **-ENOENT** if pidns does not exists for the current task.3032 * **-ENOENT** if pidns does not exists for the current task.
3009 *3033 *
3010 * int bpf_xdp_output(void *ctx, struct bpf_map *map, u64 flags, void *data, u64 size)3034 * long bpf_xdp_output(void *ctx, struct bpf_map *map, u64 flags, void *data, u64 size)
3011 * Description3035 * Description
3012 * Write raw *data* blob into a special BPF perf event held by3036 * Write raw *data* blob into a special BPF perf event held by
3013 * *map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. This perf3037 * *map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. This perf
@@ -3062,8 +3086,12 @@ union bpf_attr { · 48 unmodified lines
3062 * Return3086 * Return
3063 * The id is returned or 0 in case the id could not be retrieved.3087 * The id is returned or 0 in case the id could not be retrieved.
3064 *3088 *
3065 * int bpf_sk_assign(struct sk_buff *skb, struct bpf_sock *sk, u64 flags)3089 * long bpf_sk_assign(struct sk_buff *skb, struct bpf_sock *sk, u64 flags)
3066 * Description3090 * Description
3091 * Helper is overloaded depending on BPF program type. This
3092 * description applies to **BPF_PROG_TYPE_SCHED_CLS** and
3093 * **BPF_PROG_TYPE_SCHED_ACT** programs.
3094 *
3067 * Assign the *sk* to the *skb*. When combined with appropriate3095 * Assign the *sk* to the *skb*. When combined with appropriate
3068 * routing configuration to receive the packet towards the socket,3096 * routing configuration to receive the packet towards the socket,
3069 * will cause *skb* to be delivered to the specified socket.3097 * will cause *skb* to be delivered to the specified socket.
@@ -3089,6 +3117,56 @@ union bpf_attr { · 19 unmodified lines
3089 * **-ESOCKTNOSUPPORT** if the socket type is not supported3117 * **-ESOCKTNOSUPPORT** if the socket type is not supported
3090 * (reuseport).3118 * (reuseport).
3091 *3119 *
3120 * long bpf_sk_assign(struct bpf_sk_lookup *ctx, struct bpf_sock *sk, u64 flags)
3121 * Description
3122 * Helper is overloaded depending on BPF program type. This
3123 * description applies to **BPF_PROG_TYPE_SK_LOOKUP** programs.
3124 *
3125 * Select the *sk* as a result of a socket lookup.
3126 *
3127 * For the operation to succeed passed socket must be compatible
3128 * with the packet description provided by the *ctx* object.
3129 *
3130 * L4 protocol (**IPPROTO_TCP** or **IPPROTO_UDP**) must
3131 * be an exact match. While IP family (**AF_INET** or
3132 * **AF_INET6**) must be compatible, that is IPv6 sockets
3133 * that are not v6-only can be selected for IPv4 packets.
3134 *
3135 * Only TCP listeners and UDP unconnected sockets can be
3136 * selected. *sk* can also be NULL to reset any previous
3137 * selection.
3138 *
3139 * *flags* argument can combination of following values:
3140 *
3141 * * **BPF_SK_LOOKUP_F_REPLACE** to override the previous
3142 * socket selection, potentially done by a BPF program
3143 * that ran before us.
3144 *
3145 * * **BPF_SK_LOOKUP_F_NO_REUSEPORT** to skip
3146 * load-balancing within reuseport group for the socket
3147 * being selected.
3148 *
3149 * On success *ctx->sk* will point to the selected socket.
3150 *
3151 * Return
3152 * 0 on success, or a negative errno in case of failure.
3153 *
3154 * * **-EAFNOSUPPORT** if socket family (*sk->family*) is
3155 * not compatible with packet family (*ctx->family*).
3156 *
3157 * * **-EEXIST** if socket has been already selected,
3158 * potentially by another program, and
3159 * **BPF_SK_LOOKUP_F_REPLACE** flag was not specified.
3160 *
3161 * * **-EINVAL** if unsupported flags were specified.
3162 *
3163 * * **-EPROTOTYPE** if socket L4 protocol
3164 * (*sk->protocol*) doesn't match packet protocol
3165 * (*ctx->protocol*).
3166 *
3167 * * **-ESOCKTNOSUPPORT** if socket is not in allowed
3168 * state (TCP listening or UDP unconnected).
3169 *
3092 * u64 bpf_ktime_get_boot_ns(void)3170 * u64 bpf_ktime_get_boot_ns(void)
3093 * Description3171 * Description
3094 * Return the time elapsed since system boot, in nanoseconds.3172 * Return the time elapsed since system boot, in nanoseconds.
@@ -3097,7 +3175,7 @@ union bpf_attr { · 2 unmodified lines
3097 * Return3175 * Return
3098 * Current *ktime*.3176 * Current *ktime*.
3099 *3177 *
3100 * int bpf_seq_printf(struct seq_file *m, const char *fmt, u32 fmt_size, const void *data, u32 data_len)3178 * long bpf_seq_printf(struct seq_file *m, const char *fmt, u32 fmt_size, const void *data, u32 data_len)
3101 * Description3179 * Description
3102 * **bpf_seq_printf**\ () uses seq_file **seq_printf**\ () to print3180 * **bpf_seq_printf**\ () uses seq_file **seq_printf**\ () to print
3103 * out the format string.3181 * out the format string.
@@ -3126,7 +3204,7 @@ union bpf_attr { · 22 unmodified lines
3126 *3204 *
3127 * **-EOVERFLOW** if an overflow happened: The same object will be tried again.3205 * **-EOVERFLOW** if an overflow happened: The same object will be tried again.
3128 *3206 *
3129 * int bpf_seq_write(struct seq_file *m, const void *data, u32 len)3207 * long bpf_seq_write(struct seq_file *m, const void *data, u32 len)
3130 * Description3208 * Description
3131 * **bpf_seq_write**\ () uses seq_file **seq_write**\ () to write the data.3209 * **bpf_seq_write**\ () uses seq_file **seq_write**\ () to write the data.
3132 * The *m* represents the seq_file. The *data* and *len* represent the3210 * The *m* represents the seq_file. The *data* and *len* represent the
@@ -3168,7 +3246,7 @@ union bpf_attr { · 35 unmodified lines
3168 * Return3246 * Return
3169 * The id is returned or 0 in case the id could not be retrieved.3247 * The id is returned or 0 in case the id could not be retrieved.
3170 *3248 *
3171 * int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)3249 * long bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
3172 * Description3250 * Description
3173 * Copy *size* bytes from *data* into a ring buffer *ringbuf*.3251 * Copy *size* bytes from *data* into a ring buffer *ringbuf*.
3174 * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification3252 * If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
@@ -3222,7 +3300,7 @@ union bpf_attr { · 47 unmodified lines
3222 * Return3300 * Return
3223 * Requested value, or 0, if *flags* are not recognized.3301 * Requested value, or 0, if *flags* are not recognized.
3224 *3302 *
3225 * int bpf_csum_level(struct sk_buff *skb, u64 level)3303 * long bpf_csum_level(struct sk_buff *skb, u64 level)
3226 * Description3304 * Description
3227 * Change the skbs checksum level by one layer up or down, or3305 * Change the skbs checksum level by one layer up or down, or
3228 * reset it entirely to none in order to have the stack perform3306 * reset it entirely to none in order to have the stack perform
@@ -3253,6 +3331,69 @@ union bpf_attr { · 24 unmodified lines
3253 * case of **BPF_CSUM_LEVEL_QUERY**, the current skb->csum_level3331 * case of **BPF_CSUM_LEVEL_QUERY**, the current skb->csum_level
3254 * is returned or the error code -EACCES in case the skb is not3332 * is returned or the error code -EACCES in case the skb is not
3255 * subject to CHECKSUM_UNNECESSARY.3333 * subject to CHECKSUM_UNNECESSARY.
3334 *
3335 * struct tcp6_sock *bpf_skc_to_tcp6_sock(void *sk)
3336 * Description
3337 * Dynamically cast a *sk* pointer to a *tcp6_sock* pointer.
3338 * Return
3339 * *sk* if casting is valid, or NULL otherwise.
3340 *
3341 * struct tcp_sock *bpf_skc_to_tcp_sock(void *sk)
3342 * Description
3343 * Dynamically cast a *sk* pointer to a *tcp_sock* pointer.
3344 * Return
3345 * *sk* if casting is valid, or NULL otherwise.
3346 *
3347 * struct tcp_timewait_sock *bpf_skc_to_tcp_timewait_sock(void *sk)
3348 * Description
3349 * Dynamically cast a *sk* pointer to a *tcp_timewait_sock* pointer.
3350 * Return
3351 * *sk* if casting is valid, or NULL otherwise.
3352 *
3353 * struct tcp_request_sock *bpf_skc_to_tcp_request_sock(void *sk)
3354 * Description
3355 * Dynamically cast a *sk* pointer to a *tcp_request_sock* pointer.
3356 * Return
3357 * *sk* if casting is valid, or NULL otherwise.
3358 *
3359 * struct udp6_sock *bpf_skc_to_udp6_sock(void *sk)
3360 * Description
3361 * Dynamically cast a *sk* pointer to a *udp6_sock* pointer.
3362 * Return
3363 * *sk* if casting is valid, or NULL otherwise.
3364 *
3365 * long bpf_get_task_stack(struct task_struct *task, void *buf, u32 size, u64 flags)
3366 * Description
3367 * Return a user or a kernel stack in bpf program provided buffer.
3368 * To achieve this, the helper needs *task*, which is a valid
3369 * pointer to struct task_struct. To store the stacktrace, the
3370 * bpf program provides *buf* with a nonnegative *size*.
3371 *
3372 * The last argument, *flags*, holds the number of stack frames to
3373 * skip (from 0 to 255), masked with
3374 * **BPF_F_SKIP_FIELD_MASK**. The next bits can be used to set
3375 * the following flags:
3376 *
3377 * **BPF_F_USER_STACK**
3378 * Collect a user space stack instead of a kernel stack.
3379 * **BPF_F_USER_BUILD_ID**
3380 * Collect buildid+offset instead of ips for user stack,
3381 * only valid if **BPF_F_USER_STACK** is also specified.
3382 *
3383 * **bpf_get_task_stack**\ () can collect up to
3384 * **PERF_MAX_STACK_DEPTH** both kernel and user frames, subject
3385 * to sufficient large buffer size. Note that
3386 * this limit can be controlled with the **sysctl** program, and
3387 * that it should be manually increased in order to profile long
3388 * user stacks (such as stacks for Java programs). To do so, use:
3389 *
3390 * ::
3391 *
3392 * # sysctl kernel.perf_event_max_stack=<new value>
3393 * Return
3394 * A non-negative value equal to or less than *size* on success,
3395 * or a negative error in case of failure.
3396 *
3256 */3397 */
3257#define __BPF_FUNC_MAPPER(FN) \3398#define __BPF_FUNC_MAPPER(FN) \
3258 FN(unspec), \3399 FN(unspec), \
@@ -3390,7 +3531,14 @@ union bpf_attr { · 131 unmodified lines
3390 FN(ringbuf_submit), \3531 FN(ringbuf_submit), \
3391 FN(ringbuf_discard), \3532 FN(ringbuf_discard), \
3392 FN(ringbuf_query), \3533 FN(ringbuf_query), \
3393 FN(csum_level),3534 FN(csum_level), \
3535 FN(skc_to_tcp6_sock), \
3536 FN(skc_to_tcp_sock), \
3537 FN(skc_to_tcp_timewait_sock), \
3538 FN(skc_to_tcp_request_sock), \
3539 FN(skc_to_udp6_sock), \
3540 FN(get_task_stack), \
3541 /* */
3394 3542
3395/* integer value in 'imm' field of BPF_CALL instruction selects which helper3543/* integer value in 'imm' field of BPF_CALL instruction selects which helper
3396 * function eBPF program intends to call3544 * function eBPF program intends to call
@@ -3532,6 +3680,12 @@ enum { · 135 unmodified lines
3532 BPF_RINGBUF_HDR_SZ = 8,3680 BPF_RINGBUF_HDR_SZ = 8,
3533};3681};
3534 3682
3683/* BPF_FUNC_sk_assign flags in bpf_sk_lookup context. */
3684enum {
3685 BPF_SK_LOOKUP_F_REPLACE = (1ULL << 0),
3686 BPF_SK_LOOKUP_F_NO_REUSEPORT = (1ULL << 1),
3687};
3688
3535/* Mode for BPF_FUNC_skb_adjust_room helper. */3689/* Mode for BPF_FUNC_skb_adjust_room helper. */
3536enum bpf_adj_room_mode {3690enum bpf_adj_room_mode {
3537 BPF_ADJ_ROOM_NET,3691 BPF_ADJ_ROOM_NET,
@@ -3775,6 +3929,19 @@ struct bpf_devmap_val { · 237 unmodified lines
3775 } bpf_prog;3929 } bpf_prog;
3776};3930};
3777 3931
3932/* CPUMAP map-value layout
3933 *
3934 * The struct data-layout of map-value is a configuration interface.
3935 * New members can only be added to the end of this structure.
3936 */
3937struct bpf_cpumap_val {
3938 __u32 qsize; /* queue size to remote target CPU */
3939 union {
3940 int fd; /* prog fd on map write */
3941 __u32 id; /* prog id on map read */
3942 } bpf_prog;
3943};
3944
3778enum sk_action {3945enum sk_action {
3779 SK_DROP = 0,3946 SK_DROP = 0,
3780 SK_PASS,3947 SK_PASS,
@@ -3907,12 +4074,15 @@ struct bpf_link_info { · 126 unmodified lines
3907 __u32 netns_ino;4074 __u32 netns_ino;
3908 __u32 attach_type;4075 __u32 attach_type;
3909 } netns;4076 } netns;
4077 struct {
4078 __u32 ifindex;
4079 } xdp;
3910 };4080 };
3911} __attribute__((aligned(8)));4081} __attribute__((aligned(8)));
3912 4082
3913/* User bpf_sock_addr struct to access socket fields and sockaddr struct passed4083/* User bpf_sock_addr struct to access socket fields and sockaddr struct passed
3914 * by user and intended to be used by socket (e.g. to bind to, depends on4084 * by user and intended to be used by socket (e.g. to bind to, depends on
3915 * attach attach type).4085 * attach type).
3916 */4086 */
3917struct bpf_sock_addr {4087struct bpf_sock_addr {
3918 __u32 user_family; /* Allows 4-byte read, but no write. */4088 __u32 user_family; /* Allows 4-byte read, but no write. */
@@ -4261,4 +4431,19 @@ struct bpf_pidns_info { · 342 unmodified lines
4261 __u32 pid;4431 __u32 pid;
4262 __u32 tgid;4432 __u32 tgid;
4263};4433};
4434
4435/* User accessible data for SK_LOOKUP programs. Add new fields at the end. */
4436struct bpf_sk_lookup {
4437 __bpf_md_ptr(struct bpf_sock *, sk); /* Selected socket */
4438
4439 __u32 family; /* Protocol family (AF_INET, AF_INET6) */
4440 __u32 protocol; /* IP protocol (IPPROTO_TCP, IPPROTO_UDP) */
4441 __u32 remote_ip4; /* Network byte order */
4442 __u32 remote_ip6[4]; /* Network byte order */
4443 __u32 remote_port; /* Network byte order */
4444 __u32 local_ip4; /* Network byte order */
4445 __u32 local_ip6[4]; /* Network byte order */
4446 __u32 local_port; /* Host byte order */
4447};
4448
4264#endif /* _UAPI__LINUX_BPF_H__ */4449#endif /* _UAPI__LINUX_BPF_H__ */
include/uapi/linux/caif/caif_socket.h+1−1
@@ -169,7 +169,7 @@ struct sockaddr_caif { · 168 unmodified lines
169 * @CAIFSO_LINK_SELECT: Selector used if multiple CAIF Link layers are169 * @CAIFSO_LINK_SELECT: Selector used if multiple CAIF Link layers are
170 * available. Either a high bandwidth170 * available. Either a high bandwidth
171 * link can be selected (CAIF_LINK_HIGH_BANDW) or171 * link can be selected (CAIF_LINK_HIGH_BANDW) or
172 * or a low latency link (CAIF_LINK_LOW_LATENCY).172 * a low latency link (CAIF_LINK_LOW_LATENCY).
173 * This option is of type __u32.173 * This option is of type __u32.
174 * Alternatively SO_BINDTODEVICE can be used.174 * Alternatively SO_BINDTODEVICE can be used.
175 *175 *
include/uapi/linux/devlink.h+15−0
@@ -451,6 +451,13 @@ enum devlink_attr { · 450 unmodified lines
451 DEVLINK_ATTR_TRAP_POLICER_RATE, /* u64 */451 DEVLINK_ATTR_TRAP_POLICER_RATE, /* u64 */
452 DEVLINK_ATTR_TRAP_POLICER_BURST, /* u64 */452 DEVLINK_ATTR_TRAP_POLICER_BURST, /* u64 */
453 453
454 DEVLINK_ATTR_PORT_FUNCTION, /* nested */
455
456 DEVLINK_ATTR_INFO_BOARD_SERIAL_NUMBER, /* string */
457
458 DEVLINK_ATTR_PORT_LANES, /* u32 */
459 DEVLINK_ATTR_PORT_SPLITTABLE, /* u8 */
460
454 /* add new attributes above here, update the policy in devlink.c */461 /* add new attributes above here, update the policy in devlink.c */
455 462
456 __DEVLINK_ATTR_MAX,463 __DEVLINK_ATTR_MAX,
@@ -497,4 +504,12 @@ enum devlink_resource_unit { · 40 unmodified lines
497 DEVLINK_RESOURCE_UNIT_ENTRY,504 DEVLINK_RESOURCE_UNIT_ENTRY,
498};505};
499 506
507enum devlink_port_function_attr {
508 DEVLINK_PORT_FUNCTION_ATTR_UNSPEC,
509 DEVLINK_PORT_FUNCTION_ATTR_HW_ADDR, /* binary */
510
511 __DEVLINK_PORT_FUNCTION_ATTR_MAX,
512 DEVLINK_PORT_FUNCTION_ATTR_MAX = __DEVLINK_PORT_FUNCTION_ATTR_MAX - 1
513};
514
500#endif /* _UAPI_LINUX_DEVLINK_H_ */515#endif /* _UAPI_LINUX_DEVLINK_H_ */
include/uapi/linux/errqueue.h+13−1
@@ -5,6 +5,13 @@ · 4 unmodified lines
5#include <linux/types.h>5#include <linux/types.h>
6#include <linux/time_types.h>6#include <linux/time_types.h>
7 7
8/* RFC 4884: return offset to extension struct + validation */
9struct sock_ee_data_rfc4884 {
10 __u16 len;
11 __u8 flags;
12 __u8 reserved;
13};
14
8struct sock_extended_err {15struct sock_extended_err {
9 __u32 ee_errno; 16 __u32 ee_errno;
10 __u8 ee_origin;17 __u8 ee_origin;
@@ -12,7 +19,10 @@ struct sock_extended_err { · 1 unmodified line
12 __u8 ee_code;19 __u8 ee_code;
13 __u8 ee_pad;20 __u8 ee_pad;
14 __u32 ee_info;21 __u32 ee_info;
15 __u32 ee_data;22 union {
23 __u32 ee_data;
24 struct sock_ee_data_rfc4884 ee_rfc4884;
25 };
16};26};
17 27
18#define SO_EE_ORIGIN_NONE 028#define SO_EE_ORIGIN_NONE 0
@@ -31,6 +41,8 @@ struct sock_extended_err { · 12 unmodified lines
31#define SO_EE_CODE_TXTIME_INVALID_PARAM 141#define SO_EE_CODE_TXTIME_INVALID_PARAM 1
32#define SO_EE_CODE_TXTIME_MISSED 242#define SO_EE_CODE_TXTIME_MISSED 2
33 43
44#define SO_EE_RFC4884_FLAG_INVALID 1
45
34/**46/**
35 * struct scm_timestamping - timestamps exposed through cmsg47 * struct scm_timestamping - timestamps exposed through cmsg
36 *48 *
include/uapi/linux/ethtool.h+87−0
@@ -579,6 +579,76 @@ struct ethtool_pauseparam { · 578 unmodified lines
579 __u32 tx_pause;579 __u32 tx_pause;
580};580};
581 581
582/**
583 * enum ethtool_link_ext_state - link extended state
584 */
585enum ethtool_link_ext_state {
586 ETHTOOL_LINK_EXT_STATE_AUTONEG,
587 ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE,
588 ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH,
589 ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY,
590 ETHTOOL_LINK_EXT_STATE_NO_CABLE,
591 ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE,
592 ETHTOOL_LINK_EXT_STATE_EEPROM_ISSUE,
593 ETHTOOL_LINK_EXT_STATE_CALIBRATION_FAILURE,
594 ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED,
595 ETHTOOL_LINK_EXT_STATE_OVERHEAT,
596};
597
598/**
599 * enum ethtool_link_ext_substate_autoneg - more information in addition to
600 * ETHTOOL_LINK_EXT_STATE_AUTONEG.
601 */
602enum ethtool_link_ext_substate_autoneg {
603 ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED = 1,
604 ETHTOOL_LINK_EXT_SUBSTATE_AN_ACK_NOT_RECEIVED,
605 ETHTOOL_LINK_EXT_SUBSTATE_AN_NEXT_PAGE_EXCHANGE_FAILED,
606 ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED_FORCE_MODE,
607 ETHTOOL_LINK_EXT_SUBSTATE_AN_FEC_MISMATCH_DURING_OVERRIDE,
608 ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_HCD,
609};
610
611/**
612 * enum ethtool_link_ext_substate_link_training - more information in addition to
613 * ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE.
614 */
615enum ethtool_link_ext_substate_link_training {
616 ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_FRAME_LOCK_NOT_ACQUIRED = 1,
617 ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_INHIBIT_TIMEOUT,
618 ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_PARTNER_DID_NOT_SET_RECEIVER_READY,
619 ETHTOOL_LINK_EXT_SUBSTATE_LT_REMOTE_FAULT,
620};
621
622/**
623 * enum ethtool_link_ext_substate_logical_mismatch - more information in addition
624 * to ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH.
625 */
626enum ethtool_link_ext_substate_link_logical_mismatch {
627 ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_BLOCK_LOCK = 1,
628 ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_AM_LOCK,
629 ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_GET_ALIGN_STATUS,
630 ETHTOOL_LINK_EXT_SUBSTATE_LLM_FC_FEC_IS_NOT_LOCKED,
631 ETHTOOL_LINK_EXT_SUBSTATE_LLM_RS_FEC_IS_NOT_LOCKED,
632};
633
634/**
635 * enum ethtool_link_ext_substate_bad_signal_integrity - more information in
636 * addition to ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY.
637 */
638enum ethtool_link_ext_substate_bad_signal_integrity {
639 ETHTOOL_LINK_EXT_SUBSTATE_BSI_LARGE_NUMBER_OF_PHYSICAL_ERRORS = 1,
640 ETHTOOL_LINK_EXT_SUBSTATE_BSI_UNSUPPORTED_RATE,
641};
642
643/**
644 * enum ethtool_link_ext_substate_cable_issue - more information in
645 * addition to ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE.
646 */
647enum ethtool_link_ext_substate_cable_issue {
648 ETHTOOL_LINK_EXT_SUBSTATE_CI_UNSUPPORTED_CABLE = 1,
649 ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE,
650};
651
582#define ETH_GSTRING_LEN 32652#define ETH_GSTRING_LEN 32
583 653
584/**654/**
@@ -599,6 +669,7 @@ struct ethtool_pauseparam { · 14 unmodified lines
599 * @ETH_SS_SOF_TIMESTAMPING: SOF_TIMESTAMPING_* flags669 * @ETH_SS_SOF_TIMESTAMPING: SOF_TIMESTAMPING_* flags
600 * @ETH_SS_TS_TX_TYPES: timestamping Tx types670 * @ETH_SS_TS_TX_TYPES: timestamping Tx types
601 * @ETH_SS_TS_RX_FILTERS: timestamping Rx filters671 * @ETH_SS_TS_RX_FILTERS: timestamping Rx filters
672 * @ETH_SS_UDP_TUNNEL_TYPES: UDP tunnel types
602 */673 */
603enum ethtool_stringset {674enum ethtool_stringset {
604 ETH_SS_TEST = 0,675 ETH_SS_TEST = 0,
@@ -616,6 +687,7 @@ enum ethtool_stringset { · 11 unmodified lines
616 ETH_SS_SOF_TIMESTAMPING,687 ETH_SS_SOF_TIMESTAMPING,
617 ETH_SS_TS_TX_TYPES,688 ETH_SS_TS_TX_TYPES,
618 ETH_SS_TS_RX_FILTERS,689 ETH_SS_TS_RX_FILTERS,
690 ETH_SS_UDP_TUNNEL_TYPES,
619 691
620 /* add new constants above here */692 /* add new constants above here */
621 ETH_SS_COUNT693 ETH_SS_COUNT
@@ -1530,6 +1602,21 @@ enum ethtool_link_mode_bit_indices { · 908 unmodified lines
1530 ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT = 72,1602 ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT = 72,
1531 ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT = 73,1603 ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT = 73,
1532 ETHTOOL_LINK_MODE_FEC_LLRS_BIT = 74,1604 ETHTOOL_LINK_MODE_FEC_LLRS_BIT = 74,
1605 ETHTOOL_LINK_MODE_100000baseKR_Full_BIT = 75,
1606 ETHTOOL_LINK_MODE_100000baseSR_Full_BIT = 76,
1607 ETHTOOL_LINK_MODE_100000baseLR_ER_FR_Full_BIT = 77,
1608 ETHTOOL_LINK_MODE_100000baseCR_Full_BIT = 78,
1609 ETHTOOL_LINK_MODE_100000baseDR_Full_BIT = 79,
1610 ETHTOOL_LINK_MODE_200000baseKR2_Full_BIT = 80,
1611 ETHTOOL_LINK_MODE_200000baseSR2_Full_BIT = 81,
1612 ETHTOOL_LINK_MODE_200000baseLR2_ER2_FR2_Full_BIT = 82,
1613 ETHTOOL_LINK_MODE_200000baseDR2_Full_BIT = 83,
1614 ETHTOOL_LINK_MODE_200000baseCR2_Full_BIT = 84,
1615 ETHTOOL_LINK_MODE_400000baseKR4_Full_BIT = 85,
1616 ETHTOOL_LINK_MODE_400000baseSR4_Full_BIT = 86,
1617 ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT = 87,
1618 ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT = 88,
1619 ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT = 89,
1533 /* must be last entry */1620 /* must be last entry */
1534 __ETHTOOL_LINK_MODE_MASK_NBITS1621 __ETHTOOL_LINK_MODE_MASK_NBITS
1535};1622};
include/uapi/linux/ethtool_netlink.h+57−0
@@ -41,6 +41,7 @@ enum { · 40 unmodified lines
41 ETHTOOL_MSG_TSINFO_GET,41 ETHTOOL_MSG_TSINFO_GET,
42 ETHTOOL_MSG_CABLE_TEST_ACT,42 ETHTOOL_MSG_CABLE_TEST_ACT,
43 ETHTOOL_MSG_CABLE_TEST_TDR_ACT,43 ETHTOOL_MSG_CABLE_TEST_TDR_ACT,
44 ETHTOOL_MSG_TUNNEL_INFO_GET,
44 45
45 /* add new constants above here */46 /* add new constants above here */
46 __ETHTOOL_MSG_USER_CNT,47 __ETHTOOL_MSG_USER_CNT,
@@ -236,6 +237,8 @@ enum { · 189 unmodified lines
236 ETHTOOL_A_LINKSTATE_LINK, /* u8 */237 ETHTOOL_A_LINKSTATE_LINK, /* u8 */
237 ETHTOOL_A_LINKSTATE_SQI, /* u32 */238 ETHTOOL_A_LINKSTATE_SQI, /* u32 */
238 ETHTOOL_A_LINKSTATE_SQI_MAX, /* u32 */239 ETHTOOL_A_LINKSTATE_SQI_MAX, /* u32 */
240 ETHTOOL_A_LINKSTATE_EXT_STATE, /* u8 */
241 ETHTOOL_A_LINKSTATE_EXT_SUBSTATE, /* u8 */
239 242
240 /* add new constants above here */243 /* add new constants above here */
241 __ETHTOOL_A_LINKSTATE_CNT,244 __ETHTOOL_A_LINKSTATE_CNT,
@@ -554,6 +557,60 @@ enum { · 312 unmodified lines
554 ETHTOOL_A_CABLE_TEST_TDR_NTF_MAX = __ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT - 1557 ETHTOOL_A_CABLE_TEST_TDR_NTF_MAX = __ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT - 1
555};558};
556 559
560/* TUNNEL INFO */
561
562enum {
563 ETHTOOL_UDP_TUNNEL_TYPE_VXLAN,
564 ETHTOOL_UDP_TUNNEL_TYPE_GENEVE,
565 ETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE,
566
567 __ETHTOOL_UDP_TUNNEL_TYPE_CNT
568};
569
570enum {
571 ETHTOOL_A_TUNNEL_UDP_ENTRY_UNSPEC,
572
573 ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT, /* be16 */
574 ETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE, /* u32 */
575
576 /* add new constants above here */
577 __ETHTOOL_A_TUNNEL_UDP_ENTRY_CNT,
578 ETHTOOL_A_TUNNEL_UDP_ENTRY_MAX = (__ETHTOOL_A_TUNNEL_UDP_ENTRY_CNT - 1)
579};
580
581enum {
582 ETHTOOL_A_TUNNEL_UDP_TABLE_UNSPEC,
583
584 ETHTOOL_A_TUNNEL_UDP_TABLE_SIZE, /* u32 */
585 ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES, /* bitset */
586 ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY, /* nest - _UDP_ENTRY_* */
587
588 /* add new constants above here */
589 __ETHTOOL_A_TUNNEL_UDP_TABLE_CNT,
590 ETHTOOL_A_TUNNEL_UDP_TABLE_MAX = (__ETHTOOL_A_TUNNEL_UDP_TABLE_CNT - 1)
591};
592
593enum {
594 ETHTOOL_A_TUNNEL_UDP_UNSPEC,
595
596 ETHTOOL_A_TUNNEL_UDP_TABLE, /* nest - _UDP_TABLE_* */
597
598 /* add new constants above here */
599 __ETHTOOL_A_TUNNEL_UDP_CNT,
600 ETHTOOL_A_TUNNEL_UDP_MAX = (__ETHTOOL_A_TUNNEL_UDP_CNT - 1)
601};
602
603enum {
604 ETHTOOL_A_TUNNEL_INFO_UNSPEC,
605 ETHTOOL_A_TUNNEL_INFO_HEADER, /* nest - _A_HEADER_* */
606
607 ETHTOOL_A_TUNNEL_INFO_UDP_PORTS, /* nest - _UDP_TABLE */
608
609 /* add new constants above here */
610 __ETHTOOL_A_TUNNEL_INFO_CNT,
611 ETHTOOL_A_TUNNEL_INFO_MAX = (__ETHTOOL_A_TUNNEL_INFO_CNT - 1)
612};
613
557/* generic netlink info */614/* generic netlink info */
558#define ETHTOOL_GENL_NAME "ethtool"615#define ETHTOOL_GENL_NAME "ethtool"
559#define ETHTOOL_GENL_VERSION 1616#define ETHTOOL_GENL_VERSION 1
include/uapi/linux/hsr_netlink.h+1−1
@@ -17,7 +17,7 @@ · 16 unmodified lines
17/* Generic Netlink HSR family definition17/* Generic Netlink HSR family definition
18 */18 */
19 19
20/* attributes */20/* attributes for HSR or PRP node */
21enum {21enum {
22 HSR_A_UNSPEC,22 HSR_A_UNSPEC,
23 HSR_A_NODE_ADDR,23 HSR_A_NODE_ADDR,
include/uapi/linux/icmp.h+22−0
@@ -19,6 +19,7 @@ · 18 unmodified lines
19#define _UAPI_LINUX_ICMP_H19#define _UAPI_LINUX_ICMP_H
20 20
21#include <linux/types.h>21#include <linux/types.h>
22#include <asm/byteorder.h>
22 23
23#define ICMP_ECHOREPLY 0 /* Echo Reply */24#define ICMP_ECHOREPLY 0 /* Echo Reply */
24#define ICMP_DEST_UNREACH 3 /* Destination Unreachable */25#define ICMP_DEST_UNREACH 3 /* Destination Unreachable */
@@ -95,5 +96,26 @@ struct icmp_filter { · 70 unmodified lines
95 __u32 data;96 __u32 data;
96};97};
97 98
99/* RFC 4884 extension struct: one per message */
100struct icmp_ext_hdr {
101#if defined(__LITTLE_ENDIAN_BITFIELD)
102 __u8 reserved1:4,
103 version:4;
104#elif defined(__BIG_ENDIAN_BITFIELD)
105 __u8 version:4,
106 reserved1:4;
107#else
108#error "Please fix <asm/byteorder.h>"
109#endif
110 __u8 reserved2;
111 __sum16 checksum;
112};
113
114/* RFC 4884 extension object header: one for each object */
115struct icmp_extobj_hdr {
116 __be16 length;
117 __u8 class_num;
118 __u8 class_type;
119};
98 120
99#endif /* _UAPI_LINUX_ICMP_H */121#endif /* _UAPI_LINUX_ICMP_H */
include/uapi/linux/icmpv6.h+1−0
@@ -68,6 +68,7 @@ struct icmp6hdr { · 67 unmodified lines
68#define icmp6_mtu icmp6_dataun.un_data32[0]68#define icmp6_mtu icmp6_dataun.un_data32[0]
69#define icmp6_unused icmp6_dataun.un_data32[0]69#define icmp6_unused icmp6_dataun.un_data32[0]
70#define icmp6_maxdelay icmp6_dataun.un_data16[0]70#define icmp6_maxdelay icmp6_dataun.un_data16[0]
71#define icmp6_datagram_len icmp6_dataun.un_data8[0]
71#define icmp6_router icmp6_dataun.u_nd_advt.router72#define icmp6_router icmp6_dataun.u_nd_advt.router
72#define icmp6_solicited icmp6_dataun.u_nd_advt.solicited73#define icmp6_solicited icmp6_dataun.u_nd_advt.solicited
73#define icmp6_override icmp6_dataun.u_nd_advt.override74#define icmp6_override icmp6_dataun.u_nd_advt.override
include/uapi/linux/if_bridge.h+75−0
@@ -166,6 +166,10 @@ enum { · 165 unmodified lines
166 IFLA_BRIDGE_MRP_RING_STATE,166 IFLA_BRIDGE_MRP_RING_STATE,
167 IFLA_BRIDGE_MRP_RING_ROLE,167 IFLA_BRIDGE_MRP_RING_ROLE,
168 IFLA_BRIDGE_MRP_START_TEST,168 IFLA_BRIDGE_MRP_START_TEST,
169 IFLA_BRIDGE_MRP_INFO,
170 IFLA_BRIDGE_MRP_IN_ROLE,
171 IFLA_BRIDGE_MRP_IN_STATE,
172 IFLA_BRIDGE_MRP_START_IN_TEST,
169 __IFLA_BRIDGE_MRP_MAX,173 __IFLA_BRIDGE_MRP_MAX,
170};174};
171 175
@@ -228,6 +232,58 @@ enum { · 56 unmodified lines
228 232
229#define IFLA_BRIDGE_MRP_START_TEST_MAX (__IFLA_BRIDGE_MRP_START_TEST_MAX - 1)233#define IFLA_BRIDGE_MRP_START_TEST_MAX (__IFLA_BRIDGE_MRP_START_TEST_MAX - 1)
230 234
235enum {
236 IFLA_BRIDGE_MRP_INFO_UNSPEC,
237 IFLA_BRIDGE_MRP_INFO_RING_ID,
238 IFLA_BRIDGE_MRP_INFO_P_IFINDEX,
239 IFLA_BRIDGE_MRP_INFO_S_IFINDEX,
240 IFLA_BRIDGE_MRP_INFO_PRIO,
241 IFLA_BRIDGE_MRP_INFO_RING_STATE,
242 IFLA_BRIDGE_MRP_INFO_RING_ROLE,
243 IFLA_BRIDGE_MRP_INFO_TEST_INTERVAL,
244 IFLA_BRIDGE_MRP_INFO_TEST_MAX_MISS,
245 IFLA_BRIDGE_MRP_INFO_TEST_MONITOR,
246 IFLA_BRIDGE_MRP_INFO_I_IFINDEX,
247 IFLA_BRIDGE_MRP_INFO_IN_STATE,
248 IFLA_BRIDGE_MRP_INFO_IN_ROLE,
249 IFLA_BRIDGE_MRP_INFO_IN_TEST_INTERVAL,
250 IFLA_BRIDGE_MRP_INFO_IN_TEST_MAX_MISS,
251 __IFLA_BRIDGE_MRP_INFO_MAX,
252};
253
254#define IFLA_BRIDGE_MRP_INFO_MAX (__IFLA_BRIDGE_MRP_INFO_MAX - 1)
255
256enum {
257 IFLA_BRIDGE_MRP_IN_STATE_UNSPEC,
258 IFLA_BRIDGE_MRP_IN_STATE_IN_ID,
259 IFLA_BRIDGE_MRP_IN_STATE_STATE,
260 __IFLA_BRIDGE_MRP_IN_STATE_MAX,
261};
262
263#define IFLA_BRIDGE_MRP_IN_STATE_MAX (__IFLA_BRIDGE_MRP_IN_STATE_MAX - 1)
264
265enum {
266 IFLA_BRIDGE_MRP_IN_ROLE_UNSPEC,
267 IFLA_BRIDGE_MRP_IN_ROLE_RING_ID,
268 IFLA_BRIDGE_MRP_IN_ROLE_IN_ID,
269 IFLA_BRIDGE_MRP_IN_ROLE_ROLE,
270 IFLA_BRIDGE_MRP_IN_ROLE_I_IFINDEX,
271 __IFLA_BRIDGE_MRP_IN_ROLE_MAX,
272};
273
274#define IFLA_BRIDGE_MRP_IN_ROLE_MAX (__IFLA_BRIDGE_MRP_IN_ROLE_MAX - 1)
275
276enum {
277 IFLA_BRIDGE_MRP_START_IN_TEST_UNSPEC,
278 IFLA_BRIDGE_MRP_START_IN_TEST_IN_ID,
279 IFLA_BRIDGE_MRP_START_IN_TEST_INTERVAL,
280 IFLA_BRIDGE_MRP_START_IN_TEST_MAX_MISS,
281 IFLA_BRIDGE_MRP_START_IN_TEST_PERIOD,
282 __IFLA_BRIDGE_MRP_START_IN_TEST_MAX,
283};
284
285#define IFLA_BRIDGE_MRP_START_IN_TEST_MAX (__IFLA_BRIDGE_MRP_START_IN_TEST_MAX - 1)
286
231struct br_mrp_instance {287struct br_mrp_instance {
232 __u32 ring_id;288 __u32 ring_id;
233 __u32 p_ifindex;289 __u32 p_ifindex;
@@ -253,6 +309,25 @@ struct br_mrp_start_test { · 19 unmodified lines
253 __u32 monitor;309 __u32 monitor;
254};310};
255 311
312struct br_mrp_in_state {
313 __u32 in_state;
314 __u16 in_id;
315};
316
317struct br_mrp_in_role {
318 __u32 ring_id;
319 __u32 in_role;
320 __u32 i_ifindex;
321 __u16 in_id;
322};
323
324struct br_mrp_start_in_test {
325 __u32 interval;
326 __u32 max_miss;
327 __u32 period;
328 __u16 in_id;
329};
330
256struct bridge_stp_xstats {331struct bridge_stp_xstats {
257 __u64 transition_blk;332 __u64 transition_blk;
258 __u64 transition_fwd;333 __u64 transition_fwd;
include/uapi/linux/if_link.h+22−1
@@ -170,12 +170,22 @@ enum { · 169 unmodified lines
170 IFLA_PROP_LIST,170 IFLA_PROP_LIST,
171 IFLA_ALT_IFNAME, /* Alternative ifname */171 IFLA_ALT_IFNAME, /* Alternative ifname */
172 IFLA_PERM_ADDRESS,172 IFLA_PERM_ADDRESS,
173 IFLA_PROTO_DOWN_REASON,
173 __IFLA_MAX174 __IFLA_MAX
174};175};
175 176
176 177
177#define IFLA_MAX (__IFLA_MAX - 1)178#define IFLA_MAX (__IFLA_MAX - 1)
178 179
180enum {
181 IFLA_PROTO_DOWN_REASON_UNSPEC,
182 IFLA_PROTO_DOWN_REASON_MASK, /* u32, mask for reason bits */
183 IFLA_PROTO_DOWN_REASON_VALUE, /* u32, reason bit value */
184
185 __IFLA_PROTO_DOWN_REASON_CNT,
186 IFLA_PROTO_DOWN_REASON_MAX = __IFLA_PROTO_DOWN_REASON_CNT - 1
187};
188
179/* backwards compatibility for userspace */189/* backwards compatibility for userspace */
180#ifndef __KERNEL__190#ifndef __KERNEL__
181#define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))191#define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
@@ -344,6 +354,7 @@ enum { · 162 unmodified lines
344 IFLA_BRPORT_ISOLATED,354 IFLA_BRPORT_ISOLATED,
345 IFLA_BRPORT_BACKUP_PORT,355 IFLA_BRPORT_BACKUP_PORT,
346 IFLA_BRPORT_MRP_RING_OPEN,356 IFLA_BRPORT_MRP_RING_OPEN,
357 IFLA_BRPORT_MRP_IN_OPEN,
347 __IFLA_BRPORT_MAX358 __IFLA_BRPORT_MAX
348};359};
349#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)360#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
@@ -906,7 +917,14 @@ enum { · 556 unmodified lines
906#define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)917#define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)
907 918
908 919
909/* HSR section */920/* HSR/PRP section, both uses same interface */
921
922/* Different redundancy protocols for hsr device */
923enum {
924 HSR_PROTOCOL_HSR,
925 HSR_PROTOCOL_PRP,
926 HSR_PROTOCOL_MAX,
927};
910 928
911enum {929enum {
912 IFLA_HSR_UNSPEC,930 IFLA_HSR_UNSPEC,
@@ -916,6 +934,9 @@ enum { · 3 unmodified lines
916 IFLA_HSR_SUPERVISION_ADDR, /* Supervision frame multicast addr */934 IFLA_HSR_SUPERVISION_ADDR, /* Supervision frame multicast addr */
917 IFLA_HSR_SEQ_NR,935 IFLA_HSR_SEQ_NR,
918 IFLA_HSR_VERSION, /* HSR version */936 IFLA_HSR_VERSION, /* HSR version */
937 IFLA_HSR_PROTOCOL, /* Indicate different protocol than
938 * HSR. For example PRP.
939 */
919 __IFLA_HSR_MAX,940 __IFLA_HSR_MAX,
920};941};
921 942
include/uapi/linux/if_xdp.h+4−1
@@ -73,9 +73,12 @@ struct xdp_umem_reg { · 72 unmodified lines
73};73};
74 74
75struct xdp_statistics {75struct xdp_statistics {
76 __u64 rx_dropped; /* Dropped for reasons other than invalid desc */76 __u64 rx_dropped; /* Dropped for other reasons */
77 __u64 rx_invalid_descs; /* Dropped due to invalid descriptor */77 __u64 rx_invalid_descs; /* Dropped due to invalid descriptor */
78 __u64 tx_invalid_descs; /* Dropped due to invalid descriptor */78 __u64 tx_invalid_descs; /* Dropped due to invalid descriptor */
79 __u64 rx_ring_full; /* Dropped due to rx ring being full */
80 __u64 rx_fill_ring_empty_descs; /* Failed to retrieve item from fill ring */
81 __u64 tx_ring_empty_descs; /* Failed to retrieve item from tx ring */
79};82};
80 83
81struct xdp_options {84struct xdp_options {
include/uapi/linux/in.h+1−0
@@ -123,6 +123,7 @@ struct in_addr { · 122 unmodified lines
123#define IP_CHECKSUM 23123#define IP_CHECKSUM 23
124#define IP_BIND_ADDRESS_NO_PORT 24124#define IP_BIND_ADDRESS_NO_PORT 24
125#define IP_RECVFRAGSIZE 25125#define IP_RECVFRAGSIZE 25
126#define IP_RECVERR_RFC4884 26
126 127
127/* IP_MTU_DISCOVER values */128/* IP_MTU_DISCOVER values */
128#define IP_PMTUDISC_DONT 0 /* Never send DF frames */129#define IP_PMTUDISC_DONT 0 /* Never send DF frames */
include/uapi/linux/in6.h+1−0
@@ -179,6 +179,7 @@ struct in6_flowlabel_req { · 178 unmodified lines
179#define IPV6_LEAVE_ANYCAST 28179#define IPV6_LEAVE_ANYCAST 28
180#define IPV6_MULTICAST_ALL 29180#define IPV6_MULTICAST_ALL 29
181#define IPV6_ROUTER_ALERT_ISOLATE 30181#define IPV6_ROUTER_ALERT_ISOLATE 30
182#define IPV6_RECVERR_RFC4884 31
182 183
183/* IPV6_MTU_DISCOVER values */184/* IPV6_MTU_DISCOVER values */
184#define IPV6_PMTUDISC_DONT 0185#define IPV6_PMTUDISC_DONT 0
include/uapi/linux/inet_diag.h+1−0
@@ -65,6 +65,7 @@ enum { · 64 unmodified lines
65 INET_DIAG_REQ_NONE,65 INET_DIAG_REQ_NONE,
66 INET_DIAG_REQ_BYTECODE,66 INET_DIAG_REQ_BYTECODE,
67 INET_DIAG_REQ_SK_BPF_STORAGES,67 INET_DIAG_REQ_SK_BPF_STORAGES,
68 INET_DIAG_REQ_PROTOCOL,
68 __INET_DIAG_REQ_MAX,69 __INET_DIAG_REQ_MAX,
69};70};
70 71
include/uapi/linux/mdio.h+26−0
@@ -324,4 +324,30 @@ static inline __u16 mdio_phy_id_c45(int prtad, int devad) · 323 unmodified lines
324 return MDIO_PHY_ID_C45 | (prtad << 5) | devad;324 return MDIO_PHY_ID_C45 | (prtad << 5) | devad;
325}325}
326 326
327/* UsxgmiiChannelInfo[15:0] for USXGMII in-band auto-negotiation.*/
328#define MDIO_USXGMII_EEE_CLK_STP 0x0080 /* EEE clock stop supported */
329#define MDIO_USXGMII_EEE 0x0100 /* EEE supported */
330#define MDIO_USXGMII_SPD_MASK 0x0e00 /* USXGMII speed mask */
331#define MDIO_USXGMII_FULL_DUPLEX 0x1000 /* USXGMII full duplex */
332#define MDIO_USXGMII_DPX_SPD_MASK 0x1e00 /* USXGMII duplex and speed bits */
333#define MDIO_USXGMII_10 0x0000 /* 10Mbps */
334#define MDIO_USXGMII_10HALF 0x0000 /* 10Mbps half-duplex */
335#define MDIO_USXGMII_10FULL 0x1000 /* 10Mbps full-duplex */
336#define MDIO_USXGMII_100 0x0200 /* 100Mbps */
337#define MDIO_USXGMII_100HALF 0x0200 /* 100Mbps half-duplex */
338#define MDIO_USXGMII_100FULL 0x1200 /* 100Mbps full-duplex */
339#define MDIO_USXGMII_1000 0x0400 /* 1000Mbps */
340#define MDIO_USXGMII_1000HALF 0x0400 /* 1000Mbps half-duplex */
341#define MDIO_USXGMII_1000FULL 0x1400 /* 1000Mbps full-duplex */
342#define MDIO_USXGMII_10G 0x0600 /* 10Gbps */
343#define MDIO_USXGMII_10GHALF 0x0600 /* 10Gbps half-duplex */
344#define MDIO_USXGMII_10GFULL 0x1600 /* 10Gbps full-duplex */
345#define MDIO_USXGMII_2500 0x0800 /* 2500Mbps */
346#define MDIO_USXGMII_2500HALF 0x0800 /* 2500Mbps half-duplex */
347#define MDIO_USXGMII_2500FULL 0x1800 /* 2500Mbps full-duplex */
348#define MDIO_USXGMII_5000 0x0a00 /* 5000Mbps */
349#define MDIO_USXGMII_5000HALF 0x0a00 /* 5000Mbps half-duplex */
350#define MDIO_USXGMII_5000FULL 0x1a00 /* 5000Mbps full-duplex */
351#define MDIO_USXGMII_LINK 0x8000 /* PHY link with copper-side partner */
352
327#endif /* _UAPI__LINUX_MDIO_H__ */353#endif /* _UAPI__LINUX_MDIO_H__ */
include/uapi/linux/mptcp.h+17−0
@@ -86,4 +86,21 @@ enum { · 85 unmodified lines
86 __MPTCP_PM_CMD_AFTER_LAST86 __MPTCP_PM_CMD_AFTER_LAST
87};87};
88 88
89#define MPTCP_INFO_FLAG_FALLBACK _BITUL(0)
90#define MPTCP_INFO_FLAG_REMOTE_KEY_RECEIVED _BITUL(1)
91
92struct mptcp_info {
93 __u8 mptcpi_subflows;
94 __u8 mptcpi_add_addr_signal;
95 __u8 mptcpi_add_addr_accepted;
96 __u8 mptcpi_subflows_max;
97 __u8 mptcpi_add_addr_signal_max;
98 __u8 mptcpi_add_addr_accepted_max;
99 __u32 mptcpi_flags;
100 __u32 mptcpi_token;
101 __u64 mptcpi_write_seq;
102 __u64 mptcpi_snd_una;
103 __u64 mptcpi_rcv_nxt;
104};
105
89#endif /* _UAPI_MPTCP_H */106#endif /* _UAPI_MPTCP_H */
include/uapi/linux/mrp_bridge.h+38−0
@@ -21,11 +21,22 @@ enum br_mrp_ring_role_type { · 20 unmodified lines
21 BR_MRP_RING_ROLE_MRA,21 BR_MRP_RING_ROLE_MRA,
22};22};
23 23
24enum br_mrp_in_role_type {
25 BR_MRP_IN_ROLE_DISABLED,
26 BR_MRP_IN_ROLE_MIC,
27 BR_MRP_IN_ROLE_MIM,
28};
29
24enum br_mrp_ring_state_type {30enum br_mrp_ring_state_type {
25 BR_MRP_RING_STATE_OPEN,31 BR_MRP_RING_STATE_OPEN,
26 BR_MRP_RING_STATE_CLOSED,32 BR_MRP_RING_STATE_CLOSED,
27};33};
28 34
35enum br_mrp_in_state_type {
36 BR_MRP_IN_STATE_OPEN,
37 BR_MRP_IN_STATE_CLOSED,
38};
39
29enum br_mrp_port_state_type {40enum br_mrp_port_state_type {
30 BR_MRP_PORT_STATE_DISABLED,41 BR_MRP_PORT_STATE_DISABLED,
31 BR_MRP_PORT_STATE_BLOCKED,42 BR_MRP_PORT_STATE_BLOCKED,
@@ -36,6 +47,7 @@ enum br_mrp_port_state_type { · 4 unmodified lines
36enum br_mrp_port_role_type {47enum br_mrp_port_role_type {
37 BR_MRP_PORT_ROLE_PRIMARY,48 BR_MRP_PORT_ROLE_PRIMARY,
38 BR_MRP_PORT_ROLE_SECONDARY,49 BR_MRP_PORT_ROLE_SECONDARY,
50 BR_MRP_PORT_ROLE_INTER,
39};51};
40 52
41enum br_mrp_tlv_header_type {53enum br_mrp_tlv_header_type {
@@ -45,6 +57,10 @@ enum br_mrp_tlv_header_type { · 3 unmodified lines
45 BR_MRP_TLV_HEADER_RING_TOPO = 0x3,57 BR_MRP_TLV_HEADER_RING_TOPO = 0x3,
46 BR_MRP_TLV_HEADER_RING_LINK_DOWN = 0x4,58 BR_MRP_TLV_HEADER_RING_LINK_DOWN = 0x4,
47 BR_MRP_TLV_HEADER_RING_LINK_UP = 0x5,59 BR_MRP_TLV_HEADER_RING_LINK_UP = 0x5,
60 BR_MRP_TLV_HEADER_IN_TEST = 0x6,
61 BR_MRP_TLV_HEADER_IN_TOPO = 0x7,
62 BR_MRP_TLV_HEADER_IN_LINK_DOWN = 0x8,
63 BR_MRP_TLV_HEADER_IN_LINK_UP = 0x9,
48 BR_MRP_TLV_HEADER_OPTION = 0x7f,64 BR_MRP_TLV_HEADER_OPTION = 0x7f,
49};65};
50 66
@@ -118,4 +134,26 @@ struct br_mrp_oui_hdr { · 67 unmodified lines
118 __u8 oui[MRP_OUI_LENGTH];134 __u8 oui[MRP_OUI_LENGTH];
119};135};
120 136
137struct br_mrp_in_test_hdr {
138 __be16 id;
139 __u8 sa[ETH_ALEN];
140 __be16 port_role;
141 __be16 state;
142 __be16 transitions;
143 __be32 timestamp;
144};
145
146struct br_mrp_in_topo_hdr {
147 __u8 sa[ETH_ALEN];
148 __be16 id;
149 __be16 interval;
150};
151
152struct br_mrp_in_link_hdr {
153 __u8 sa[ETH_ALEN];
154 __be16 port_role;
155 __be16 id;
156 __be16 interval;
157};
158
121#endif159#endif
include/uapi/linux/neighbour.h+24−0
@@ -30,6 +30,7 @@ enum { · 29 unmodified lines
30 NDA_SRC_VNI,30 NDA_SRC_VNI,
31 NDA_PROTOCOL, /* Originator of entry */31 NDA_PROTOCOL, /* Originator of entry */
32 NDA_NH_ID,32 NDA_NH_ID,
33 NDA_FDB_EXT_ATTRS,
33 __NDA_MAX34 __NDA_MAX
34};35};
35 36
@@ -172,4 +173,27 @@ enum { · 136 unmodified lines
172};173};
173#define NDTA_MAX (__NDTA_MAX - 1)174#define NDTA_MAX (__NDTA_MAX - 1)
174 175
176 /* FDB activity notification bits used in NFEA_ACTIVITY_NOTIFY:
177 * - FDB_NOTIFY_BIT - notify on activity/expire for any entry
178 * - FDB_NOTIFY_INACTIVE_BIT - mark as inactive to avoid multiple notifications
179 */
180enum {
181 FDB_NOTIFY_BIT = (1 << 0),
182 FDB_NOTIFY_INACTIVE_BIT = (1 << 1)
183};
184
185/* embedded into NDA_FDB_EXT_ATTRS:
186 * [NDA_FDB_EXT_ATTRS] = {
187 * [NFEA_ACTIVITY_NOTIFY]
188 * ...
189 * }
190 */
191enum {
192 NFEA_UNSPEC,
193 NFEA_ACTIVITY_NOTIFY,
194 NFEA_DONT_REFRESH,
195 __NFEA_MAX
196};
197#define NFEA_MAX (__NFEA_MAX - 1)
198
175#endif199#endif
include/uapi/linux/netfilter/nf_tables.h+14−0
@@ -184,6 +184,15 @@ enum nft_table_attributes { · 183 unmodified lines
184};184};
185#define NFTA_TABLE_MAX (__NFTA_TABLE_MAX - 1)185#define NFTA_TABLE_MAX (__NFTA_TABLE_MAX - 1)
186 186
187enum nft_chain_flags {
188 NFT_CHAIN_BASE = (1 << 0),
189 NFT_CHAIN_HW_OFFLOAD = (1 << 1),
190 NFT_CHAIN_BINDING = (1 << 2),
191};
192#define NFT_CHAIN_FLAGS (NFT_CHAIN_BASE | \
193 NFT_CHAIN_HW_OFFLOAD | \
194 NFT_CHAIN_BINDING)
195
187/**196/**
188 * enum nft_chain_attributes - nf_tables chain netlink attributes197 * enum nft_chain_attributes - nf_tables chain netlink attributes
189 *198 *
@@ -196,6 +205,7 @@ enum nft_table_attributes { · 6 unmodified lines
196 * @NFTA_CHAIN_TYPE: type name of the string (NLA_NUL_STRING)205 * @NFTA_CHAIN_TYPE: type name of the string (NLA_NUL_STRING)
197 * @NFTA_CHAIN_COUNTERS: counter specification of the chain (NLA_NESTED: nft_counter_attributes)206 * @NFTA_CHAIN_COUNTERS: counter specification of the chain (NLA_NESTED: nft_counter_attributes)
198 * @NFTA_CHAIN_FLAGS: chain flags207 * @NFTA_CHAIN_FLAGS: chain flags
208 * @NFTA_CHAIN_ID: uniquely identifies a chain in a transaction (NLA_U32)
199 */209 */
200enum nft_chain_attributes {210enum nft_chain_attributes {
201 NFTA_CHAIN_UNSPEC,211 NFTA_CHAIN_UNSPEC,
@@ -209,6 +219,7 @@ enum nft_chain_attributes { · 7 unmodified lines
209 NFTA_CHAIN_COUNTERS,219 NFTA_CHAIN_COUNTERS,
210 NFTA_CHAIN_PAD,220 NFTA_CHAIN_PAD,
211 NFTA_CHAIN_FLAGS,221 NFTA_CHAIN_FLAGS,
222 NFTA_CHAIN_ID,
212 __NFTA_CHAIN_MAX223 __NFTA_CHAIN_MAX
213};224};
214#define NFTA_CHAIN_MAX (__NFTA_CHAIN_MAX - 1)225#define NFTA_CHAIN_MAX (__NFTA_CHAIN_MAX - 1)
@@ -238,6 +249,7 @@ enum nft_rule_attributes { · 23 unmodified lines
238 NFTA_RULE_PAD,249 NFTA_RULE_PAD,
239 NFTA_RULE_ID,250 NFTA_RULE_ID,
240 NFTA_RULE_POSITION_ID,251 NFTA_RULE_POSITION_ID,
252 NFTA_RULE_CHAIN_ID,
241 __NFTA_RULE_MAX253 __NFTA_RULE_MAX
242};254};
243#define NFTA_RULE_MAX (__NFTA_RULE_MAX - 1)255#define NFTA_RULE_MAX (__NFTA_RULE_MAX - 1)
@@ -468,11 +480,13 @@ enum nft_data_attributes { · 224 unmodified lines
468 *480 *
469 * @NFTA_VERDICT_CODE: nf_tables verdict (NLA_U32: enum nft_verdicts)481 * @NFTA_VERDICT_CODE: nf_tables verdict (NLA_U32: enum nft_verdicts)
470 * @NFTA_VERDICT_CHAIN: jump target chain name (NLA_STRING)482 * @NFTA_VERDICT_CHAIN: jump target chain name (NLA_STRING)
483 * @NFTA_VERDICT_CHAIN_ID: jump target chain ID (NLA_U32)
471 */484 */
472enum nft_verdict_attributes {485enum nft_verdict_attributes {
473 NFTA_VERDICT_UNSPEC,486 NFTA_VERDICT_UNSPEC,
474 NFTA_VERDICT_CODE,487 NFTA_VERDICT_CODE,
475 NFTA_VERDICT_CHAIN,488 NFTA_VERDICT_CHAIN,
489 NFTA_VERDICT_CHAIN_ID,
476 __NFTA_VERDICT_MAX490 __NFTA_VERDICT_MAX
477};491};
478#define NFTA_VERDICT_MAX (__NFTA_VERDICT_MAX - 1)492#define NFTA_VERDICT_MAX (__NFTA_VERDICT_MAX - 1)
include/uapi/linux/netfilter/xt_connmark.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
4 4
5#include <linux/types.h>5#include <linux/types.h>
6 6
7/* Copyright (C) 2002,2004 MARA Systems AB <http://www.marasystems.com>7/* Copyright (C) 2002,2004 MARA Systems AB <https://www.marasystems.com>
8 * by Henrik Nordstrom <hno@marasystems.com>8 * by Henrik Nordstrom <hno@marasystems.com>
9 *9 *
10 * This program is free software; you can redistribute it and/or modify10 * This program is free software; you can redistribute it and/or modify
include/uapi/linux/nl80211.h+72−22
@@ -183,18 +183,27 @@ · 182 unmodified lines
183 *183 *
184 * By setting @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK flag drivers184 * By setting @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK flag drivers
185 * can indicate they support offloading EAPOL handshakes for WPA/WPA2185 * can indicate they support offloading EAPOL handshakes for WPA/WPA2
186 * preshared key authentication. In %NL80211_CMD_CONNECT the preshared186 * preshared key authentication in station mode. In %NL80211_CMD_CONNECT
187 * key should be specified using %NL80211_ATTR_PMK. Drivers supporting187 * the preshared key should be specified using %NL80211_ATTR_PMK. Drivers
188 * this offload may reject the %NL80211_CMD_CONNECT when no preshared188 * supporting this offload may reject the %NL80211_CMD_CONNECT when no
189 * key material is provided, for example when that driver does not189 * preshared key material is provided, for example when that driver does
190 * support setting the temporal keys through %CMD_NEW_KEY.190 * not support setting the temporal keys through %NL80211_CMD_NEW_KEY.
191 *191 *
192 * Similarly @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X flag can be192 * Similarly @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X flag can be
193 * set by drivers indicating offload support of the PTK/GTK EAPOL193 * set by drivers indicating offload support of the PTK/GTK EAPOL
194 * handshakes during 802.1X authentication. In order to use the offload194 * handshakes during 802.1X authentication in station mode. In order to
195 * the %NL80211_CMD_CONNECT should have %NL80211_ATTR_WANT_1X_4WAY_HS195 * use the offload the %NL80211_CMD_CONNECT should have
196 * attribute flag. Drivers supporting this offload may reject the196 * %NL80211_ATTR_WANT_1X_4WAY_HS attribute flag. Drivers supporting this
197 * %NL80211_CMD_CONNECT when the attribute flag is not present.197 * offload may reject the %NL80211_CMD_CONNECT when the attribute flag is
198 * not present.
199 *
200 * By setting @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK flag drivers
201 * can indicate they support offloading EAPOL handshakes for WPA/WPA2
202 * preshared key authentication in AP mode. In %NL80211_CMD_START_AP
203 * the preshared key should be specified using %NL80211_ATTR_PMK. Drivers
204 * supporting this offload may reject the %NL80211_CMD_START_AP when no
205 * preshared key material is provided, for example when that driver does
206 * not support setting the temporal keys through %NL80211_CMD_NEW_KEY.
198 *207 *
199 * For 802.1X the PMK or PMK-R0 are set by providing %NL80211_ATTR_PMK208 * For 802.1X the PMK or PMK-R0 are set by providing %NL80211_ATTR_PMK
200 * using %NL80211_CMD_SET_PMK. For offloaded FT support also209 * using %NL80211_CMD_SET_PMK. For offloaded FT support also
@@ -363,7 +372,7 @@ · 162 unmodified lines
363 * @NL80211_CMD_SET_STATION: Set station attributes for station identified by372 * @NL80211_CMD_SET_STATION: Set station attributes for station identified by
364 * %NL80211_ATTR_MAC on the interface identified by %NL80211_ATTR_IFINDEX.373 * %NL80211_ATTR_MAC on the interface identified by %NL80211_ATTR_IFINDEX.
365 * @NL80211_CMD_NEW_STATION: Add a station with given attributes to the374 * @NL80211_CMD_NEW_STATION: Add a station with given attributes to the
366 * the interface identified by %NL80211_ATTR_IFINDEX.375 * interface identified by %NL80211_ATTR_IFINDEX.
367 * @NL80211_CMD_DEL_STATION: Remove a station identified by %NL80211_ATTR_MAC376 * @NL80211_CMD_DEL_STATION: Remove a station identified by %NL80211_ATTR_MAC
368 * or, if no MAC address given, all stations, on the interface identified377 * or, if no MAC address given, all stations, on the interface identified
369 * by %NL80211_ATTR_IFINDEX. %NL80211_ATTR_MGMT_SUBTYPE and378 * by %NL80211_ATTR_IFINDEX. %NL80211_ATTR_MGMT_SUBTYPE and
@@ -383,7 +392,7 @@ · 13 unmodified lines
383 * @NL80211_CMD_DEL_MPATH: Delete a mesh path to the destination given by392 * @NL80211_CMD_DEL_MPATH: Delete a mesh path to the destination given by
384 * %NL80211_ATTR_MAC.393 * %NL80211_ATTR_MAC.
385 * @NL80211_CMD_NEW_PATH: Add a mesh path with given attributes to the394 * @NL80211_CMD_NEW_PATH: Add a mesh path with given attributes to the
386 * the interface identified by %NL80211_ATTR_IFINDEX.395 * interface identified by %NL80211_ATTR_IFINDEX.
387 * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC396 * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC
388 * or, if no MAC address given, all mesh paths, on the interface identified397 * or, if no MAC address given, all mesh paths, on the interface identified
389 * by %NL80211_ATTR_IFINDEX.398 * by %NL80211_ATTR_IFINDEX.
@@ -934,7 +943,7 @@ · 544 unmodified lines
934 * @NL80211_CMD_SET_COALESCE: Configure coalesce rules or clear existing rules.943 * @NL80211_CMD_SET_COALESCE: Configure coalesce rules or clear existing rules.
935 *944 *
936 * @NL80211_CMD_CHANNEL_SWITCH: Perform a channel switch by announcing the945 * @NL80211_CMD_CHANNEL_SWITCH: Perform a channel switch by announcing the
937 * the new channel information (Channel Switch Announcement - CSA)946 * new channel information (Channel Switch Announcement - CSA)
938 * in the beacon for some time (as defined in the947 * in the beacon for some time (as defined in the
939 * %NL80211_ATTR_CH_SWITCH_COUNT parameter) and then change to the948 * %NL80211_ATTR_CH_SWITCH_COUNT parameter) and then change to the
940 * new channel. Userspace provides the new channel information (using949 * new channel. Userspace provides the new channel information (using
@@ -1113,7 +1122,7 @@ · 172 unmodified lines
1113 * randomization may be enabled and configured by specifying the1122 * randomization may be enabled and configured by specifying the
1114 * %NL80211_ATTR_MAC and %NL80211_ATTR_MAC_MASK attributes.1123 * %NL80211_ATTR_MAC and %NL80211_ATTR_MAC_MASK attributes.
1115 * If a timeout is requested, use the %NL80211_ATTR_TIMEOUT attribute.1124 * If a timeout is requested, use the %NL80211_ATTR_TIMEOUT attribute.
1116 * A u64 cookie for further %NL80211_ATTR_COOKIE use is is returned in1125 * A u64 cookie for further %NL80211_ATTR_COOKIE use is returned in
1117 * the netlink extended ack message.1126 * the netlink extended ack message.
1118 *1127 *
1119 * To cancel a measurement, close the socket that requested it.1128 * To cancel a measurement, close the socket that requested it.
@@ -1511,7 +1520,7 @@ enum nl80211_commands { · 391 unmodified lines
1511 * rates as defined by IEEE 802.11 7.3.2.2 but without the length1520 * rates as defined by IEEE 802.11 7.3.2.2 but without the length
1512 * restriction (at most %NL80211_MAX_SUPP_RATES).1521 * restriction (at most %NL80211_MAX_SUPP_RATES).
1513 * @NL80211_ATTR_STA_VLAN: interface index of VLAN interface to move station1522 * @NL80211_ATTR_STA_VLAN: interface index of VLAN interface to move station
1514 * to, or the AP interface the station was originally added to to.1523 * to, or the AP interface the station was originally added to.
1515 * @NL80211_ATTR_STA_INFO: information about a station, part of station info1524 * @NL80211_ATTR_STA_INFO: information about a station, part of station info
1516 * given for %NL80211_CMD_GET_STATION, nested attribute containing1525 * given for %NL80211_CMD_GET_STATION, nested attribute containing
1517 * info as possible, see &enum nl80211_sta_info.1526 * info as possible, see &enum nl80211_sta_info.
@@ -2084,7 +2093,7 @@ enum nl80211_commands { · 566 unmodified lines
2084 * @NL80211_ATTR_STA_SUPPORTED_CHANNELS: array of supported channels.2093 * @NL80211_ATTR_STA_SUPPORTED_CHANNELS: array of supported channels.
2085 *2094 *
2086 * @NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES: array of supported2095 * @NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES: array of supported
2087 * supported operating classes.2096 * operating classes.
2088 *2097 *
2089 * @NL80211_ATTR_HANDLE_DFS: A flag indicating whether user space2098 * @NL80211_ATTR_HANDLE_DFS: A flag indicating whether user space
2090 * controls DFS operation in IBSS mode. If the flag is included in2099 * controls DFS operation in IBSS mode. If the flag is included in
@@ -2362,10 +2371,11 @@ enum nl80211_commands { · 271 unmodified lines
2362 *2371 *
2363 * @NL80211_ATTR_PMK: attribute for passing PMK key material. Used with2372 * @NL80211_ATTR_PMK: attribute for passing PMK key material. Used with
2364 * %NL80211_CMD_SET_PMKSA for the PMKSA identified by %NL80211_ATTR_PMKID.2373 * %NL80211_CMD_SET_PMKSA for the PMKSA identified by %NL80211_ATTR_PMKID.
2365 * For %NL80211_CMD_CONNECT it is used to provide PSK for offloading 4-way2374 * For %NL80211_CMD_CONNECT and %NL80211_CMD_START_AP it is used to provide
2366 * handshake for WPA/WPA2-PSK networks. For 802.1X authentication it is2375 * PSK for offloading 4-way handshake for WPA/WPA2-PSK networks. For 802.1X
2367 * used with %NL80211_CMD_SET_PMK. For offloaded FT support this attribute2376 * authentication it is used with %NL80211_CMD_SET_PMK. For offloaded FT
2368 * specifies the PMK-R0 if NL80211_ATTR_PMKR0_NAME is included as well.2377 * support this attribute specifies the PMK-R0 if NL80211_ATTR_PMKR0_NAME
2378 * is included as well.
2369 *2379 *
2370 * @NL80211_ATTR_SCHED_SCAN_MULTI: flag attribute which user-space shall use to2380 * @NL80211_ATTR_SCHED_SCAN_MULTI: flag attribute which user-space shall use to
2371 * indicate that it supports multiple active scheduled scan requests.2381 * indicate that it supports multiple active scheduled scan requests.
@@ -2395,7 +2405,7 @@ enum nl80211_commands { · 23 unmodified lines
2395 * nl80211_txq_stats)2405 * nl80211_txq_stats)
2396 * @NL80211_ATTR_TXQ_LIMIT: Total packet limit for the TXQ queues for this phy.2406 * @NL80211_ATTR_TXQ_LIMIT: Total packet limit for the TXQ queues for this phy.
2397 * The smaller of this and the memory limit is enforced.2407 * The smaller of this and the memory limit is enforced.
2398 * @NL80211_ATTR_TXQ_MEMORY_LIMIT: Total memory memory limit (in bytes) for the2408 * @NL80211_ATTR_TXQ_MEMORY_LIMIT: Total memory limit (in bytes) for the
2399 * TXQ queues for this phy. The smaller of this and the packet limit is2409 * TXQ queues for this phy. The smaller of this and the packet limit is
2400 * enforced.2410 * enforced.
2401 * @NL80211_ATTR_TXQ_QUANTUM: TXQ scheduler quantum (bytes). Number of bytes2411 * @NL80211_ATTR_TXQ_QUANTUM: TXQ scheduler quantum (bytes). Number of bytes
@@ -3370,6 +3380,8 @@ enum nl80211_sta_bss_param { · 968 unmodified lines
3370 * @NL80211_STA_INFO_AIRTIME_LINK_METRIC: airtime link metric for mesh station3380 * @NL80211_STA_INFO_AIRTIME_LINK_METRIC: airtime link metric for mesh station
3371 * @NL80211_STA_INFO_ASSOC_AT_BOOTTIME: Timestamp (CLOCK_BOOTTIME, nanoseconds)3381 * @NL80211_STA_INFO_ASSOC_AT_BOOTTIME: Timestamp (CLOCK_BOOTTIME, nanoseconds)
3372 * of STA's association3382 * of STA's association
3383 * @NL80211_STA_INFO_CONNECTED_TO_AS: set to true if STA has a path to a
3384 * authentication server (u8, 0 or 1)
3373 * @__NL80211_STA_INFO_AFTER_LAST: internal3385 * @__NL80211_STA_INFO_AFTER_LAST: internal
3374 * @NL80211_STA_INFO_MAX: highest possible station info attribute3386 * @NL80211_STA_INFO_MAX: highest possible station info attribute
3375 */3387 */
@@ -3417,6 +3429,7 @@ enum nl80211_sta_info { · 41 unmodified lines
3417 NL80211_STA_INFO_AIRTIME_WEIGHT,3429 NL80211_STA_INFO_AIRTIME_WEIGHT,
3418 NL80211_STA_INFO_AIRTIME_LINK_METRIC,3430 NL80211_STA_INFO_AIRTIME_LINK_METRIC,
3419 NL80211_STA_INFO_ASSOC_AT_BOOTTIME,3431 NL80211_STA_INFO_ASSOC_AT_BOOTTIME,
3432 NL80211_STA_INFO_CONNECTED_TO_AS,
3420 3433
3421 /* keep last */3434 /* keep last */
3422 __NL80211_STA_INFO_AFTER_LAST,3435 __NL80211_STA_INFO_AFTER_LAST,
@@ -4236,6 +4249,16 @@ enum nl80211_mesh_power_mode { · 813 unmodified lines
4236 * field. If left unset then the mesh formation field will only4249 * field. If left unset then the mesh formation field will only
4237 * advertise such if there is an active root mesh path.4250 * advertise such if there is an active root mesh path.
4238 *4251 *
4252 * @NL80211_MESHCONF_NOLEARN: Try to avoid multi-hop path discovery (e.g.
4253 * PREQ/PREP for HWMP) if the destination is a direct neighbor. Note that
4254 * this might not be the optimal decision as a multi-hop route might be
4255 * better. So if using this setting you will likely also want to disable
4256 * dot11MeshForwarding and use another mesh routing protocol on top.
4257 *
4258 * @NL80211_MESHCONF_CONNECTED_TO_AS: If set to true then this mesh STA
4259 * will advertise that it is connected to a authentication server
4260 * in the mesh formation field.
4261 *
4239 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use4262 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
4240 */4263 */
4241enum nl80211_meshconf_params {4264enum nl80211_meshconf_params {
@@ -4269,6 +4292,8 @@ enum nl80211_meshconf_params { · 27 unmodified lines
4269 NL80211_MESHCONF_AWAKE_WINDOW,4292 NL80211_MESHCONF_AWAKE_WINDOW,
4270 NL80211_MESHCONF_PLINK_TIMEOUT,4293 NL80211_MESHCONF_PLINK_TIMEOUT,
4271 NL80211_MESHCONF_CONNECTED_TO_GATE,4294 NL80211_MESHCONF_CONNECTED_TO_GATE,
4295 NL80211_MESHCONF_NOLEARN,
4296 NL80211_MESHCONF_CONNECTED_TO_AS,
4272 4297
4273 /* keep last */4298 /* keep last */
4274 __NL80211_MESHCONF_ATTR_AFTER_LAST,4299 __NL80211_MESHCONF_ATTR_AFTER_LAST,
@@ -4437,6 +4462,11 @@ enum nl80211_key_mode { · 162 unmodified lines
4437 * attribute must be provided as well4462 * attribute must be provided as well
4438 * @NL80211_CHAN_WIDTH_5: 5 MHz OFDM channel4463 * @NL80211_CHAN_WIDTH_5: 5 MHz OFDM channel
4439 * @NL80211_CHAN_WIDTH_10: 10 MHz OFDM channel4464 * @NL80211_CHAN_WIDTH_10: 10 MHz OFDM channel
4465 * @NL80211_CHAN_WIDTH_1: 1 MHz OFDM channel
4466 * @NL80211_CHAN_WIDTH_2: 2 MHz OFDM channel
4467 * @NL80211_CHAN_WIDTH_4: 4 MHz OFDM channel
4468 * @NL80211_CHAN_WIDTH_8: 8 MHz OFDM channel
4469 * @NL80211_CHAN_WIDTH_16: 16 MHz OFDM channel
4440 */4470 */
4441enum nl80211_chan_width {4471enum nl80211_chan_width {
4442 NL80211_CHAN_WIDTH_20_NOHT,4472 NL80211_CHAN_WIDTH_20_NOHT,
@@ -4447,6 +4477,11 @@ enum nl80211_chan_width { · 4 unmodified lines
4447 NL80211_CHAN_WIDTH_160,4477 NL80211_CHAN_WIDTH_160,
4448 NL80211_CHAN_WIDTH_5,4478 NL80211_CHAN_WIDTH_5,
4449 NL80211_CHAN_WIDTH_10,4479 NL80211_CHAN_WIDTH_10,
4480 NL80211_CHAN_WIDTH_1,
4481 NL80211_CHAN_WIDTH_2,
4482 NL80211_CHAN_WIDTH_4,
4483 NL80211_CHAN_WIDTH_8,
4484 NL80211_CHAN_WIDTH_16,
4450};4485};
4451 4486
4452/**4487/**
@@ -4457,11 +4492,15 @@ enum nl80211_chan_width { · 4 unmodified lines
4457 * @NL80211_BSS_CHAN_WIDTH_20: control channel is 20 MHz wide or compatible4492 * @NL80211_BSS_CHAN_WIDTH_20: control channel is 20 MHz wide or compatible
4458 * @NL80211_BSS_CHAN_WIDTH_10: control channel is 10 MHz wide4493 * @NL80211_BSS_CHAN_WIDTH_10: control channel is 10 MHz wide
4459 * @NL80211_BSS_CHAN_WIDTH_5: control channel is 5 MHz wide4494 * @NL80211_BSS_CHAN_WIDTH_5: control channel is 5 MHz wide
4495 * @NL80211_BSS_CHAN_WIDTH_1: control channel is 1 MHz wide
4496 * @NL80211_BSS_CHAN_WIDTH_2: control channel is 2 MHz wide
4460 */4497 */
4461enum nl80211_bss_scan_width {4498enum nl80211_bss_scan_width {
4462 NL80211_BSS_CHAN_WIDTH_20,4499 NL80211_BSS_CHAN_WIDTH_20,
4463 NL80211_BSS_CHAN_WIDTH_10,4500 NL80211_BSS_CHAN_WIDTH_10,
4464 NL80211_BSS_CHAN_WIDTH_5,4501 NL80211_BSS_CHAN_WIDTH_5,
4502 NL80211_BSS_CHAN_WIDTH_1,
4503 NL80211_BSS_CHAN_WIDTH_2,
4465};4504};
4466 4505
4467/**4506/**
@@ -4740,6 +4779,7 @@ enum nl80211_txrate_gi { · 272 unmodified lines
4740 * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz)4779 * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz)
4741 * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 69.12 GHz)4780 * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 69.12 GHz)
4742 * @NL80211_BAND_6GHZ: around 6 GHz band (5.9 - 7.2 GHz)4781 * @NL80211_BAND_6GHZ: around 6 GHz band (5.9 - 7.2 GHz)
4782 * @NL80211_BAND_S1GHZ: around 900MHz, supported by S1G PHYs
4743 * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace4783 * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace
4744 * since newer kernel versions may support more bands4784 * since newer kernel versions may support more bands
4745 */4785 */
@@ -4748,6 +4788,7 @@ enum nl80211_band { · 2 unmodified lines
4748 NL80211_BAND_5GHZ,4788 NL80211_BAND_5GHZ,
4749 NL80211_BAND_60GHZ,4789 NL80211_BAND_60GHZ,
4750 NL80211_BAND_6GHZ,4790 NL80211_BAND_6GHZ,
4791 NL80211_BAND_S1GHZ,
4751 4792
4752 NUM_NL80211_BANDS,4793 NUM_NL80211_BANDS,
4753};4794};
@@ -5636,7 +5677,7 @@ enum nl80211_feature_flags { · 882 unmodified lines
5636 * enum nl80211_ext_feature_index - bit index of extended features.5677 * enum nl80211_ext_feature_index - bit index of extended features.
5637 * @NL80211_EXT_FEATURE_VHT_IBSS: This driver supports IBSS with VHT datarates.5678 * @NL80211_EXT_FEATURE_VHT_IBSS: This driver supports IBSS with VHT datarates.
5638 * @NL80211_EXT_FEATURE_RRM: This driver supports RRM. When featured, user can5679 * @NL80211_EXT_FEATURE_RRM: This driver supports RRM. When featured, user can
5639 * can request to use RRM (see %NL80211_ATTR_USE_RRM) with5680 * request to use RRM (see %NL80211_ATTR_USE_RRM) with
5640 * %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests, which will set5681 * %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests, which will set
5641 * the ASSOC_REQ_USE_RRM flag in the association request even if5682 * the ASSOC_REQ_USE_RRM flag in the association request even if
5642 * NL80211_FEATURE_QUIET is not advertized.5683 * NL80211_FEATURE_QUIET is not advertized.
@@ -5773,6 +5814,13 @@ enum nl80211_feature_flags { · 130 unmodified lines
5773 * @NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS: The driver5814 * @NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS: The driver
5774 * can report tx status for control port over nl80211 tx operations.5815 * can report tx status for control port over nl80211 tx operations.
5775 *5816 *
5817 * @NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION: Driver supports Operating
5818 * Channel Validation (OCV) when using driver's SME for RSNA handshakes.
5819 *
5820 * @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK: Device wants to do 4-way
5821 * handshake with PSK in AP mode (PSK is passed as part of the start AP
5822 * command).
5823 *
5776 * @NUM_NL80211_EXT_FEATURES: number of extended features.5824 * @NUM_NL80211_EXT_FEATURES: number of extended features.
5777 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.5825 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
5778 */5826 */
@@ -5828,6 +5876,8 @@ enum nl80211_ext_feature_index { · 49 unmodified lines
5828 NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT,5876 NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT,
5829 NL80211_EXT_FEATURE_SCAN_FREQ_KHZ,5877 NL80211_EXT_FEATURE_SCAN_FREQ_KHZ,
5830 NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS,5878 NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS,
5879 NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION,
5880 NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK,
5831 5881
5832 /* add new features before the definition below */5882 /* add new features before the definition below */
5833 NUM_NL80211_EXT_FEATURES,5883 NUM_NL80211_EXT_FEATURES,
@@ -6045,7 +6095,7 @@ enum nl80211_dfs_state { · 211 unmodified lines
6045};6095};
6046 6096
6047/**6097/**
6048 * enum enum nl80211_protocol_features - nl80211 protocol features6098 * enum nl80211_protocol_features - nl80211 protocol features
6049 * @NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP: nl80211 supports splitting6099 * @NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP: nl80211 supports splitting
6050 * wiphy dumps (if requested by the application with the attribute6100 * wiphy dumps (if requested by the application with the attribute
6051 * %NL80211_ATTR_SPLIT_WIPHY_DUMP. Also supported is filtering the6101 * %NL80211_ATTR_SPLIT_WIPHY_DUMP. Also supported is filtering the
include/uapi/linux/openvswitch.h+2−1
@@ -86,6 +86,7 @@ enum ovs_datapath_attr { · 85 unmodified lines
86 OVS_DP_ATTR_MEGAFLOW_STATS, /* struct ovs_dp_megaflow_stats */86 OVS_DP_ATTR_MEGAFLOW_STATS, /* struct ovs_dp_megaflow_stats */
87 OVS_DP_ATTR_USER_FEATURES, /* OVS_DP_F_* */87 OVS_DP_ATTR_USER_FEATURES, /* OVS_DP_F_* */
88 OVS_DP_ATTR_PAD,88 OVS_DP_ATTR_PAD,
89 OVS_DP_ATTR_MASKS_CACHE_SIZE,
89 __OVS_DP_ATTR_MAX90 __OVS_DP_ATTR_MAX
90};91};
91 92
@@ -102,8 +103,8 @@ struct ovs_dp_megaflow_stats { · 10 unmodified lines
102 __u64 n_mask_hit; /* Number of masks used for flow lookups. */103 __u64 n_mask_hit; /* Number of masks used for flow lookups. */
103 __u32 n_masks; /* Number of masks for the datapath. */104 __u32 n_masks; /* Number of masks for the datapath. */
104 __u32 pad0; /* Pad for future expension. */105 __u32 pad0; /* Pad for future expension. */
106 __u64 n_cache_hit; /* Number of cache matches for flow lookups. */
105 __u64 pad1; /* Pad for future expension. */107 __u64 pad1; /* Pad for future expension. */
106 __u64 pad2; /* Pad for future expension. */
107};108};
108 109
109struct ovs_vport_stats {110struct ovs_vport_stats {
include/uapi/linux/pkt_cls.h+3−0
@@ -578,6 +578,9 @@ enum { · 577 unmodified lines
578 578
579 TCA_FLOWER_KEY_MPLS_OPTS,579 TCA_FLOWER_KEY_MPLS_OPTS,
580 580
581 TCA_FLOWER_KEY_HASH, /* u32 */
582 TCA_FLOWER_KEY_HASH_MASK, /* u32 */
583
581 __TCA_FLOWER_MAX,584 __TCA_FLOWER_MAX,
582};585};
583 586
include/uapi/linux/pkt_sched.h+2−0
@@ -257,6 +257,8 @@ enum { · 256 unmodified lines
257 TCA_RED_STAB,257 TCA_RED_STAB,
258 TCA_RED_MAX_P,258 TCA_RED_MAX_P,
259 TCA_RED_FLAGS, /* bitfield32 */259 TCA_RED_FLAGS, /* bitfield32 */
260 TCA_RED_EARLY_DROP_BLOCK, /* u32 */
261 TCA_RED_MARK_BLOCK, /* u32 */
260 __TCA_RED_MAX,262 __TCA_RED_MAX,
261};263};
262 264
include/uapi/linux/ptp_clock.h+30−4
@@ -53,12 +53,16 @@ · 52 unmodified lines
53/*53/*
54 * Bits of the ptp_perout_request.flags field:54 * Bits of the ptp_perout_request.flags field:
55 */55 */
56#define PTP_PEROUT_ONE_SHOT (1<<0)56#define PTP_PEROUT_ONE_SHOT (1<<0)
57#define PTP_PEROUT_DUTY_CYCLE (1<<1)
58#define PTP_PEROUT_PHASE (1<<2)
57 59
58/*60/*
59 * flag fields valid for the new PTP_PEROUT_REQUEST2 ioctl.61 * flag fields valid for the new PTP_PEROUT_REQUEST2 ioctl.
60 */62 */
61#define PTP_PEROUT_VALID_FLAGS (PTP_PEROUT_ONE_SHOT)63#define PTP_PEROUT_VALID_FLAGS (PTP_PEROUT_ONE_SHOT | \
64 PTP_PEROUT_DUTY_CYCLE | \
65 PTP_PEROUT_PHASE)
62 66
63/*67/*
64 * No flags are valid for the original PTP_PEROUT_REQUEST ioctl68 * No flags are valid for the original PTP_PEROUT_REQUEST ioctl
@@ -101,11 +105,33 @@ struct ptp_extts_request { · 36 unmodified lines
101};105};
102 106
103struct ptp_perout_request {107struct ptp_perout_request {
104 struct ptp_clock_time start; /* Absolute start time. */108 union {
109 /*
110 * Absolute start time.
111 * Valid only if (flags & PTP_PEROUT_PHASE) is unset.
112 */
113 struct ptp_clock_time start;
114 /*
115 * Phase offset. The signal should start toggling at an
116 * unspecified integer multiple of the period, plus this value.
117 * The start time should be "as soon as possible".
118 * Valid only if (flags & PTP_PEROUT_PHASE) is set.
119 */
120 struct ptp_clock_time phase;
121 };
105 struct ptp_clock_time period; /* Desired period, zero means disable. */122 struct ptp_clock_time period; /* Desired period, zero means disable. */
106 unsigned int index; /* Which channel to configure. */123 unsigned int index; /* Which channel to configure. */
107 unsigned int flags;124 unsigned int flags;
108 unsigned int rsv[4]; /* Reserved for future use. */125 union {
126 /*
127 * The "on" time of the signal.
128 * Must be lower than the period.
129 * Valid only if (flags & PTP_PEROUT_DUTY_CYCLE) is set.
130 */
131 struct ptp_clock_time on;
132 /* Reserved for future use. */
133 unsigned int rsv[4];
134 };
109};135};
110 136
111#define PTP_MAX_SAMPLES 25 /* Maximum allowed offset measurement samples. */137#define PTP_MAX_SAMPLES 25 /* Maximum allowed offset measurement samples. */
include/uapi/linux/rtnetlink.h+24−22
@@ -257,12 +257,12 @@ enum { · 256 unmodified lines
257 257
258/* rtm_protocol */258/* rtm_protocol */
259 259
260#define RTPROT_UNSPEC 0260#define RTPROT_UNSPEC 0
261#define RTPROT_REDIRECT 1 /* Route installed by ICMP redirects;261#define RTPROT_REDIRECT 1 /* Route installed by ICMP redirects;
262 not used by current IPv4 */262 not used by current IPv4 */
263#define RTPROT_KERNEL 2 /* Route installed by kernel */263#define RTPROT_KERNEL 2 /* Route installed by kernel */
264#define RTPROT_BOOT 3 /* Route installed during boot */264#define RTPROT_BOOT 3 /* Route installed during boot */
265#define RTPROT_STATIC 4 /* Route installed by administrator */265#define RTPROT_STATIC 4 /* Route installed by administrator */
266 266
267/* Values of protocol >= RTPROT_STATIC are not interpreted by kernel;267/* Values of protocol >= RTPROT_STATIC are not interpreted by kernel;
268 they are just passed from user and back as is.268 they are just passed from user and back as is.
@@ -271,22 +271,23 @@ enum { · 2 unmodified lines
271 avoid conflicts.271 avoid conflicts.
272 */272 */
273 273
274#define RTPROT_GATED 8 /* Apparently, GateD */274#define RTPROT_GATED 8 /* Apparently, GateD */
275#define RTPROT_RA 9 /* RDISC/ND router advertisements */275#define RTPROT_RA 9 /* RDISC/ND router advertisements */
276#define RTPROT_MRT 10 /* Merit MRT */276#define RTPROT_MRT 10 /* Merit MRT */
277#define RTPROT_ZEBRA 11 /* Zebra */277#define RTPROT_ZEBRA 11 /* Zebra */
278#define RTPROT_BIRD 12 /* BIRD */278#define RTPROT_BIRD 12 /* BIRD */
279#define RTPROT_DNROUTED 13 /* DECnet routing daemon */279#define RTPROT_DNROUTED 13 /* DECnet routing daemon */
280#define RTPROT_XORP 14 /* XORP */280#define RTPROT_XORP 14 /* XORP */
281#define RTPROT_NTK 15 /* Netsukuku */281#define RTPROT_NTK 15 /* Netsukuku */
282#define RTPROT_DHCP 16 /* DHCP client */282#define RTPROT_DHCP 16 /* DHCP client */
283#define RTPROT_MROUTED 17 /* Multicast daemon */283#define RTPROT_MROUTED 17 /* Multicast daemon */
284#define RTPROT_BABEL 42 /* Babel daemon */284#define RTPROT_KEEPALIVED 18 /* Keepalived daemon */
285#define RTPROT_BGP 186 /* BGP Routes */285#define RTPROT_BABEL 42 /* Babel daemon */
286#define RTPROT_ISIS 187 /* ISIS Routes */286#define RTPROT_BGP 186 /* BGP Routes */
287#define RTPROT_OSPF 188 /* OSPF Routes */287#define RTPROT_ISIS 187 /* ISIS Routes */
288#define RTPROT_RIP 189 /* RIP Routes */288#define RTPROT_OSPF 188 /* OSPF Routes */
289#define RTPROT_EIGRP 192 /* EIGRP Routes */289#define RTPROT_RIP 189 /* RIP Routes */
290#define RTPROT_EIGRP 192 /* EIGRP Routes */
290 291
291/* rtm_scope292/* rtm_scope
292 293
@@ -777,6 +778,7 @@ enum { · 484 unmodified lines
777#define RTEXT_FILTER_BRVLAN (1 << 1)778#define RTEXT_FILTER_BRVLAN (1 << 1)
778#define RTEXT_FILTER_BRVLAN_COMPRESSED (1 << 2)779#define RTEXT_FILTER_BRVLAN_COMPRESSED (1 << 2)
779#define RTEXT_FILTER_SKIP_STATS (1 << 3)780#define RTEXT_FILTER_SKIP_STATS (1 << 3)
781#define RTEXT_FILTER_MRP (1 << 4)
780 782
781/* End of information exported to user level */783/* End of information exported to user level */
782 784
include/uapi/linux/seg6_iptunnel.h+0−21
@@ -37,25 +37,4 @@ enum { · 36 unmodified lines
37 SEG6_IPTUN_MODE_L2ENCAP,37 SEG6_IPTUN_MODE_L2ENCAP,
38};38};
39 39
40#ifdef __KERNEL__
41
42static inline size_t seg6_lwt_headroom(struct seg6_iptunnel_encap *tuninfo)
43{
44 int head = 0;
45
46 switch (tuninfo->mode) {
47 case SEG6_IPTUN_MODE_INLINE:
48 break;
49 case SEG6_IPTUN_MODE_ENCAP:
50 head = sizeof(struct ipv6hdr);
51 break;
52 case SEG6_IPTUN_MODE_L2ENCAP:
53 return 0;
54 }
55
56 return ((tuninfo->srh->hdrlen + 1) << 3) + head;
57}
58
59#endif
60
61#endif40#endif
include/uapi/linux/snmp.h+1−0
@@ -287,6 +287,7 @@ enum · 286 unmodified lines
287 LINUX_MIB_TCPFASTOPENPASSIVEALTKEY, /* TCPFastOpenPassiveAltKey */287 LINUX_MIB_TCPFASTOPENPASSIVEALTKEY, /* TCPFastOpenPassiveAltKey */
288 LINUX_MIB_TCPTIMEOUTREHASH, /* TCPTimeoutRehash */288 LINUX_MIB_TCPTIMEOUTREHASH, /* TCPTimeoutRehash */
289 LINUX_MIB_TCPDUPLICATEDATAREHASH, /* TCPDuplicateDataRehash */289 LINUX_MIB_TCPDUPLICATEDATAREHASH, /* TCPDuplicateDataRehash */
290 LINUX_MIB_TCPDSACKRECVSEGS, /* TCPDSACKRecvSegs */
290 __LINUX_MIB_MAX291 __LINUX_MIB_MAX
291};292};
292 293
include/uapi/linux/tcp.h+1−0
@@ -313,6 +313,7 @@ enum { · 312 unmodified lines
313 TCP_NLA_SRTT, /* smoothed RTT in usecs */313 TCP_NLA_SRTT, /* smoothed RTT in usecs */
314 TCP_NLA_TIMEOUT_REHASH, /* Timeout-triggered rehash attempts */314 TCP_NLA_TIMEOUT_REHASH, /* Timeout-triggered rehash attempts */
315 TCP_NLA_BYTES_NOTSENT, /* Bytes in write queue not yet sent */315 TCP_NLA_BYTES_NOTSENT, /* Bytes in write queue not yet sent */
316 TCP_NLA_EDT, /* Earliest departure time (CLOCK_MONOTONIC) */
316};317};
317 318
318/* for TCP_MD5SIG socket option */319/* for TCP_MD5SIG socket option */
include/uapi/linux/wireless.h+1−1
@@ -914,7 +914,7 @@ union iwreq_data { · 913 unmodified lines
914 struct iw_param sens; /* signal level threshold */914 struct iw_param sens; /* signal level threshold */
915 struct iw_param bitrate; /* default bit rate */915 struct iw_param bitrate; /* default bit rate */
916 struct iw_param txpower; /* default transmit power */916 struct iw_param txpower; /* default transmit power */
917 struct iw_param rts; /* RTS threshold threshold */917 struct iw_param rts; /* RTS threshold */
918 struct iw_param frag; /* Fragmentation threshold */918 struct iw_param frag; /* Fragmentation threshold */
919 __u32 mode; /* Operation mode */919 __u32 mode; /* Operation mode */
920 struct iw_param retry; /* Retry limits & lifetime */920 struct iw_param retry; /* Retry limits & lifetime */
include/uapi/linux/xdp_diag.h+11−0
@@ -30,6 +30,7 @@ struct xdp_diag_msg { · 29 unmodified lines
30#define XDP_SHOW_RING_CFG (1 << 1)30#define XDP_SHOW_RING_CFG (1 << 1)
31#define XDP_SHOW_UMEM (1 << 2)31#define XDP_SHOW_UMEM (1 << 2)
32#define XDP_SHOW_MEMINFO (1 << 3)32#define XDP_SHOW_MEMINFO (1 << 3)
33#define XDP_SHOW_STATS (1 << 4)
33 34
34enum {35enum {
35 XDP_DIAG_NONE,36 XDP_DIAG_NONE,
@@ -41,6 +42,7 @@ enum { · 5 unmodified lines
41 XDP_DIAG_UMEM_FILL_RING,42 XDP_DIAG_UMEM_FILL_RING,
42 XDP_DIAG_UMEM_COMPLETION_RING,43 XDP_DIAG_UMEM_COMPLETION_RING,
43 XDP_DIAG_MEMINFO,44 XDP_DIAG_MEMINFO,
45 XDP_DIAG_STATS,
44 __XDP_DIAG_MAX,46 __XDP_DIAG_MAX,
45};47};
46 48
@@ -69,4 +71,13 @@ struct xdp_diag_umem { · 22 unmodified lines
69 __u32 refs;71 __u32 refs;
70};72};
71 73
74struct xdp_diag_stats {
75 __u64 n_rx_dropped;
76 __u64 n_rx_invalid;
77 __u64 n_rx_full;
78 __u64 n_fill_ring_empty;
79 __u64 n_tx_invalid;
80 __u64 n_tx_ring_empty;
81};
82
72#endif /* _LINUX_XDP_DIAG_H */83#endif /* _LINUX_XDP_DIAG_H */
include/uapi/linux/xfrm.h+1−0
@@ -387,6 +387,7 @@ struct xfrm_usersa_info { · 386 unmodified lines
387};387};
388 388
389#define XFRM_SA_XFLAG_DONT_ENCAP_DSCP 1389#define XFRM_SA_XFLAG_DONT_ENCAP_DSCP 1
390#define XFRM_SA_XFLAG_OSEQ_MAY_WRAP 2
390 391
391struct xfrm_usersa_id {392struct xfrm_usersa_id {
392 xfrm_address_t daddr;393 xfrm_address_t daddr;

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