diff options
Diffstat (limited to 'include/uapi/linux')
26 files changed, 910 insertions, 88 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 5c9ae6a9b7f5..0495884defc1 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild | |||
| @@ -174,6 +174,7 @@ header-y += if_hippi.h | |||
| 174 | header-y += if_infiniband.h | 174 | header-y += if_infiniband.h |
| 175 | header-y += if_link.h | 175 | header-y += if_link.h |
| 176 | header-y += if_ltalk.h | 176 | header-y += if_ltalk.h |
| 177 | header-y += if_macsec.h | ||
| 177 | header-y += if_packet.h | 178 | header-y += if_packet.h |
| 178 | header-y += if_phonet.h | 179 | header-y += if_phonet.h |
| 179 | header-y += if_plip.h | 180 | header-y += if_plip.h |
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 5df4881dea7b..924f537183fd 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h | |||
| @@ -81,6 +81,9 @@ enum bpf_map_type { | |||
| 81 | BPF_MAP_TYPE_ARRAY, | 81 | BPF_MAP_TYPE_ARRAY, |
| 82 | BPF_MAP_TYPE_PROG_ARRAY, | 82 | BPF_MAP_TYPE_PROG_ARRAY, |
| 83 | BPF_MAP_TYPE_PERF_EVENT_ARRAY, | 83 | BPF_MAP_TYPE_PERF_EVENT_ARRAY, |
| 84 | BPF_MAP_TYPE_PERCPU_HASH, | ||
| 85 | BPF_MAP_TYPE_PERCPU_ARRAY, | ||
| 86 | BPF_MAP_TYPE_STACK_TRACE, | ||
| 84 | }; | 87 | }; |
| 85 | 88 | ||
| 86 | enum bpf_prog_type { | 89 | enum bpf_prog_type { |
| @@ -98,12 +101,15 @@ enum bpf_prog_type { | |||
| 98 | #define BPF_NOEXIST 1 /* create new element if it didn't exist */ | 101 | #define BPF_NOEXIST 1 /* create new element if it didn't exist */ |
| 99 | #define BPF_EXIST 2 /* update existing element */ | 102 | #define BPF_EXIST 2 /* update existing element */ |
| 100 | 103 | ||
| 104 | #define BPF_F_NO_PREALLOC (1U << 0) | ||
| 105 | |||
| 101 | union bpf_attr { | 106 | union bpf_attr { |
| 102 | struct { /* anonymous struct used by BPF_MAP_CREATE command */ | 107 | struct { /* anonymous struct used by BPF_MAP_CREATE command */ |
| 103 | __u32 map_type; /* one of enum bpf_map_type */ | 108 | __u32 map_type; /* one of enum bpf_map_type */ |
| 104 | __u32 key_size; /* size of key in bytes */ | 109 | __u32 key_size; /* size of key in bytes */ |
| 105 | __u32 value_size; /* size of value in bytes */ | 110 | __u32 value_size; /* size of value in bytes */ |
| 106 | __u32 max_entries; /* max number of entries in a map */ | 111 | __u32 max_entries; /* max number of entries in a map */ |
| 112 | __u32 map_flags; /* prealloc or not */ | ||
| 107 | }; | 113 | }; |
| 108 | 114 | ||
| 109 | struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ | 115 | struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ |
| @@ -270,6 +276,42 @@ enum bpf_func_id { | |||
| 270 | */ | 276 | */ |
| 271 | BPF_FUNC_perf_event_output, | 277 | BPF_FUNC_perf_event_output, |
| 272 | BPF_FUNC_skb_load_bytes, | 278 | BPF_FUNC_skb_load_bytes, |
| 279 | |||
| 280 | /** | ||
| 281 | * bpf_get_stackid(ctx, map, flags) - walk user or kernel stack and return id | ||
| 282 | * @ctx: struct pt_regs* | ||
| 283 | * @map: pointer to stack_trace map | ||
| 284 | * @flags: bits 0-7 - numer of stack frames to skip | ||
| 285 | * bit 8 - collect user stack instead of kernel | ||
| 286 | * bit 9 - compare stacks by hash only | ||
| 287 | * bit 10 - if two different stacks hash into the same stackid | ||
| 288 | * discard old | ||
| 289 | * other bits - reserved | ||
| 290 | * Return: >= 0 stackid on success or negative error | ||
| 291 | */ | ||
| 292 | BPF_FUNC_get_stackid, | ||
| 293 | |||
| 294 | /** | ||
| 295 | * bpf_csum_diff(from, from_size, to, to_size, seed) - calculate csum diff | ||
| 296 | * @from: raw from buffer | ||
| 297 | * @from_size: length of from buffer | ||
| 298 | * @to: raw to buffer | ||
| 299 | * @to_size: length of to buffer | ||
| 300 | * @seed: optional seed | ||
| 301 | * Return: csum result | ||
| 302 | */ | ||
| 303 | BPF_FUNC_csum_diff, | ||
| 304 | |||
| 305 | /** | ||
| 306 | * bpf_skb_[gs]et_tunnel_opt(skb, opt, size) | ||
| 307 | * retrieve or populate tunnel options metadata | ||
| 308 | * @skb: pointer to skb | ||
| 309 | * @opt: pointer to raw tunnel option data | ||
| 310 | * @size: size of @opt | ||
| 311 | * Return: 0 on success for set, option size for get | ||
| 312 | */ | ||
| 313 | BPF_FUNC_skb_get_tunnel_opt, | ||
| 314 | BPF_FUNC_skb_set_tunnel_opt, | ||
| 273 | __BPF_FUNC_MAX_ID, | 315 | __BPF_FUNC_MAX_ID, |
| 274 | }; | 316 | }; |
| 275 | 317 | ||
| @@ -277,6 +319,7 @@ enum bpf_func_id { | |||
| 277 | 319 | ||
| 278 | /* BPF_FUNC_skb_store_bytes flags. */ | 320 | /* BPF_FUNC_skb_store_bytes flags. */ |
| 279 | #define BPF_F_RECOMPUTE_CSUM (1ULL << 0) | 321 | #define BPF_F_RECOMPUTE_CSUM (1ULL << 0) |
| 322 | #define BPF_F_INVALIDATE_HASH (1ULL << 1) | ||
| 280 | 323 | ||
| 281 | /* BPF_FUNC_l3_csum_replace and BPF_FUNC_l4_csum_replace flags. | 324 | /* BPF_FUNC_l3_csum_replace and BPF_FUNC_l4_csum_replace flags. |
| 282 | * First 4 bits are for passing the header field size. | 325 | * First 4 bits are for passing the header field size. |
| @@ -285,6 +328,7 @@ enum bpf_func_id { | |||
| 285 | 328 | ||
| 286 | /* BPF_FUNC_l4_csum_replace flags. */ | 329 | /* BPF_FUNC_l4_csum_replace flags. */ |
| 287 | #define BPF_F_PSEUDO_HDR (1ULL << 4) | 330 | #define BPF_F_PSEUDO_HDR (1ULL << 4) |
| 331 | #define BPF_F_MARK_MANGLED_0 (1ULL << 5) | ||
| 288 | 332 | ||
| 289 | /* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */ | 333 | /* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */ |
| 290 | #define BPF_F_INGRESS (1ULL << 0) | 334 | #define BPF_F_INGRESS (1ULL << 0) |
| @@ -292,8 +336,15 @@ enum bpf_func_id { | |||
| 292 | /* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */ | 336 | /* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */ |
| 293 | #define BPF_F_TUNINFO_IPV6 (1ULL << 0) | 337 | #define BPF_F_TUNINFO_IPV6 (1ULL << 0) |
| 294 | 338 | ||
| 339 | /* BPF_FUNC_get_stackid flags. */ | ||
| 340 | #define BPF_F_SKIP_FIELD_MASK 0xffULL | ||
| 341 | #define BPF_F_USER_STACK (1ULL << 8) | ||
| 342 | #define BPF_F_FAST_STACK_CMP (1ULL << 9) | ||
| 343 | #define BPF_F_REUSE_STACKID (1ULL << 10) | ||
| 344 | |||
| 295 | /* BPF_FUNC_skb_set_tunnel_key flags. */ | 345 | /* BPF_FUNC_skb_set_tunnel_key flags. */ |
| 296 | #define BPF_F_ZERO_CSUM_TX (1ULL << 1) | 346 | #define BPF_F_ZERO_CSUM_TX (1ULL << 1) |
| 347 | #define BPF_F_DONT_FRAGMENT (1ULL << 2) | ||
| 297 | 348 | ||
| 298 | /* user accessible mirror of in-kernel sk_buff. | 349 | /* user accessible mirror of in-kernel sk_buff. |
| 299 | * new fields can only be added to the end of this structure | 350 | * new fields can only be added to the end of this structure |
| @@ -324,6 +375,7 @@ struct bpf_tunnel_key { | |||
| 324 | }; | 375 | }; |
| 325 | __u8 tunnel_tos; | 376 | __u8 tunnel_tos; |
| 326 | __u8 tunnel_ttl; | 377 | __u8 tunnel_ttl; |
| 378 | __u32 tunnel_label; | ||
| 327 | }; | 379 | }; |
| 328 | 380 | ||
| 329 | #endif /* _UAPI__LINUX_BPF_H__ */ | 381 | #endif /* _UAPI__LINUX_BPF_H__ */ |
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h new file mode 100644 index 000000000000..c9fee5781eb1 --- /dev/null +++ b/include/uapi/linux/devlink.h | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | /* | ||
| 2 | * include/uapi/linux/devlink.h - Network physical device Netlink interface | ||
| 3 | * Copyright (c) 2016 Mellanox Technologies. All rights reserved. | ||
| 4 | * Copyright (c) 2016 Jiri Pirko <jiri@mellanox.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef _UAPI_LINUX_DEVLINK_H_ | ||
| 13 | #define _UAPI_LINUX_DEVLINK_H_ | ||
| 14 | |||
| 15 | #define DEVLINK_GENL_NAME "devlink" | ||
| 16 | #define DEVLINK_GENL_VERSION 0x1 | ||
| 17 | #define DEVLINK_GENL_MCGRP_CONFIG_NAME "config" | ||
| 18 | |||
| 19 | enum devlink_command { | ||
| 20 | /* don't change the order or add anything between, this is ABI! */ | ||
| 21 | DEVLINK_CMD_UNSPEC, | ||
| 22 | |||
| 23 | DEVLINK_CMD_GET, /* can dump */ | ||
| 24 | DEVLINK_CMD_SET, | ||
| 25 | DEVLINK_CMD_NEW, | ||
| 26 | DEVLINK_CMD_DEL, | ||
| 27 | |||
| 28 | DEVLINK_CMD_PORT_GET, /* can dump */ | ||
| 29 | DEVLINK_CMD_PORT_SET, | ||
| 30 | DEVLINK_CMD_PORT_NEW, | ||
| 31 | DEVLINK_CMD_PORT_DEL, | ||
| 32 | |||
| 33 | DEVLINK_CMD_PORT_SPLIT, | ||
| 34 | DEVLINK_CMD_PORT_UNSPLIT, | ||
| 35 | |||
| 36 | /* add new commands above here */ | ||
| 37 | |||
| 38 | __DEVLINK_CMD_MAX, | ||
| 39 | DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1 | ||
| 40 | }; | ||
| 41 | |||
| 42 | enum devlink_port_type { | ||
| 43 | DEVLINK_PORT_TYPE_NOTSET, | ||
| 44 | DEVLINK_PORT_TYPE_AUTO, | ||
| 45 | DEVLINK_PORT_TYPE_ETH, | ||
| 46 | DEVLINK_PORT_TYPE_IB, | ||
| 47 | }; | ||
| 48 | |||
| 49 | enum devlink_attr { | ||
| 50 | /* don't change the order or add anything between, this is ABI! */ | ||
| 51 | DEVLINK_ATTR_UNSPEC, | ||
| 52 | |||
| 53 | /* bus name + dev name together are a handle for devlink entity */ | ||
| 54 | DEVLINK_ATTR_BUS_NAME, /* string */ | ||
| 55 | DEVLINK_ATTR_DEV_NAME, /* string */ | ||
| 56 | |||
| 57 | DEVLINK_ATTR_PORT_INDEX, /* u32 */ | ||
| 58 | DEVLINK_ATTR_PORT_TYPE, /* u16 */ | ||
| 59 | DEVLINK_ATTR_PORT_DESIRED_TYPE, /* u16 */ | ||
| 60 | DEVLINK_ATTR_PORT_NETDEV_IFINDEX, /* u32 */ | ||
| 61 | DEVLINK_ATTR_PORT_NETDEV_NAME, /* string */ | ||
| 62 | DEVLINK_ATTR_PORT_IBDEV_NAME, /* string */ | ||
| 63 | DEVLINK_ATTR_PORT_SPLIT_COUNT, /* u32 */ | ||
| 64 | DEVLINK_ATTR_PORT_SPLIT_GROUP, /* u32 */ | ||
| 65 | |||
| 66 | /* add new attributes above here, update the policy in devlink.c */ | ||
| 67 | |||
| 68 | __DEVLINK_ATTR_MAX, | ||
| 69 | DEVLINK_ATTR_MAX = __DEVLINK_ATTR_MAX - 1 | ||
| 70 | }; | ||
| 71 | |||
| 72 | #endif /* _UAPI_LINUX_DEVLINK_H_ */ | ||
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index 57fa39005e79..2835b07416b7 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h | |||
| @@ -13,15 +13,21 @@ | |||
| 13 | #ifndef _UAPI_LINUX_ETHTOOL_H | 13 | #ifndef _UAPI_LINUX_ETHTOOL_H |
| 14 | #define _UAPI_LINUX_ETHTOOL_H | 14 | #define _UAPI_LINUX_ETHTOOL_H |
| 15 | 15 | ||
| 16 | #include <linux/kernel.h> | ||
| 16 | #include <linux/types.h> | 17 | #include <linux/types.h> |
| 17 | #include <linux/if_ether.h> | 18 | #include <linux/if_ether.h> |
| 18 | 19 | ||
| 20 | #ifndef __KERNEL__ | ||
| 21 | #include <limits.h> /* for INT_MAX */ | ||
| 22 | #endif | ||
| 23 | |||
| 19 | /* All structures exposed to userland should be defined such that they | 24 | /* All structures exposed to userland should be defined such that they |
| 20 | * have the same layout for 32-bit and 64-bit userland. | 25 | * have the same layout for 32-bit and 64-bit userland. |
| 21 | */ | 26 | */ |
| 22 | 27 | ||
| 23 | /** | 28 | /** |
| 24 | * struct ethtool_cmd - link control and status | 29 | * struct ethtool_cmd - DEPRECATED, link control and status |
| 30 | * This structure is DEPRECATED, please use struct ethtool_link_settings. | ||
| 25 | * @cmd: Command number = %ETHTOOL_GSET or %ETHTOOL_SSET | 31 | * @cmd: Command number = %ETHTOOL_GSET or %ETHTOOL_SSET |
| 26 | * @supported: Bitmask of %SUPPORTED_* flags for the link modes, | 32 | * @supported: Bitmask of %SUPPORTED_* flags for the link modes, |
| 27 | * physical connectors and other link features for which the | 33 | * physical connectors and other link features for which the |
| @@ -31,7 +37,7 @@ | |||
| 31 | * physical connectors and other link features that are | 37 | * physical connectors and other link features that are |
| 32 | * advertised through autonegotiation or enabled for | 38 | * advertised through autonegotiation or enabled for |
| 33 | * auto-detection. | 39 | * auto-detection. |
| 34 | * @speed: Low bits of the speed | 40 | * @speed: Low bits of the speed, 1Mb units, 0 to INT_MAX or SPEED_UNKNOWN |
| 35 | * @duplex: Duplex mode; one of %DUPLEX_* | 41 | * @duplex: Duplex mode; one of %DUPLEX_* |
| 36 | * @port: Physical connector type; one of %PORT_* | 42 | * @port: Physical connector type; one of %PORT_* |
| 37 | * @phy_address: MDIO address of PHY (transceiver); 0 or 255 if not | 43 | * @phy_address: MDIO address of PHY (transceiver); 0 or 255 if not |
| @@ -47,7 +53,7 @@ | |||
| 47 | * obsoleted by &struct ethtool_coalesce. Read-only; deprecated. | 53 | * obsoleted by &struct ethtool_coalesce. Read-only; deprecated. |
| 48 | * @maxrxpkt: Historically used to report RX IRQ coalescing; now | 54 | * @maxrxpkt: Historically used to report RX IRQ coalescing; now |
| 49 | * obsoleted by &struct ethtool_coalesce. Read-only; deprecated. | 55 | * obsoleted by &struct ethtool_coalesce. Read-only; deprecated. |
| 50 | * @speed_hi: High bits of the speed | 56 | * @speed_hi: High bits of the speed, 1Mb units, 0 to INT_MAX or SPEED_UNKNOWN |
| 51 | * @eth_tp_mdix: Ethernet twisted-pair MDI(-X) status; one of | 57 | * @eth_tp_mdix: Ethernet twisted-pair MDI(-X) status; one of |
| 52 | * %ETH_TP_MDI_*. If the status is unknown or not applicable, the | 58 | * %ETH_TP_MDI_*. If the status is unknown or not applicable, the |
| 53 | * value will be %ETH_TP_MDI_INVALID. Read-only. | 59 | * value will be %ETH_TP_MDI_INVALID. Read-only. |
| @@ -748,6 +754,56 @@ struct ethtool_usrip4_spec { | |||
| 748 | __u8 proto; | 754 | __u8 proto; |
| 749 | }; | 755 | }; |
| 750 | 756 | ||
| 757 | /** | ||
| 758 | * struct ethtool_tcpip6_spec - flow specification for TCP/IPv6 etc. | ||
| 759 | * @ip6src: Source host | ||
| 760 | * @ip6dst: Destination host | ||
| 761 | * @psrc: Source port | ||
| 762 | * @pdst: Destination port | ||
| 763 | * @tclass: Traffic Class | ||
| 764 | * | ||
| 765 | * This can be used to specify a TCP/IPv6, UDP/IPv6 or SCTP/IPv6 flow. | ||
| 766 | */ | ||
| 767 | struct ethtool_tcpip6_spec { | ||
| 768 | __be32 ip6src[4]; | ||
| 769 | __be32 ip6dst[4]; | ||
| 770 | __be16 psrc; | ||
| 771 | __be16 pdst; | ||
| 772 | __u8 tclass; | ||
| 773 | }; | ||
| 774 | |||
| 775 | /** | ||
| 776 | * struct ethtool_ah_espip6_spec - flow specification for IPsec/IPv6 | ||
| 777 | * @ip6src: Source host | ||
| 778 | * @ip6dst: Destination host | ||
| 779 | * @spi: Security parameters index | ||
| 780 | * @tclass: Traffic Class | ||
| 781 | * | ||
| 782 | * This can be used to specify an IPsec transport or tunnel over IPv6. | ||
| 783 | */ | ||
| 784 | struct ethtool_ah_espip6_spec { | ||
| 785 | __be32 ip6src[4]; | ||
| 786 | __be32 ip6dst[4]; | ||
| 787 | __be32 spi; | ||
| 788 | __u8 tclass; | ||
| 789 | }; | ||
| 790 | |||
| 791 | /** | ||
| 792 | * struct ethtool_usrip6_spec - general flow specification for IPv6 | ||
| 793 | * @ip6src: Source host | ||
| 794 | * @ip6dst: Destination host | ||
| 795 | * @l4_4_bytes: First 4 bytes of transport (layer 4) header | ||
| 796 | * @tclass: Traffic Class | ||
| 797 | * @l4_proto: Transport protocol number (nexthdr after any Extension Headers) | ||
| 798 | */ | ||
| 799 | struct ethtool_usrip6_spec { | ||
| 800 | __be32 ip6src[4]; | ||
| 801 | __be32 ip6dst[4]; | ||
| 802 | __be32 l4_4_bytes; | ||
| 803 | __u8 tclass; | ||
| 804 | __u8 l4_proto; | ||
| 805 | }; | ||
| 806 | |||
| 751 | union ethtool_flow_union { | 807 | union ethtool_flow_union { |
| 752 | struct ethtool_tcpip4_spec tcp_ip4_spec; | 808 | struct ethtool_tcpip4_spec tcp_ip4_spec; |
| 753 | struct ethtool_tcpip4_spec udp_ip4_spec; | 809 | struct ethtool_tcpip4_spec udp_ip4_spec; |
| @@ -755,6 +811,12 @@ union ethtool_flow_union { | |||
| 755 | struct ethtool_ah_espip4_spec ah_ip4_spec; | 811 | struct ethtool_ah_espip4_spec ah_ip4_spec; |
| 756 | struct ethtool_ah_espip4_spec esp_ip4_spec; | 812 | struct ethtool_ah_espip4_spec esp_ip4_spec; |
| 757 | struct ethtool_usrip4_spec usr_ip4_spec; | 813 | struct ethtool_usrip4_spec usr_ip4_spec; |
| 814 | struct ethtool_tcpip6_spec tcp_ip6_spec; | ||
| 815 | struct ethtool_tcpip6_spec udp_ip6_spec; | ||
| 816 | struct ethtool_tcpip6_spec sctp_ip6_spec; | ||
| 817 | struct ethtool_ah_espip6_spec ah_ip6_spec; | ||
| 818 | struct ethtool_ah_espip6_spec esp_ip6_spec; | ||
| 819 | struct ethtool_usrip6_spec usr_ip6_spec; | ||
| 758 | struct ethhdr ether_spec; | 820 | struct ethhdr ether_spec; |
| 759 | __u8 hdata[52]; | 821 | __u8 hdata[52]; |
| 760 | }; | 822 | }; |
| @@ -1146,10 +1208,29 @@ enum ethtool_sfeatures_retval_bits { | |||
| 1146 | #define ETHTOOL_F_WISH (1 << ETHTOOL_F_WISH__BIT) | 1208 | #define ETHTOOL_F_WISH (1 << ETHTOOL_F_WISH__BIT) |
| 1147 | #define ETHTOOL_F_COMPAT (1 << ETHTOOL_F_COMPAT__BIT) | 1209 | #define ETHTOOL_F_COMPAT (1 << ETHTOOL_F_COMPAT__BIT) |
| 1148 | 1210 | ||
| 1211 | #define MAX_NUM_QUEUE 4096 | ||
| 1212 | |||
| 1213 | /** | ||
| 1214 | * struct ethtool_per_queue_op - apply sub command to the queues in mask. | ||
| 1215 | * @cmd: ETHTOOL_PERQUEUE | ||
| 1216 | * @sub_command: the sub command which apply to each queues | ||
| 1217 | * @queue_mask: Bitmap of the queues which sub command apply to | ||
| 1218 | * @data: A complete command structure following for each of the queues addressed | ||
| 1219 | */ | ||
| 1220 | struct ethtool_per_queue_op { | ||
| 1221 | __u32 cmd; | ||
| 1222 | __u32 sub_command; | ||
| 1223 | __u32 queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)]; | ||
| 1224 | char data[]; | ||
| 1225 | }; | ||
| 1149 | 1226 | ||
| 1150 | /* CMDs currently supported */ | 1227 | /* CMDs currently supported */ |
| 1151 | #define ETHTOOL_GSET 0x00000001 /* Get settings. */ | 1228 | #define ETHTOOL_GSET 0x00000001 /* DEPRECATED, Get settings. |
| 1152 | #define ETHTOOL_SSET 0x00000002 /* Set settings. */ | 1229 | * Please use ETHTOOL_GLINKSETTINGS |
| 1230 | */ | ||
| 1231 | #define ETHTOOL_SSET 0x00000002 /* DEPRECATED, Set settings. | ||
| 1232 | * Please use ETHTOOL_SLINKSETTINGS | ||
| 1233 | */ | ||
| 1153 | #define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */ | 1234 | #define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */ |
| 1154 | #define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */ | 1235 | #define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */ |
| 1155 | #define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */ | 1236 | #define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */ |
| @@ -1229,73 +1310,141 @@ enum ethtool_sfeatures_retval_bits { | |||
| 1229 | #define ETHTOOL_STUNABLE 0x00000049 /* Set tunable configuration */ | 1310 | #define ETHTOOL_STUNABLE 0x00000049 /* Set tunable configuration */ |
| 1230 | #define ETHTOOL_GPHYSTATS 0x0000004a /* get PHY-specific statistics */ | 1311 | #define ETHTOOL_GPHYSTATS 0x0000004a /* get PHY-specific statistics */ |
| 1231 | 1312 | ||
| 1313 | #define ETHTOOL_PERQUEUE 0x0000004b /* Set per queue options */ | ||
| 1314 | |||
| 1315 | #define ETHTOOL_GLINKSETTINGS 0x0000004c /* Get ethtool_link_settings */ | ||
| 1316 | #define ETHTOOL_SLINKSETTINGS 0x0000004d /* Set ethtool_link_settings */ | ||
| 1317 | |||
| 1318 | |||
| 1232 | /* compatibility with older code */ | 1319 | /* compatibility with older code */ |
| 1233 | #define SPARC_ETH_GSET ETHTOOL_GSET | 1320 | #define SPARC_ETH_GSET ETHTOOL_GSET |
| 1234 | #define SPARC_ETH_SSET ETHTOOL_SSET | 1321 | #define SPARC_ETH_SSET ETHTOOL_SSET |
| 1235 | 1322 | ||
| 1236 | #define SUPPORTED_10baseT_Half (1 << 0) | 1323 | /* Link mode bit indices */ |
| 1237 | #define SUPPORTED_10baseT_Full (1 << 1) | 1324 | enum ethtool_link_mode_bit_indices { |
| 1238 | #define SUPPORTED_100baseT_Half (1 << 2) | 1325 | ETHTOOL_LINK_MODE_10baseT_Half_BIT = 0, |
| 1239 | #define SUPPORTED_100baseT_Full (1 << 3) | 1326 | ETHTOOL_LINK_MODE_10baseT_Full_BIT = 1, |
| 1240 | #define SUPPORTED_1000baseT_Half (1 << 4) | 1327 | ETHTOOL_LINK_MODE_100baseT_Half_BIT = 2, |
| 1241 | #define SUPPORTED_1000baseT_Full (1 << 5) | 1328 | ETHTOOL_LINK_MODE_100baseT_Full_BIT = 3, |
| 1242 | #define SUPPORTED_Autoneg (1 << 6) | 1329 | ETHTOOL_LINK_MODE_1000baseT_Half_BIT = 4, |
| 1243 | #define SUPPORTED_TP (1 << 7) | 1330 | ETHTOOL_LINK_MODE_1000baseT_Full_BIT = 5, |
| 1244 | #define SUPPORTED_AUI (1 << 8) | 1331 | ETHTOOL_LINK_MODE_Autoneg_BIT = 6, |
| 1245 | #define SUPPORTED_MII (1 << 9) | 1332 | ETHTOOL_LINK_MODE_TP_BIT = 7, |
| 1246 | #define SUPPORTED_FIBRE (1 << 10) | 1333 | ETHTOOL_LINK_MODE_AUI_BIT = 8, |
| 1247 | #define SUPPORTED_BNC (1 << 11) | 1334 | ETHTOOL_LINK_MODE_MII_BIT = 9, |
| 1248 | #define SUPPORTED_10000baseT_Full (1 << 12) | 1335 | ETHTOOL_LINK_MODE_FIBRE_BIT = 10, |
| 1249 | #define SUPPORTED_Pause (1 << 13) | 1336 | ETHTOOL_LINK_MODE_BNC_BIT = 11, |
| 1250 | #define SUPPORTED_Asym_Pause (1 << 14) | 1337 | ETHTOOL_LINK_MODE_10000baseT_Full_BIT = 12, |
| 1251 | #define SUPPORTED_2500baseX_Full (1 << 15) | 1338 | ETHTOOL_LINK_MODE_Pause_BIT = 13, |
| 1252 | #define SUPPORTED_Backplane (1 << 16) | 1339 | ETHTOOL_LINK_MODE_Asym_Pause_BIT = 14, |
| 1253 | #define SUPPORTED_1000baseKX_Full (1 << 17) | 1340 | ETHTOOL_LINK_MODE_2500baseX_Full_BIT = 15, |
| 1254 | #define SUPPORTED_10000baseKX4_Full (1 << 18) | 1341 | ETHTOOL_LINK_MODE_Backplane_BIT = 16, |
| 1255 | #define SUPPORTED_10000baseKR_Full (1 << 19) | 1342 | ETHTOOL_LINK_MODE_1000baseKX_Full_BIT = 17, |
| 1256 | #define SUPPORTED_10000baseR_FEC (1 << 20) | 1343 | ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT = 18, |
| 1257 | #define SUPPORTED_20000baseMLD2_Full (1 << 21) | 1344 | ETHTOOL_LINK_MODE_10000baseKR_Full_BIT = 19, |
| 1258 | #define SUPPORTED_20000baseKR2_Full (1 << 22) | 1345 | ETHTOOL_LINK_MODE_10000baseR_FEC_BIT = 20, |
| 1259 | #define SUPPORTED_40000baseKR4_Full (1 << 23) | 1346 | ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT = 21, |
| 1260 | #define SUPPORTED_40000baseCR4_Full (1 << 24) | 1347 | ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT = 22, |
| 1261 | #define SUPPORTED_40000baseSR4_Full (1 << 25) | 1348 | ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT = 23, |
| 1262 | #define SUPPORTED_40000baseLR4_Full (1 << 26) | 1349 | ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT = 24, |
| 1263 | #define SUPPORTED_56000baseKR4_Full (1 << 27) | 1350 | ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT = 25, |
| 1264 | #define SUPPORTED_56000baseCR4_Full (1 << 28) | 1351 | ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT = 26, |
| 1265 | #define SUPPORTED_56000baseSR4_Full (1 << 29) | 1352 | ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT = 27, |
| 1266 | #define SUPPORTED_56000baseLR4_Full (1 << 30) | 1353 | ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT = 28, |
| 1267 | 1354 | ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT = 29, | |
| 1268 | #define ADVERTISED_10baseT_Half (1 << 0) | 1355 | ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT = 30, |
| 1269 | #define ADVERTISED_10baseT_Full (1 << 1) | 1356 | |
| 1270 | #define ADVERTISED_100baseT_Half (1 << 2) | 1357 | /* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit |
| 1271 | #define ADVERTISED_100baseT_Full (1 << 3) | 1358 | * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_* |
| 1272 | #define ADVERTISED_1000baseT_Half (1 << 4) | 1359 | * macro for bits > 31. The only way to use indices > 31 is to |
| 1273 | #define ADVERTISED_1000baseT_Full (1 << 5) | 1360 | * use the new ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API. |
| 1274 | #define ADVERTISED_Autoneg (1 << 6) | 1361 | */ |
| 1275 | #define ADVERTISED_TP (1 << 7) | 1362 | |
| 1276 | #define ADVERTISED_AUI (1 << 8) | 1363 | __ETHTOOL_LINK_MODE_LAST |
| 1277 | #define ADVERTISED_MII (1 << 9) | 1364 | = ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT, |
| 1278 | #define ADVERTISED_FIBRE (1 << 10) | 1365 | }; |
| 1279 | #define ADVERTISED_BNC (1 << 11) | 1366 | |
| 1280 | #define ADVERTISED_10000baseT_Full (1 << 12) | 1367 | #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) \ |
| 1281 | #define ADVERTISED_Pause (1 << 13) | 1368 | (1UL << (ETHTOOL_LINK_MODE_ ## base_name ## _BIT)) |
| 1282 | #define ADVERTISED_Asym_Pause (1 << 14) | 1369 | |
| 1283 | #define ADVERTISED_2500baseX_Full (1 << 15) | 1370 | /* DEPRECATED macros. Please migrate to |
| 1284 | #define ADVERTISED_Backplane (1 << 16) | 1371 | * ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API. Please do NOT |
| 1285 | #define ADVERTISED_1000baseKX_Full (1 << 17) | 1372 | * define any new SUPPORTED_* macro for bits > 31. |
| 1286 | #define ADVERTISED_10000baseKX4_Full (1 << 18) | 1373 | */ |
| 1287 | #define ADVERTISED_10000baseKR_Full (1 << 19) | 1374 | #define SUPPORTED_10baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half) |
| 1288 | #define ADVERTISED_10000baseR_FEC (1 << 20) | 1375 | #define SUPPORTED_10baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full) |
| 1289 | #define ADVERTISED_20000baseMLD2_Full (1 << 21) | 1376 | #define SUPPORTED_100baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half) |
| 1290 | #define ADVERTISED_20000baseKR2_Full (1 << 22) | 1377 | #define SUPPORTED_100baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full) |
| 1291 | #define ADVERTISED_40000baseKR4_Full (1 << 23) | 1378 | #define SUPPORTED_1000baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half) |
| 1292 | #define ADVERTISED_40000baseCR4_Full (1 << 24) | 1379 | #define SUPPORTED_1000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full) |
| 1293 | #define ADVERTISED_40000baseSR4_Full (1 << 25) | 1380 | #define SUPPORTED_Autoneg __ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg) |
| 1294 | #define ADVERTISED_40000baseLR4_Full (1 << 26) | 1381 | #define SUPPORTED_TP __ETHTOOL_LINK_MODE_LEGACY_MASK(TP) |
| 1295 | #define ADVERTISED_56000baseKR4_Full (1 << 27) | 1382 | #define SUPPORTED_AUI __ETHTOOL_LINK_MODE_LEGACY_MASK(AUI) |
| 1296 | #define ADVERTISED_56000baseCR4_Full (1 << 28) | 1383 | #define SUPPORTED_MII __ETHTOOL_LINK_MODE_LEGACY_MASK(MII) |
| 1297 | #define ADVERTISED_56000baseSR4_Full (1 << 29) | 1384 | #define SUPPORTED_FIBRE __ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE) |
| 1298 | #define ADVERTISED_56000baseLR4_Full (1 << 30) | 1385 | #define SUPPORTED_BNC __ETHTOOL_LINK_MODE_LEGACY_MASK(BNC) |
| 1386 | #define SUPPORTED_10000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full) | ||
| 1387 | #define SUPPORTED_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Pause) | ||
| 1388 | #define SUPPORTED_Asym_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause) | ||
| 1389 | #define SUPPORTED_2500baseX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full) | ||
| 1390 | #define SUPPORTED_Backplane __ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane) | ||
| 1391 | #define SUPPORTED_1000baseKX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full) | ||
| 1392 | #define SUPPORTED_10000baseKX4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full) | ||
| 1393 | #define SUPPORTED_10000baseKR_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full) | ||
| 1394 | #define SUPPORTED_10000baseR_FEC __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC) | ||
| 1395 | #define SUPPORTED_20000baseMLD2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full) | ||
| 1396 | #define SUPPORTED_20000baseKR2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full) | ||
| 1397 | #define SUPPORTED_40000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full) | ||
| 1398 | #define SUPPORTED_40000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full) | ||
| 1399 | #define SUPPORTED_40000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full) | ||
| 1400 | #define SUPPORTED_40000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full) | ||
| 1401 | #define SUPPORTED_56000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full) | ||
| 1402 | #define SUPPORTED_56000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full) | ||
| 1403 | #define SUPPORTED_56000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full) | ||
| 1404 | #define SUPPORTED_56000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full) | ||
| 1405 | /* Please do not define any new SUPPORTED_* macro for bits > 31, see | ||
| 1406 | * notice above. | ||
| 1407 | */ | ||
| 1408 | |||
| 1409 | /* | ||
| 1410 | * DEPRECATED macros. Please migrate to | ||
| 1411 | * ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API. Please do NOT | ||
| 1412 | * define any new ADERTISE_* macro for bits > 31. | ||
| 1413 | */ | ||
| 1414 | #define ADVERTISED_10baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half) | ||
| 1415 | #define ADVERTISED_10baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full) | ||
| 1416 | #define ADVERTISED_100baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half) | ||
| 1417 | #define ADVERTISED_100baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full) | ||
| 1418 | #define ADVERTISED_1000baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half) | ||
| 1419 | #define ADVERTISED_1000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full) | ||
| 1420 | #define ADVERTISED_Autoneg __ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg) | ||
| 1421 | #define ADVERTISED_TP __ETHTOOL_LINK_MODE_LEGACY_MASK(TP) | ||
| 1422 | #define ADVERTISED_AUI __ETHTOOL_LINK_MODE_LEGACY_MASK(AUI) | ||
| 1423 | #define ADVERTISED_MII __ETHTOOL_LINK_MODE_LEGACY_MASK(MII) | ||
| 1424 | #define ADVERTISED_FIBRE __ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE) | ||
| 1425 | #define ADVERTISED_BNC __ETHTOOL_LINK_MODE_LEGACY_MASK(BNC) | ||
| 1426 | #define ADVERTISED_10000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full) | ||
| 1427 | #define ADVERTISED_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Pause) | ||
| 1428 | #define ADVERTISED_Asym_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause) | ||
| 1429 | #define ADVERTISED_2500baseX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full) | ||
| 1430 | #define ADVERTISED_Backplane __ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane) | ||
| 1431 | #define ADVERTISED_1000baseKX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full) | ||
| 1432 | #define ADVERTISED_10000baseKX4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full) | ||
| 1433 | #define ADVERTISED_10000baseKR_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full) | ||
| 1434 | #define ADVERTISED_10000baseR_FEC __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC) | ||
| 1435 | #define ADVERTISED_20000baseMLD2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full) | ||
| 1436 | #define ADVERTISED_20000baseKR2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full) | ||
| 1437 | #define ADVERTISED_40000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full) | ||
| 1438 | #define ADVERTISED_40000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full) | ||
| 1439 | #define ADVERTISED_40000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full) | ||
| 1440 | #define ADVERTISED_40000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full) | ||
| 1441 | #define ADVERTISED_56000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full) | ||
| 1442 | #define ADVERTISED_56000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full) | ||
| 1443 | #define ADVERTISED_56000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full) | ||
| 1444 | #define ADVERTISED_56000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full) | ||
| 1445 | /* Please do not define any new ADVERTISED_* macro for bits > 31, see | ||
| 1446 | * notice above. | ||
| 1447 | */ | ||
| 1299 | 1448 | ||
| 1300 | /* The following are all involved in forcing a particular link | 1449 | /* The following are all involved in forcing a particular link |
| 1301 | * mode for the device for setting things. When getting the | 1450 | * mode for the device for setting things. When getting the |
| @@ -1303,7 +1452,7 @@ enum ethtool_sfeatures_retval_bits { | |||
| 1303 | * it was forced up into this mode or autonegotiated. | 1452 | * it was forced up into this mode or autonegotiated. |
| 1304 | */ | 1453 | */ |
| 1305 | 1454 | ||
| 1306 | /* The forced speed, 10Mb, 100Mb, gigabit, [2.5|5|10|20|25|40|50|56|100]GbE. */ | 1455 | /* The forced speed, in units of 1Mb. All values 0 to INT_MAX are legal. */ |
| 1307 | #define SPEED_10 10 | 1456 | #define SPEED_10 10 |
| 1308 | #define SPEED_100 100 | 1457 | #define SPEED_100 100 |
| 1309 | #define SPEED_1000 1000 | 1458 | #define SPEED_1000 1000 |
| @@ -1319,11 +1468,28 @@ enum ethtool_sfeatures_retval_bits { | |||
| 1319 | 1468 | ||
| 1320 | #define SPEED_UNKNOWN -1 | 1469 | #define SPEED_UNKNOWN -1 |
| 1321 | 1470 | ||
| 1471 | static inline int ethtool_validate_speed(__u32 speed) | ||
| 1472 | { | ||
| 1473 | return speed <= INT_MAX || speed == SPEED_UNKNOWN; | ||
| 1474 | } | ||
| 1475 | |||
| 1322 | /* Duplex, half or full. */ | 1476 | /* Duplex, half or full. */ |
| 1323 | #define DUPLEX_HALF 0x00 | 1477 | #define DUPLEX_HALF 0x00 |
| 1324 | #define DUPLEX_FULL 0x01 | 1478 | #define DUPLEX_FULL 0x01 |
| 1325 | #define DUPLEX_UNKNOWN 0xff | 1479 | #define DUPLEX_UNKNOWN 0xff |
| 1326 | 1480 | ||
| 1481 | static inline int ethtool_validate_duplex(__u8 duplex) | ||
| 1482 | { | ||
| 1483 | switch (duplex) { | ||
| 1484 | case DUPLEX_HALF: | ||
| 1485 | case DUPLEX_FULL: | ||
| 1486 | case DUPLEX_UNKNOWN: | ||
| 1487 | return 1; | ||
| 1488 | } | ||
| 1489 | |||
| 1490 | return 0; | ||
| 1491 | } | ||
| 1492 | |||
| 1327 | /* Which connector port. */ | 1493 | /* Which connector port. */ |
| 1328 | #define PORT_TP 0x00 | 1494 | #define PORT_TP 0x00 |
| 1329 | #define PORT_AUI 0x01 | 1495 | #define PORT_AUI 0x01 |
| @@ -1367,15 +1533,17 @@ enum ethtool_sfeatures_retval_bits { | |||
| 1367 | #define UDP_V4_FLOW 0x02 /* hash or spec (udp_ip4_spec) */ | 1533 | #define UDP_V4_FLOW 0x02 /* hash or spec (udp_ip4_spec) */ |
| 1368 | #define SCTP_V4_FLOW 0x03 /* hash or spec (sctp_ip4_spec) */ | 1534 | #define SCTP_V4_FLOW 0x03 /* hash or spec (sctp_ip4_spec) */ |
| 1369 | #define AH_ESP_V4_FLOW 0x04 /* hash only */ | 1535 | #define AH_ESP_V4_FLOW 0x04 /* hash only */ |
| 1370 | #define TCP_V6_FLOW 0x05 /* hash only */ | 1536 | #define TCP_V6_FLOW 0x05 /* hash or spec (tcp_ip6_spec; nfc only) */ |
| 1371 | #define UDP_V6_FLOW 0x06 /* hash only */ | 1537 | #define UDP_V6_FLOW 0x06 /* hash or spec (udp_ip6_spec; nfc only) */ |
| 1372 | #define SCTP_V6_FLOW 0x07 /* hash only */ | 1538 | #define SCTP_V6_FLOW 0x07 /* hash or spec (sctp_ip6_spec; nfc only) */ |
| 1373 | #define AH_ESP_V6_FLOW 0x08 /* hash only */ | 1539 | #define AH_ESP_V6_FLOW 0x08 /* hash only */ |
| 1374 | #define AH_V4_FLOW 0x09 /* hash or spec (ah_ip4_spec) */ | 1540 | #define AH_V4_FLOW 0x09 /* hash or spec (ah_ip4_spec) */ |
| 1375 | #define ESP_V4_FLOW 0x0a /* hash or spec (esp_ip4_spec) */ | 1541 | #define ESP_V4_FLOW 0x0a /* hash or spec (esp_ip4_spec) */ |
| 1376 | #define AH_V6_FLOW 0x0b /* hash only */ | 1542 | #define AH_V6_FLOW 0x0b /* hash or spec (ah_ip6_spec; nfc only) */ |
| 1377 | #define ESP_V6_FLOW 0x0c /* hash only */ | 1543 | #define ESP_V6_FLOW 0x0c /* hash or spec (esp_ip6_spec; nfc only) */ |
| 1378 | #define IP_USER_FLOW 0x0d /* spec only (usr_ip4_spec) */ | 1544 | #define IPV4_USER_FLOW 0x0d /* spec only (usr_ip4_spec) */ |
| 1545 | #define IP_USER_FLOW IPV4_USER_FLOW | ||
| 1546 | #define IPV6_USER_FLOW 0x0e /* spec only (usr_ip6_spec; nfc only) */ | ||
| 1379 | #define IPV4_FLOW 0x10 /* hash only */ | 1547 | #define IPV4_FLOW 0x10 /* hash only */ |
| 1380 | #define IPV6_FLOW 0x11 /* hash only */ | 1548 | #define IPV6_FLOW 0x11 /* hash only */ |
| 1381 | #define ETHER_FLOW 0x12 /* spec only (ether_spec) */ | 1549 | #define ETHER_FLOW 0x12 /* spec only (ether_spec) */ |
| @@ -1441,4 +1609,123 @@ enum ethtool_reset_flags { | |||
| 1441 | }; | 1609 | }; |
| 1442 | #define ETH_RESET_SHARED_SHIFT 16 | 1610 | #define ETH_RESET_SHARED_SHIFT 16 |
| 1443 | 1611 | ||
| 1612 | |||
| 1613 | /** | ||
| 1614 | * struct ethtool_link_settings - link control and status | ||
| 1615 | * | ||
| 1616 | * IMPORTANT, Backward compatibility notice: When implementing new | ||
| 1617 | * user-space tools, please first try %ETHTOOL_GLINKSETTINGS, and | ||
| 1618 | * if it succeeds use %ETHTOOL_SLINKSETTINGS to change link | ||
| 1619 | * settings; do not use %ETHTOOL_SSET if %ETHTOOL_GLINKSETTINGS | ||
| 1620 | * succeeded: stick to %ETHTOOL_GLINKSETTINGS/%SLINKSETTINGS in | ||
| 1621 | * that case. Conversely, if %ETHTOOL_GLINKSETTINGS fails, use | ||
| 1622 | * %ETHTOOL_GSET to query and %ETHTOOL_SSET to change link | ||
| 1623 | * settings; do not use %ETHTOOL_SLINKSETTINGS if | ||
| 1624 | * %ETHTOOL_GLINKSETTINGS failed: stick to | ||
| 1625 | * %ETHTOOL_GSET/%ETHTOOL_SSET in that case. | ||
| 1626 | * | ||
| 1627 | * @cmd: Command number = %ETHTOOL_GLINKSETTINGS or %ETHTOOL_SLINKSETTINGS | ||
| 1628 | * @speed: Link speed (Mbps) | ||
| 1629 | * @duplex: Duplex mode; one of %DUPLEX_* | ||
| 1630 | * @port: Physical connector type; one of %PORT_* | ||
| 1631 | * @phy_address: MDIO address of PHY (transceiver); 0 or 255 if not | ||
| 1632 | * applicable. For clause 45 PHYs this is the PRTAD. | ||
| 1633 | * @autoneg: Enable/disable autonegotiation and auto-detection; | ||
| 1634 | * either %AUTONEG_DISABLE or %AUTONEG_ENABLE | ||
| 1635 | * @mdio_support: Bitmask of %ETH_MDIO_SUPPORTS_* flags for the MDIO | ||
| 1636 | * protocols supported by the interface; 0 if unknown. | ||
| 1637 | * Read-only. | ||
| 1638 | * @eth_tp_mdix: Ethernet twisted-pair MDI(-X) status; one of | ||
| 1639 | * %ETH_TP_MDI_*. If the status is unknown or not applicable, the | ||
| 1640 | * value will be %ETH_TP_MDI_INVALID. Read-only. | ||
| 1641 | * @eth_tp_mdix_ctrl: Ethernet twisted pair MDI(-X) control; one of | ||
| 1642 | * %ETH_TP_MDI_*. If MDI(-X) control is not implemented, reads | ||
| 1643 | * yield %ETH_TP_MDI_INVALID and writes may be ignored or rejected. | ||
| 1644 | * When written successfully, the link should be renegotiated if | ||
| 1645 | * necessary. | ||
| 1646 | * @link_mode_masks_nwords: Number of 32-bit words for each of the | ||
| 1647 | * supported, advertising, lp_advertising link mode bitmaps. For | ||
| 1648 | * %ETHTOOL_GLINKSETTINGS: on entry, number of words passed by user | ||
| 1649 | * (>= 0); on return, if handshake in progress, negative if | ||
| 1650 | * request size unsupported by kernel: absolute value indicates | ||
| 1651 | * kernel recommended size and cmd field is 0, as well as all the | ||
| 1652 | * other fields; otherwise (handshake completed), strictly | ||
| 1653 | * positive to indicate size used by kernel and cmd field is | ||
| 1654 | * %ETHTOOL_GLINKSETTINGS, all other fields populated by driver. For | ||
| 1655 | * %ETHTOOL_SLINKSETTINGS: must be valid on entry, ie. a positive | ||
| 1656 | * value returned previously by %ETHTOOL_GLINKSETTINGS, otherwise | ||
| 1657 | * refused. For drivers: ignore this field (use kernel's | ||
| 1658 | * __ETHTOOL_LINK_MODE_MASK_NBITS instead), any change to it will | ||
| 1659 | * be overwritten by kernel. | ||
| 1660 | * @supported: Bitmap with each bit meaning given by | ||
| 1661 | * %ethtool_link_mode_bit_indices for the link modes, physical | ||
| 1662 | * connectors and other link features for which the interface | ||
| 1663 | * supports autonegotiation or auto-detection. Read-only. | ||
| 1664 | * @advertising: Bitmap with each bit meaning given by | ||
| 1665 | * %ethtool_link_mode_bit_indices for the link modes, physical | ||
| 1666 | * connectors and other link features that are advertised through | ||
| 1667 | * autonegotiation or enabled for auto-detection. | ||
| 1668 | * @lp_advertising: Bitmap with each bit meaning given by | ||
| 1669 | * %ethtool_link_mode_bit_indices for the link modes, and other | ||
| 1670 | * link features that the link partner advertised through | ||
| 1671 | * autonegotiation; 0 if unknown or not applicable. Read-only. | ||
| 1672 | * | ||
| 1673 | * If autonegotiation is disabled, the speed and @duplex represent the | ||
| 1674 | * fixed link mode and are writable if the driver supports multiple | ||
| 1675 | * link modes. If it is enabled then they are read-only; if the link | ||
| 1676 | * is up they represent the negotiated link mode; if the link is down, | ||
| 1677 | * the speed is 0, %SPEED_UNKNOWN or the highest enabled speed and | ||
| 1678 | * @duplex is %DUPLEX_UNKNOWN or the best enabled duplex mode. | ||
| 1679 | * | ||
| 1680 | * Some hardware interfaces may have multiple PHYs and/or physical | ||
| 1681 | * connectors fitted or do not allow the driver to detect which are | ||
| 1682 | * fitted. For these interfaces @port and/or @phy_address may be | ||
| 1683 | * writable, possibly dependent on @autoneg being %AUTONEG_DISABLE. | ||
| 1684 | * Otherwise, attempts to write different values may be ignored or | ||
| 1685 | * rejected. | ||
| 1686 | * | ||
| 1687 | * Deprecated %ethtool_cmd fields transceiver, maxtxpkt and maxrxpkt | ||
| 1688 | * are not available in %ethtool_link_settings. Until all drivers are | ||
| 1689 | * converted to ignore them or to the new %ethtool_link_settings API, | ||
| 1690 | * for both queries and changes, users should always try | ||
| 1691 | * %ETHTOOL_GLINKSETTINGS first, and if it fails with -ENOTSUPP stick | ||
| 1692 | * only to %ETHTOOL_GSET and %ETHTOOL_SSET consistently. If it | ||
| 1693 | * succeeds, then users should stick to %ETHTOOL_GLINKSETTINGS and | ||
| 1694 | * %ETHTOOL_SLINKSETTINGS (which would support drivers implementing | ||
| 1695 | * either %ethtool_cmd or %ethtool_link_settings). | ||
| 1696 | * | ||
| 1697 | * Users should assume that all fields not marked read-only are | ||
| 1698 | * writable and subject to validation by the driver. They should use | ||
| 1699 | * %ETHTOOL_GLINKSETTINGS to get the current values before making specific | ||
| 1700 | * changes and then applying them with %ETHTOOL_SLINKSETTINGS. | ||
| 1701 | * | ||
| 1702 | * Drivers that implement %get_link_ksettings and/or | ||
| 1703 | * %set_link_ksettings should ignore the @cmd | ||
| 1704 | * and @link_mode_masks_nwords fields (any change to them overwritten | ||
| 1705 | * by kernel), and rely only on kernel's internal | ||
| 1706 | * %__ETHTOOL_LINK_MODE_MASK_NBITS and | ||
| 1707 | * %ethtool_link_mode_mask_t. Drivers that implement | ||
| 1708 | * %set_link_ksettings() should validate all fields other than @cmd | ||
| 1709 | * and @link_mode_masks_nwords that are not described as read-only or | ||
| 1710 | * deprecated, and must ignore all fields described as read-only. | ||
| 1711 | */ | ||
| 1712 | struct ethtool_link_settings { | ||
| 1713 | __u32 cmd; | ||
| 1714 | __u32 speed; | ||
| 1715 | __u8 duplex; | ||
| 1716 | __u8 port; | ||
| 1717 | __u8 phy_address; | ||
| 1718 | __u8 autoneg; | ||
| 1719 | __u8 mdio_support; | ||
| 1720 | __u8 eth_tp_mdix; | ||
| 1721 | __u8 eth_tp_mdix_ctrl; | ||
| 1722 | __s8 link_mode_masks_nwords; | ||
| 1723 | __u32 reserved[8]; | ||
| 1724 | __u32 link_mode_masks[0]; | ||
| 1725 | /* layout of link_mode_masks fields: | ||
| 1726 | * __u32 map_supported[link_mode_masks_nwords]; | ||
| 1727 | * __u32 map_advertising[link_mode_masks_nwords]; | ||
| 1728 | * __u32 map_lp_advertising[link_mode_masks_nwords]; | ||
| 1729 | */ | ||
| 1730 | }; | ||
| 1444 | #endif /* _UAPI_LINUX_ETHTOOL_H */ | 1731 | #endif /* _UAPI_LINUX_ETHTOOL_H */ |
diff --git a/include/uapi/linux/genetlink.h b/include/uapi/linux/genetlink.h index c3363ba1ae05..5512c90af7e3 100644 --- a/include/uapi/linux/genetlink.h +++ b/include/uapi/linux/genetlink.h | |||
| @@ -21,6 +21,7 @@ struct genlmsghdr { | |||
| 21 | #define GENL_CMD_CAP_DO 0x02 | 21 | #define GENL_CMD_CAP_DO 0x02 |
| 22 | #define GENL_CMD_CAP_DUMP 0x04 | 22 | #define GENL_CMD_CAP_DUMP 0x04 |
| 23 | #define GENL_CMD_CAP_HASPOL 0x08 | 23 | #define GENL_CMD_CAP_HASPOL 0x08 |
| 24 | #define GENL_UNS_ADMIN_PERM 0x10 | ||
| 24 | 25 | ||
| 25 | /* | 26 | /* |
| 26 | * List of reserved static generic netlink identifiers: | 27 | * List of reserved static generic netlink identifiers: |
diff --git a/include/uapi/linux/if.h b/include/uapi/linux/if.h index 9cf2394f0bcf..f80277569f24 100644 --- a/include/uapi/linux/if.h +++ b/include/uapi/linux/if.h | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | * are shared for all types of net_devices. The sysfs entries are available | 37 | * are shared for all types of net_devices. The sysfs entries are available |
| 38 | * via /sys/class/net/<dev>/flags. Flags which can be toggled through sysfs | 38 | * via /sys/class/net/<dev>/flags. Flags which can be toggled through sysfs |
| 39 | * are annotated below, note that only a few flags can be toggled and some | 39 | * are annotated below, note that only a few flags can be toggled and some |
| 40 | * other flags are always always preserved from the original net_device flags | 40 | * other flags are always preserved from the original net_device flags |
| 41 | * even if you try to set them via sysfs. Flags which are always preserved | 41 | * even if you try to set them via sysfs. Flags which are always preserved |
| 42 | * are kept under the flag grouping @IFF_VOLATILE. Flags which are volatile | 42 | * are kept under the flag grouping @IFF_VOLATILE. Flags which are volatile |
| 43 | * are annotated below as such. | 43 | * are annotated below as such. |
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h index 18db14477bdd..0536eefff9bf 100644 --- a/include/uapi/linux/if_bridge.h +++ b/include/uapi/linux/if_bridge.h | |||
| @@ -137,11 +137,17 @@ struct bridge_vlan_info { | |||
| 137 | /* Bridge multicast database attributes | 137 | /* Bridge multicast database attributes |
| 138 | * [MDBA_MDB] = { | 138 | * [MDBA_MDB] = { |
| 139 | * [MDBA_MDB_ENTRY] = { | 139 | * [MDBA_MDB_ENTRY] = { |
| 140 | * [MDBA_MDB_ENTRY_INFO] | 140 | * [MDBA_MDB_ENTRY_INFO] { |
| 141 | * struct br_mdb_entry | ||
| 142 | * [MDBA_MDB_EATTR attributes] | ||
| 143 | * } | ||
| 141 | * } | 144 | * } |
| 142 | * } | 145 | * } |
| 143 | * [MDBA_ROUTER] = { | 146 | * [MDBA_ROUTER] = { |
| 144 | * [MDBA_ROUTER_PORT] | 147 | * [MDBA_ROUTER_PORT] = { |
| 148 | * u32 ifindex | ||
| 149 | * [MDBA_ROUTER_PATTR attributes] | ||
| 150 | * } | ||
| 145 | * } | 151 | * } |
| 146 | */ | 152 | */ |
| 147 | enum { | 153 | enum { |
| @@ -166,6 +172,22 @@ enum { | |||
| 166 | }; | 172 | }; |
| 167 | #define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1) | 173 | #define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1) |
| 168 | 174 | ||
| 175 | /* per mdb entry additional attributes */ | ||
| 176 | enum { | ||
| 177 | MDBA_MDB_EATTR_UNSPEC, | ||
| 178 | MDBA_MDB_EATTR_TIMER, | ||
| 179 | __MDBA_MDB_EATTR_MAX | ||
| 180 | }; | ||
| 181 | #define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1) | ||
| 182 | |||
| 183 | /* multicast router types */ | ||
| 184 | enum { | ||
| 185 | MDB_RTR_TYPE_DISABLED, | ||
| 186 | MDB_RTR_TYPE_TEMP_QUERY, | ||
| 187 | MDB_RTR_TYPE_PERM, | ||
| 188 | MDB_RTR_TYPE_TEMP | ||
| 189 | }; | ||
| 190 | |||
| 169 | enum { | 191 | enum { |
| 170 | MDBA_ROUTER_UNSPEC, | 192 | MDBA_ROUTER_UNSPEC, |
| 171 | MDBA_ROUTER_PORT, | 193 | MDBA_ROUTER_PORT, |
| @@ -173,6 +195,15 @@ enum { | |||
| 173 | }; | 195 | }; |
| 174 | #define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1) | 196 | #define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1) |
| 175 | 197 | ||
| 198 | /* router port attributes */ | ||
| 199 | enum { | ||
| 200 | MDBA_ROUTER_PATTR_UNSPEC, | ||
| 201 | MDBA_ROUTER_PATTR_TIMER, | ||
| 202 | MDBA_ROUTER_PATTR_TYPE, | ||
| 203 | __MDBA_ROUTER_PATTR_MAX | ||
| 204 | }; | ||
| 205 | #define MDBA_ROUTER_PATTR_MAX (__MDBA_ROUTER_PATTR_MAX - 1) | ||
| 206 | |||
| 176 | struct br_port_msg { | 207 | struct br_port_msg { |
| 177 | __u8 family; | 208 | __u8 family; |
| 178 | __u32 ifindex; | 209 | __u32 ifindex; |
| @@ -183,6 +214,8 @@ struct br_mdb_entry { | |||
| 183 | #define MDB_TEMPORARY 0 | 214 | #define MDB_TEMPORARY 0 |
| 184 | #define MDB_PERMANENT 1 | 215 | #define MDB_PERMANENT 1 |
| 185 | __u8 state; | 216 | __u8 state; |
| 217 | #define MDB_FLAGS_OFFLOAD (1 << 0) | ||
| 218 | __u8 flags; | ||
| 186 | __u16 vid; | 219 | __u16 vid; |
| 187 | struct { | 220 | struct { |
| 188 | union { | 221 | union { |
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h index ea9221b0331a..4a93051c578c 100644 --- a/include/uapi/linux/if_ether.h +++ b/include/uapi/linux/if_ether.h | |||
| @@ -83,6 +83,7 @@ | |||
| 83 | #define ETH_P_8021AD 0x88A8 /* 802.1ad Service VLAN */ | 83 | #define ETH_P_8021AD 0x88A8 /* 802.1ad Service VLAN */ |
| 84 | #define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */ | 84 | #define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */ |
| 85 | #define ETH_P_TIPC 0x88CA /* TIPC */ | 85 | #define ETH_P_TIPC 0x88CA /* TIPC */ |
| 86 | #define ETH_P_MACSEC 0x88E5 /* 802.1ae MACsec */ | ||
| 86 | #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ | 87 | #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ |
| 87 | #define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */ | 88 | #define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */ |
| 88 | #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ | 89 | #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ |
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index a30b78090594..8e3f88fa5b59 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h | |||
| @@ -35,6 +35,8 @@ struct rtnl_link_stats { | |||
| 35 | /* for cslip etc */ | 35 | /* for cslip etc */ |
| 36 | __u32 rx_compressed; | 36 | __u32 rx_compressed; |
| 37 | __u32 tx_compressed; | 37 | __u32 tx_compressed; |
| 38 | |||
| 39 | __u32 rx_nohandler; /* dropped, no handler found */ | ||
| 38 | }; | 40 | }; |
| 39 | 41 | ||
| 40 | /* The main device statistics structure */ | 42 | /* The main device statistics structure */ |
| @@ -68,6 +70,8 @@ struct rtnl_link_stats64 { | |||
| 68 | /* for cslip etc */ | 70 | /* for cslip etc */ |
| 69 | __u64 rx_compressed; | 71 | __u64 rx_compressed; |
| 70 | __u64 tx_compressed; | 72 | __u64 tx_compressed; |
| 73 | |||
| 74 | __u64 rx_nohandler; /* dropped, no handler found */ | ||
| 71 | }; | 75 | }; |
| 72 | 76 | ||
| 73 | /* The struct should be in sync with struct ifmap */ | 77 | /* The struct should be in sync with struct ifmap */ |
| @@ -401,6 +405,43 @@ enum { | |||
| 401 | 405 | ||
| 402 | #define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1) | 406 | #define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1) |
| 403 | 407 | ||
| 408 | enum { | ||
| 409 | IFLA_VRF_PORT_UNSPEC, | ||
| 410 | IFLA_VRF_PORT_TABLE, | ||
| 411 | __IFLA_VRF_PORT_MAX | ||
| 412 | }; | ||
| 413 | |||
| 414 | #define IFLA_VRF_PORT_MAX (__IFLA_VRF_PORT_MAX - 1) | ||
| 415 | |||
| 416 | /* MACSEC section */ | ||
| 417 | enum { | ||
| 418 | IFLA_MACSEC_UNSPEC, | ||
| 419 | IFLA_MACSEC_SCI, | ||
| 420 | IFLA_MACSEC_PORT, | ||
| 421 | IFLA_MACSEC_ICV_LEN, | ||
| 422 | IFLA_MACSEC_CIPHER_SUITE, | ||
| 423 | IFLA_MACSEC_WINDOW, | ||
| 424 | IFLA_MACSEC_ENCODING_SA, | ||
| 425 | IFLA_MACSEC_ENCRYPT, | ||
| 426 | IFLA_MACSEC_PROTECT, | ||
| 427 | IFLA_MACSEC_INC_SCI, | ||
| 428 | IFLA_MACSEC_ES, | ||
| 429 | IFLA_MACSEC_SCB, | ||
| 430 | IFLA_MACSEC_REPLAY_PROTECT, | ||
| 431 | IFLA_MACSEC_VALIDATION, | ||
| 432 | __IFLA_MACSEC_MAX, | ||
| 433 | }; | ||
| 434 | |||
| 435 | #define IFLA_MACSEC_MAX (__IFLA_MACSEC_MAX - 1) | ||
| 436 | |||
| 437 | enum macsec_validation_type { | ||
| 438 | MACSEC_VALIDATE_DISABLED = 0, | ||
| 439 | MACSEC_VALIDATE_CHECK = 1, | ||
| 440 | MACSEC_VALIDATE_STRICT = 2, | ||
| 441 | __MACSEC_VALIDATE_END, | ||
| 442 | MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1, | ||
| 443 | }; | ||
| 444 | |||
| 404 | /* IPVLAN section */ | 445 | /* IPVLAN section */ |
| 405 | enum { | 446 | enum { |
| 406 | IFLA_IPVLAN_UNSPEC, | 447 | IFLA_IPVLAN_UNSPEC, |
| @@ -444,6 +485,7 @@ enum { | |||
| 444 | IFLA_VXLAN_GBP, | 485 | IFLA_VXLAN_GBP, |
| 445 | IFLA_VXLAN_REMCSUM_NOPARTIAL, | 486 | IFLA_VXLAN_REMCSUM_NOPARTIAL, |
| 446 | IFLA_VXLAN_COLLECT_METADATA, | 487 | IFLA_VXLAN_COLLECT_METADATA, |
| 488 | IFLA_VXLAN_LABEL, | ||
| 447 | __IFLA_VXLAN_MAX | 489 | __IFLA_VXLAN_MAX |
| 448 | }; | 490 | }; |
| 449 | #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) | 491 | #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) |
| @@ -466,6 +508,7 @@ enum { | |||
| 466 | IFLA_GENEVE_UDP_CSUM, | 508 | IFLA_GENEVE_UDP_CSUM, |
| 467 | IFLA_GENEVE_UDP_ZERO_CSUM6_TX, | 509 | IFLA_GENEVE_UDP_ZERO_CSUM6_TX, |
| 468 | IFLA_GENEVE_UDP_ZERO_CSUM6_RX, | 510 | IFLA_GENEVE_UDP_ZERO_CSUM6_RX, |
| 511 | IFLA_GENEVE_LABEL, | ||
| 469 | __IFLA_GENEVE_MAX | 512 | __IFLA_GENEVE_MAX |
| 470 | }; | 513 | }; |
| 471 | #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1) | 514 | #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1) |
diff --git a/include/uapi/linux/if_macsec.h b/include/uapi/linux/if_macsec.h new file mode 100644 index 000000000000..26b0d1e3e3e7 --- /dev/null +++ b/include/uapi/linux/if_macsec.h | |||
| @@ -0,0 +1,161 @@ | |||
| 1 | /* | ||
| 2 | * include/uapi/linux/if_macsec.h - MACsec device | ||
| 3 | * | ||
| 4 | * Copyright (c) 2015 Sabrina Dubroca <sd@queasysnail.net> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef _UAPI_MACSEC_H | ||
| 13 | #define _UAPI_MACSEC_H | ||
| 14 | |||
| 15 | #include <linux/types.h> | ||
| 16 | |||
| 17 | #define MACSEC_GENL_NAME "macsec" | ||
| 18 | #define MACSEC_GENL_VERSION 1 | ||
| 19 | |||
| 20 | #define MACSEC_MAX_KEY_LEN 128 | ||
| 21 | |||
| 22 | #define DEFAULT_CIPHER_ID 0x0080020001000001ULL | ||
| 23 | #define DEFAULT_CIPHER_ALT 0x0080C20001000001ULL | ||
| 24 | |||
| 25 | #define MACSEC_MIN_ICV_LEN 8 | ||
| 26 | #define MACSEC_MAX_ICV_LEN 32 | ||
| 27 | |||
| 28 | enum macsec_attrs { | ||
| 29 | MACSEC_ATTR_UNSPEC, | ||
| 30 | MACSEC_ATTR_IFINDEX, /* u32, ifindex of the MACsec netdevice */ | ||
| 31 | MACSEC_ATTR_RXSC_CONFIG, /* config, nested macsec_rxsc_attrs */ | ||
| 32 | MACSEC_ATTR_SA_CONFIG, /* config, nested macsec_sa_attrs */ | ||
| 33 | MACSEC_ATTR_SECY, /* dump, nested macsec_secy_attrs */ | ||
| 34 | MACSEC_ATTR_TXSA_LIST, /* dump, nested, macsec_sa_attrs for each TXSA */ | ||
| 35 | MACSEC_ATTR_RXSC_LIST, /* dump, nested, macsec_rxsc_attrs for each RXSC */ | ||
| 36 | MACSEC_ATTR_TXSC_STATS, /* dump, nested, macsec_txsc_stats_attr */ | ||
| 37 | MACSEC_ATTR_SECY_STATS, /* dump, nested, macsec_secy_stats_attr */ | ||
| 38 | __MACSEC_ATTR_END, | ||
| 39 | NUM_MACSEC_ATTR = __MACSEC_ATTR_END, | ||
| 40 | MACSEC_ATTR_MAX = __MACSEC_ATTR_END - 1, | ||
| 41 | }; | ||
| 42 | |||
| 43 | enum macsec_secy_attrs { | ||
| 44 | MACSEC_SECY_ATTR_UNSPEC, | ||
| 45 | MACSEC_SECY_ATTR_SCI, | ||
| 46 | MACSEC_SECY_ATTR_ENCODING_SA, | ||
| 47 | MACSEC_SECY_ATTR_WINDOW, | ||
| 48 | MACSEC_SECY_ATTR_CIPHER_SUITE, | ||
| 49 | MACSEC_SECY_ATTR_ICV_LEN, | ||
| 50 | MACSEC_SECY_ATTR_PROTECT, | ||
| 51 | MACSEC_SECY_ATTR_REPLAY, | ||
| 52 | MACSEC_SECY_ATTR_OPER, | ||
| 53 | MACSEC_SECY_ATTR_VALIDATE, | ||
| 54 | MACSEC_SECY_ATTR_ENCRYPT, | ||
| 55 | MACSEC_SECY_ATTR_INC_SCI, | ||
| 56 | MACSEC_SECY_ATTR_ES, | ||
| 57 | MACSEC_SECY_ATTR_SCB, | ||
| 58 | __MACSEC_SECY_ATTR_END, | ||
| 59 | NUM_MACSEC_SECY_ATTR = __MACSEC_SECY_ATTR_END, | ||
| 60 | MACSEC_SECY_ATTR_MAX = __MACSEC_SECY_ATTR_END - 1, | ||
| 61 | }; | ||
| 62 | |||
| 63 | enum macsec_rxsc_attrs { | ||
| 64 | MACSEC_RXSC_ATTR_UNSPEC, | ||
| 65 | MACSEC_RXSC_ATTR_SCI, /* config/dump, u64 */ | ||
| 66 | MACSEC_RXSC_ATTR_ACTIVE, /* config/dump, u8 0..1 */ | ||
| 67 | MACSEC_RXSC_ATTR_SA_LIST, /* dump, nested */ | ||
| 68 | MACSEC_RXSC_ATTR_STATS, /* dump, nested, macsec_rxsc_stats_attr */ | ||
| 69 | __MACSEC_RXSC_ATTR_END, | ||
| 70 | NUM_MACSEC_RXSC_ATTR = __MACSEC_RXSC_ATTR_END, | ||
| 71 | MACSEC_RXSC_ATTR_MAX = __MACSEC_RXSC_ATTR_END - 1, | ||
| 72 | }; | ||
| 73 | |||
| 74 | enum macsec_sa_attrs { | ||
| 75 | MACSEC_SA_ATTR_UNSPEC, | ||
| 76 | MACSEC_SA_ATTR_AN, /* config/dump, u8 0..3 */ | ||
| 77 | MACSEC_SA_ATTR_ACTIVE, /* config/dump, u8 0..1 */ | ||
| 78 | MACSEC_SA_ATTR_PN, /* config/dump, u32 */ | ||
| 79 | MACSEC_SA_ATTR_KEY, /* config, data */ | ||
| 80 | MACSEC_SA_ATTR_KEYID, /* config/dump, u64 */ | ||
| 81 | MACSEC_SA_ATTR_STATS, /* dump, nested, macsec_sa_stats_attr */ | ||
| 82 | __MACSEC_SA_ATTR_END, | ||
| 83 | NUM_MACSEC_SA_ATTR = __MACSEC_SA_ATTR_END, | ||
| 84 | MACSEC_SA_ATTR_MAX = __MACSEC_SA_ATTR_END - 1, | ||
| 85 | }; | ||
| 86 | |||
| 87 | enum macsec_nl_commands { | ||
| 88 | MACSEC_CMD_GET_TXSC, | ||
| 89 | MACSEC_CMD_ADD_RXSC, | ||
| 90 | MACSEC_CMD_DEL_RXSC, | ||
| 91 | MACSEC_CMD_UPD_RXSC, | ||
| 92 | MACSEC_CMD_ADD_TXSA, | ||
| 93 | MACSEC_CMD_DEL_TXSA, | ||
| 94 | MACSEC_CMD_UPD_TXSA, | ||
| 95 | MACSEC_CMD_ADD_RXSA, | ||
| 96 | MACSEC_CMD_DEL_RXSA, | ||
| 97 | MACSEC_CMD_UPD_RXSA, | ||
| 98 | }; | ||
| 99 | |||
| 100 | /* u64 per-RXSC stats */ | ||
| 101 | enum macsec_rxsc_stats_attr { | ||
| 102 | MACSEC_RXSC_STATS_ATTR_UNSPEC, | ||
| 103 | MACSEC_RXSC_STATS_ATTR_IN_OCTETS_VALIDATED, | ||
| 104 | MACSEC_RXSC_STATS_ATTR_IN_OCTETS_DECRYPTED, | ||
| 105 | MACSEC_RXSC_STATS_ATTR_IN_PKTS_UNCHECKED, | ||
| 106 | MACSEC_RXSC_STATS_ATTR_IN_PKTS_DELAYED, | ||
| 107 | MACSEC_RXSC_STATS_ATTR_IN_PKTS_OK, | ||
| 108 | MACSEC_RXSC_STATS_ATTR_IN_PKTS_INVALID, | ||
| 109 | MACSEC_RXSC_STATS_ATTR_IN_PKTS_LATE, | ||
| 110 | MACSEC_RXSC_STATS_ATTR_IN_PKTS_NOT_VALID, | ||
| 111 | MACSEC_RXSC_STATS_ATTR_IN_PKTS_NOT_USING_SA, | ||
| 112 | MACSEC_RXSC_STATS_ATTR_IN_PKTS_UNUSED_SA, | ||
| 113 | __MACSEC_RXSC_STATS_ATTR_END, | ||
| 114 | NUM_MACSEC_RXSC_STATS_ATTR = __MACSEC_RXSC_STATS_ATTR_END, | ||
| 115 | MACSEC_RXSC_STATS_ATTR_MAX = __MACSEC_RXSC_STATS_ATTR_END - 1, | ||
| 116 | }; | ||
| 117 | |||
| 118 | /* u32 per-{RX,TX}SA stats */ | ||
| 119 | enum macsec_sa_stats_attr { | ||
| 120 | MACSEC_SA_STATS_ATTR_UNSPEC, | ||
| 121 | MACSEC_SA_STATS_ATTR_IN_PKTS_OK, | ||
| 122 | MACSEC_SA_STATS_ATTR_IN_PKTS_INVALID, | ||
| 123 | MACSEC_SA_STATS_ATTR_IN_PKTS_NOT_VALID, | ||
| 124 | MACSEC_SA_STATS_ATTR_IN_PKTS_NOT_USING_SA, | ||
| 125 | MACSEC_SA_STATS_ATTR_IN_PKTS_UNUSED_SA, | ||
| 126 | MACSEC_SA_STATS_ATTR_OUT_PKTS_PROTECTED, | ||
| 127 | MACSEC_SA_STATS_ATTR_OUT_PKTS_ENCRYPTED, | ||
| 128 | __MACSEC_SA_STATS_ATTR_END, | ||
| 129 | NUM_MACSEC_SA_STATS_ATTR = __MACSEC_SA_STATS_ATTR_END, | ||
| 130 | MACSEC_SA_STATS_ATTR_MAX = __MACSEC_SA_STATS_ATTR_END - 1, | ||
| 131 | }; | ||
| 132 | |||
| 133 | /* u64 per-TXSC stats */ | ||
| 134 | enum macsec_txsc_stats_attr { | ||
| 135 | MACSEC_TXSC_STATS_ATTR_UNSPEC, | ||
| 136 | MACSEC_TXSC_STATS_ATTR_OUT_PKTS_PROTECTED, | ||
| 137 | MACSEC_TXSC_STATS_ATTR_OUT_PKTS_ENCRYPTED, | ||
| 138 | MACSEC_TXSC_STATS_ATTR_OUT_OCTETS_PROTECTED, | ||
| 139 | MACSEC_TXSC_STATS_ATTR_OUT_OCTETS_ENCRYPTED, | ||
| 140 | __MACSEC_TXSC_STATS_ATTR_END, | ||
| 141 | NUM_MACSEC_TXSC_STATS_ATTR = __MACSEC_TXSC_STATS_ATTR_END, | ||
| 142 | MACSEC_TXSC_STATS_ATTR_MAX = __MACSEC_TXSC_STATS_ATTR_END - 1, | ||
| 143 | }; | ||
| 144 | |||
| 145 | /* u64 per-SecY stats */ | ||
| 146 | enum macsec_secy_stats_attr { | ||
| 147 | MACSEC_SECY_STATS_ATTR_UNSPEC, | ||
| 148 | MACSEC_SECY_STATS_ATTR_OUT_PKTS_UNTAGGED, | ||
| 149 | MACSEC_SECY_STATS_ATTR_IN_PKTS_UNTAGGED, | ||
| 150 | MACSEC_SECY_STATS_ATTR_OUT_PKTS_TOO_LONG, | ||
| 151 | MACSEC_SECY_STATS_ATTR_IN_PKTS_NO_TAG, | ||
| 152 | MACSEC_SECY_STATS_ATTR_IN_PKTS_BAD_TAG, | ||
| 153 | MACSEC_SECY_STATS_ATTR_IN_PKTS_UNKNOWN_SCI, | ||
| 154 | MACSEC_SECY_STATS_ATTR_IN_PKTS_NO_SCI, | ||
| 155 | MACSEC_SECY_STATS_ATTR_IN_PKTS_OVERRUN, | ||
| 156 | __MACSEC_SECY_STATS_ATTR_END, | ||
| 157 | NUM_MACSEC_SECY_STATS_ATTR = __MACSEC_SECY_STATS_ATTR_END, | ||
| 158 | MACSEC_SECY_STATS_ATTR_MAX = __MACSEC_SECY_STATS_ATTR_END - 1, | ||
| 159 | }; | ||
| 160 | |||
| 161 | #endif /* _UAPI_MACSEC_H */ | ||
diff --git a/include/uapi/linux/ip.h b/include/uapi/linux/ip.h index 08f894d2ddbd..f291569768dd 100644 --- a/include/uapi/linux/ip.h +++ b/include/uapi/linux/ip.h | |||
| @@ -165,6 +165,8 @@ enum | |||
| 165 | IPV4_DEVCONF_IGMPV2_UNSOLICITED_REPORT_INTERVAL, | 165 | IPV4_DEVCONF_IGMPV2_UNSOLICITED_REPORT_INTERVAL, |
| 166 | IPV4_DEVCONF_IGMPV3_UNSOLICITED_REPORT_INTERVAL, | 166 | IPV4_DEVCONF_IGMPV3_UNSOLICITED_REPORT_INTERVAL, |
| 167 | IPV4_DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN, | 167 | IPV4_DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN, |
| 168 | IPV4_DEVCONF_DROP_UNICAST_IN_L2_MULTICAST, | ||
| 169 | IPV4_DEVCONF_DROP_GRATUITOUS_ARP, | ||
| 168 | __IPV4_DEVCONF_MAX | 170 | __IPV4_DEVCONF_MAX |
| 169 | }; | 171 | }; |
| 170 | 172 | ||
diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h index 38b4fef20219..395876060f50 100644 --- a/include/uapi/linux/ipv6.h +++ b/include/uapi/linux/ipv6.h | |||
| @@ -174,6 +174,9 @@ enum { | |||
| 174 | DEVCONF_USE_OIF_ADDRS_ONLY, | 174 | DEVCONF_USE_OIF_ADDRS_ONLY, |
| 175 | DEVCONF_ACCEPT_RA_MIN_HOP_LIMIT, | 175 | DEVCONF_ACCEPT_RA_MIN_HOP_LIMIT, |
| 176 | DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN, | 176 | DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN, |
| 177 | DEVCONF_DROP_UNICAST_IN_L2_MULTICAST, | ||
| 178 | DEVCONF_DROP_UNSOLICITED_NA, | ||
| 179 | DEVCONF_KEEP_ADDR_ON_DOWN, | ||
| 177 | DEVCONF_MAX | 180 | DEVCONF_MAX |
| 178 | }; | 181 | }; |
| 179 | 182 | ||
diff --git a/include/uapi/linux/kcm.h b/include/uapi/linux/kcm.h new file mode 100644 index 000000000000..a5a530940b99 --- /dev/null +++ b/include/uapi/linux/kcm.h | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | /* | ||
| 2 | * Kernel Connection Multiplexor | ||
| 3 | * | ||
| 4 | * Copyright (c) 2016 Tom Herbert <tom@herbertland.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 | ||
| 8 | * as published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * User API to clone KCM sockets and attach transport socket to a KCM | ||
| 11 | * multiplexor. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef KCM_KERNEL_H | ||
| 15 | #define KCM_KERNEL_H | ||
| 16 | |||
| 17 | struct kcm_attach { | ||
| 18 | int fd; | ||
| 19 | int bpf_fd; | ||
| 20 | }; | ||
| 21 | |||
| 22 | struct kcm_unattach { | ||
| 23 | int fd; | ||
| 24 | }; | ||
| 25 | |||
| 26 | struct kcm_clone { | ||
| 27 | int fd; | ||
| 28 | }; | ||
| 29 | |||
| 30 | #define SIOCKCMATTACH (SIOCPROTOPRIVATE + 0) | ||
| 31 | #define SIOCKCMUNATTACH (SIOCPROTOPRIVATE + 1) | ||
| 32 | #define SIOCKCMCLONE (SIOCPROTOPRIVATE + 2) | ||
| 33 | |||
| 34 | #define KCMPROTO_CONNECTED 0 | ||
| 35 | |||
| 36 | /* Socket options */ | ||
| 37 | #define KCM_RECV_DISABLE 1 | ||
| 38 | |||
| 39 | #endif | ||
| 40 | |||
diff --git a/include/uapi/linux/kernel.h b/include/uapi/linux/kernel.h index 321e399457f5..466073f0ce46 100644 --- a/include/uapi/linux/kernel.h +++ b/include/uapi/linux/kernel.h | |||
| @@ -9,5 +9,6 @@ | |||
| 9 | #define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) | 9 | #define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) |
| 10 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) | 10 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) |
| 11 | 11 | ||
| 12 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) | ||
| 12 | 13 | ||
| 13 | #endif /* _UAPI_LINUX_KERNEL_H */ | 14 | #endif /* _UAPI_LINUX_KERNEL_H */ |
diff --git a/include/uapi/linux/mroute6.h b/include/uapi/linux/mroute6.h index ce91215cf7e6..5062fb5751e1 100644 --- a/include/uapi/linux/mroute6.h +++ b/include/uapi/linux/mroute6.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _UAPI__LINUX_MROUTE6_H | 1 | #ifndef _UAPI__LINUX_MROUTE6_H |
| 2 | #define _UAPI__LINUX_MROUTE6_H | 2 | #define _UAPI__LINUX_MROUTE6_H |
| 3 | 3 | ||
| 4 | #include <linux/kernel.h> | ||
| 4 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 5 | #include <linux/sockios.h> | 6 | #include <linux/sockios.h> |
| 6 | 7 | ||
| @@ -46,14 +47,8 @@ typedef unsigned short mifi_t; | |||
| 46 | typedef __u32 if_mask; | 47 | typedef __u32 if_mask; |
| 47 | #define NIFBITS (sizeof(if_mask) * 8) /* bits per mask */ | 48 | #define NIFBITS (sizeof(if_mask) * 8) /* bits per mask */ |
| 48 | 49 | ||
| 49 | #if !defined(__KERNEL__) | ||
| 50 | #if !defined(DIV_ROUND_UP) | ||
| 51 | #define DIV_ROUND_UP(x,y) (((x) + ((y) - 1)) / (y)) | ||
| 52 | #endif | ||
| 53 | #endif | ||
| 54 | |||
| 55 | typedef struct if_set { | 50 | typedef struct if_set { |
| 56 | if_mask ifs_bits[DIV_ROUND_UP(IF_SETSIZE, NIFBITS)]; | 51 | if_mask ifs_bits[__KERNEL_DIV_ROUND_UP(IF_SETSIZE, NIFBITS)]; |
| 57 | } if_set; | 52 | } if_set; |
| 58 | 53 | ||
| 59 | #define IF_SET(n, p) ((p)->ifs_bits[(n)/NIFBITS] |= (1 << ((n) % NIFBITS))) | 54 | #define IF_SET(n, p) ((p)->ifs_bits[(n)/NIFBITS] |= (1 << ((n) % NIFBITS))) |
diff --git a/include/uapi/linux/netconf.h b/include/uapi/linux/netconf.h index 23cbd34e4ac7..45dfad509c4d 100644 --- a/include/uapi/linux/netconf.h +++ b/include/uapi/linux/netconf.h | |||
| @@ -19,6 +19,7 @@ enum { | |||
| 19 | __NETCONFA_MAX | 19 | __NETCONFA_MAX |
| 20 | }; | 20 | }; |
| 21 | #define NETCONFA_MAX (__NETCONFA_MAX - 1) | 21 | #define NETCONFA_MAX (__NETCONFA_MAX - 1) |
| 22 | #define NETCONFA_ALL -1 | ||
| 22 | 23 | ||
| 23 | #define NETCONFA_IFINDEX_ALL -1 | 24 | #define NETCONFA_IFINDEX_ALL -1 |
| 24 | #define NETCONFA_IFINDEX_DEFAULT -2 | 25 | #define NETCONFA_IFINDEX_DEFAULT -2 |
diff --git a/include/uapi/linux/netfilter/nf_conntrack_common.h b/include/uapi/linux/netfilter/nf_conntrack_common.h index 319f47128db8..6d074d14ee27 100644 --- a/include/uapi/linux/netfilter/nf_conntrack_common.h +++ b/include/uapi/linux/netfilter/nf_conntrack_common.h | |||
| @@ -20,9 +20,15 @@ enum ip_conntrack_info { | |||
| 20 | 20 | ||
| 21 | IP_CT_ESTABLISHED_REPLY = IP_CT_ESTABLISHED + IP_CT_IS_REPLY, | 21 | IP_CT_ESTABLISHED_REPLY = IP_CT_ESTABLISHED + IP_CT_IS_REPLY, |
| 22 | IP_CT_RELATED_REPLY = IP_CT_RELATED + IP_CT_IS_REPLY, | 22 | IP_CT_RELATED_REPLY = IP_CT_RELATED + IP_CT_IS_REPLY, |
| 23 | IP_CT_NEW_REPLY = IP_CT_NEW + IP_CT_IS_REPLY, | 23 | /* No NEW in reply direction. */ |
| 24 | /* Number of distinct IP_CT types (no NEW in reply dirn). */ | 24 | |
| 25 | IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 1 | 25 | /* Number of distinct IP_CT types. */ |
| 26 | IP_CT_NUMBER, | ||
| 27 | |||
| 28 | /* only for userspace compatibility */ | ||
| 29 | #ifndef __KERNEL__ | ||
| 30 | IP_CT_NEW_REPLY = IP_CT_NUMBER, | ||
| 31 | #endif | ||
| 26 | }; | 32 | }; |
| 27 | 33 | ||
| 28 | #define NF_CT_STATE_INVALID_BIT (1 << 0) | 34 | #define NF_CT_STATE_INVALID_BIT (1 << 0) |
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h index be41ffc128b8..eeffde196f80 100644 --- a/include/uapi/linux/netfilter/nf_tables.h +++ b/include/uapi/linux/netfilter/nf_tables.h | |||
| @@ -681,6 +681,7 @@ enum nft_exthdr_attributes { | |||
| 681 | * @NFT_META_IIFGROUP: packet input interface group | 681 | * @NFT_META_IIFGROUP: packet input interface group |
| 682 | * @NFT_META_OIFGROUP: packet output interface group | 682 | * @NFT_META_OIFGROUP: packet output interface group |
| 683 | * @NFT_META_CGROUP: socket control group (skb->sk->sk_classid) | 683 | * @NFT_META_CGROUP: socket control group (skb->sk->sk_classid) |
| 684 | * @NFT_META_PRANDOM: a 32bit pseudo-random number | ||
| 684 | */ | 685 | */ |
| 685 | enum nft_meta_keys { | 686 | enum nft_meta_keys { |
| 686 | NFT_META_LEN, | 687 | NFT_META_LEN, |
| @@ -707,6 +708,7 @@ enum nft_meta_keys { | |||
| 707 | NFT_META_IIFGROUP, | 708 | NFT_META_IIFGROUP, |
| 708 | NFT_META_OIFGROUP, | 709 | NFT_META_OIFGROUP, |
| 709 | NFT_META_CGROUP, | 710 | NFT_META_CGROUP, |
| 711 | NFT_META_PRANDOM, | ||
| 710 | }; | 712 | }; |
| 711 | 713 | ||
| 712 | /** | 714 | /** |
| @@ -949,10 +951,14 @@ enum nft_nat_attributes { | |||
| 949 | * enum nft_masq_attributes - nf_tables masquerade expression attributes | 951 | * enum nft_masq_attributes - nf_tables masquerade expression attributes |
| 950 | * | 952 | * |
| 951 | * @NFTA_MASQ_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32) | 953 | * @NFTA_MASQ_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32) |
| 954 | * @NFTA_MASQ_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers) | ||
| 955 | * @NFTA_MASQ_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers) | ||
| 952 | */ | 956 | */ |
| 953 | enum nft_masq_attributes { | 957 | enum nft_masq_attributes { |
| 954 | NFTA_MASQ_UNSPEC, | 958 | NFTA_MASQ_UNSPEC, |
| 955 | NFTA_MASQ_FLAGS, | 959 | NFTA_MASQ_FLAGS, |
| 960 | NFTA_MASQ_REG_PROTO_MIN, | ||
| 961 | NFTA_MASQ_REG_PROTO_MAX, | ||
| 956 | __NFTA_MASQ_MAX | 962 | __NFTA_MASQ_MAX |
| 957 | }; | 963 | }; |
| 958 | #define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1) | 964 | #define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1) |
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h index f095155d8749..0dba4e4ed2be 100644 --- a/include/uapi/linux/netlink.h +++ b/include/uapi/linux/netlink.h | |||
| @@ -107,8 +107,10 @@ struct nlmsgerr { | |||
| 107 | #define NETLINK_PKTINFO 3 | 107 | #define NETLINK_PKTINFO 3 |
| 108 | #define NETLINK_BROADCAST_ERROR 4 | 108 | #define NETLINK_BROADCAST_ERROR 4 |
| 109 | #define NETLINK_NO_ENOBUFS 5 | 109 | #define NETLINK_NO_ENOBUFS 5 |
| 110 | #ifndef __KERNEL__ | ||
| 110 | #define NETLINK_RX_RING 6 | 111 | #define NETLINK_RX_RING 6 |
| 111 | #define NETLINK_TX_RING 7 | 112 | #define NETLINK_TX_RING 7 |
| 113 | #endif | ||
| 112 | #define NETLINK_LISTEN_ALL_NSID 8 | 114 | #define NETLINK_LISTEN_ALL_NSID 8 |
| 113 | #define NETLINK_LIST_MEMBERSHIPS 9 | 115 | #define NETLINK_LIST_MEMBERSHIPS 9 |
| 114 | #define NETLINK_CAP_ACK 10 | 116 | #define NETLINK_CAP_ACK 10 |
| @@ -134,6 +136,7 @@ struct nl_mmap_hdr { | |||
| 134 | __u32 nm_gid; | 136 | __u32 nm_gid; |
| 135 | }; | 137 | }; |
| 136 | 138 | ||
| 139 | #ifndef __KERNEL__ | ||
| 137 | enum nl_mmap_status { | 140 | enum nl_mmap_status { |
| 138 | NL_MMAP_STATUS_UNUSED, | 141 | NL_MMAP_STATUS_UNUSED, |
| 139 | NL_MMAP_STATUS_RESERVED, | 142 | NL_MMAP_STATUS_RESERVED, |
| @@ -145,6 +148,7 @@ enum nl_mmap_status { | |||
| 145 | #define NL_MMAP_MSG_ALIGNMENT NLMSG_ALIGNTO | 148 | #define NL_MMAP_MSG_ALIGNMENT NLMSG_ALIGNTO |
| 146 | #define NL_MMAP_MSG_ALIGN(sz) __ALIGN_KERNEL(sz, NL_MMAP_MSG_ALIGNMENT) | 149 | #define NL_MMAP_MSG_ALIGN(sz) __ALIGN_KERNEL(sz, NL_MMAP_MSG_ALIGNMENT) |
| 147 | #define NL_MMAP_HDRLEN NL_MMAP_MSG_ALIGN(sizeof(struct nl_mmap_hdr)) | 150 | #define NL_MMAP_HDRLEN NL_MMAP_MSG_ALIGN(sizeof(struct nl_mmap_hdr)) |
| 151 | #endif | ||
| 148 | 152 | ||
| 149 | #define NET_MAJOR 36 /* Major 36 is reserved for networking */ | 153 | #define NET_MAJOR 36 /* Major 36 is reserved for networking */ |
| 150 | 154 | ||
diff --git a/include/uapi/linux/netlink_diag.h b/include/uapi/linux/netlink_diag.h index f2159d30d1f5..d79399394b46 100644 --- a/include/uapi/linux/netlink_diag.h +++ b/include/uapi/linux/netlink_diag.h | |||
| @@ -48,6 +48,8 @@ enum { | |||
| 48 | 48 | ||
| 49 | #define NDIAG_SHOW_MEMINFO 0x00000001 /* show memory info of a socket */ | 49 | #define NDIAG_SHOW_MEMINFO 0x00000001 /* show memory info of a socket */ |
| 50 | #define NDIAG_SHOW_GROUPS 0x00000002 /* show groups of a netlink socket */ | 50 | #define NDIAG_SHOW_GROUPS 0x00000002 /* show groups of a netlink socket */ |
| 51 | #ifndef __KERNEL__ | ||
| 51 | #define NDIAG_SHOW_RING_CFG 0x00000004 /* show ring configuration */ | 52 | #define NDIAG_SHOW_RING_CFG 0x00000004 /* show ring configuration */ |
| 53 | #endif | ||
| 52 | 54 | ||
| 53 | #endif | 55 | #endif |
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 5b7b5ebe7ca8..5a30a7563633 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
| @@ -1727,6 +1727,8 @@ enum nl80211_commands { | |||
| 1727 | * underlying device supports these minimal RRM features: | 1727 | * underlying device supports these minimal RRM features: |
| 1728 | * %NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES, | 1728 | * %NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES, |
| 1729 | * %NL80211_FEATURE_QUIET, | 1729 | * %NL80211_FEATURE_QUIET, |
| 1730 | * Or, if global RRM is supported, see: | ||
| 1731 | * %NL80211_EXT_FEATURE_RRM | ||
| 1730 | * If this flag is used, driver must add the Power Capabilities IE to the | 1732 | * If this flag is used, driver must add the Power Capabilities IE to the |
| 1731 | * association request. In addition, it must also set the RRM capability | 1733 | * association request. In addition, it must also set the RRM capability |
| 1732 | * flag in the association request's Capability Info field. | 1734 | * flag in the association request's Capability Info field. |
| @@ -1789,6 +1791,10 @@ enum nl80211_commands { | |||
| 1789 | * thus it must not specify the number of iterations, only the interval | 1791 | * thus it must not specify the number of iterations, only the interval |
| 1790 | * between scans. The scan plans are executed sequentially. | 1792 | * between scans. The scan plans are executed sequentially. |
| 1791 | * Each scan plan is a nested attribute of &enum nl80211_sched_scan_plan. | 1793 | * Each scan plan is a nested attribute of &enum nl80211_sched_scan_plan. |
| 1794 | * @NL80211_ATTR_PBSS: flag attribute. If set it means operate | ||
| 1795 | * in a PBSS. Specified in %NL80211_CMD_CONNECT to request | ||
| 1796 | * connecting to a PCP, and in %NL80211_CMD_START_AP to start | ||
| 1797 | * a PCP instead of AP. Relevant for DMG networks only. | ||
| 1792 | * | 1798 | * |
| 1793 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available | 1799 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 1794 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1800 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| @@ -2164,6 +2170,8 @@ enum nl80211_attrs { | |||
| 2164 | NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS, | 2170 | NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS, |
| 2165 | NL80211_ATTR_SCHED_SCAN_PLANS, | 2171 | NL80211_ATTR_SCHED_SCAN_PLANS, |
| 2166 | 2172 | ||
| 2173 | NL80211_ATTR_PBSS, | ||
| 2174 | |||
| 2167 | /* add attributes here, update the policy in nl80211.c */ | 2175 | /* add attributes here, update the policy in nl80211.c */ |
| 2168 | 2176 | ||
| 2169 | __NL80211_ATTR_AFTER_LAST, | 2177 | __NL80211_ATTR_AFTER_LAST, |
| @@ -4396,12 +4404,18 @@ enum nl80211_feature_flags { | |||
| 4396 | /** | 4404 | /** |
| 4397 | * enum nl80211_ext_feature_index - bit index of extended features. | 4405 | * enum nl80211_ext_feature_index - bit index of extended features. |
| 4398 | * @NL80211_EXT_FEATURE_VHT_IBSS: This driver supports IBSS with VHT datarates. | 4406 | * @NL80211_EXT_FEATURE_VHT_IBSS: This driver supports IBSS with VHT datarates. |
| 4407 | * @NL80211_EXT_FEATURE_RRM: This driver supports RRM. When featured, user can | ||
| 4408 | * can request to use RRM (see %NL80211_ATTR_USE_RRM) with | ||
| 4409 | * %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests, which will set | ||
| 4410 | * the ASSOC_REQ_USE_RRM flag in the association request even if | ||
| 4411 | * NL80211_FEATURE_QUIET is not advertized. | ||
| 4399 | * | 4412 | * |
| 4400 | * @NUM_NL80211_EXT_FEATURES: number of extended features. | 4413 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
| 4401 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. | 4414 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
| 4402 | */ | 4415 | */ |
| 4403 | enum nl80211_ext_feature_index { | 4416 | enum nl80211_ext_feature_index { |
| 4404 | NL80211_EXT_FEATURE_VHT_IBSS, | 4417 | NL80211_EXT_FEATURE_VHT_IBSS, |
| 4418 | NL80211_EXT_FEATURE_RRM, | ||
| 4405 | 4419 | ||
| 4406 | /* add new features before the definition below */ | 4420 | /* add new features before the definition below */ |
| 4407 | NUM_NL80211_EXT_FEATURES, | 4421 | NUM_NL80211_EXT_FEATURES, |
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index a27222d5b413..616d04761730 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h | |||
| @@ -454,6 +454,14 @@ struct ovs_key_ct_labels { | |||
| 454 | #define OVS_CS_F_REPLY_DIR 0x08 /* Flow is in the reply direction. */ | 454 | #define OVS_CS_F_REPLY_DIR 0x08 /* Flow is in the reply direction. */ |
| 455 | #define OVS_CS_F_INVALID 0x10 /* Could not track connection. */ | 455 | #define OVS_CS_F_INVALID 0x10 /* Could not track connection. */ |
| 456 | #define OVS_CS_F_TRACKED 0x20 /* Conntrack has occurred. */ | 456 | #define OVS_CS_F_TRACKED 0x20 /* Conntrack has occurred. */ |
| 457 | #define OVS_CS_F_SRC_NAT 0x40 /* Packet's source address/port was | ||
| 458 | * mangled by NAT. | ||
| 459 | */ | ||
| 460 | #define OVS_CS_F_DST_NAT 0x80 /* Packet's destination address/port | ||
| 461 | * was mangled by NAT. | ||
| 462 | */ | ||
| 463 | |||
| 464 | #define OVS_CS_F_NAT_MASK (OVS_CS_F_SRC_NAT | OVS_CS_F_DST_NAT) | ||
| 457 | 465 | ||
| 458 | /** | 466 | /** |
| 459 | * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands. | 467 | * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands. |
| @@ -632,6 +640,8 @@ struct ovs_action_hash { | |||
| 632 | * mask. For each bit set in the mask, the corresponding bit in the value is | 640 | * mask. For each bit set in the mask, the corresponding bit in the value is |
| 633 | * copied to the connection tracking label field in the connection. | 641 | * copied to the connection tracking label field in the connection. |
| 634 | * @OVS_CT_ATTR_HELPER: variable length string defining conntrack ALG. | 642 | * @OVS_CT_ATTR_HELPER: variable length string defining conntrack ALG. |
| 643 | * @OVS_CT_ATTR_NAT: Nested OVS_NAT_ATTR_* for performing L3 network address | ||
| 644 | * translation (NAT) on the packet. | ||
| 635 | */ | 645 | */ |
| 636 | enum ovs_ct_attr { | 646 | enum ovs_ct_attr { |
| 637 | OVS_CT_ATTR_UNSPEC, | 647 | OVS_CT_ATTR_UNSPEC, |
| @@ -641,12 +651,51 @@ enum ovs_ct_attr { | |||
| 641 | OVS_CT_ATTR_LABELS, /* labels to associate with this connection. */ | 651 | OVS_CT_ATTR_LABELS, /* labels to associate with this connection. */ |
| 642 | OVS_CT_ATTR_HELPER, /* netlink helper to assist detection of | 652 | OVS_CT_ATTR_HELPER, /* netlink helper to assist detection of |
| 643 | related connections. */ | 653 | related connections. */ |
| 654 | OVS_CT_ATTR_NAT, /* Nested OVS_NAT_ATTR_* */ | ||
| 644 | __OVS_CT_ATTR_MAX | 655 | __OVS_CT_ATTR_MAX |
| 645 | }; | 656 | }; |
| 646 | 657 | ||
| 647 | #define OVS_CT_ATTR_MAX (__OVS_CT_ATTR_MAX - 1) | 658 | #define OVS_CT_ATTR_MAX (__OVS_CT_ATTR_MAX - 1) |
| 648 | 659 | ||
| 649 | /** | 660 | /** |
| 661 | * enum ovs_nat_attr - Attributes for %OVS_CT_ATTR_NAT. | ||
| 662 | * | ||
| 663 | * @OVS_NAT_ATTR_SRC: Flag for Source NAT (mangle source address/port). | ||
| 664 | * @OVS_NAT_ATTR_DST: Flag for Destination NAT (mangle destination | ||
| 665 | * address/port). Only one of (@OVS_NAT_ATTR_SRC, @OVS_NAT_ATTR_DST) may be | ||
| 666 | * specified. Effective only for packets for ct_state NEW connections. | ||
| 667 | * Packets of committed connections are mangled by the NAT action according to | ||
| 668 | * the committed NAT type regardless of the flags specified. As a corollary, a | ||
| 669 | * NAT action without a NAT type flag will only mangle packets of committed | ||
| 670 | * connections. The following NAT attributes only apply for NEW | ||
| 671 | * (non-committed) connections, and they may be included only when the CT | ||
| 672 | * action has the @OVS_CT_ATTR_COMMIT flag and either @OVS_NAT_ATTR_SRC or | ||
| 673 | * @OVS_NAT_ATTR_DST is also included. | ||
| 674 | * @OVS_NAT_ATTR_IP_MIN: struct in_addr or struct in6_addr | ||
| 675 | * @OVS_NAT_ATTR_IP_MAX: struct in_addr or struct in6_addr | ||
| 676 | * @OVS_NAT_ATTR_PROTO_MIN: u16 L4 protocol specific lower boundary (port) | ||
| 677 | * @OVS_NAT_ATTR_PROTO_MAX: u16 L4 protocol specific upper boundary (port) | ||
| 678 | * @OVS_NAT_ATTR_PERSISTENT: Flag for persistent IP mapping across reboots | ||
| 679 | * @OVS_NAT_ATTR_PROTO_HASH: Flag for pseudo random L4 port mapping (MD5) | ||
| 680 | * @OVS_NAT_ATTR_PROTO_RANDOM: Flag for fully randomized L4 port mapping | ||
| 681 | */ | ||
| 682 | enum ovs_nat_attr { | ||
| 683 | OVS_NAT_ATTR_UNSPEC, | ||
| 684 | OVS_NAT_ATTR_SRC, | ||
| 685 | OVS_NAT_ATTR_DST, | ||
| 686 | OVS_NAT_ATTR_IP_MIN, | ||
| 687 | OVS_NAT_ATTR_IP_MAX, | ||
| 688 | OVS_NAT_ATTR_PROTO_MIN, | ||
| 689 | OVS_NAT_ATTR_PROTO_MAX, | ||
| 690 | OVS_NAT_ATTR_PERSISTENT, | ||
| 691 | OVS_NAT_ATTR_PROTO_HASH, | ||
| 692 | OVS_NAT_ATTR_PROTO_RANDOM, | ||
| 693 | __OVS_NAT_ATTR_MAX, | ||
| 694 | }; | ||
| 695 | |||
| 696 | #define OVS_NAT_ATTR_MAX (__OVS_NAT_ATTR_MAX - 1) | ||
| 697 | |||
| 698 | /** | ||
| 650 | * enum ovs_action_attr - Action types. | 699 | * enum ovs_action_attr - Action types. |
| 651 | * | 700 | * |
| 652 | * @OVS_ACTION_ATTR_OUTPUT: Output packet to port. | 701 | * @OVS_ACTION_ATTR_OUTPUT: Output packet to port. |
diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h index 439873775d49..c43c5f78b9c4 100644 --- a/include/uapi/linux/pkt_cls.h +++ b/include/uapi/linux/pkt_cls.h | |||
| @@ -172,6 +172,7 @@ enum { | |||
| 172 | TCA_U32_INDEV, | 172 | TCA_U32_INDEV, |
| 173 | TCA_U32_PCNT, | 173 | TCA_U32_PCNT, |
| 174 | TCA_U32_MARK, | 174 | TCA_U32_MARK, |
| 175 | TCA_U32_FLAGS, | ||
| 175 | __TCA_U32_MAX | 176 | __TCA_U32_MAX |
| 176 | }; | 177 | }; |
| 177 | 178 | ||
| @@ -416,6 +417,8 @@ enum { | |||
| 416 | TCA_FLOWER_KEY_TCP_DST, /* be16 */ | 417 | TCA_FLOWER_KEY_TCP_DST, /* be16 */ |
| 417 | TCA_FLOWER_KEY_UDP_SRC, /* be16 */ | 418 | TCA_FLOWER_KEY_UDP_SRC, /* be16 */ |
| 418 | TCA_FLOWER_KEY_UDP_DST, /* be16 */ | 419 | TCA_FLOWER_KEY_UDP_DST, /* be16 */ |
| 420 | |||
| 421 | TCA_FLOWER_FLAGS, | ||
| 419 | __TCA_FLOWER_MAX, | 422 | __TCA_FLOWER_MAX, |
| 420 | }; | 423 | }; |
| 421 | 424 | ||
diff --git a/include/uapi/linux/rfkill.h b/include/uapi/linux/rfkill.h index 058757f7a733..2e00dcebebd0 100644 --- a/include/uapi/linux/rfkill.h +++ b/include/uapi/linux/rfkill.h | |||
| @@ -59,6 +59,8 @@ enum rfkill_type { | |||
| 59 | * @RFKILL_OP_DEL: a device was removed | 59 | * @RFKILL_OP_DEL: a device was removed |
| 60 | * @RFKILL_OP_CHANGE: a device's state changed -- userspace changes one device | 60 | * @RFKILL_OP_CHANGE: a device's state changed -- userspace changes one device |
| 61 | * @RFKILL_OP_CHANGE_ALL: userspace changes all devices (of a type, or all) | 61 | * @RFKILL_OP_CHANGE_ALL: userspace changes all devices (of a type, or all) |
| 62 | * into a state, also updating the default state used for devices that | ||
| 63 | * are hot-plugged later. | ||
| 62 | */ | 64 | */ |
| 63 | enum rfkill_operation { | 65 | enum rfkill_operation { |
| 64 | RFKILL_OP_ADD = 0, | 66 | RFKILL_OP_ADD = 0, |
diff --git a/include/uapi/linux/tc_act/tc_ife.h b/include/uapi/linux/tc_act/tc_ife.h new file mode 100644 index 000000000000..d648ff66586f --- /dev/null +++ b/include/uapi/linux/tc_act/tc_ife.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | #ifndef __UAPI_TC_IFE_H | ||
| 2 | #define __UAPI_TC_IFE_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | #include <linux/pkt_cls.h> | ||
| 6 | |||
| 7 | #define TCA_ACT_IFE 25 | ||
| 8 | /* Flag bits for now just encoding/decoding; mutually exclusive */ | ||
| 9 | #define IFE_ENCODE 1 | ||
| 10 | #define IFE_DECODE 0 | ||
| 11 | |||
| 12 | struct tc_ife { | ||
| 13 | tc_gen; | ||
| 14 | __u16 flags; | ||
| 15 | }; | ||
| 16 | |||
| 17 | /*XXX: We need to encode the total number of bytes consumed */ | ||
| 18 | enum { | ||
| 19 | TCA_IFE_UNSPEC, | ||
| 20 | TCA_IFE_PARMS, | ||
| 21 | TCA_IFE_TM, | ||
| 22 | TCA_IFE_DMAC, | ||
| 23 | TCA_IFE_SMAC, | ||
| 24 | TCA_IFE_TYPE, | ||
| 25 | TCA_IFE_METALST, | ||
| 26 | __TCA_IFE_MAX | ||
| 27 | }; | ||
| 28 | #define TCA_IFE_MAX (__TCA_IFE_MAX - 1) | ||
| 29 | |||
| 30 | #define IFE_META_SKBMARK 1 | ||
| 31 | #define IFE_META_HASHID 2 | ||
| 32 | #define IFE_META_PRIO 3 | ||
| 33 | #define IFE_META_QMAP 4 | ||
| 34 | /*Can be overridden at runtime by module option*/ | ||
| 35 | #define __IFE_META_MAX 5 | ||
| 36 | #define IFE_META_MAX (__IFE_META_MAX - 1) | ||
| 37 | |||
| 38 | #endif | ||
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h index 65a77b071e22..53e8e3fe6b1b 100644 --- a/include/uapi/linux/tcp.h +++ b/include/uapi/linux/tcp.h | |||
| @@ -196,6 +196,11 @@ struct tcp_info { | |||
| 196 | __u64 tcpi_bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived */ | 196 | __u64 tcpi_bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived */ |
| 197 | __u32 tcpi_segs_out; /* RFC4898 tcpEStatsPerfSegsOut */ | 197 | __u32 tcpi_segs_out; /* RFC4898 tcpEStatsPerfSegsOut */ |
| 198 | __u32 tcpi_segs_in; /* RFC4898 tcpEStatsPerfSegsIn */ | 198 | __u32 tcpi_segs_in; /* RFC4898 tcpEStatsPerfSegsIn */ |
| 199 | |||
| 200 | __u32 tcpi_notsent_bytes; | ||
| 201 | __u32 tcpi_min_rtt; | ||
| 202 | __u32 tcpi_data_segs_in; /* RFC4898 tcpEStatsDataSegsIn */ | ||
| 203 | __u32 tcpi_data_segs_out; /* RFC4898 tcpEStatsDataSegsOut */ | ||
| 199 | }; | 204 | }; |
| 200 | 205 | ||
| 201 | /* for TCP_MD5SIG socket option */ | 206 | /* for TCP_MD5SIG socket option */ |
