History

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

Pull networking updates from David Miller: 1) Significantly shrink the core networking routing structures. Result of http://vger.kernel.org/~davem/seoul2017_netdev_keynote.pdf 2) Add netdevsim driver for testing various offloads, from Jakub Kicinski. 3) Support cross-chip FDB operations in DSA, from Vivien Didelot. 4) Add a 2nd listener hash table for TCP, similar to what was done for UDP. From Martin KaFai Lau. 5) Add eBPF based queue selection to tun, from Jason Wang. 6) Lockless qdisc support, from John Fastabend. 7) SCTP stream interleave support, from Xin Long. 8) Smoother TCP receive autotuning, from Eric Dumazet. 9) Lots of erspan tunneling enhancements, from William Tu. 10) Add true function call support to BPF, from Alexei Starovoitov. 11) Add explicit support for GRO HW offloading, from Michael Chan. 12) Support extack generation in more netlink subsystems. From Alexander Aring, Quentin Monnet, and Jakub Kicinski. 13) Add 1000BaseX, flow control, and EEE support to mvneta driver. From Russell King. 14) Add flow table abstraction to netfilter, from Pablo Neira Ayuso. 15) Many improvements and simplifications to the NFP driver bpf JIT, from Jakub Kicinski. 16) Support for ipv6 non-equal cost multipath routing, from Ido Schimmel. 17) Add resource abstration to devlink, from Arkadi Sharshevsky. 18) Packet scheduler classifier shared filter block support, from Jiri Pirko. 19) Avoid locking in act_csum, from Davide Caratti. 20) devinet_ioctl() simplifications from Al viro. 21) More TCP bpf improvements from Lawrence Brakmo. 22) Add support for onlink ipv6 route flag, similar to ipv4, from David Ahern. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1925 commits) tls: Add support for encryption using async offload accelerator ip6mr: fix stale iterator net/sched: kconfig: Remove blank help texts openvswitch: meter: Use 64-bit arithmetic instead of 32-bit tcp_nv: fix potential integer overflow in tcpnv_acked r8169: fix RTL8168EP take too long to complete driver initialization. qmi_wwan: Add support for Quectel EP06 rtnetlink: enable IFLA_IF_NETNSID for RTM_NEWLINK ipmr: Fix ptrdiff_t print formatting ibmvnic: Wait for device response when changing MAC qlcnic: fix deadlock bug tcp: release sk_frag.page in tcp_disconnect ipv4: Get the address of interface correctly. net_sched: gen_estimator: fix lockdep splat net: macb: Handle HRESP error net/mlx5e: IPoIB, Fix copy-paste bug in flow steering refactoring ipv6: addrconf: break critical section in addrconf_verify_rtnl() ipv6: change route cache aging logic i40e/i40evf: Update DESC_NEEDED value to reflect larger value bnxt_en: cleanup DIM work on device shutdown ...

Linus Torvalds committed 8 years ago

Commit b2fe5fa2 parents a103950 a54667f1666 files · +120605 −45688Browse files

Showing the changes to include/uapi/linux (30 of 1666 files). Show all

Unified · Split

30 files
  1. include/uapi/linux/batadv_packet.h +644 −0
  2. include/uapi/linux/batman_adv.h +17 −10
  3. include/uapi/linux/bpf.h +111 −5
  4. include/uapi/linux/bpf_common.h +4 −3
  5. include/uapi/linux/can/netlink.h +1 −0
  6. include/uapi/linux/devlink.h +25 −0
  7. include/uapi/linux/erspan.h +52 −0
  8. include/uapi/linux/ethtool.h +1 −0
  9. include/uapi/linux/if_ether.h +1 −0
  10. include/uapi/linux/if_link.h +5 −0
  11. include/uapi/linux/if_macsec.h +7 −2
  12. include/uapi/linux/if_tun.h +2 −0
  13. include/uapi/linux/if_tunnel.h +3 −0
  14. include/uapi/linux/inet_diag.h +2 −0
  15. include/uapi/linux/l2tp.h +3 −3
  16. include/uapi/linux/netfilter/nf_conntrack_common.h +5 −1
  17. include/uapi/linux/netfilter/nf_tables.h +76 −0
  18. include/uapi/linux/netfilter/xt_connlimit.h +1 −1
  19. include/uapi/linux/netfilter_arp.h +3 −0
  20. include/uapi/linux/netfilter_decnet.h +3 −1
  21. include/uapi/linux/netfilter_ipv4.h +1 −0
  22. include/uapi/linux/netfilter_ipv6.h +1 −0
  23. include/uapi/linux/netfilter_ipv6/ip6t_srh.h +57 −0
  24. include/uapi/linux/nl80211.h +4 −0
  25. include/uapi/linux/openvswitch.h +1 −0
  26. include/uapi/linux/perf_event.h +22 −0
  27. include/uapi/linux/rtnetlink.h +12 −0
  28. include/uapi/linux/sctp.h +3 −0
  29. include/uapi/linux/tipc.h +3 −4
  30. include/uapi/linux/virtio_net.h +13 −0
include/uapi/linux/batadv_packet.h+644−0
@@ -0,0 +1,644 @@
1/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */
2/* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors:
3 *
4 * Marek Lindner, Simon Wunderlich
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of version 2 of the GNU General Public
8 * License as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef _UAPI_LINUX_BATADV_PACKET_H_
20#define _UAPI_LINUX_BATADV_PACKET_H_
21
22#include <asm/byteorder.h>
23#include <linux/if_ether.h>
24#include <linux/types.h>
25
26/**
27 * batadv_tp_is_error() - Check throughput meter return code for error
28 * @n: throughput meter return code
29 *
30 * Return: 0 when not error was detected, != 0 otherwise
31 */
32#define batadv_tp_is_error(n) ((__u8)(n) > 127 ? 1 : 0)
33
34/**
35 * enum batadv_packettype - types for batman-adv encapsulated packets
36 * @BATADV_IV_OGM: originator messages for B.A.T.M.A.N. IV
37 * @BATADV_BCAST: broadcast packets carrying broadcast payload
38 * @BATADV_CODED: network coded packets
39 * @BATADV_ELP: echo location packets for B.A.T.M.A.N. V
40 * @BATADV_OGM2: originator messages for B.A.T.M.A.N. V
41 *
42 * @BATADV_UNICAST: unicast packets carrying unicast payload traffic
43 * @BATADV_UNICAST_FRAG: unicast packets carrying a fragment of the original
44 * payload packet
45 * @BATADV_UNICAST_4ADDR: unicast packet including the originator address of
46 * the sender
47 * @BATADV_ICMP: unicast packet like IP ICMP used for ping or traceroute
48 * @BATADV_UNICAST_TVLV: unicast packet carrying TVLV containers
49 */
50enum batadv_packettype {
51 /* 0x00 - 0x3f: local packets or special rules for handling */
52 BATADV_IV_OGM = 0x00,
53 BATADV_BCAST = 0x01,
54 BATADV_CODED = 0x02,
55 BATADV_ELP = 0x03,
56 BATADV_OGM2 = 0x04,
57 /* 0x40 - 0x7f: unicast */
58#define BATADV_UNICAST_MIN 0x40
59 BATADV_UNICAST = 0x40,
60 BATADV_UNICAST_FRAG = 0x41,
61 BATADV_UNICAST_4ADDR = 0x42,
62 BATADV_ICMP = 0x43,
63 BATADV_UNICAST_TVLV = 0x44,
64#define BATADV_UNICAST_MAX 0x7f
65 /* 0x80 - 0xff: reserved */
66};
67
68/**
69 * enum batadv_subtype - packet subtype for unicast4addr
70 * @BATADV_P_DATA: user payload
71 * @BATADV_P_DAT_DHT_GET: DHT request message
72 * @BATADV_P_DAT_DHT_PUT: DHT store message
73 * @BATADV_P_DAT_CACHE_REPLY: ARP reply generated by DAT
74 */
75enum batadv_subtype {
76 BATADV_P_DATA = 0x01,
77 BATADV_P_DAT_DHT_GET = 0x02,
78 BATADV_P_DAT_DHT_PUT = 0x03,
79 BATADV_P_DAT_CACHE_REPLY = 0x04,
80};
81
82/* this file is included by batctl which needs these defines */
83#define BATADV_COMPAT_VERSION 15
84
85/**
86 * enum batadv_iv_flags - flags used in B.A.T.M.A.N. IV OGM packets
87 * @BATADV_NOT_BEST_NEXT_HOP: flag is set when ogm packet is forwarded and was
88 * previously received from someone else than the best neighbor.
89 * @BATADV_PRIMARIES_FIRST_HOP: flag unused.
90 * @BATADV_DIRECTLINK: flag is for the first hop or if rebroadcasted from a
91 * one hop neighbor on the interface where it was originally received.
92 */
93enum batadv_iv_flags {
94 BATADV_NOT_BEST_NEXT_HOP = 1UL << 0,
95 BATADV_PRIMARIES_FIRST_HOP = 1UL << 1,
96 BATADV_DIRECTLINK = 1UL << 2,
97};
98
99/**
100 * enum batadv_icmp_packettype - ICMP message types
101 * @BATADV_ECHO_REPLY: success reply to BATADV_ECHO_REQUEST
102 * @BATADV_DESTINATION_UNREACHABLE: failure when route to destination not found
103 * @BATADV_ECHO_REQUEST: request BATADV_ECHO_REPLY from destination
104 * @BATADV_TTL_EXCEEDED: error after BATADV_ECHO_REQUEST traversed too many hops
105 * @BATADV_PARAMETER_PROBLEM: return code for malformed messages
106 * @BATADV_TP: throughput meter packet
107 */
108enum batadv_icmp_packettype {
109 BATADV_ECHO_REPLY = 0,
110 BATADV_DESTINATION_UNREACHABLE = 3,
111 BATADV_ECHO_REQUEST = 8,
112 BATADV_TTL_EXCEEDED = 11,
113 BATADV_PARAMETER_PROBLEM = 12,
114 BATADV_TP = 15,
115};
116
117/**
118 * enum batadv_mcast_flags - flags for multicast capabilities and settings
119 * @BATADV_MCAST_WANT_ALL_UNSNOOPABLES: we want all packets destined for
120 * 224.0.0.0/24 or ff02::1
121 * @BATADV_MCAST_WANT_ALL_IPV4: we want all IPv4 multicast packets
122 * @BATADV_MCAST_WANT_ALL_IPV6: we want all IPv6 multicast packets
123 */
124enum batadv_mcast_flags {
125 BATADV_MCAST_WANT_ALL_UNSNOOPABLES = 1UL << 0,
126 BATADV_MCAST_WANT_ALL_IPV4 = 1UL << 1,
127 BATADV_MCAST_WANT_ALL_IPV6 = 1UL << 2,
128};
129
130/* tt data subtypes */
131#define BATADV_TT_DATA_TYPE_MASK 0x0F
132
133/**
134 * enum batadv_tt_data_flags - flags for tt data tvlv
135 * @BATADV_TT_OGM_DIFF: TT diff propagated through OGM
136 * @BATADV_TT_REQUEST: TT request message
137 * @BATADV_TT_RESPONSE: TT response message
138 * @BATADV_TT_FULL_TABLE: contains full table to replace existing table
139 */
140enum batadv_tt_data_flags {
141 BATADV_TT_OGM_DIFF = 1UL << 0,
142 BATADV_TT_REQUEST = 1UL << 1,
143 BATADV_TT_RESPONSE = 1UL << 2,
144 BATADV_TT_FULL_TABLE = 1UL << 4,
145};
146
147/**
148 * enum batadv_vlan_flags - flags for the four MSB of any vlan ID field
149 * @BATADV_VLAN_HAS_TAG: whether the field contains a valid vlan tag or not
150 */
151enum batadv_vlan_flags {
152 BATADV_VLAN_HAS_TAG = 1UL << 15,
153};
154
155/**
156 * enum batadv_bla_claimframe - claim frame types for the bridge loop avoidance
157 * @BATADV_CLAIM_TYPE_CLAIM: claim of a client mac address
158 * @BATADV_CLAIM_TYPE_UNCLAIM: unclaim of a client mac address
159 * @BATADV_CLAIM_TYPE_ANNOUNCE: announcement of backbone with current crc
160 * @BATADV_CLAIM_TYPE_REQUEST: request of full claim table
161 * @BATADV_CLAIM_TYPE_LOOPDETECT: mesh-traversing loop detect packet
162 */
163enum batadv_bla_claimframe {
164 BATADV_CLAIM_TYPE_CLAIM = 0x00,
165 BATADV_CLAIM_TYPE_UNCLAIM = 0x01,
166 BATADV_CLAIM_TYPE_ANNOUNCE = 0x02,
167 BATADV_CLAIM_TYPE_REQUEST = 0x03,
168 BATADV_CLAIM_TYPE_LOOPDETECT = 0x04,
169};
170
171/**
172 * enum batadv_tvlv_type - tvlv type definitions
173 * @BATADV_TVLV_GW: gateway tvlv
174 * @BATADV_TVLV_DAT: distributed arp table tvlv
175 * @BATADV_TVLV_NC: network coding tvlv
176 * @BATADV_TVLV_TT: translation table tvlv
177 * @BATADV_TVLV_ROAM: roaming advertisement tvlv
178 * @BATADV_TVLV_MCAST: multicast capability tvlv
179 */
180enum batadv_tvlv_type {
181 BATADV_TVLV_GW = 0x01,
182 BATADV_TVLV_DAT = 0x02,
183 BATADV_TVLV_NC = 0x03,
184 BATADV_TVLV_TT = 0x04,
185 BATADV_TVLV_ROAM = 0x05,
186 BATADV_TVLV_MCAST = 0x06,
187};
188
189#pragma pack(2)
190/* the destination hardware field in the ARP frame is used to
191 * transport the claim type and the group id
192 */
193struct batadv_bla_claim_dst {
194 __u8 magic[3]; /* FF:43:05 */
195 __u8 type; /* bla_claimframe */
196 __be16 group; /* group id */
197};
198
199#pragma pack()
200
201/**
202 * struct batadv_ogm_packet - ogm (routing protocol) packet
203 * @packet_type: batman-adv packet type, part of the general header
204 * @version: batman-adv protocol version, part of the genereal header
205 * @ttl: time to live for this packet, part of the genereal header
206 * @flags: contains routing relevant flags - see enum batadv_iv_flags
207 * @seqno: sequence identification
208 * @orig: address of the source node
209 * @prev_sender: address of the previous sender
210 * @reserved: reserved byte for alignment
211 * @tq: transmission quality
212 * @tvlv_len: length of tvlv data following the ogm header
213 */
214struct batadv_ogm_packet {
215 __u8 packet_type;
216 __u8 version;
217 __u8 ttl;
218 __u8 flags;
219 __be32 seqno;
220 __u8 orig[ETH_ALEN];
221 __u8 prev_sender[ETH_ALEN];
222 __u8 reserved;
223 __u8 tq;
224 __be16 tvlv_len;
225 /* __packed is not needed as the struct size is divisible by 4,
226 * and the largest data type in this struct has a size of 4.
227 */
228};
229
230#define BATADV_OGM_HLEN sizeof(struct batadv_ogm_packet)
231
232/**
233 * struct batadv_ogm2_packet - ogm2 (routing protocol) packet
234 * @packet_type: batman-adv packet type, part of the general header
235 * @version: batman-adv protocol version, part of the general header
236 * @ttl: time to live for this packet, part of the general header
237 * @flags: reseved for routing relevant flags - currently always 0
238 * @seqno: sequence number
239 * @orig: originator mac address
240 * @tvlv_len: length of the appended tvlv buffer (in bytes)
241 * @throughput: the currently flooded path throughput
242 */
243struct batadv_ogm2_packet {
244 __u8 packet_type;
245 __u8 version;
246 __u8 ttl;
247 __u8 flags;
248 __be32 seqno;
249 __u8 orig[ETH_ALEN];
250 __be16 tvlv_len;
251 __be32 throughput;
252 /* __packed is not needed as the struct size is divisible by 4,
253 * and the largest data type in this struct has a size of 4.
254 */
255};
256
257#define BATADV_OGM2_HLEN sizeof(struct batadv_ogm2_packet)
258
259/**
260 * struct batadv_elp_packet - elp (neighbor discovery) packet
261 * @packet_type: batman-adv packet type, part of the general header
262 * @version: batman-adv protocol version, part of the genereal header
263 * @orig: originator mac address
264 * @seqno: sequence number
265 * @elp_interval: currently used ELP sending interval in ms
266 */
267struct batadv_elp_packet {
268 __u8 packet_type;
269 __u8 version;
270 __u8 orig[ETH_ALEN];
271 __be32 seqno;
272 __be32 elp_interval;
273};
274
275#define BATADV_ELP_HLEN sizeof(struct batadv_elp_packet)
276
277/**
278 * struct batadv_icmp_header - common members among all the ICMP packets
279 * @packet_type: batman-adv packet type, part of the general header
280 * @version: batman-adv protocol version, part of the genereal header
281 * @ttl: time to live for this packet, part of the genereal header
282 * @msg_type: ICMP packet type
283 * @dst: address of the destination node
284 * @orig: address of the source node
285 * @uid: local ICMP socket identifier
286 * @align: not used - useful for alignment purposes only
287 *
288 * This structure is used for ICMP packets parsing only and it is never sent
289 * over the wire. The alignment field at the end is there to ensure that
290 * members are padded the same way as they are in real packets.
291 */
292struct batadv_icmp_header {
293 __u8 packet_type;
294 __u8 version;
295 __u8 ttl;
296 __u8 msg_type; /* see ICMP message types above */
297 __u8 dst[ETH_ALEN];
298 __u8 orig[ETH_ALEN];
299 __u8 uid;
300 __u8 align[3];
301};
302
303/**
304 * struct batadv_icmp_packet - ICMP packet
305 * @packet_type: batman-adv packet type, part of the general header
306 * @version: batman-adv protocol version, part of the genereal header
307 * @ttl: time to live for this packet, part of the genereal header
308 * @msg_type: ICMP packet type
309 * @dst: address of the destination node
310 * @orig: address of the source node
311 * @uid: local ICMP socket identifier
312 * @reserved: not used - useful for alignment
313 * @seqno: ICMP sequence number
314 */
315struct batadv_icmp_packet {
316 __u8 packet_type;
317 __u8 version;
318 __u8 ttl;
319 __u8 msg_type; /* see ICMP message types above */
320 __u8 dst[ETH_ALEN];
321 __u8 orig[ETH_ALEN];
322 __u8 uid;
323 __u8 reserved;
324 __be16 seqno;
325};
326
327/**
328 * struct batadv_icmp_tp_packet - ICMP TP Meter packet
329 * @packet_type: batman-adv packet type, part of the general header
330 * @version: batman-adv protocol version, part of the genereal header
331 * @ttl: time to live for this packet, part of the genereal header
332 * @msg_type: ICMP packet type
333 * @dst: address of the destination node
334 * @orig: address of the source node
335 * @uid: local ICMP socket identifier
336 * @subtype: TP packet subtype (see batadv_icmp_tp_subtype)
337 * @session: TP session identifier
338 * @seqno: the TP sequence number
339 * @timestamp: time when the packet has been sent. This value is filled in a
340 * TP_MSG and echoed back in the next TP_ACK so that the sender can compute the
341 * RTT. Since it is read only by the host which wrote it, there is no need to
342 * store it using network order
343 */
344struct batadv_icmp_tp_packet {
345 __u8 packet_type;
346 __u8 version;
347 __u8 ttl;
348 __u8 msg_type; /* see ICMP message types above */
349 __u8 dst[ETH_ALEN];
350 __u8 orig[ETH_ALEN];
351 __u8 uid;
352 __u8 subtype;
353 __u8 session[2];
354 __be32 seqno;
355 __be32 timestamp;
356};
357
358/**
359 * enum batadv_icmp_tp_subtype - ICMP TP Meter packet subtypes
360 * @BATADV_TP_MSG: Msg from sender to receiver
361 * @BATADV_TP_ACK: acknowledgment from receiver to sender
362 */
363enum batadv_icmp_tp_subtype {
364 BATADV_TP_MSG = 0,
365 BATADV_TP_ACK,
366};
367
368#define BATADV_RR_LEN 16
369
370/**
371 * struct batadv_icmp_packet_rr - ICMP RouteRecord packet
372 * @packet_type: batman-adv packet type, part of the general header
373 * @version: batman-adv protocol version, part of the genereal header
374 * @ttl: time to live for this packet, part of the genereal header
375 * @msg_type: ICMP packet type
376 * @dst: address of the destination node
377 * @orig: address of the source node
378 * @uid: local ICMP socket identifier
379 * @rr_cur: number of entries the rr array
380 * @seqno: ICMP sequence number
381 * @rr: route record array
382 */
383struct batadv_icmp_packet_rr {
384 __u8 packet_type;
385 __u8 version;
386 __u8 ttl;
387 __u8 msg_type; /* see ICMP message types above */
388 __u8 dst[ETH_ALEN];
389 __u8 orig[ETH_ALEN];
390 __u8 uid;
391 __u8 rr_cur;
392 __be16 seqno;
393 __u8 rr[BATADV_RR_LEN][ETH_ALEN];
394};
395
396#define BATADV_ICMP_MAX_PACKET_SIZE sizeof(struct batadv_icmp_packet_rr)
397
398/* All packet headers in front of an ethernet header have to be completely
399 * divisible by 2 but not by 4 to make the payload after the ethernet
400 * header again 4 bytes boundary aligned.
401 *
402 * A packing of 2 is necessary to avoid extra padding at the end of the struct
403 * caused by a structure member which is larger than two bytes. Otherwise
404 * the structure would not fulfill the previously mentioned rule to avoid the
405 * misalignment of the payload after the ethernet header. It may also lead to
406 * leakage of information when the padding it not initialized before sending.
407 */
408#pragma pack(2)
409
410/**
411 * struct batadv_unicast_packet - unicast packet for network payload
412 * @packet_type: batman-adv packet type, part of the general header
413 * @version: batman-adv protocol version, part of the genereal header
414 * @ttl: time to live for this packet, part of the genereal header
415 * @ttvn: translation table version number
416 * @dest: originator destination of the unicast packet
417 */
418struct batadv_unicast_packet {
419 __u8 packet_type;
420 __u8 version;
421 __u8 ttl;
422 __u8 ttvn; /* destination translation table version number */
423 __u8 dest[ETH_ALEN];
424 /* "4 bytes boundary + 2 bytes" long to make the payload after the
425 * following ethernet header again 4 bytes boundary aligned
426 */
427};
428
429/**
430 * struct batadv_unicast_4addr_packet - extended unicast packet
431 * @u: common unicast packet header
432 * @src: address of the source
433 * @subtype: packet subtype
434 * @reserved: reserved byte for alignment
435 */
436struct batadv_unicast_4addr_packet {
437 struct batadv_unicast_packet u;
438 __u8 src[ETH_ALEN];
439 __u8 subtype;
440 __u8 reserved;
441 /* "4 bytes boundary + 2 bytes" long to make the payload after the
442 * following ethernet header again 4 bytes boundary aligned
443 */
444};
445
446/**
447 * struct batadv_frag_packet - fragmented packet
448 * @packet_type: batman-adv packet type, part of the general header
449 * @version: batman-adv protocol version, part of the genereal header
450 * @ttl: time to live for this packet, part of the genereal header
451 * @dest: final destination used when routing fragments
452 * @orig: originator of the fragment used when merging the packet
453 * @no: fragment number within this sequence
454 * @priority: priority of frame, from ToS IP precedence or 802.1p
455 * @reserved: reserved byte for alignment
456 * @seqno: sequence identification
457 * @total_size: size of the merged packet
458 */
459struct batadv_frag_packet {
460 __u8 packet_type;
461 __u8 version; /* batman version field */
462 __u8 ttl;
463#if defined(__BIG_ENDIAN_BITFIELD)
464 __u8 no:4;
465 __u8 priority:3;
466 __u8 reserved:1;
467#elif defined(__LITTLE_ENDIAN_BITFIELD)
468 __u8 reserved:1;
469 __u8 priority:3;
470 __u8 no:4;
471#else
472#error "unknown bitfield endianness"
473#endif
474 __u8 dest[ETH_ALEN];
475 __u8 orig[ETH_ALEN];
476 __be16 seqno;
477 __be16 total_size;
478};
479
480/**
481 * struct batadv_bcast_packet - broadcast packet for network payload
482 * @packet_type: batman-adv packet type, part of the general header
483 * @version: batman-adv protocol version, part of the genereal header
484 * @ttl: time to live for this packet, part of the genereal header
485 * @reserved: reserved byte for alignment
486 * @seqno: sequence identification
487 * @orig: originator of the broadcast packet
488 */
489struct batadv_bcast_packet {
490 __u8 packet_type;
491 __u8 version; /* batman version field */
492 __u8 ttl;
493 __u8 reserved;
494 __be32 seqno;
495 __u8 orig[ETH_ALEN];
496 /* "4 bytes boundary + 2 bytes" long to make the payload after the
497 * following ethernet header again 4 bytes boundary aligned
498 */
499};
500
501/**
502 * struct batadv_coded_packet - network coded packet
503 * @packet_type: batman-adv packet type, part of the general header
504 * @version: batman-adv protocol version, part of the genereal header
505 * @ttl: time to live for this packet, part of the genereal header
506 * @first_source: original source of first included packet
507 * @first_orig_dest: original destinal of first included packet
508 * @first_crc: checksum of first included packet
509 * @first_ttvn: tt-version number of first included packet
510 * @second_ttl: ttl of second packet
511 * @second_dest: second receiver of this coded packet
512 * @second_source: original source of second included packet
513 * @second_orig_dest: original destination of second included packet
514 * @second_crc: checksum of second included packet
515 * @second_ttvn: tt version number of second included packet
516 * @coded_len: length of network coded part of the payload
517 */
518struct batadv_coded_packet {
519 __u8 packet_type;
520 __u8 version; /* batman version field */
521 __u8 ttl;
522 __u8 first_ttvn;
523 /* __u8 first_dest[ETH_ALEN]; - saved in mac header destination */
524 __u8 first_source[ETH_ALEN];
525 __u8 first_orig_dest[ETH_ALEN];
526 __be32 first_crc;
527 __u8 second_ttl;
528 __u8 second_ttvn;
529 __u8 second_dest[ETH_ALEN];
530 __u8 second_source[ETH_ALEN];
531 __u8 second_orig_dest[ETH_ALEN];
532 __be32 second_crc;
533 __be16 coded_len;
534};
535
536#pragma pack()
537
538/**
539 * struct batadv_unicast_tvlv_packet - generic unicast packet with tvlv payload
540 * @packet_type: batman-adv packet type, part of the general header
541 * @version: batman-adv protocol version, part of the genereal header
542 * @ttl: time to live for this packet, part of the genereal header
543 * @reserved: reserved field (for packet alignment)
544 * @src: address of the source
545 * @dst: address of the destination
546 * @tvlv_len: length of tvlv data following the unicast tvlv header
547 * @align: 2 bytes to align the header to a 4 byte boundary
548 */
549struct batadv_unicast_tvlv_packet {
550 __u8 packet_type;
551 __u8 version; /* batman version field */
552 __u8 ttl;
553 __u8 reserved;
554 __u8 dst[ETH_ALEN];
555 __u8 src[ETH_ALEN];
556 __be16 tvlv_len;
557 __u16 align;
558};
559
560/**
561 * struct batadv_tvlv_hdr - base tvlv header struct
562 * @type: tvlv container type (see batadv_tvlv_type)
563 * @version: tvlv container version
564 * @len: tvlv container length
565 */
566struct batadv_tvlv_hdr {
567 __u8 type;
568 __u8 version;
569 __be16 len;
570};
571
572/**
573 * struct batadv_tvlv_gateway_data - gateway data propagated through gw tvlv
574 * container
575 * @bandwidth_down: advertised uplink download bandwidth
576 * @bandwidth_up: advertised uplink upload bandwidth
577 */
578struct batadv_tvlv_gateway_data {
579 __be32 bandwidth_down;
580 __be32 bandwidth_up;
581};
582
583/**
584 * struct batadv_tvlv_tt_data - tt data propagated through the tt tvlv container
585 * @flags: translation table flags (see batadv_tt_data_flags)
586 * @ttvn: translation table version number
587 * @num_vlan: number of announced VLANs. In the TVLV this struct is followed by
588 * one batadv_tvlv_tt_vlan_data object per announced vlan
589 */
590struct batadv_tvlv_tt_data {
591 __u8 flags;
592 __u8 ttvn;
593 __be16 num_vlan;
594};
595
596/**
597 * struct batadv_tvlv_tt_vlan_data - vlan specific tt data propagated through
598 * the tt tvlv container
599 * @crc: crc32 checksum of the entries belonging to this vlan
600 * @vid: vlan identifier
601 * @reserved: unused, useful for alignment purposes
602 */
603struct batadv_tvlv_tt_vlan_data {
604 __be32 crc;
605 __be16 vid;
606 __u16 reserved;
607};
608
609/**
610 * struct batadv_tvlv_tt_change - translation table diff data
611 * @flags: status indicators concerning the non-mesh client (see
612 * batadv_tt_client_flags)
613 * @reserved: reserved field - useful for alignment purposes only
614 * @addr: mac address of non-mesh client that triggered this tt change
615 * @vid: VLAN identifier
616 */
617struct batadv_tvlv_tt_change {
618 __u8 flags;
619 __u8 reserved[3];
620 __u8 addr[ETH_ALEN];
621 __be16 vid;
622};
623
624/**
625 * struct batadv_tvlv_roam_adv - roaming advertisement
626 * @client: mac address of roaming client
627 * @vid: VLAN identifier
628 */
629struct batadv_tvlv_roam_adv {
630 __u8 client[ETH_ALEN];
631 __be16 vid;
632};
633
634/**
635 * struct batadv_tvlv_mcast_data - payload of a multicast tvlv
636 * @flags: multicast flags announced by the orig node
637 * @reserved: reserved field
638 */
639struct batadv_tvlv_mcast_data {
640 __u8 flags;
641 __u8 reserved[3];
642};
643
644#endif /* _UAPI_LINUX_BATADV_PACKET_H_ */
include/uapi/linux/batman_adv.h+17−10
@@ -1,18 +1,25 @@
1/* SPDX-License-Identifier: MIT */
1/* Copyright (C) 2016-2017 B.A.T.M.A.N. contributors:2/* Copyright (C) 2016-2017 B.A.T.M.A.N. contributors:
2 *3 *
3 * Matthias Schiffer4 * Matthias Schiffer
4 *5 *
5 * Permission to use, copy, modify, and/or distribute this software for any6 * Permission is hereby granted, free of charge, to any person obtaining a
6 * purpose with or without fee is hereby granted, provided that the above7 * copy of this software and associated documentation files (the "Software"),
7 * copyright notice and this permission notice appear in all copies.8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
8 *12 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES13 * The above copyright notice and this permission notice shall be included in
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF14 * all copies or substantial portions of the Software.
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR15 *
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
16 */23 */
17 24
18#ifndef _UAPI_LINUX_BATMAN_ADV_H_25#ifndef _UAPI_LINUX_BATMAN_ADV_H_
include/uapi/linux/bpf.h+111−5
@@ -17,7 +17,7 @@ · 16 unmodified lines
17#define BPF_ALU64 0x07 /* alu mode in double word width */17#define BPF_ALU64 0x07 /* alu mode in double word width */
18 18
19/* ld/ldx fields */19/* ld/ldx fields */
20#define BPF_DW 0x18 /* double word */20#define BPF_DW 0x18 /* double word (64-bit) */
21#define BPF_XADD 0xc0 /* exclusive add */21#define BPF_XADD 0xc0 /* exclusive add */
22 22
23/* alu/jmp fields */23/* alu/jmp fields */
@@ -197,8 +197,14 @@ enum bpf_attach_type { · 173 unmodified lines
197 */197 */
198#define BPF_F_STRICT_ALIGNMENT (1U << 0)198#define BPF_F_STRICT_ALIGNMENT (1U << 0)
199 199
200/* when bpf_ldimm64->src_reg == BPF_PSEUDO_MAP_FD, bpf_ldimm64->imm == fd */
200#define BPF_PSEUDO_MAP_FD 1201#define BPF_PSEUDO_MAP_FD 1
201 202
203/* when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative
204 * offset to another bpf function
205 */
206#define BPF_PSEUDO_CALL 1
207
202/* flags for BPF_MAP_UPDATE_ELEM command */208/* flags for BPF_MAP_UPDATE_ELEM command */
203#define BPF_ANY 0 /* create new element or update existing */209#define BPF_ANY 0 /* create new element or update existing */
204#define BPF_NOEXIST 1 /* create new element if it didn't exist */210#define BPF_NOEXIST 1 /* create new element if it didn't exist */
@@ -239,6 +245,7 @@ union bpf_attr { · 34 unmodified lines
239 * BPF_F_NUMA_NODE is set).245 * BPF_F_NUMA_NODE is set).
240 */246 */
241 char map_name[BPF_OBJ_NAME_LEN];247 char map_name[BPF_OBJ_NAME_LEN];
248 __u32 map_ifindex; /* ifindex of netdev to create on */
242 };249 };
243 250
244 struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */251 struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
@@ -635,6 +642,14 @@ union bpf_attr { · 390 unmodified lines
635 * @optlen: length of optval in bytes642 * @optlen: length of optval in bytes
636 * Return: 0 or negative error643 * Return: 0 or negative error
637 *644 *
645 * int bpf_sock_ops_cb_flags_set(bpf_sock_ops, flags)
646 * Set callback flags for sock_ops
647 * @bpf_sock_ops: pointer to bpf_sock_ops_kern struct
648 * @flags: flags value
649 * Return: 0 for no error
650 * -EINVAL if there is no full tcp socket
651 * bits in flags that are not supported by current kernel
652 *
638 * int bpf_skb_adjust_room(skb, len_diff, mode, flags)653 * int bpf_skb_adjust_room(skb, len_diff, mode, flags)
639 * Grow or shrink room in sk_buff.654 * Grow or shrink room in sk_buff.
640 * @skb: pointer to skb655 * @skb: pointer to skb
@@ -677,6 +692,10 @@ union bpf_attr { · 36 unmodified lines
677 * @buf: buf to fill692 * @buf: buf to fill
678 * @buf_size: size of the buf693 * @buf_size: size of the buf
679 * Return : 0 on success or negative error code694 * Return : 0 on success or negative error code
695 *
696 * int bpf_override_return(pt_regs, rc)
697 * @pt_regs: pointer to struct pt_regs
698 * @rc: the return value to set
680 */699 */
681#define __BPF_FUNC_MAPPER(FN) \700#define __BPF_FUNC_MAPPER(FN) \
682 FN(unspec), \701 FN(unspec), \
@@ -736,7 +755,9 @@ union bpf_attr { · 53 unmodified lines
736 FN(xdp_adjust_meta), \755 FN(xdp_adjust_meta), \
737 FN(perf_event_read_value), \756 FN(perf_event_read_value), \
738 FN(perf_prog_read_value), \757 FN(perf_prog_read_value), \
739 FN(getsockopt),758 FN(getsockopt), \
759 FN(override_return), \
760 FN(sock_ops_cb_flags_set),
740 761
741/* integer value in 'imm' field of BPF_CALL instruction selects which helper762/* integer value in 'imm' field of BPF_CALL instruction selects which helper
742 * function eBPF program intends to call763 * function eBPF program intends to call
@@ -888,6 +909,9 @@ struct xdp_md { · 145 unmodified lines
888 __u32 data;909 __u32 data;
889 __u32 data_end;910 __u32 data_end;
890 __u32 data_meta;911 __u32 data_meta;
912 /* Below access go through struct xdp_rxq_info */
913 __u32 ingress_ifindex; /* rxq->dev->ifindex */
914 __u32 rx_queue_index; /* rxq->queue_index */
891};915};
892 916
893enum sk_action {917enum sk_action {
@@ -910,6 +934,9 @@ struct bpf_prog_info { · 16 unmodified lines
910 __u32 nr_map_ids;934 __u32 nr_map_ids;
911 __aligned_u64 map_ids;935 __aligned_u64 map_ids;
912 char name[BPF_OBJ_NAME_LEN];936 char name[BPF_OBJ_NAME_LEN];
937 __u32 ifindex;
938 __u64 netns_dev;
939 __u64 netns_ino;
913} __attribute__((aligned(8)));940} __attribute__((aligned(8)));
914 941
915struct bpf_map_info {942struct bpf_map_info {
@@ -920,6 +947,9 @@ struct bpf_map_info { · 4 unmodified lines
920 __u32 max_entries;947 __u32 max_entries;
921 __u32 map_flags;948 __u32 map_flags;
922 char name[BPF_OBJ_NAME_LEN];949 char name[BPF_OBJ_NAME_LEN];
950 __u32 ifindex;
951 __u64 netns_dev;
952 __u64 netns_ino;
923} __attribute__((aligned(8)));953} __attribute__((aligned(8)));
924 954
925/* User bpf_sock_ops struct to access socket values and specify request ops955/* User bpf_sock_ops struct to access socket values and specify request ops
@@ -931,8 +961,9 @@ struct bpf_map_info { · 5 unmodified lines
931struct bpf_sock_ops {961struct bpf_sock_ops {
932 __u32 op;962 __u32 op;
933 union {963 union {
934 __u32 reply;964 __u32 args[4]; /* Optionally passed to bpf program */
935 __u32 replylong[4];965 __u32 reply; /* Returned by bpf program */
966 __u32 replylong[4]; /* Optionally returned by bpf prog */
936 };967 };
937 __u32 family;968 __u32 family;
938 __u32 remote_ip4; /* Stored in network byte order */969 __u32 remote_ip4; /* Stored in network byte order */
@@ -941,8 +972,45 @@ struct bpf_sock_ops { · 2 unmodified lines
941 __u32 local_ip6[4]; /* Stored in network byte order */972 __u32 local_ip6[4]; /* Stored in network byte order */
942 __u32 remote_port; /* Stored in network byte order */973 __u32 remote_port; /* Stored in network byte order */
943 __u32 local_port; /* stored in host byte order */974 __u32 local_port; /* stored in host byte order */
975 __u32 is_fullsock; /* Some TCP fields are only valid if
976 * there is a full socket. If not, the
977 * fields read as zero.
978 */
979 __u32 snd_cwnd;
980 __u32 srtt_us; /* Averaged RTT << 3 in usecs */
981 __u32 bpf_sock_ops_cb_flags; /* flags defined in uapi/linux/tcp.h */
982 __u32 state;
983 __u32 rtt_min;
984 __u32 snd_ssthresh;
985 __u32 rcv_nxt;
986 __u32 snd_nxt;
987 __u32 snd_una;
988 __u32 mss_cache;
989 __u32 ecn_flags;
990 __u32 rate_delivered;
991 __u32 rate_interval_us;
992 __u32 packets_out;
993 __u32 retrans_out;
994 __u32 total_retrans;
995 __u32 segs_in;
996 __u32 data_segs_in;
997 __u32 segs_out;
998 __u32 data_segs_out;
999 __u32 lost_out;
1000 __u32 sacked_out;
1001 __u32 sk_txhash;
1002 __u64 bytes_received;
1003 __u64 bytes_acked;
944};1004};
945 1005
1006/* Definitions for bpf_sock_ops_cb_flags */
1007#define BPF_SOCK_OPS_RTO_CB_FLAG (1<<0)
1008#define BPF_SOCK_OPS_RETRANS_CB_FLAG (1<<1)
1009#define BPF_SOCK_OPS_STATE_CB_FLAG (1<<2)
1010#define BPF_SOCK_OPS_ALL_CB_FLAGS 0x7 /* Mask of all currently
1011 * supported cb flags
1012 */
1013
946/* List of known BPF sock_ops operators.1014/* List of known BPF sock_ops operators.
947 * New entries can only be added at the end1015 * New entries can only be added at the end
948 */1016 */
@@ -976,6 +1044,43 @@ enum { · 27 unmodified lines
976 * a congestion threshold. RTTs above1044 * a congestion threshold. RTTs above
977 * this indicate congestion1045 * this indicate congestion
978 */1046 */
1047 BPF_SOCK_OPS_RTO_CB, /* Called when an RTO has triggered.
1048 * Arg1: value of icsk_retransmits
1049 * Arg2: value of icsk_rto
1050 * Arg3: whether RTO has expired
1051 */
1052 BPF_SOCK_OPS_RETRANS_CB, /* Called when skb is retransmitted.
1053 * Arg1: sequence number of 1st byte
1054 * Arg2: # segments
1055 * Arg3: return value of
1056 * tcp_transmit_skb (0 => success)
1057 */
1058 BPF_SOCK_OPS_STATE_CB, /* Called when TCP changes state.
1059 * Arg1: old_state
1060 * Arg2: new_state
1061 */
1062};
1063
1064/* List of TCP states. There is a build check in net/ipv4/tcp.c to detect
1065 * changes between the TCP and BPF versions. Ideally this should never happen.
1066 * If it does, we need to add code to convert them before calling
1067 * the BPF sock_ops function.
1068 */
1069enum {
1070 BPF_TCP_ESTABLISHED = 1,
1071 BPF_TCP_SYN_SENT,
1072 BPF_TCP_SYN_RECV,
1073 BPF_TCP_FIN_WAIT1,
1074 BPF_TCP_FIN_WAIT2,
1075 BPF_TCP_TIME_WAIT,
1076 BPF_TCP_CLOSE,
1077 BPF_TCP_CLOSE_WAIT,
1078 BPF_TCP_LAST_ACK,
1079 BPF_TCP_LISTEN,
1080 BPF_TCP_CLOSING, /* Now a valid state */
1081 BPF_TCP_NEW_SYN_RECV,
1082
1083 BPF_TCP_MAX_STATES /* Leave at the end! */
979};1084};
980 1085
981#define TCP_BPF_IW 1001 /* Set TCP initial congestion window */1086#define TCP_BPF_IW 1001 /* Set TCP initial congestion window */
@@ -995,7 +1100,8 @@ struct bpf_perf_event_value { · 13 unmodified lines
995#define BPF_DEVCG_DEV_CHAR (1ULL << 1)1100#define BPF_DEVCG_DEV_CHAR (1ULL << 1)
996 1101
997struct bpf_cgroup_dev_ctx {1102struct bpf_cgroup_dev_ctx {
998 __u32 access_type; /* (access << 16) | type */1103 /* access_type encoded as (BPF_DEVCG_ACC_* << 16) | BPF_DEVCG_DEV_* */
1104 __u32 access_type;
999 __u32 major;1105 __u32 major;
1000 __u32 minor;1106 __u32 minor;
1001};1107};
include/uapi/linux/bpf_common.h+4−3
@@ -15,9 +15,10 @@ · 14 unmodified lines
15 15
16/* ld/ldx fields */16/* ld/ldx fields */
17#define BPF_SIZE(code) ((code) & 0x18)17#define BPF_SIZE(code) ((code) & 0x18)
18#define BPF_W 0x0018#define BPF_W 0x00 /* 32-bit */
19#define BPF_H 0x0819#define BPF_H 0x08 /* 16-bit */
20#define BPF_B 0x1020#define BPF_B 0x10 /* 8-bit */
21/* eBPF BPF_DW 0x18 64-bit */
21#define BPF_MODE(code) ((code) & 0xe0)22#define BPF_MODE(code) ((code) & 0xe0)
22#define BPF_IMM 0x0023#define BPF_IMM 0x00
23#define BPF_ABS 0x2024#define BPF_ABS 0x20
include/uapi/linux/can/netlink.h+1−0
@@ -132,6 +132,7 @@ enum { · 131 unmodified lines
132 IFLA_CAN_TERMINATION_CONST,132 IFLA_CAN_TERMINATION_CONST,
133 IFLA_CAN_BITRATE_CONST,133 IFLA_CAN_BITRATE_CONST,
134 IFLA_CAN_DATA_BITRATE_CONST,134 IFLA_CAN_DATA_BITRATE_CONST,
135 IFLA_CAN_BITRATE_MAX,
135 __IFLA_CAN_MAX136 __IFLA_CAN_MAX
136};137};
137 138
include/uapi/linux/devlink.h+25−0
@@ -70,6 +70,13 @@ enum devlink_command { · 69 unmodified lines
70 DEVLINK_CMD_DPIPE_ENTRIES_GET,70 DEVLINK_CMD_DPIPE_ENTRIES_GET,
71 DEVLINK_CMD_DPIPE_HEADERS_GET,71 DEVLINK_CMD_DPIPE_HEADERS_GET,
72 DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET,72 DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET,
73 DEVLINK_CMD_RESOURCE_SET,
74 DEVLINK_CMD_RESOURCE_DUMP,
75
76 /* Hot driver reload, makes configuration changes take place. The
77 * devlink instance is not released during the process.
78 */
79 DEVLINK_CMD_RELOAD,
73 80
74 /* add new commands above here */81 /* add new commands above here */
75 __DEVLINK_CMD_MAX,82 __DEVLINK_CMD_MAX,
@@ -202,6 +209,20 @@ enum devlink_attr { · 126 unmodified lines
202 DEVLINK_ATTR_PAD,209 DEVLINK_ATTR_PAD,
203 210
204 DEVLINK_ATTR_ESWITCH_ENCAP_MODE, /* u8 */211 DEVLINK_ATTR_ESWITCH_ENCAP_MODE, /* u8 */
212 DEVLINK_ATTR_RESOURCE_LIST, /* nested */
213 DEVLINK_ATTR_RESOURCE, /* nested */
214 DEVLINK_ATTR_RESOURCE_NAME, /* string */
215 DEVLINK_ATTR_RESOURCE_ID, /* u64 */
216 DEVLINK_ATTR_RESOURCE_SIZE, /* u64 */
217 DEVLINK_ATTR_RESOURCE_SIZE_NEW, /* u64 */
218 DEVLINK_ATTR_RESOURCE_SIZE_VALID, /* u8 */
219 DEVLINK_ATTR_RESOURCE_SIZE_MIN, /* u64 */
220 DEVLINK_ATTR_RESOURCE_SIZE_MAX, /* u64 */
221 DEVLINK_ATTR_RESOURCE_SIZE_GRAN, /* u64 */
222 DEVLINK_ATTR_RESOURCE_UNIT, /* u8 */
223 DEVLINK_ATTR_RESOURCE_OCC, /* u64 */
224 DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID, /* u64 */
225 DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_UNITS,/* u64 */
205 226
206 /* add new attributes above here, update the policy in devlink.c */227 /* add new attributes above here, update the policy in devlink.c */
207 228
@@ -245,4 +266,8 @@ enum devlink_dpipe_header_id { · 37 unmodified lines
245 DEVLINK_DPIPE_HEADER_IPV6,266 DEVLINK_DPIPE_HEADER_IPV6,
246};267};
247 268
269enum devlink_resource_unit {
270 DEVLINK_RESOURCE_UNIT_ENTRY,
271};
272
248#endif /* _UAPI_LINUX_DEVLINK_H_ */273#endif /* _UAPI_LINUX_DEVLINK_H_ */
include/uapi/linux/erspan.h+52−0
@@ -0,0 +1,52 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2/*
3 * ERSPAN Tunnel Metadata
4 *
5 * Copyright (c) 2018 VMware
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2
9 * as published by the Free Software Foundation.
10 *
11 * Userspace API for metadata mode ERSPAN tunnel
12 */
13#ifndef _UAPI_ERSPAN_H
14#define _UAPI_ERSPAN_H
15
16#include <linux/types.h> /* For __beXX in userspace */
17#include <asm/byteorder.h>
18
19/* ERSPAN version 2 metadata header */
20struct erspan_md2 {
21 __be32 timestamp;
22 __be16 sgt; /* security group tag */
23#if defined(__LITTLE_ENDIAN_BITFIELD)
24 __u8 hwid_upper:2,
25 ft:5,
26 p:1;
27 __u8 o:1,
28 gra:2,
29 dir:1,
30 hwid:4;
31#elif defined(__BIG_ENDIAN_BITFIELD)
32 __u8 p:1,
33 ft:5,
34 hwid_upper:2;
35 __u8 hwid:4,
36 dir:1,
37 gra:2,
38 o:1;
39#else
40#error "Please fix <asm/byteorder.h>"
41#endif
42};
43
44struct erspan_metadata {
45 int version;
46 union {
47 __be32 index; /* Version 1 (type II)*/
48 struct erspan_md2 md2; /* Version 2 (type III) */
49 } u;
50};
51
52#endif /* _UAPI_ERSPAN_H */
include/uapi/linux/ethtool.h+1−0
@@ -1686,6 +1686,7 @@ enum ethtool_reset_flags { · 1685 unmodified lines
1686 ETH_RESET_PHY = 1 << 6, /* Transceiver/PHY */1686 ETH_RESET_PHY = 1 << 6, /* Transceiver/PHY */
1687 ETH_RESET_RAM = 1 << 7, /* RAM shared between1687 ETH_RESET_RAM = 1 << 7, /* RAM shared between
1688 * multiple components */1688 * multiple components */
1689 ETH_RESET_AP = 1 << 8, /* Application processor */
1689 1690
1690 ETH_RESET_DEDICATED = 0x0000ffff, /* All components dedicated to1691 ETH_RESET_DEDICATED = 0x0000ffff, /* All components dedicated to
1691 * this interface */1692 * this interface */
include/uapi/linux/if_ether.h+1−0
@@ -48,6 +48,7 @@ · 47 unmodified lines
48#define ETH_P_PUP 0x0200 /* Xerox PUP packet */48#define ETH_P_PUP 0x0200 /* Xerox PUP packet */
49#define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */49#define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */
50#define ETH_P_TSN 0x22F0 /* TSN (IEEE 1722) packet */50#define ETH_P_TSN 0x22F0 /* TSN (IEEE 1722) packet */
51#define ETH_P_ERSPAN2 0x22EB /* ERSPAN version 2 (type III) */
51#define ETH_P_IP 0x0800 /* Internet Protocol packet */52#define ETH_P_IP 0x0800 /* Internet Protocol packet */
52#define ETH_P_X25 0x0805 /* CCITT X.25 */53#define ETH_P_X25 0x0805 /* CCITT X.25 */
53#define ETH_P_ARP 0x0806 /* Address Resolution packet */54#define ETH_P_ARP 0x0806 /* Address Resolution packet */
include/uapi/linux/if_link.h+5−0
@@ -161,6 +161,9 @@ enum { · 160 unmodified lines
161 IFLA_EVENT,161 IFLA_EVENT,
162 IFLA_NEW_NETNSID,162 IFLA_NEW_NETNSID,
163 IFLA_IF_NETNSID,163 IFLA_IF_NETNSID,
164 IFLA_CARRIER_UP_COUNT,
165 IFLA_CARRIER_DOWN_COUNT,
166 IFLA_NEW_IFINDEX,
164 __IFLA_MAX167 __IFLA_MAX
165};168};
166 169
@@ -732,6 +735,8 @@ enum { · 565 unmodified lines
732 IFLA_VF_STATS_BROADCAST,735 IFLA_VF_STATS_BROADCAST,
733 IFLA_VF_STATS_MULTICAST,736 IFLA_VF_STATS_MULTICAST,
734 IFLA_VF_STATS_PAD,737 IFLA_VF_STATS_PAD,
738 IFLA_VF_STATS_RX_DROPPED,
739 IFLA_VF_STATS_TX_DROPPED,
735 __IFLA_VF_STATS_MAX,740 __IFLA_VF_STATS_MAX,
736};741};
737 742
include/uapi/linux/if_macsec.h+7−2
@@ -22,8 +22,13 @@ · 21 unmodified lines
22 22
23#define MACSEC_KEYID_LEN 1623#define MACSEC_KEYID_LEN 16
24 24
25#define MACSEC_DEFAULT_CIPHER_ID 0x0080020001000001ULL25/* cipher IDs as per IEEE802.1AEbn-2011 */
26#define MACSEC_DEFAULT_CIPHER_ALT 0x0080C20001000001ULL26#define MACSEC_CIPHER_ID_GCM_AES_128 0x0080C20001000001ULL
27#define MACSEC_CIPHER_ID_GCM_AES_256 0x0080C20001000002ULL
28
29/* deprecated cipher ID for GCM-AES-128 */
30#define MACSEC_DEFAULT_CIPHER_ID 0x0080020001000001ULL
31#define MACSEC_DEFAULT_CIPHER_ALT MACSEC_CIPHER_ID_GCM_AES_128
27 32
28#define MACSEC_MIN_ICV_LEN 833#define MACSEC_MIN_ICV_LEN 8
29#define MACSEC_MAX_ICV_LEN 3234#define MACSEC_MAX_ICV_LEN 32
include/uapi/linux/if_tun.h+2−0
@@ -57,6 +57,8 @@ · 56 unmodified lines
57 */57 */
58#define TUNSETVNETBE _IOW('T', 222, int)58#define TUNSETVNETBE _IOW('T', 222, int)
59#define TUNGETVNETBE _IOR('T', 223, int)59#define TUNGETVNETBE _IOR('T', 223, int)
60#define TUNSETSTEERINGEBPF _IOR('T', 224, int)
61#define TUNSETFILTEREBPF _IOR('T', 225, int)
60 62
61/* TUNSETIFF ifr flags */63/* TUNSETIFF ifr flags */
62#define IFF_TUN 0x000164#define IFF_TUN 0x0001
include/uapi/linux/if_tunnel.h+3−0
@@ -137,6 +137,9 @@ enum { · 136 unmodified lines
137 IFLA_GRE_IGNORE_DF,137 IFLA_GRE_IGNORE_DF,
138 IFLA_GRE_FWMARK,138 IFLA_GRE_FWMARK,
139 IFLA_GRE_ERSPAN_INDEX,139 IFLA_GRE_ERSPAN_INDEX,
140 IFLA_GRE_ERSPAN_VER,
141 IFLA_GRE_ERSPAN_DIR,
142 IFLA_GRE_ERSPAN_HWID,
140 __IFLA_GRE_MAX,143 __IFLA_GRE_MAX,
141};144};
142 145
include/uapi/linux/inet_diag.h+2−0
@@ -92,6 +92,8 @@ enum { · 91 unmodified lines
92 INET_DIAG_BC_D_COND,92 INET_DIAG_BC_D_COND,
93 INET_DIAG_BC_DEV_COND, /* u32 ifindex */93 INET_DIAG_BC_DEV_COND, /* u32 ifindex */
94 INET_DIAG_BC_MARK_COND,94 INET_DIAG_BC_MARK_COND,
95 INET_DIAG_BC_S_EQ,
96 INET_DIAG_BC_D_EQ,
95};97};
96 98
97struct inet_diag_hostcond {99struct inet_diag_hostcond {
include/uapi/linux/l2tp.h+3−3
@@ -65,7 +65,7 @@ struct sockaddr_l2tpip6 { · 64 unmodified lines
65 * TUNNEL_MODIFY - CONN_ID, udpcsum65 * TUNNEL_MODIFY - CONN_ID, udpcsum
66 * TUNNEL_GETSTATS - CONN_ID, (stats)66 * TUNNEL_GETSTATS - CONN_ID, (stats)
67 * TUNNEL_GET - CONN_ID, (...)67 * TUNNEL_GET - CONN_ID, (...)
68 * SESSION_CREATE - SESSION_ID, PW_TYPE, offset, data_seq, cookie, peer_cookie, offset, l2spec68 * SESSION_CREATE - SESSION_ID, PW_TYPE, data_seq, cookie, peer_cookie, l2spec
69 * SESSION_DELETE - SESSION_ID69 * SESSION_DELETE - SESSION_ID
70 * SESSION_MODIFY - SESSION_ID, data_seq70 * SESSION_MODIFY - SESSION_ID, data_seq
71 * SESSION_GET - SESSION_ID, (...)71 * SESSION_GET - SESSION_ID, (...)
@@ -94,10 +94,10 @@ enum { · 22 unmodified lines
94 L2TP_ATTR_NONE, /* no data */94 L2TP_ATTR_NONE, /* no data */
95 L2TP_ATTR_PW_TYPE, /* u16, enum l2tp_pwtype */95 L2TP_ATTR_PW_TYPE, /* u16, enum l2tp_pwtype */
96 L2TP_ATTR_ENCAP_TYPE, /* u16, enum l2tp_encap_type */96 L2TP_ATTR_ENCAP_TYPE, /* u16, enum l2tp_encap_type */
97 L2TP_ATTR_OFFSET, /* u16 */97 L2TP_ATTR_OFFSET, /* u16 (not used) */
98 L2TP_ATTR_DATA_SEQ, /* u16 */98 L2TP_ATTR_DATA_SEQ, /* u16 */
99 L2TP_ATTR_L2SPEC_TYPE, /* u8, enum l2tp_l2spec_type */99 L2TP_ATTR_L2SPEC_TYPE, /* u8, enum l2tp_l2spec_type */
100 L2TP_ATTR_L2SPEC_LEN, /* u8, enum l2tp_l2spec_type */100 L2TP_ATTR_L2SPEC_LEN, /* u8 (not used) */
101 L2TP_ATTR_PROTO_VERSION, /* u8 */101 L2TP_ATTR_PROTO_VERSION, /* u8 */
102 L2TP_ATTR_IFNAME, /* string */102 L2TP_ATTR_IFNAME, /* string */
103 L2TP_ATTR_CONN_ID, /* u32 */103 L2TP_ATTR_CONN_ID, /* u32 */
include/uapi/linux/netfilter/nf_conntrack_common.h+5−1
@@ -101,12 +101,16 @@ enum ip_conntrack_status { · 100 unmodified lines
101 IPS_HELPER_BIT = 13,101 IPS_HELPER_BIT = 13,
102 IPS_HELPER = (1 << IPS_HELPER_BIT),102 IPS_HELPER = (1 << IPS_HELPER_BIT),
103 103
104 /* Conntrack has been offloaded to flow table. */
105 IPS_OFFLOAD_BIT = 14,
106 IPS_OFFLOAD = (1 << IPS_OFFLOAD_BIT),
107
104 /* Be careful here, modifying these bits can make things messy,108 /* Be careful here, modifying these bits can make things messy,
105 * so don't let users modify them directly.109 * so don't let users modify them directly.
106 */110 */
107 IPS_UNCHANGEABLE_MASK = (IPS_NAT_DONE_MASK | IPS_NAT_MASK |111 IPS_UNCHANGEABLE_MASK = (IPS_NAT_DONE_MASK | IPS_NAT_MASK |
108 IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING |112 IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING |
109 IPS_SEQ_ADJUST | IPS_TEMPLATE),113 IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_OFFLOAD),
110 114
111 __IPS_MAX_BIT = 14,115 __IPS_MAX_BIT = 14,
112};116};
include/uapi/linux/netfilter/nf_tables.h+76−0
@@ -92,6 +92,9 @@ enum nft_verdicts { · 91 unmodified lines
92 * @NFT_MSG_GETOBJ: get a stateful object (enum nft_obj_attributes)92 * @NFT_MSG_GETOBJ: get a stateful object (enum nft_obj_attributes)
93 * @NFT_MSG_DELOBJ: delete a stateful object (enum nft_obj_attributes)93 * @NFT_MSG_DELOBJ: delete a stateful object (enum nft_obj_attributes)
94 * @NFT_MSG_GETOBJ_RESET: get and reset a stateful object (enum nft_obj_attributes)94 * @NFT_MSG_GETOBJ_RESET: get and reset a stateful object (enum nft_obj_attributes)
95 * @NFT_MSG_NEWFLOWTABLE: add new flow table (enum nft_flowtable_attributes)
96 * @NFT_MSG_GETFLOWTABLE: get flow table (enum nft_flowtable_attributes)
97 * @NFT_MSG_DELFLOWTABLE: delete flow table (enum nft_flowtable_attributes)
95 */98 */
96enum nf_tables_msg_types {99enum nf_tables_msg_types {
97 NFT_MSG_NEWTABLE,100 NFT_MSG_NEWTABLE,
@@ -116,6 +119,9 @@ enum nf_tables_msg_types { · 18 unmodified lines
116 NFT_MSG_GETOBJ,119 NFT_MSG_GETOBJ,
117 NFT_MSG_DELOBJ,120 NFT_MSG_DELOBJ,
118 NFT_MSG_GETOBJ_RESET,121 NFT_MSG_GETOBJ_RESET,
122 NFT_MSG_NEWFLOWTABLE,
123 NFT_MSG_GETFLOWTABLE,
124 NFT_MSG_DELFLOWTABLE,
119 NFT_MSG_MAX,125 NFT_MSG_MAX,
120};126};
121 127
@@ -168,6 +174,8 @@ enum nft_table_attributes { · 46 unmodified lines
168 NFTA_TABLE_NAME,174 NFTA_TABLE_NAME,
169 NFTA_TABLE_FLAGS,175 NFTA_TABLE_FLAGS,
170 NFTA_TABLE_USE,176 NFTA_TABLE_USE,
177 NFTA_TABLE_HANDLE,
178 NFTA_TABLE_PAD,
171 __NFTA_TABLE_MAX179 __NFTA_TABLE_MAX
172};180};
173#define NFTA_TABLE_MAX (__NFTA_TABLE_MAX - 1)181#define NFTA_TABLE_MAX (__NFTA_TABLE_MAX - 1)
@@ -311,6 +319,7 @@ enum nft_set_desc_attributes { · 137 unmodified lines
311 * @NFTA_SET_GC_INTERVAL: garbage collection interval (NLA_U32)319 * @NFTA_SET_GC_INTERVAL: garbage collection interval (NLA_U32)
312 * @NFTA_SET_USERDATA: user data (NLA_BINARY)320 * @NFTA_SET_USERDATA: user data (NLA_BINARY)
313 * @NFTA_SET_OBJ_TYPE: stateful object type (NLA_U32: NFT_OBJECT_*)321 * @NFTA_SET_OBJ_TYPE: stateful object type (NLA_U32: NFT_OBJECT_*)
322 * @NFTA_SET_HANDLE: set handle (NLA_U64)
314 */323 */
315enum nft_set_attributes {324enum nft_set_attributes {
316 NFTA_SET_UNSPEC,325 NFTA_SET_UNSPEC,
@@ -329,6 +338,7 @@ enum nft_set_attributes { · 12 unmodified lines
329 NFTA_SET_USERDATA,338 NFTA_SET_USERDATA,
330 NFTA_SET_PAD,339 NFTA_SET_PAD,
331 NFTA_SET_OBJ_TYPE,340 NFTA_SET_OBJ_TYPE,
341 NFTA_SET_HANDLE,
332 __NFTA_SET_MAX342 __NFTA_SET_MAX
333};343};
334#define NFTA_SET_MAX (__NFTA_SET_MAX - 1)344#define NFTA_SET_MAX (__NFTA_SET_MAX - 1)
@@ -777,6 +787,7 @@ enum nft_exthdr_attributes { · 442 unmodified lines
777 * @NFT_META_OIFGROUP: packet output interface group787 * @NFT_META_OIFGROUP: packet output interface group
778 * @NFT_META_CGROUP: socket control group (skb->sk->sk_classid)788 * @NFT_META_CGROUP: socket control group (skb->sk->sk_classid)
779 * @NFT_META_PRANDOM: a 32bit pseudo-random number789 * @NFT_META_PRANDOM: a 32bit pseudo-random number
790 * @NFT_META_SECPATH: boolean, secpath_exists (!!skb->sp)
780 */791 */
781enum nft_meta_keys {792enum nft_meta_keys {
782 NFT_META_LEN,793 NFT_META_LEN,
@@ -804,6 +815,7 @@ enum nft_meta_keys { · 21 unmodified lines
804 NFT_META_OIFGROUP,815 NFT_META_OIFGROUP,
805 NFT_META_CGROUP,816 NFT_META_CGROUP,
806 NFT_META_PRANDOM,817 NFT_META_PRANDOM,
818 NFT_META_SECPATH,
807};819};
808 820
809/**821/**
@@ -949,6 +961,17 @@ enum nft_ct_attributes { · 139 unmodified lines
949};961};
950#define NFTA_CT_MAX (__NFTA_CT_MAX - 1)962#define NFTA_CT_MAX (__NFTA_CT_MAX - 1)
951 963
964/**
965 * enum nft_flow_attributes - ct offload expression attributes
966 * @NFTA_FLOW_TABLE_NAME: flow table name (NLA_STRING)
967 */
968enum nft_offload_attributes {
969 NFTA_FLOW_UNSPEC,
970 NFTA_FLOW_TABLE_NAME,
971 __NFTA_FLOW_MAX,
972};
973#define NFTA_FLOW_MAX (__NFTA_FLOW_MAX - 1)
974
952enum nft_limit_type {975enum nft_limit_type {
953 NFT_LIMIT_PKTS,976 NFT_LIMIT_PKTS,
954 NFT_LIMIT_PKT_BYTES977 NFT_LIMIT_PKT_BYTES
@@ -1295,6 +1318,7 @@ enum nft_ct_helper_attributes { · 340 unmodified lines
1295 * @NFTA_OBJ_TYPE: stateful object type (NLA_U32)1318 * @NFTA_OBJ_TYPE: stateful object type (NLA_U32)
1296 * @NFTA_OBJ_DATA: stateful object data (NLA_NESTED)1319 * @NFTA_OBJ_DATA: stateful object data (NLA_NESTED)
1297 * @NFTA_OBJ_USE: number of references to this expression (NLA_U32)1320 * @NFTA_OBJ_USE: number of references to this expression (NLA_U32)
1321 * @NFTA_OBJ_HANDLE: object handle (NLA_U64)
1298 */1322 */
1299enum nft_object_attributes {1323enum nft_object_attributes {
1300 NFTA_OBJ_UNSPEC,1324 NFTA_OBJ_UNSPEC,
@@ -1303,10 +1327,62 @@ enum nft_object_attributes { · 2 unmodified lines
1303 NFTA_OBJ_TYPE,1327 NFTA_OBJ_TYPE,
1304 NFTA_OBJ_DATA,1328 NFTA_OBJ_DATA,
1305 NFTA_OBJ_USE,1329 NFTA_OBJ_USE,
1330 NFTA_OBJ_HANDLE,
1331 NFTA_OBJ_PAD,
1306 __NFTA_OBJ_MAX1332 __NFTA_OBJ_MAX
1307};1333};
1308#define NFTA_OBJ_MAX (__NFTA_OBJ_MAX - 1)1334#define NFTA_OBJ_MAX (__NFTA_OBJ_MAX - 1)
1309 1335
1336/**
1337 * enum nft_flowtable_attributes - nf_tables flow table netlink attributes
1338 *
1339 * @NFTA_FLOWTABLE_TABLE: name of the table containing the expression (NLA_STRING)
1340 * @NFTA_FLOWTABLE_NAME: name of this flow table (NLA_STRING)
1341 * @NFTA_FLOWTABLE_HOOK: netfilter hook configuration(NLA_U32)
1342 * @NFTA_FLOWTABLE_USE: number of references to this flow table (NLA_U32)
1343 * @NFTA_FLOWTABLE_HANDLE: object handle (NLA_U64)
1344 */
1345enum nft_flowtable_attributes {
1346 NFTA_FLOWTABLE_UNSPEC,
1347 NFTA_FLOWTABLE_TABLE,
1348 NFTA_FLOWTABLE_NAME,
1349 NFTA_FLOWTABLE_HOOK,
1350 NFTA_FLOWTABLE_USE,
1351 NFTA_FLOWTABLE_HANDLE,
1352 NFTA_FLOWTABLE_PAD,
1353 __NFTA_FLOWTABLE_MAX
1354};
1355#define NFTA_FLOWTABLE_MAX (__NFTA_FLOWTABLE_MAX - 1)
1356
1357/**
1358 * enum nft_flowtable_hook_attributes - nf_tables flow table hook netlink attributes
1359 *
1360 * @NFTA_FLOWTABLE_HOOK_NUM: netfilter hook number (NLA_U32)
1361 * @NFTA_FLOWTABLE_HOOK_PRIORITY: netfilter hook priority (NLA_U32)
1362 * @NFTA_FLOWTABLE_HOOK_DEVS: input devices this flow table is bound to (NLA_NESTED)
1363 */
1364enum nft_flowtable_hook_attributes {
1365 NFTA_FLOWTABLE_HOOK_UNSPEC,
1366 NFTA_FLOWTABLE_HOOK_NUM,
1367 NFTA_FLOWTABLE_HOOK_PRIORITY,
1368 NFTA_FLOWTABLE_HOOK_DEVS,
1369 __NFTA_FLOWTABLE_HOOK_MAX
1370};
1371#define NFTA_FLOWTABLE_HOOK_MAX (__NFTA_FLOWTABLE_HOOK_MAX - 1)
1372
1373/**
1374 * enum nft_device_attributes - nf_tables device netlink attributes
1375 *
1376 * @NFTA_DEVICE_NAME: name of this device (NLA_STRING)
1377 */
1378enum nft_devices_attributes {
1379 NFTA_DEVICE_UNSPEC,
1380 NFTA_DEVICE_NAME,
1381 __NFTA_DEVICE_MAX
1382};
1383#define NFTA_DEVICE_MAX (__NFTA_DEVICE_MAX - 1)
1384
1385
1310/**1386/**
1311 * enum nft_trace_attributes - nf_tables trace netlink attributes1387 * enum nft_trace_attributes - nf_tables trace netlink attributes
1312 *1388 *
include/uapi/linux/netfilter/xt_connlimit.h+1−1
@@ -27,7 +27,7 @@ struct xt_connlimit_info { · 26 unmodified lines
27 __u32 flags;27 __u32 flags;
28 28
29 /* Used internally by the kernel */29 /* Used internally by the kernel */
30 struct xt_connlimit_data *data __attribute__((aligned(8)));30 struct nf_conncount_data *data __attribute__((aligned(8)));
31};31};
32 32
33#endif /* _XT_CONNLIMIT_H */33#endif /* _XT_CONNLIMIT_H */
include/uapi/linux/netfilter_arp.h+3−0
@@ -15,6 +15,9 @@ · 14 unmodified lines
15#define NF_ARP_IN 015#define NF_ARP_IN 0
16#define NF_ARP_OUT 116#define NF_ARP_OUT 1
17#define NF_ARP_FORWARD 217#define NF_ARP_FORWARD 2
18
19#ifndef __KERNEL__
18#define NF_ARP_NUMHOOKS 320#define NF_ARP_NUMHOOKS 3
21#endif
19 22
20#endif /* __LINUX_ARP_NETFILTER_H */23#endif /* __LINUX_ARP_NETFILTER_H */
include/uapi/linux/netfilter_decnet.h+3−1
@@ -24,6 +24,9 @@ · 23 unmodified lines
24#define NFC_DN_IF_IN 0x000424#define NFC_DN_IF_IN 0x0004
25/* Output device. */25/* Output device. */
26#define NFC_DN_IF_OUT 0x000826#define NFC_DN_IF_OUT 0x0008
27
28/* kernel define is in netfilter_defs.h */
29#define NF_DN_NUMHOOKS 7
27#endif /* ! __KERNEL__ */30#endif /* ! __KERNEL__ */
28 31
29/* DECnet Hooks */32/* DECnet Hooks */
@@ -41,7 +44,6 @@ · 11 unmodified lines
41#define NF_DN_HELLO 544#define NF_DN_HELLO 5
42/* Input Routing Packets */45/* Input Routing Packets */
43#define NF_DN_ROUTE 646#define NF_DN_ROUTE 6
44#define NF_DN_NUMHOOKS 7
45 47
46enum nf_dn_hook_priorities {48enum nf_dn_hook_priorities {
47 NF_DN_PRI_FIRST = INT_MIN,49 NF_DN_PRI_FIRST = INT_MIN,
include/uapi/linux/netfilter_ipv4.h+1−0
@@ -57,6 +57,7 @@ · 56 unmodified lines
57 57
58enum nf_ip_hook_priorities {58enum nf_ip_hook_priorities {
59 NF_IP_PRI_FIRST = INT_MIN,59 NF_IP_PRI_FIRST = INT_MIN,
60 NF_IP_PRI_RAW_BEFORE_DEFRAG = -450,
60 NF_IP_PRI_CONNTRACK_DEFRAG = -400,61 NF_IP_PRI_CONNTRACK_DEFRAG = -400,
61 NF_IP_PRI_RAW = -300,62 NF_IP_PRI_RAW = -300,
62 NF_IP_PRI_SELINUX_FIRST = -225,63 NF_IP_PRI_SELINUX_FIRST = -225,
include/uapi/linux/netfilter_ipv6.h+1−0
@@ -62,6 +62,7 @@ · 61 unmodified lines
62 62
63enum nf_ip6_hook_priorities {63enum nf_ip6_hook_priorities {
64 NF_IP6_PRI_FIRST = INT_MIN,64 NF_IP6_PRI_FIRST = INT_MIN,
65 NF_IP6_PRI_RAW_BEFORE_DEFRAG = -450,
65 NF_IP6_PRI_CONNTRACK_DEFRAG = -400,66 NF_IP6_PRI_CONNTRACK_DEFRAG = -400,
66 NF_IP6_PRI_RAW = -300,67 NF_IP6_PRI_RAW = -300,
67 NF_IP6_PRI_SELINUX_FIRST = -225,68 NF_IP6_PRI_SELINUX_FIRST = -225,
include/uapi/linux/netfilter_ipv6/ip6t_srh.h+57−0
@@ -0,0 +1,57 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _IP6T_SRH_H
3#define _IP6T_SRH_H
4
5#include <linux/types.h>
6#include <linux/netfilter.h>
7
8/* Values for "mt_flags" field in struct ip6t_srh */
9#define IP6T_SRH_NEXTHDR 0x0001
10#define IP6T_SRH_LEN_EQ 0x0002
11#define IP6T_SRH_LEN_GT 0x0004
12#define IP6T_SRH_LEN_LT 0x0008
13#define IP6T_SRH_SEGS_EQ 0x0010
14#define IP6T_SRH_SEGS_GT 0x0020
15#define IP6T_SRH_SEGS_LT 0x0040
16#define IP6T_SRH_LAST_EQ 0x0080
17#define IP6T_SRH_LAST_GT 0x0100
18#define IP6T_SRH_LAST_LT 0x0200
19#define IP6T_SRH_TAG 0x0400
20#define IP6T_SRH_MASK 0x07FF
21
22/* Values for "mt_invflags" field in struct ip6t_srh */
23#define IP6T_SRH_INV_NEXTHDR 0x0001
24#define IP6T_SRH_INV_LEN_EQ 0x0002
25#define IP6T_SRH_INV_LEN_GT 0x0004
26#define IP6T_SRH_INV_LEN_LT 0x0008
27#define IP6T_SRH_INV_SEGS_EQ 0x0010
28#define IP6T_SRH_INV_SEGS_GT 0x0020
29#define IP6T_SRH_INV_SEGS_LT 0x0040
30#define IP6T_SRH_INV_LAST_EQ 0x0080
31#define IP6T_SRH_INV_LAST_GT 0x0100
32#define IP6T_SRH_INV_LAST_LT 0x0200
33#define IP6T_SRH_INV_TAG 0x0400
34#define IP6T_SRH_INV_MASK 0x07FF
35
36/**
37 * struct ip6t_srh - SRH match options
38 * @ next_hdr: Next header field of SRH
39 * @ hdr_len: Extension header length field of SRH
40 * @ segs_left: Segments left field of SRH
41 * @ last_entry: Last entry field of SRH
42 * @ tag: Tag field of SRH
43 * @ mt_flags: match options
44 * @ mt_invflags: Invert the sense of match options
45 */
46
47struct ip6t_srh {
48 __u8 next_hdr;
49 __u8 hdr_len;
50 __u8 segs_left;
51 __u8 last_entry;
52 __u16 tag;
53 __u16 mt_flags;
54 __u16 mt_invflags;
55};
56
57#endif /*_IP6T_SRH_H*/
include/uapi/linux/nl80211.h+4−0
@@ -3862,6 +3862,9 @@ enum nl80211_bss_scan_width { · 3861 unmodified lines
3862 * @NL80211_BSS_PARENT_BSSID. (u64).3862 * @NL80211_BSS_PARENT_BSSID. (u64).
3863 * @NL80211_BSS_PARENT_BSSID: the BSS according to which @NL80211_BSS_PARENT_TSF3863 * @NL80211_BSS_PARENT_BSSID: the BSS according to which @NL80211_BSS_PARENT_TSF
3864 * is set.3864 * is set.
3865 * @NL80211_BSS_CHAIN_SIGNAL: per-chain signal strength of last BSS update.
3866 * Contains a nested array of signal strength attributes (u8, dBm),
3867 * using the nesting index as the antenna number.
3865 * @__NL80211_BSS_AFTER_LAST: internal3868 * @__NL80211_BSS_AFTER_LAST: internal
3866 * @NL80211_BSS_MAX: highest BSS attribute3869 * @NL80211_BSS_MAX: highest BSS attribute
3867 */3870 */
@@ -3885,6 +3888,7 @@ enum nl80211_bss { · 17 unmodified lines
3885 NL80211_BSS_PAD,3888 NL80211_BSS_PAD,
3886 NL80211_BSS_PARENT_TSF,3889 NL80211_BSS_PARENT_TSF,
3887 NL80211_BSS_PARENT_BSSID,3890 NL80211_BSS_PARENT_BSSID,
3891 NL80211_BSS_CHAIN_SIGNAL,
3888 3892
3889 /* keep last */3893 /* keep last */
3890 __NL80211_BSS_AFTER_LAST,3894 __NL80211_BSS_AFTER_LAST,
include/uapi/linux/openvswitch.h+1−0
@@ -363,6 +363,7 @@ enum ovs_tunnel_key_attr { · 362 unmodified lines
363 OVS_TUNNEL_KEY_ATTR_IPV6_SRC, /* struct in6_addr src IPv6 address. */363 OVS_TUNNEL_KEY_ATTR_IPV6_SRC, /* struct in6_addr src IPv6 address. */
364 OVS_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. */364 OVS_TUNNEL_KEY_ATTR_IPV6_DST, /* struct in6_addr dst IPv6 address. */
365 OVS_TUNNEL_KEY_ATTR_PAD,365 OVS_TUNNEL_KEY_ATTR_PAD,
366 OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS, /* struct erspan_metadata */
366 __OVS_TUNNEL_KEY_ATTR_MAX367 __OVS_TUNNEL_KEY_ATTR_MAX
367};368};
368 369
include/uapi/linux/perf_event.h+22−0
@@ -418,6 +418,27 @@ struct perf_event_attr { · 417 unmodified lines
418 __u16 __reserved_2; /* align to __u64 */418 __u16 __reserved_2; /* align to __u64 */
419};419};
420 420
421/*
422 * Structure used by below PERF_EVENT_IOC_QUERY_BPF command
423 * to query bpf programs attached to the same perf tracepoint
424 * as the given perf event.
425 */
426struct perf_event_query_bpf {
427 /*
428 * The below ids array length
429 */
430 __u32 ids_len;
431 /*
432 * Set by the kernel to indicate the number of
433 * available programs
434 */
435 __u32 prog_cnt;
436 /*
437 * User provided buffer to store program ids
438 */
439 __u32 ids[0];
440};
441
421#define perf_flags(attr) (*(&(attr)->read_format + 1))442#define perf_flags(attr) (*(&(attr)->read_format + 1))
422 443
423/*444/*
@@ -433,6 +454,7 @@ struct perf_event_attr { · 9 unmodified lines
433#define PERF_EVENT_IOC_ID _IOR('$', 7, __u64 *)454#define PERF_EVENT_IOC_ID _IOR('$', 7, __u64 *)
434#define PERF_EVENT_IOC_SET_BPF _IOW('$', 8, __u32)455#define PERF_EVENT_IOC_SET_BPF _IOW('$', 8, __u32)
435#define PERF_EVENT_IOC_PAUSE_OUTPUT _IOW('$', 9, __u32)456#define PERF_EVENT_IOC_PAUSE_OUTPUT _IOW('$', 9, __u32)
457#define PERF_EVENT_IOC_QUERY_BPF _IOWR('$', 10, struct perf_event_query_bpf *)
436 458
437enum perf_event_ioc_flags {459enum perf_event_ioc_flags {
438 PERF_IOC_FLAG_GROUP = 1U << 0,460 PERF_IOC_FLAG_GROUP = 1U << 0,
include/uapi/linux/rtnetlink.h+12−0
@@ -541,9 +541,19 @@ struct tcmsg { · 540 unmodified lines
541 int tcm_ifindex;541 int tcm_ifindex;
542 __u32 tcm_handle;542 __u32 tcm_handle;
543 __u32 tcm_parent;543 __u32 tcm_parent;
544/* tcm_block_index is used instead of tcm_parent
545 * in case tcm_ifindex == TCM_IFINDEX_MAGIC_BLOCK
546 */
547#define tcm_block_index tcm_parent
544 __u32 tcm_info;548 __u32 tcm_info;
545};549};
546 550
551/* For manipulation of filters in shared block, tcm_ifindex is set to
552 * TCM_IFINDEX_MAGIC_BLOCK, and tcm_parent is aliased to tcm_block_index
553 * which is the block index.
554 */
555#define TCM_IFINDEX_MAGIC_BLOCK (0xFFFFFFFFU)
556
547enum {557enum {
548 TCA_UNSPEC,558 TCA_UNSPEC,
549 TCA_KIND,559 TCA_KIND,
@@ -558,6 +568,8 @@ enum { · 8 unmodified lines
558 TCA_DUMP_INVISIBLE,568 TCA_DUMP_INVISIBLE,
559 TCA_CHAIN,569 TCA_CHAIN,
560 TCA_HW_OFFLOAD,570 TCA_HW_OFFLOAD,
571 TCA_INGRESS_BLOCK,
572 TCA_EGRESS_BLOCK,
561 __TCA_MAX573 __TCA_MAX
562};574};
563 575
include/uapi/linux/sctp.h+3−0
@@ -125,6 +125,7 @@ typedef __s32 sctp_assoc_t; · 124 unmodified lines
125#define SCTP_SOCKOPT_PEELOFF_FLAGS 122125#define SCTP_SOCKOPT_PEELOFF_FLAGS 122
126#define SCTP_STREAM_SCHEDULER 123126#define SCTP_STREAM_SCHEDULER 123
127#define SCTP_STREAM_SCHEDULER_VALUE 124127#define SCTP_STREAM_SCHEDULER_VALUE 124
128#define SCTP_INTERLEAVING_SUPPORTED 125
128 129
129/* PR-SCTP policies */130/* PR-SCTP policies */
130#define SCTP_PR_SCTP_NONE 0x0000131#define SCTP_PR_SCTP_NONE 0x0000
@@ -459,6 +460,8 @@ struct sctp_pdapi_event { · 328 unmodified lines
459 __u32 pdapi_length;460 __u32 pdapi_length;
460 __u32 pdapi_indication;461 __u32 pdapi_indication;
461 sctp_assoc_t pdapi_assoc_id;462 sctp_assoc_t pdapi_assoc_id;
463 __u32 pdapi_stream;
464 __u32 pdapi_seq;
462};465};
463 466
464enum { SCTP_PARTIAL_DELIVERY_ABORTED=0, };467enum { SCTP_PARTIAL_DELIVERY_ABORTED=0, };
include/uapi/linux/tipc.h+3−4
@@ -117,10 +117,9 @@ static inline unsigned int tipc_node(__u32 addr) · 116 unmodified lines
117/*117/*
118 * Publication scopes when binding port names and port name sequences118 * Publication scopes when binding port names and port name sequences
119 */119 */
120 120#define TIPC_ZONE_SCOPE 1
121#define TIPC_ZONE_SCOPE 1121#define TIPC_CLUSTER_SCOPE 2
122#define TIPC_CLUSTER_SCOPE 2122#define TIPC_NODE_SCOPE 3
123#define TIPC_NODE_SCOPE 3
124 123
125/*124/*
126 * Limiting values for messages125 * Limiting values for messages
include/uapi/linux/virtio_net.h+13−0
@@ -57,6 +57,8 @@ · 56 unmodified lines
57 * Steering */57 * Steering */
58#define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */58#define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */
59 59
60#define VIRTIO_NET_F_SPEED_DUPLEX 63 /* Device set linkspeed and duplex */
61
60#ifndef VIRTIO_NET_NO_LEGACY62#ifndef VIRTIO_NET_NO_LEGACY
61#define VIRTIO_NET_F_GSO 6 /* Host handles pkts w/ any GSO type */63#define VIRTIO_NET_F_GSO 6 /* Host handles pkts w/ any GSO type */
62#endif /* VIRTIO_NET_NO_LEGACY */64#endif /* VIRTIO_NET_NO_LEGACY */
@@ -76,6 +78,17 @@ struct virtio_net_config { · 13 unmodified lines
76 __u16 max_virtqueue_pairs;78 __u16 max_virtqueue_pairs;
77 /* Default maximum transmit unit advice */79 /* Default maximum transmit unit advice */
78 __u16 mtu;80 __u16 mtu;
81 /*
82 * speed, in units of 1Mb. All values 0 to INT_MAX are legal.
83 * Any other value stands for unknown.
84 */
85 __u32 speed;
86 /*
87 * 0x00 - half duplex
88 * 0x01 - full duplex
89 * Any other value stands for unknown.
90 */
91 __u8 duplex;
79} __attribute__((packed));92} __attribute__((packed));
80 93
81/*94/*

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