History

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

Pull networking updates from David Miller: 1) Unified UDP encapsulation offload methods for drivers, from Alexander Duyck. 2) Make DSA binding more sane, from Andrew Lunn. 3) Support QCA9888 chips in ath10k, from Anilkumar Kolli. 4) Several workqueue usage cleanups, from Bhaktipriya Shridhar. 5) Add XDP (eXpress Data Path), essentially running BPF programs on RX packets as soon as the device sees them, with the option to mirror the packet on TX via the same interface. From Brenden Blanco and others. 6) Allow qdisc/class stats dumps to run lockless, from Eric Dumazet. 7) Add VLAN support to b53 and bcm_sf2, from Florian Fainelli. 8) Simplify netlink conntrack entry layout, from Florian Westphal. 9) Add ipv4 forwarding support to mlxsw spectrum driver, from Ido Schimmel, Yotam Gigi, and Jiri Pirko. 10) Add SKB array infrastructure and convert tun and macvtap over to it. From Michael S Tsirkin and Jason Wang. 11) Support qdisc packet injection in pktgen, from John Fastabend. 12) Add neighbour monitoring framework to TIPC, from Jon Paul Maloy. 13) Add NV congestion control support to TCP, from Lawrence Brakmo. 14) Add GSO support to SCTP, from Marcelo Ricardo Leitner. 15) Allow GRO and RPS to function on macsec devices, from Paolo Abeni. 16) Support MPLS over IPV4, from Simon Horman. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1622 commits) xgene: Fix build warning with ACPI disabled. be2net: perform temperature query in adapter regardless of its interface state l2tp: Correctly return -EBADF from pppol2tp_getname. net/mlx5_core/health: Remove deprecated create_singlethread_workqueue net: ipmr/ip6mr: update lastuse on entry change macsec: ensure rx_sa is set when validation is disabled tipc: dump monitor attributes tipc: add a function to get the bearer name tipc: get monitor threshold for the cluster tipc: make cluster size threshold for monitoring configurable tipc: introduce constants for tipc address validation net: neigh: disallow transition to NUD_STALE if lladdr is unchanged in neigh_update() MAINTAINERS: xgene: Add driver and documentation path Documentation: dtb: xgene: Add MDIO node dtb: xgene: Add MDIO node drivers: net: xgene: ethtool: Use phy_ethtool_gset and sset drivers: net: xgene: Use exported functions drivers: net: xgene: Enable MDIO driver drivers: net: xgene: Add backward compatibility drivers: net: phy: xgene: Add MDIO driver ...

Linus Torvalds committed 10 years ago

Commit 468fc7e2 parents 08fd8c1 36232011390 files · +95887 −36917Browse files

Showing the changes to include/uapi/linux (27 of 1390 files). Show all

Unified · Split

27 files
  1. include/uapi/linux/batman_adv.h +114 −0
  2. include/uapi/linux/bpf.h +85 −1
  3. include/uapi/linux/can/bcm.h +1 −0
  4. include/uapi/linux/devlink.h +8 −0
  5. include/uapi/linux/elf-em.h +1 −0
  6. include/uapi/linux/ethtool.h +2 −1
  7. include/uapi/linux/fib_rules.h +1 −0
  8. include/uapi/linux/icmp.h +1 −0
  9. include/uapi/linux/if_bridge.h +29 −0
  10. include/uapi/linux/if_ether.h +1 −0
  11. include/uapi/linux/if_link.h +14 −0
  12. include/uapi/linux/if_macsec.h +2 −0
  13. include/uapi/linux/if_tunnel.h +1 −0
  14. include/uapi/linux/inet_diag.h +1 −0
  15. include/uapi/linux/netfilter/nf_tables.h +6 −0
  16. include/uapi/linux/netfilter/xt_NFLOG.h +5 −1
  17. include/uapi/linux/netlink_diag.h +1 −0
  18. include/uapi/linux/nl80211.h +89 −1
  19. include/uapi/linux/openvswitch.h +8 −0
  20. include/uapi/linux/pkt_cls.h +16 −3
  21. include/uapi/linux/sctp.h +42 −0
  22. include/uapi/linux/tc_act/tc_skbedit.h +2 −0
  23. include/uapi/linux/tcp.h +10 −0
  24. include/uapi/linux/tipc.h +26 −4
  25. include/uapi/linux/tipc_netlink.h +37 −0
  26. include/uapi/linux/virtio_net.h +6 −3
  27. include/uapi/linux/wireless.h +22 −41
include/uapi/linux/batman_adv.h+114−0
@@ -0,0 +1,114 @@
1+/* Copyright (C) 2016 B.A.T.M.A.N. contributors:
2+ *
3+ * Matthias Schiffer
4+ *
5+ * Permission to use, copy, modify, and/or distribute this software for any
6+ * purpose with or without fee is hereby granted, provided that the above
7+ * copyright notice and this permission notice appear in all copies.
8+ *
9+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16+ */
17+
18+#ifndef _UAPI_LINUX_BATMAN_ADV_H_
19+#define _UAPI_LINUX_BATMAN_ADV_H_
20+
21+#define BATADV_NL_NAME "batadv"
22+
23+#define BATADV_NL_MCAST_GROUP_TPMETER "tpmeter"
24+
25+/**
26+ * enum batadv_nl_attrs - batman-adv netlink attributes
27+ *
28+ * @BATADV_ATTR_UNSPEC: unspecified attribute to catch errors
29+ * @BATADV_ATTR_VERSION: batman-adv version string
30+ * @BATADV_ATTR_ALGO_NAME: name of routing algorithm
31+ * @BATADV_ATTR_MESH_IFINDEX: index of the batman-adv interface
32+ * @BATADV_ATTR_MESH_IFNAME: name of the batman-adv interface
33+ * @BATADV_ATTR_MESH_ADDRESS: mac address of the batman-adv interface
34+ * @BATADV_ATTR_HARD_IFINDEX: index of the non-batman-adv interface
35+ * @BATADV_ATTR_HARD_IFNAME: name of the non-batman-adv interface
36+ * @BATADV_ATTR_HARD_ADDRESS: mac address of the non-batman-adv interface
37+ * @BATADV_ATTR_ORIG_ADDRESS: originator mac address
38+ * @BATADV_ATTR_TPMETER_RESULT: result of run (see batadv_tp_meter_status)
39+ * @BATADV_ATTR_TPMETER_TEST_TIME: time (msec) the run took
40+ * @BATADV_ATTR_TPMETER_BYTES: amount of acked bytes during run
41+ * @BATADV_ATTR_TPMETER_COOKIE: session cookie to match tp_meter session
42+ * @BATADV_ATTR_PAD: attribute used for padding for 64-bit alignment
43+ * @__BATADV_ATTR_AFTER_LAST: internal use
44+ * @NUM_BATADV_ATTR: total number of batadv_nl_attrs available
45+ * @BATADV_ATTR_MAX: highest attribute number currently defined
46+ */
47+enum batadv_nl_attrs {
48+ BATADV_ATTR_UNSPEC,
49+ BATADV_ATTR_VERSION,
50+ BATADV_ATTR_ALGO_NAME,
51+ BATADV_ATTR_MESH_IFINDEX,
52+ BATADV_ATTR_MESH_IFNAME,
53+ BATADV_ATTR_MESH_ADDRESS,
54+ BATADV_ATTR_HARD_IFINDEX,
55+ BATADV_ATTR_HARD_IFNAME,
56+ BATADV_ATTR_HARD_ADDRESS,
57+ BATADV_ATTR_ORIG_ADDRESS,
58+ BATADV_ATTR_TPMETER_RESULT,
59+ BATADV_ATTR_TPMETER_TEST_TIME,
60+ BATADV_ATTR_TPMETER_BYTES,
61+ BATADV_ATTR_TPMETER_COOKIE,
62+ BATADV_ATTR_PAD,
63+ /* add attributes above here, update the policy in netlink.c */
64+ __BATADV_ATTR_AFTER_LAST,
65+ NUM_BATADV_ATTR = __BATADV_ATTR_AFTER_LAST,
66+ BATADV_ATTR_MAX = __BATADV_ATTR_AFTER_LAST - 1
67+};
68+
69+/**
70+ * enum batadv_nl_commands - supported batman-adv netlink commands
71+ *
72+ * @BATADV_CMD_UNSPEC: unspecified command to catch errors
73+ * @BATADV_CMD_GET_MESH_INFO: Query basic information about batman-adv device
74+ * @BATADV_CMD_TP_METER: Start a tp meter session
75+ * @BATADV_CMD_TP_METER_CANCEL: Cancel a tp meter session
76+ * @__BATADV_CMD_AFTER_LAST: internal use
77+ * @BATADV_CMD_MAX: highest used command number
78+ */
79+enum batadv_nl_commands {
80+ BATADV_CMD_UNSPEC,
81+ BATADV_CMD_GET_MESH_INFO,
82+ BATADV_CMD_TP_METER,
83+ BATADV_CMD_TP_METER_CANCEL,
84+ /* add new commands above here */
85+ __BATADV_CMD_AFTER_LAST,
86+ BATADV_CMD_MAX = __BATADV_CMD_AFTER_LAST - 1
87+};
88+
89+/**
90+ * enum batadv_tp_meter_reason - reason of a tp meter test run stop
91+ * @BATADV_TP_REASON_COMPLETE: sender finished tp run
92+ * @BATADV_TP_REASON_CANCEL: sender was stopped during run
93+ * @BATADV_TP_REASON_DST_UNREACHABLE: receiver could not be reached or didn't
94+ * answer
95+ * @BATADV_TP_REASON_RESEND_LIMIT: (unused) sender retry reached limit
96+ * @BATADV_TP_REASON_ALREADY_ONGOING: test to or from the same node already
97+ * ongoing
98+ * @BATADV_TP_REASON_MEMORY_ERROR: test was stopped due to low memory
99+ * @BATADV_TP_REASON_CANT_SEND: failed to send via outgoing interface
100+ * @BATADV_TP_REASON_TOO_MANY: too many ongoing sessions
101+ */
102+enum batadv_tp_meter_reason {
103+ BATADV_TP_REASON_COMPLETE = 3,
104+ BATADV_TP_REASON_CANCEL = 4,
105+ /* error status >= 128 */
106+ BATADV_TP_REASON_DST_UNREACHABLE = 128,
107+ BATADV_TP_REASON_RESEND_LIMIT = 129,
108+ BATADV_TP_REASON_ALREADY_ONGOING = 130,
109+ BATADV_TP_REASON_MEMORY_ERROR = 131,
110+ BATADV_TP_REASON_CANT_SEND = 132,
111+ BATADV_TP_REASON_TOO_MANY = 133,
112+};
113+
114+#endif /* _UAPI_LINUX_BATMAN_ADV_H_ */
include/uapi/linux/bpf.h+85−1
@@ -84,6 +84,7 @@ enum bpf_map_type { · 83 unmodified lines
8484 BPF_MAP_TYPE_PERCPU_HASH,
8585 BPF_MAP_TYPE_PERCPU_ARRAY,
8686 BPF_MAP_TYPE_STACK_TRACE,
87+ BPF_MAP_TYPE_CGROUP_ARRAY,
8788 };
8889
8990 enum bpf_prog_type {
@@ -93,6 +94,7 @@ enum bpf_prog_type { · 3 unmodified lines
9394 BPF_PROG_TYPE_SCHED_CLS,
9495 BPF_PROG_TYPE_SCHED_ACT,
9596 BPF_PROG_TYPE_TRACEPOINT,
97+ BPF_PROG_TYPE_XDP,
9698 };
9799
98100 #define BPF_PSEUDO_MAP_FD 1
@@ -313,6 +315,66 @@ enum bpf_func_id { · 214 unmodified lines
313315 */
314316 BPF_FUNC_skb_get_tunnel_opt,
315317 BPF_FUNC_skb_set_tunnel_opt,
318+
319+ /**
320+ * bpf_skb_change_proto(skb, proto, flags)
321+ * Change protocol of the skb. Currently supported is
322+ * v4 -> v6, v6 -> v4 transitions. The helper will also
323+ * resize the skb. eBPF program is expected to fill the
324+ * new headers via skb_store_bytes and lX_csum_replace.
325+ * @skb: pointer to skb
326+ * @proto: new skb->protocol type
327+ * @flags: reserved
328+ * Return: 0 on success or negative error
329+ */
330+ BPF_FUNC_skb_change_proto,
331+
332+ /**
333+ * bpf_skb_change_type(skb, type)
334+ * Change packet type of skb.
335+ * @skb: pointer to skb
336+ * @type: new skb->pkt_type type
337+ * Return: 0 on success or negative error
338+ */
339+ BPF_FUNC_skb_change_type,
340+
341+ /**
342+ * bpf_skb_in_cgroup(skb, map, index) - Check cgroup2 membership of skb
343+ * @skb: pointer to skb
344+ * @map: pointer to bpf_map in BPF_MAP_TYPE_CGROUP_ARRAY type
345+ * @index: index of the cgroup in the bpf_map
346+ * Return:
347+ * == 0 skb failed the cgroup2 descendant test
348+ * == 1 skb succeeded the cgroup2 descendant test
349+ * < 0 error
350+ */
351+ BPF_FUNC_skb_in_cgroup,
352+
353+ /**
354+ * bpf_get_hash_recalc(skb)
355+ * Retrieve and possibly recalculate skb->hash.
356+ * @skb: pointer to skb
357+ * Return: hash
358+ */
359+ BPF_FUNC_get_hash_recalc,
360+
361+ /**
362+ * u64 bpf_get_current_task(void)
363+ * Returns current task_struct
364+ * Return: current
365+ */
366+ BPF_FUNC_get_current_task,
367+
368+ /**
369+ * bpf_probe_write_user(void *dst, void *src, int len)
370+ * safely attempt to write to a location
371+ * @dst: destination address in userspace
372+ * @src: source address on stack
373+ * @len: number of bytes to copy
374+ * Return: 0 on success or negative error
375+ */
376+ BPF_FUNC_probe_write_user,
377+
316378 __BPF_FUNC_MAX_ID,
317379 };
318380
@@ -347,9 +409,11 @@ enum bpf_func_id { · 28 unmodified lines
347409 #define BPF_F_ZERO_CSUM_TX (1ULL << 1)
348410 #define BPF_F_DONT_FRAGMENT (1ULL << 2)
349411
350−/* BPF_FUNC_perf_event_output flags. */
412+/* BPF_FUNC_perf_event_output and BPF_FUNC_perf_event_read flags. */
351413 #define BPF_F_INDEX_MASK 0xffffffffULL
352414 #define BPF_F_CURRENT_CPU BPF_F_INDEX_MASK
415+/* BPF_FUNC_perf_event_output for sk_buff input context. */
416+#define BPF_F_CTXLEN_MASK (0xfffffULL << 32)
353417
354418 /* user accessible mirror of in-kernel sk_buff.
355419 * new fields can only be added to the end of this structure
@@ -386,4 +450,24 @@ struct bpf_tunnel_key { · 30 unmodified lines
386450 __u32 tunnel_label;
387451 };
388452
453+/* User return codes for XDP prog type.
454+ * A valid XDP program must return one of these defined values. All other
455+ * return codes are reserved for future use. Unknown return codes will result
456+ * in packet drop.
457+ */
458+enum xdp_action {
459+ XDP_ABORTED = 0,
460+ XDP_DROP,
461+ XDP_PASS,
462+ XDP_TX,
463+};
464+
465+/* user accessible metadata for XDP packet hook
466+ * new fields must be added to the end of this structure
467+ */
468+struct xdp_md {
469+ __u32 data;
470+ __u32 data_end;
471+};
472+
389473 #endif /* _UAPI__LINUX_BPF_H__ */
include/uapi/linux/can/bcm.h+1−0
@@ -99,5 +99,6 @@ enum { · 98 unmodified lines
9999 #define RX_ANNOUNCE_RESUME 0x0100
100100 #define TX_RESET_MULTI_IDX 0x0200
101101 #define RX_RTR_FRAME 0x0400
102+#define CAN_FD_FRAME 0x0800
102103
103104 #endif /* !_UAPI_CAN_BCM_H */
include/uapi/linux/devlink.h+8−0
@@ -57,6 +57,8 @@ enum devlink_command { · 56 unmodified lines
5757 DEVLINK_CMD_SB_OCC_SNAPSHOT,
5858 DEVLINK_CMD_SB_OCC_MAX_CLEAR,
5959
60+ DEVLINK_CMD_ESWITCH_MODE_GET,
61+ DEVLINK_CMD_ESWITCH_MODE_SET,
6062 /* add new commands above here */
6163
6264 __DEVLINK_CMD_MAX,
@@ -95,6 +97,11 @@ enum devlink_sb_threshold_type { · 32 unmodified lines
9597
9698 #define DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX 20
9799
100+enum devlink_eswitch_mode {
101+ DEVLINK_ESWITCH_MODE_LEGACY,
102+ DEVLINK_ESWITCH_MODE_SWITCHDEV,
103+};
104+
98105 enum devlink_attr {
99106 /* don't change the order or add anything between, this is ABI! */
100107 DEVLINK_ATTR_UNSPEC,
@@ -125,6 +132,7 @@ enum devlink_attr { · 24 unmodified lines
125132 DEVLINK_ATTR_SB_TC_INDEX, /* u16 */
126133 DEVLINK_ATTR_SB_OCC_CUR, /* u32 */
127134 DEVLINK_ATTR_SB_OCC_MAX, /* u32 */
135+ DEVLINK_ATTR_ESWITCH_MODE, /* u16 */
128136
129137 /* add new attributes above here, update the policy in devlink.c */
130138
include/uapi/linux/elf-em.h+1−0
@@ -40,6 +40,7 @@ · 39 unmodified lines
4040 #define EM_TILEPRO 188 /* Tilera TILEPro */
4141 #define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */
4242 #define EM_TILEGX 191 /* Tilera TILE-Gx */
43+#define EM_BPF 247 /* Linux BPF - in-kernel virtual machine */
4344 #define EM_FRV 0x5441 /* Fujitsu FR-V */
4445 #define EM_AVR32 0x18ad /* Atmel AVR32 */
4546
include/uapi/linux/ethtool.h+2−1
@@ -1362,6 +1362,7 @@ enum ethtool_link_mode_bit_indices { · 1361 unmodified lines
13621362 ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT = 37,
13631363 ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT = 38,
13641364 ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT = 39,
1365+ ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT = 40,
13651366
13661367 /* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit
13671368 * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_*
@@ -1370,7 +1371,7 @@ enum ethtool_link_mode_bit_indices { · 2 unmodified lines
13701371 */
13711372
13721373 __ETHTOOL_LINK_MODE_LAST
1373− = ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT,
1374+ = ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT,
13741375 };
13751376
13761377 #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) \
include/uapi/linux/fib_rules.h+1−0
@@ -50,6 +50,7 @@ enum { · 49 unmodified lines
5050 FRA_FWMASK, /* mask for netfilter mark */
5151 FRA_OIFNAME,
5252 FRA_PAD,
53+ FRA_L3MDEV, /* iif or oif is l3mdev goto its table */
5354 __FRA_MAX
5455 };
5556
include/uapi/linux/icmp.h+1−0
@@ -79,6 +79,7 @@ struct icmphdr { · 78 unmodified lines
7979 __be16 __unused;
8080 __be16 mtu;
8181 } frag;
82+ __u8 reserved[4];
8283 } un;
8384 };
8485
include/uapi/linux/if_bridge.h+29−0
@@ -247,8 +247,37 @@ enum { · 246 unmodified lines
247247 enum {
248248 BRIDGE_XSTATS_UNSPEC,
249249 BRIDGE_XSTATS_VLAN,
250+ BRIDGE_XSTATS_MCAST,
251+ BRIDGE_XSTATS_PAD,
250252 __BRIDGE_XSTATS_MAX
251253 };
252254 #define BRIDGE_XSTATS_MAX (__BRIDGE_XSTATS_MAX - 1)
253255
256+enum {
257+ BR_MCAST_DIR_RX,
258+ BR_MCAST_DIR_TX,
259+ BR_MCAST_DIR_SIZE
260+};
261+
262+/* IGMP/MLD statistics */
263+struct br_mcast_stats {
264+ __u64 igmp_v1queries[BR_MCAST_DIR_SIZE];
265+ __u64 igmp_v2queries[BR_MCAST_DIR_SIZE];
266+ __u64 igmp_v3queries[BR_MCAST_DIR_SIZE];
267+ __u64 igmp_leaves[BR_MCAST_DIR_SIZE];
268+ __u64 igmp_v1reports[BR_MCAST_DIR_SIZE];
269+ __u64 igmp_v2reports[BR_MCAST_DIR_SIZE];
270+ __u64 igmp_v3reports[BR_MCAST_DIR_SIZE];
271+ __u64 igmp_parse_errors;
272+
273+ __u64 mld_v1queries[BR_MCAST_DIR_SIZE];
274+ __u64 mld_v2queries[BR_MCAST_DIR_SIZE];
275+ __u64 mld_leaves[BR_MCAST_DIR_SIZE];
276+ __u64 mld_v1reports[BR_MCAST_DIR_SIZE];
277+ __u64 mld_v2reports[BR_MCAST_DIR_SIZE];
278+ __u64 mld_parse_errors;
279+
280+ __u64 mcast_bytes[BR_MCAST_DIR_SIZE];
281+ __u64 mcast_packets[BR_MCAST_DIR_SIZE];
282+};
254283 #endif /* _UAPI_LINUX_IF_BRIDGE_H */
include/uapi/linux/if_ether.h+1−0
@@ -87,6 +87,7 @@ · 86 unmodified lines
8787 #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */
8888 #define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */
8989 #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */
90+#define ETH_P_NCSI 0x88F8 /* NCSI protocol */
9091 #define ETH_P_PRP 0x88FB /* IEC 62439-3 PRP/HSRv0 */
9192 #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */
9293 #define ETH_P_TDLS 0x890D /* TDLS */
include/uapi/linux/if_link.h+14−0
@@ -156,6 +156,7 @@ enum { · 155 unmodified lines
156156 IFLA_GSO_MAX_SEGS,
157157 IFLA_GSO_MAX_SIZE,
158158 IFLA_PAD,
159+ IFLA_XDP,
159160 __IFLA_MAX
160161 };
161162
@@ -273,6 +274,7 @@ enum { · 111 unmodified lines
273274 IFLA_BR_VLAN_DEFAULT_PVID,
274275 IFLA_BR_PAD,
275276 IFLA_BR_VLAN_STATS_ENABLED,
277+ IFLA_BR_MCAST_STATS_ENABLED,
276278 __IFLA_BR_MAX,
277279 };
278280
@@ -822,6 +824,7 @@ enum { · 543 unmodified lines
822824 IFLA_STATS_UNSPEC, /* also used as 64bit pad attribute */
823825 IFLA_STATS_LINK_64,
824826 IFLA_STATS_LINK_XSTATS,
827+ IFLA_STATS_LINK_XSTATS_SLAVE,
825828 __IFLA_STATS_MAX,
826829 };
827830
@@ -841,4 +844,15 @@ enum { · 13 unmodified lines
841844 };
842845 #define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1)
843846
847+/* XDP section */
848+
849+enum {
850+ IFLA_XDP_UNSPEC,
851+ IFLA_XDP_FD,
852+ IFLA_XDP_ATTACHED,
853+ __IFLA_XDP_MAX,
854+};
855+
856+#define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1)
857+
844858 #endif /* _UAPI_LINUX_IF_LINK_H */
include/uapi/linux/if_macsec.h+2−0
@@ -26,6 +26,8 @@ · 25 unmodified lines
2626
2727 #define MACSEC_MIN_ICV_LEN 8
2828 #define MACSEC_MAX_ICV_LEN 32
29+/* upper limit for ICV length as recommended by IEEE802.1AE-2006 */
30+#define MACSEC_STD_ICV_LEN 16
2931
3032 enum macsec_attrs {
3133 MACSEC_ATTR_UNSPEC,
include/uapi/linux/if_tunnel.h+1−0
@@ -113,6 +113,7 @@ enum { · 112 unmodified lines
113113 IFLA_GRE_ENCAP_SPORT,
114114 IFLA_GRE_ENCAP_DPORT,
115115 IFLA_GRE_COLLECT_METADATA,
116+ IFLA_GRE_IGNORE_DF,
116117 __IFLA_GRE_MAX,
117118 };
118119
include/uapi/linux/inet_diag.h+1−0
@@ -72,6 +72,7 @@ enum { · 71 unmodified lines
7272 INET_DIAG_BC_AUTO,
7373 INET_DIAG_BC_S_COND,
7474 INET_DIAG_BC_D_COND,
75+ INET_DIAG_BC_DEV_COND, /* u32 ifindex */
7576 };
7677
7778 struct inet_diag_hostcond {
include/uapi/linux/netfilter/nf_tables.h+6−0
@@ -546,6 +546,10 @@ enum nft_cmp_attributes { · 545 unmodified lines
546546 };
547547 #define NFTA_CMP_MAX (__NFTA_CMP_MAX - 1)
548548
549+enum nft_lookup_flags {
550+ NFT_LOOKUP_F_INV = (1 << 0),
551+};
552+
549553 /**
550554 * enum nft_lookup_attributes - nf_tables set lookup expression netlink attributes
551555 *
@@ -553,6 +557,7 @@ enum nft_cmp_attributes { · 1 unmodified line
553557 * @NFTA_LOOKUP_SREG: source register of the data to look for (NLA_U32: nft_registers)
554558 * @NFTA_LOOKUP_DREG: destination register (NLA_U32: nft_registers)
555559 * @NFTA_LOOKUP_SET_ID: uniquely identifies a set in a transaction (NLA_U32)
560+ * @NFTA_LOOKUP_FLAGS: flags (NLA_U32: enum nft_lookup_flags)
556561 */
557562 enum nft_lookup_attributes {
558563 NFTA_LOOKUP_UNSPEC,
@@ -560,6 +565,7 @@ enum nft_lookup_attributes { · 1 unmodified line
560565 NFTA_LOOKUP_SREG,
561566 NFTA_LOOKUP_DREG,
562567 NFTA_LOOKUP_SET_ID,
568+ NFTA_LOOKUP_FLAGS,
563569 __NFTA_LOOKUP_MAX
564570 };
565571 #define NFTA_LOOKUP_MAX (__NFTA_LOOKUP_MAX - 1)
include/uapi/linux/netfilter/xt_NFLOG.h+5−1
@@ -6,9 +6,13 @@ · 5 unmodified lines
66 #define XT_NFLOG_DEFAULT_GROUP 0x1
77 #define XT_NFLOG_DEFAULT_THRESHOLD 0
88
9−#define XT_NFLOG_MASK 0x0
9+#define XT_NFLOG_MASK 0x1
10+
11+/* This flag indicates that 'len' field in xt_nflog_info is set*/
12+#define XT_NFLOG_F_COPY_LEN 0x1
1013
1114 struct xt_nflog_info {
15+ /* 'len' will be used iff you set XT_NFLOG_F_COPY_LEN in flags */
1216 __u32 len;
1317 __u16 group;
1418 __u16 threshold;
include/uapi/linux/netlink_diag.h+1−0
@@ -49,6 +49,7 @@ enum { · 48 unmodified lines
4949 #define NDIAG_SHOW_MEMINFO 0x00000001 /* show memory info of a socket */
5050 #define NDIAG_SHOW_GROUPS 0x00000002 /* show groups of a netlink socket */
5151 #ifndef __KERNEL__
52+/* deprecated since 4.6 */
5253 #define NDIAG_SHOW_RING_CFG 0x00000004 /* show ring configuration */
5354 #endif
5455
include/uapi/linux/nl80211.h+89−1
@@ -493,7 +493,12 @@ · 492 unmodified lines
493493 * This attribute is ignored if driver does not support roam scan.
494494 * It is also sent as an event, with the BSSID and response IEs when the
495495 * connection is established or failed to be established. This can be
496− * determined by the STATUS_CODE attribute.
496+ * determined by the %NL80211_ATTR_STATUS_CODE attribute (0 = success,
497+ * non-zero = failure). If %NL80211_ATTR_TIMED_OUT is included in the
498+ * event, the connection attempt failed due to not being able to initiate
499+ * authentication/association or not receiving a response from the AP.
500+ * Non-zero %NL80211_ATTR_STATUS_CODE value is indicated in that case as
501+ * well to remain backwards compatible.
497502 * @NL80211_CMD_ROAM: request that the card roam (currently not implemented),
498503 * sent as an event when the card/driver roamed by itself.
499504 * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify
@@ -1819,6 +1824,49 @@ enum nl80211_commands { · 1319 unmodified lines
18191824 *
18201825 * @NL80211_ATTR_PAD: attribute used for padding for 64-bit alignment
18211826 *
1827+ * @NL80211_ATTR_IFTYPE_EXT_CAPA: Nested attribute of the following attributes:
1828+ * %NL80211_ATTR_IFTYPE, %NL80211_ATTR_EXT_CAPA,
1829+ * %NL80211_ATTR_EXT_CAPA_MASK, to specify the extended capabilities per
1830+ * interface type.
1831+ *
1832+ * @NL80211_ATTR_MU_MIMO_GROUP_DATA: array of 24 bytes that defines a MU-MIMO
1833+ * groupID for monitor mode.
1834+ * The first 8 bytes are a mask that defines the membership in each
1835+ * group (there are 64 groups, group 0 and 63 are reserved),
1836+ * each bit represents a group and set to 1 for being a member in
1837+ * that group and 0 for not being a member.
1838+ * The remaining 16 bytes define the position in each group: 2 bits for
1839+ * each group.
1840+ * (smaller group numbers represented on most significant bits and bigger
1841+ * group numbers on least significant bits.)
1842+ * This attribute is used only if all interfaces are in monitor mode.
1843+ * Set this attribute in order to monitor packets using the given MU-MIMO
1844+ * groupID data.
1845+ * to turn off that feature set all the bits of the groupID to zero.
1846+ * @NL80211_ATTR_MU_MIMO_FOLLOW_MAC_ADDR: mac address for the sniffer to follow
1847+ * when using MU-MIMO air sniffer.
1848+ * to turn that feature off set an invalid mac address
1849+ * (e.g. FF:FF:FF:FF:FF:FF)
1850+ *
1851+ * @NL80211_ATTR_SCAN_START_TIME_TSF: The time at which the scan was actually
1852+ * started (u64). The time is the TSF of the BSS the interface that
1853+ * requested the scan is connected to (if available, otherwise this
1854+ * attribute must not be included).
1855+ * @NL80211_ATTR_SCAN_START_TIME_TSF_BSSID: The BSS according to which
1856+ * %NL80211_ATTR_SCAN_START_TIME_TSF is set.
1857+ * @NL80211_ATTR_MEASUREMENT_DURATION: measurement duration in TUs (u16). If
1858+ * %NL80211_ATTR_MEASUREMENT_DURATION_MANDATORY is not set, this is the
1859+ * maximum measurement duration allowed. This attribute is used with
1860+ * measurement requests. It can also be used with %NL80211_CMD_TRIGGER_SCAN
1861+ * if the scan is used for beacon report radio measurement.
1862+ * @NL80211_ATTR_MEASUREMENT_DURATION_MANDATORY: flag attribute that indicates
1863+ * that the duration specified with %NL80211_ATTR_MEASUREMENT_DURATION is
1864+ * mandatory. If this flag is not set, the duration is the maximum duration
1865+ * and the actual measurement duration may be shorter.
1866+ *
1867+ * @NL80211_ATTR_MESH_PEER_AID: Association ID for the mesh peer (u16). This is
1868+ * used to pull the stored data for mesh peer in power save state.
1869+ *
18221870 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
18231871 * @NL80211_ATTR_MAX: highest attribute number currently defined
18241872 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2201,6 +2249,18 @@ enum nl80211_attrs { · 376 unmodified lines
22012249
22022250 NL80211_ATTR_PAD,
22032251
2252+ NL80211_ATTR_IFTYPE_EXT_CAPA,
2253+
2254+ NL80211_ATTR_MU_MIMO_GROUP_DATA,
2255+ NL80211_ATTR_MU_MIMO_FOLLOW_MAC_ADDR,
2256+
2257+ NL80211_ATTR_SCAN_START_TIME_TSF,
2258+ NL80211_ATTR_SCAN_START_TIME_TSF_BSSID,
2259+ NL80211_ATTR_MEASUREMENT_DURATION,
2260+ NL80211_ATTR_MEASUREMENT_DURATION_MANDATORY,
2261+
2262+ NL80211_ATTR_MESH_PEER_AID,
2263+
22042264 /* add attributes here, update the policy in nl80211.c */
22052265
22062266 __NL80211_ATTR_AFTER_LAST,
@@ -3462,6 +3522,12 @@ enum nl80211_bss_scan_width { · 1255 unmodified lines
34623522 * was last updated by a received frame. The value is expected to be
34633523 * accurate to about 10ms. (u64, nanoseconds)
34643524 * @NL80211_BSS_PAD: attribute used for padding for 64-bit alignment
3525+ * @NL80211_BSS_PARENT_TSF: the time at the start of reception of the first
3526+ * octet of the timestamp field of the last beacon/probe received for
3527+ * this BSS. The time is the TSF of the BSS specified by
3528+ * @NL80211_BSS_PARENT_BSSID. (u64).
3529+ * @NL80211_BSS_PARENT_BSSID: the BSS according to which @NL80211_BSS_PARENT_TSF
3530+ * is set.
34653531 * @__NL80211_BSS_AFTER_LAST: internal
34663532 * @NL80211_BSS_MAX: highest BSS attribute
34673533 */
@@ -3483,6 +3549,8 @@ enum nl80211_bss { · 15 unmodified lines
34833549 NL80211_BSS_PRESP_DATA,
34843550 NL80211_BSS_LAST_SEEN_BOOTTIME,
34853551 NL80211_BSS_PAD,
3552+ NL80211_BSS_PARENT_TSF,
3553+ NL80211_BSS_PARENT_BSSID,
34863554
34873555 /* keep last */
34883556 __NL80211_BSS_AFTER_LAST,
@@ -4467,6 +4535,22 @@ enum nl80211_feature_flags { · 978 unmodified lines
44674535 * %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests, which will set
44684536 * the ASSOC_REQ_USE_RRM flag in the association request even if
44694537 * NL80211_FEATURE_QUIET is not advertized.
4538+ * @NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER: This device supports MU-MIMO air
4539+ * sniffer which means that it can be configured to hear packets from
4540+ * certain groups which can be configured by the
4541+ * %NL80211_ATTR_MU_MIMO_GROUP_DATA attribute,
4542+ * or can be configured to follow a station by configuring the
4543+ * %NL80211_ATTR_MU_MIMO_FOLLOW_MAC_ADDR attribute.
4544+ * @NL80211_EXT_FEATURE_SCAN_START_TIME: This driver includes the actual
4545+ * time the scan started in scan results event. The time is the TSF of
4546+ * the BSS that the interface that requested the scan is connected to
4547+ * (if available).
4548+ * @NL80211_EXT_FEATURE_BSS_PARENT_TSF: Per BSS, this driver reports the
4549+ * time the last beacon/probe was received. The time is the TSF of the
4550+ * BSS that the interface that requested the scan is connected to
4551+ * (if available).
4552+ * @NL80211_EXT_FEATURE_SET_SCAN_DWELL: This driver supports configuration of
4553+ * channel dwell time.
44704554 *
44714555 * @NUM_NL80211_EXT_FEATURES: number of extended features.
44724556 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@ -4474,6 +4558,10 @@ enum nl80211_feature_flags { · 1 unmodified line
44744558 enum nl80211_ext_feature_index {
44754559 NL80211_EXT_FEATURE_VHT_IBSS,
44764560 NL80211_EXT_FEATURE_RRM,
4561+ NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER,
4562+ NL80211_EXT_FEATURE_SCAN_START_TIME,
4563+ NL80211_EXT_FEATURE_BSS_PARENT_TSF,
4564+ NL80211_EXT_FEATURE_SET_SCAN_DWELL,
44774565
44784566 /* add new features before the definition below */
44794567 NUM_NL80211_EXT_FEATURES,
include/uapi/linux/openvswitch.h+8−0
@@ -166,6 +166,7 @@ enum ovs_packet_cmd { · 165 unmodified lines
166166 * output port is actually a tunnel port. Contains the output tunnel key
167167 * extracted from the packet as nested %OVS_TUNNEL_KEY_ATTR_* attributes.
168168 * @OVS_PACKET_ATTR_MRU: Present for an %OVS_PACKET_CMD_ACTION and
169+ * @OVS_PACKET_ATTR_LEN: Packet size before truncation.
169170 * %OVS_PACKET_ATTR_USERSPACE action specify the Maximum received fragment
170171 * size.
171172 *
@@ -185,6 +186,7 @@ enum ovs_packet_attr { · 13 unmodified lines
185186 OVS_PACKET_ATTR_PROBE, /* Packet operation is a feature probe,
186187 error logging should be suppressed. */
187188 OVS_PACKET_ATTR_MRU, /* Maximum received IP fragment size. */
189+ OVS_PACKET_ATTR_LEN, /* Packet size before truncation. */
188190 __OVS_PACKET_ATTR_MAX
189191 };
190192
@@ -580,6 +582,10 @@ enum ovs_userspace_attr { · 389 unmodified lines
580582
581583 #define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1)
582584
585+struct ovs_action_trunc {
586+ uint32_t max_len; /* Max packet size in bytes. */
587+};
588+
583589 /**
584590 * struct ovs_action_push_mpls - %OVS_ACTION_ATTR_PUSH_MPLS action argument.
585591 * @mpls_lse: MPLS label stack entry to push.
@@ -703,6 +709,7 @@ enum ovs_nat_attr { · 117 unmodified lines
703709 * enum ovs_action_attr - Action types.
704710 *
705711 * @OVS_ACTION_ATTR_OUTPUT: Output packet to port.
712+ * @OVS_ACTION_ATTR_TRUNC: Output packet to port with truncated packet size.
706713 * @OVS_ACTION_ATTR_USERSPACE: Send packet to userspace according to nested
707714 * %OVS_USERSPACE_ATTR_* attributes.
708715 * @OVS_ACTION_ATTR_SET: Replaces the contents of an existing header. The
@@ -756,6 +763,7 @@ enum ovs_action_attr { · 47 unmodified lines
756763 * The data must be zero for the unmasked
757764 * bits. */
758765 OVS_ACTION_ATTR_CT, /* Nested OVS_CT_ATTR_* . */
766+ OVS_ACTION_ATTR_TRUNC, /* u32 struct ovs_action_trunc. */
759767
760768 __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted
761769 * from userspace. */
include/uapi/linux/pkt_cls.h+16−3
@@ -115,8 +115,8 @@ struct tc_police { · 114 unmodified lines
115115 __u32 mtu;
116116 struct tc_ratespec rate;
117117 struct tc_ratespec peakrate;
118− int refcnt;
119− int bindcnt;
118+ int refcnt;
119+ int bindcnt;
120120 __u32 capab;
121121 };
122122
@@ -124,10 +124,11 @@ struct tcf_t { · 1 unmodified line
124124 __u64 install;
125125 __u64 lastuse;
126126 __u64 expires;
127+ __u64 firstuse;
127128 };
128129
129130 struct tc_cnt {
130− int refcnt;
131+ int refcnt;
131132 int bindcnt;
132133 };
133134
@@ -432,6 +433,18 @@ enum { · 298 unmodified lines
432433
433434 #define TCA_FLOWER_MAX (__TCA_FLOWER_MAX - 1)
434435
436+/* Match-all classifier */
437+
438+enum {
439+ TCA_MATCHALL_UNSPEC,
440+ TCA_MATCHALL_CLASSID,
441+ TCA_MATCHALL_ACT,
442+ TCA_MATCHALL_FLAGS,
443+ __TCA_MATCHALL_MAX,
444+};
445+
446+#define TCA_MATCHALL_MAX (__TCA_MATCHALL_MAX - 1)
447+
435448 /* Extended Matches */
436449
437450 struct tcf_ematch_tree_hdr {
include/uapi/linux/sctp.h+42−0
@@ -112,6 +112,31 @@ typedef __s32 sctp_assoc_t; · 111 unmodified lines
112112 #define SCTP_SOCKOPT_CONNECTX 110 /* CONNECTX requests. */
113113 #define SCTP_SOCKOPT_CONNECTX3 111 /* CONNECTX requests (updated) */
114114 #define SCTP_GET_ASSOC_STATS 112 /* Read only */
115+#define SCTP_PR_SUPPORTED 113
116+#define SCTP_DEFAULT_PRINFO 114
117+#define SCTP_PR_ASSOC_STATUS 115
118+
119+/* PR-SCTP policies */
120+#define SCTP_PR_SCTP_NONE 0x0000
121+#define SCTP_PR_SCTP_TTL 0x0010
122+#define SCTP_PR_SCTP_RTX 0x0020
123+#define SCTP_PR_SCTP_PRIO 0x0030
124+#define SCTP_PR_SCTP_MAX SCTP_PR_SCTP_PRIO
125+#define SCTP_PR_SCTP_MASK 0x0030
126+
127+#define __SCTP_PR_INDEX(x) ((x >> 4) - 1)
128+#define SCTP_PR_INDEX(x) __SCTP_PR_INDEX(SCTP_PR_SCTP_ ## x)
129+
130+#define SCTP_PR_POLICY(x) ((x) & SCTP_PR_SCTP_MASK)
131+#define SCTP_PR_SET_POLICY(flags, x) \
132+ do { \
133+ flags &= ~SCTP_PR_SCTP_MASK; \
134+ flags |= x; \
135+ } while (0)
136+
137+#define SCTP_PR_TTL_ENABLED(x) (SCTP_PR_POLICY(x) == SCTP_PR_SCTP_TTL)
138+#define SCTP_PR_RTX_ENABLED(x) (SCTP_PR_POLICY(x) == SCTP_PR_SCTP_RTX)
139+#define SCTP_PR_PRIO_ENABLED(x) (SCTP_PR_POLICY(x) == SCTP_PR_SCTP_PRIO)
115140
116141 /* These are bit fields for msghdr->msg_flags. See section 5.1. */
117142 /* On user space Linux, these live in <bits/socket.h> as an enum. */
@@ -902,4 +927,21 @@ struct sctp_paddrthlds { · 784 unmodified lines
902927 __u16 spt_pathpfthld;
903928 };
904929
930+/*
931+ * Socket Option for Getting the Association/Stream-Specific PR-SCTP Status
932+ */
933+struct sctp_prstatus {
934+ sctp_assoc_t sprstat_assoc_id;
935+ __u16 sprstat_sid;
936+ __u16 sprstat_policy;
937+ __u64 sprstat_abandoned_unsent;
938+ __u64 sprstat_abandoned_sent;
939+};
940+
941+struct sctp_default_prinfo {
942+ sctp_assoc_t pr_assoc_id;
943+ __u32 pr_value;
944+ __u16 pr_policy;
945+};
946+
905947 #endif /* _UAPI_SCTP_H */
include/uapi/linux/tc_act/tc_skbedit.h+2−0
@@ -27,6 +27,7 @@ · 26 unmodified lines
2727 #define SKBEDIT_F_PRIORITY 0x1
2828 #define SKBEDIT_F_QUEUE_MAPPING 0x2
2929 #define SKBEDIT_F_MARK 0x4
30+#define SKBEDIT_F_PTYPE 0x8
3031
3132 struct tc_skbedit {
3233 tc_gen;
@@ -40,6 +41,7 @@ enum { · 7 unmodified lines
4041 TCA_SKBEDIT_QUEUE_MAPPING,
4142 TCA_SKBEDIT_MARK,
4243 TCA_SKBEDIT_PAD,
44+ TCA_SKBEDIT_PTYPE,
4345 __TCA_SKBEDIT_MAX
4446 };
4547 #define TCA_SKBEDIT_MAX (__TCA_SKBEDIT_MAX - 1)
include/uapi/linux/tcp.h+10−0
@@ -115,12 +115,22 @@ enum { · 114 unmodified lines
115115 #define TCP_CC_INFO 26 /* Get Congestion Control (optional) info */
116116 #define TCP_SAVE_SYN 27 /* Record SYN headers for new connections */
117117 #define TCP_SAVED_SYN 28 /* Get SYN headers recorded for connection */
118+#define TCP_REPAIR_WINDOW 29 /* Get/set window parameters */
118119
119120 struct tcp_repair_opt {
120121 __u32 opt_code;
121122 __u32 opt_val;
122123 };
123124
125+struct tcp_repair_window {
126+ __u32 snd_wl1;
127+ __u32 snd_wnd;
128+ __u32 max_window;
129+
130+ __u32 rcv_wnd;
131+ __u32 rcv_wup;
132+};
133+
124134 enum {
125135 TCP_NO_QUEUE,
126136 TCP_RECV_QUEUE,
include/uapi/linux/tipc.h+26−4
@@ -60,26 +60,48 @@ struct tipc_name_seq { · 59 unmodified lines
6060 __u32 upper;
6161 };
6262
63+/* TIPC Address Size, Offset, Mask specification for Z.C.N
64+ */
65+#define TIPC_NODE_BITS 12
66+#define TIPC_CLUSTER_BITS 12
67+#define TIPC_ZONE_BITS 8
68+
69+#define TIPC_NODE_OFFSET 0
70+#define TIPC_CLUSTER_OFFSET TIPC_NODE_BITS
71+#define TIPC_ZONE_OFFSET (TIPC_CLUSTER_OFFSET + TIPC_CLUSTER_BITS)
72+
73+#define TIPC_NODE_SIZE ((1UL << TIPC_NODE_BITS) - 1)
74+#define TIPC_CLUSTER_SIZE ((1UL << TIPC_CLUSTER_BITS) - 1)
75+#define TIPC_ZONE_SIZE ((1UL << TIPC_ZONE_BITS) - 1)
76+
77+#define TIPC_NODE_MASK (TIPC_NODE_SIZE << TIPC_NODE_OFFSET)
78+#define TIPC_CLUSTER_MASK (TIPC_CLUSTER_SIZE << TIPC_CLUSTER_OFFSET)
79+#define TIPC_ZONE_MASK (TIPC_ZONE_SIZE << TIPC_ZONE_OFFSET)
80+
81+#define TIPC_ZONE_CLUSTER_MASK (TIPC_ZONE_MASK | TIPC_CLUSTER_MASK)
82+
6383 static inline __u32 tipc_addr(unsigned int zone,
6484 unsigned int cluster,
6585 unsigned int node)
6686 {
67− return (zone << 24) | (cluster << 12) | node;
87+ return (zone << TIPC_ZONE_OFFSET) |
88+ (cluster << TIPC_CLUSTER_OFFSET) |
89+ node;
6890 }
6991
7092 static inline unsigned int tipc_zone(__u32 addr)
7193 {
72− return addr >> 24;
94+ return addr >> TIPC_ZONE_OFFSET;
7395 }
7496
7597 static inline unsigned int tipc_cluster(__u32 addr)
7698 {
77− return (addr >> 12) & 0xfff;
99+ return (addr & TIPC_CLUSTER_MASK) >> TIPC_CLUSTER_OFFSET;
78100 }
79101
80102 static inline unsigned int tipc_node(__u32 addr)
81103 {
82− return addr & 0xfff;
104+ return addr & TIPC_NODE_MASK;
83105 }
84106
85107 /*
include/uapi/linux/tipc_netlink.h+37−0
@@ -56,6 +56,9 @@ enum { · 55 unmodified lines
5656 TIPC_NL_NET_GET,
5757 TIPC_NL_NET_SET,
5858 TIPC_NL_NAME_TABLE_GET,
59+ TIPC_NL_MON_SET,
60+ TIPC_NL_MON_GET,
61+ TIPC_NL_MON_PEER_GET,
5962
6063 __TIPC_NL_CMD_MAX,
6164 TIPC_NL_CMD_MAX = __TIPC_NL_CMD_MAX - 1
@@ -72,6 +75,8 @@ enum { · 10 unmodified lines
7275 TIPC_NLA_NODE, /* nest */
7376 TIPC_NLA_NET, /* nest */
7477 TIPC_NLA_NAME_TABLE, /* nest */
78+ TIPC_NLA_MON, /* nest */
79+ TIPC_NLA_MON_PEER, /* nest */
7580
7681 __TIPC_NLA_MAX,
7782 TIPC_NLA_MAX = __TIPC_NLA_MAX - 1
@@ -166,6 +171,20 @@ enum { · 88 unmodified lines
166171 TIPC_NLA_NAME_TABLE_MAX = __TIPC_NLA_NAME_TABLE_MAX - 1
167172 };
168173
174+/* Monitor info */
175+enum {
176+ TIPC_NLA_MON_UNSPEC,
177+ TIPC_NLA_MON_ACTIVATION_THRESHOLD, /* u32 */
178+ TIPC_NLA_MON_REF, /* u32 */
179+ TIPC_NLA_MON_ACTIVE, /* flag */
180+ TIPC_NLA_MON_BEARER_NAME, /* string */
181+ TIPC_NLA_MON_PEERCNT, /* u32 */
182+ TIPC_NLA_MON_LISTGEN, /* u32 */
183+
184+ __TIPC_NLA_MON_MAX,
185+ TIPC_NLA_MON_MAX = __TIPC_NLA_MON_MAX - 1
186+};
187+
169188 /* Publication info */
170189 enum {
171190 TIPC_NLA_PUBL_UNSPEC,
@@ -182,6 +201,24 @@ enum { · 10 unmodified lines
182201 TIPC_NLA_PUBL_MAX = __TIPC_NLA_PUBL_MAX - 1
183202 };
184203
204+/* Monitor peer info */
205+enum {
206+ TIPC_NLA_MON_PEER_UNSPEC,
207+
208+ TIPC_NLA_MON_PEER_ADDR, /* u32 */
209+ TIPC_NLA_MON_PEER_DOMGEN, /* u32 */
210+ TIPC_NLA_MON_PEER_APPLIED, /* u32 */
211+ TIPC_NLA_MON_PEER_UPMAP, /* u64 */
212+ TIPC_NLA_MON_PEER_MEMBERS, /* tlv */
213+ TIPC_NLA_MON_PEER_UP, /* flag */
214+ TIPC_NLA_MON_PEER_HEAD, /* flag */
215+ TIPC_NLA_MON_PEER_LOCAL, /* flag */
216+ TIPC_NLA_MON_PEER_PAD, /* flag */
217+
218+ __TIPC_NLA_MON_PEER_MAX,
219+ TIPC_NLA_MON_PEER_MAX = __TIPC_NLA_MON_PEER_MAX - 1
220+};
221+
185222 /* Nest, connection info */
186223 enum {
187224 TIPC_NLA_CON_UNSPEC,
include/uapi/linux/virtio_net.h+6−3
@@ -1,5 +1,5 @@
1−#ifndef _LINUX_VIRTIO_NET_H
2−#define _LINUX_VIRTIO_NET_H
1+#ifndef _UAPI_LINUX_VIRTIO_NET_H
2+#define _UAPI_LINUX_VIRTIO_NET_H
33 /* This header is BSD licensed so anyone can use the definitions to implement
44 * compatible drivers/servers.
55 *
@@ -35,6 +35,7 @@ · 29 unmodified lines
3535 #define VIRTIO_NET_F_CSUM 0 /* Host handles pkts w/ partial csum */
3636 #define VIRTIO_NET_F_GUEST_CSUM 1 /* Guest handles pkts w/ partial csum */
3737 #define VIRTIO_NET_F_CTRL_GUEST_OFFLOADS 2 /* Dynamic offload configuration. */
38+#define VIRTIO_NET_F_MTU 3 /* Initial MTU advice */
3839 #define VIRTIO_NET_F_MAC 5 /* Host has given MAC address. */
3940 #define VIRTIO_NET_F_GUEST_TSO4 7 /* Guest can handle TSOv4 in. */
4041 #define VIRTIO_NET_F_GUEST_TSO6 8 /* Guest can handle TSOv6 in. */
@@ -73,6 +74,8 @@ struct virtio_net_config { · 32 unmodified lines
7374 * Legal values are between 1 and 0x8000
7475 */
7576 __u16 max_virtqueue_pairs;
77+ /* Default maximum transmit unit advice */
78+ __u16 mtu;
7679 } __attribute__((packed));
7780
7881 /*
@@ -242,4 +245,4 @@ struct virtio_net_ctrl_mq { · 163 unmodified lines
242245 #define VIRTIO_NET_CTRL_GUEST_OFFLOADS 5
243246 #define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0
244247
245−#endif /* _LINUX_VIRTIO_NET_H */
248+#endif /* _UAPI_LINUX_VIRTIO_NET_H */
include/uapi/linux/wireless.h+22−41
@@ -670,8 +670,7 @@ · 669 unmodified lines
670670 /*
671671 * Generic format for most parameters that fit in an int
672672 */
673−struct iw_param
674−{
673+struct iw_param {
675674 __s32 value; /* The value of the parameter itself */
676675 __u8 fixed; /* Hardware should not use auto select */
677676 __u8 disabled; /* Disable the feature */
@@ -682,8 +681,7 @@ struct iw_param · 4 unmodified lines
682681 * For all data larger than 16 octets, we need to use a
683682 * pointer to memory allocated in user space.
684683 */
685−struct iw_point
686−{
684+struct iw_point {
687685 void __user *pointer; /* Pointer to the data (in user space) */
688686 __u16 length; /* number of fields or size in bytes */
689687 __u16 flags; /* Optional params */
@@ -698,8 +696,7 @@ struct iw_point · 8 unmodified lines
698696 * of 10 to get 'm' lower than 10^9, with 'm'= f / (10^'e')...
699697 * The power of 10 is in 'e', the result of the division is in 'm'.
700698 */
701−struct iw_freq
702−{
699+struct iw_freq {
703700 __s32 m; /* Mantissa */
704701 __s16 e; /* Exponent */
705702 __u8 i; /* List index (when in range struct) */
@@ -709,8 +706,7 @@ struct iw_freq · 3 unmodified lines
709706 /*
710707 * Quality of the link
711708 */
712−struct iw_quality
713−{
709+struct iw_quality {
714710 __u8 qual; /* link quality (%retries, SNR,
715711 %missed beacons or better...) */
716712 __u8 level; /* signal level (dBm) */
@@ -725,8 +721,7 @@ struct iw_quality · 8 unmodified lines
725721 * is already pretty exhaustive, and you should use that first.
726722 * This is only additional stats...
727723 */
728−struct iw_discarded
729−{
724+struct iw_discarded {
730725 __u32 nwid; /* Rx : Wrong nwid/essid */
731726 __u32 code; /* Rx : Unable to code/decode (WEP) */
732727 __u32 fragment; /* Rx : Can't perform MAC reassembly */
@@ -738,16 +733,14 @@ struct iw_discarded · 5 unmodified lines
738733 * Packet/Time period missed in the wireless adapter due to
739734 * "wireless" specific problems...
740735 */
741−struct iw_missed
742−{
736+struct iw_missed {
743737 __u32 beacon; /* Missed beacons/superframe */
744738 };
745739
746740 /*
747741 * Quality range (for spy threshold)
748742 */
749−struct iw_thrspy
750−{
743+struct iw_thrspy {
751744 struct sockaddr addr; /* Source address (hw/mac) */
752745 struct iw_quality qual; /* Quality of the link */
753746 struct iw_quality low; /* Low threshold */
@@ -765,8 +758,7 @@ struct iw_thrspy · 11 unmodified lines
765758 * Especially, scan results are required to include an entry for the
766759 * current BSS if the driver is in Managed mode and associated with an AP.
767760 */
768−struct iw_scan_req
769−{
761+struct iw_scan_req {
770762 __u8 scan_type; /* IW_SCAN_TYPE_{ACTIVE,PASSIVE} */
771763 __u8 essid_len;
772764 __u8 num_channels; /* num entries in channel_list;
@@ -827,8 +819,7 @@ struct iw_scan_req · 54 unmodified lines
827819 * RX_SEQ_VALID for SIOCGIWENCODEEXT are optional, but can be useful for
828820 * debugging/testing.
829821 */
830−struct iw_encode_ext
831−{
822+struct iw_encode_ext {
832823 __u32 ext_flags; /* IW_ENCODE_EXT_* */
833824 __u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
834825 __u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
@@ -841,8 +832,7 @@ struct iw_encode_ext · 6 unmodified lines
841832 };
842833
843834 /* SIOCSIWMLME data */
844−struct iw_mlme
845−{
835+struct iw_mlme {
846836 __u16 cmd; /* IW_MLME_* */
847837 __u16 reason_code;
848838 struct sockaddr addr;
@@ -855,16 +845,14 @@ struct iw_mlme · 6 unmodified lines
855845
856846 #define IW_PMKID_LEN 16
857847
858−struct iw_pmksa
859−{
848+struct iw_pmksa {
860849 __u32 cmd; /* IW_PMKSA_* */
861850 struct sockaddr bssid;
862851 __u8 pmkid[IW_PMKID_LEN];
863852 };
864853
865854 /* IWEVMICHAELMICFAILURE data */
866−struct iw_michaelmicfailure
867−{
855+struct iw_michaelmicfailure {
868856 __u32 flags;
869857 struct sockaddr src_addr;
870858 __u8 tsc[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
@@ -872,8 +860,7 @@ struct iw_michaelmicfailure · 1 unmodified line
872860
873861 /* IWEVPMKIDCAND data */
874862 #define IW_PMKID_CAND_PREAUTH 0x00000001 /* RNS pre-authentication enabled */
875−struct iw_pmkid_cand
876−{
863+struct iw_pmkid_cand {
877864 __u32 flags; /* IW_PMKID_CAND_* */
878865 __u32 index; /* the smaller the index, the higher the
879866 * priority */
@@ -884,8 +871,7 @@ struct iw_pmkid_cand · 4 unmodified lines
884871 /*
885872 * Wireless statistics (used for /proc/net/wireless)
886873 */
887−struct iw_statistics
888−{
874+struct iw_statistics {
889875 __u16 status; /* Status
890876 * - device dependent for now */
891877
@@ -897,7 +883,7 @@ struct iw_statistics · 5 unmodified lines
897883
898884 /* ------------------------ IOCTL REQUEST ------------------------ */
899885 /*
900− * This structure defines the payload of an ioctl, and is used
886+ * This structure defines the payload of an ioctl, and is used
901887 * below.
902888 *
903889 * Note that this structure should fit on the memory footprint
@@ -906,8 +892,7 @@ struct iw_statistics · 2 unmodified lines
906892 * You should check this when increasing the structures defined
907893 * above in this file...
908894 */
909−union iwreq_data
910−{
895+union iwreq_data {
911896 /* Config - generic */
912897 char name[IFNAMSIZ];
913898 /* Name : used to verify the presence of wireless extensions.
@@ -944,15 +929,14 @@ union iwreq_data · 30 unmodified lines
944929 * convenience...
945930 * Do I need to remind you about structure size (32 octets) ?
946931 */
947−struct iwreq
948−{
932+struct iwreq {
949933 union
950934 {
951935 char ifrn_name[IFNAMSIZ]; /* if name, e.g. "eth0" */
952936 } ifr_ifrn;
953937
954938 /* Data part (defined just above) */
955− union iwreq_data u;
939+ union iwreq_data u;
956940 };
957941
958942 /* -------------------------- IOCTL DATA -------------------------- */
@@ -965,8 +949,7 @@ struct iwreq · 6 unmodified lines
965949 * Range of parameters
966950 */
967951
968−struct iw_range
969−{
952+struct iw_range {
970953 /* Informative stuff (to choose between different interface) */
971954 __u32 throughput; /* To give an idea... */
972955 /* In theory this value should be the maximum benchmarked
@@ -1069,9 +1052,8 @@ struct iw_range · 96 unmodified lines
10691052 /*
10701053 * Private ioctl interface information
10711054 */
1072−
1073−struct iw_priv_args
1074−{
1055+
1056+struct iw_priv_args {
10751057 __u32 cmd; /* Number of the ioctl to issue */
10761058 __u16 set_args; /* Type and number of args */
10771059 __u16 get_args; /* Type and number of args */
@@ -1088,8 +1070,7 @@ struct iw_priv_args · 10 unmodified lines
10881070 /*
10891071 * A Wireless Event. Contains basically the same data as the ioctl...
10901072 */
1091−struct iw_event
1092−{
1073+struct iw_event {
10931074 __u16 len; /* Real length of this stuff */
10941075 __u16 cmd; /* Wireless IOCTL */
10951076 union iwreq_data u; /* IOCTL fixed payload */

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