Pull networking updates from Jakub Kicinski: "Core: - Remove socket skb caches - Add a SO_RESERVE_MEM socket op to forward allocate buffer space and avoid memory accounting overhead on each message sent - Introduce managed neighbor entries - added by control plane and resolved by the kernel for use in acceleration paths (BPF / XDP right now, HW offload users will benefit as well) - Make neighbor eviction on link down controllable by userspace to work around WiFi networks with bad roaming implementations - vrf: Rework interaction with netfilter/conntrack - fq_codel: implement L4S style ce_threshold_ect1 marking - sch: Eliminate unnecessary RCU waits in mini_qdisc_pair_swap() BPF: - Add support for new btf kind BTF_KIND_TAG, arbitrary type tagging as implemented in LLVM14 - Introduce bpf_get_branch_snapshot() to capture Last Branch Records - Implement variadic trace_printk helper - Add a new Bloomfilter map type - Track <8-byte scalar spill and refill - Access hw timestamp through BPF's __sk_buff - Disallow unprivileged BPF by default - Document BPF licensing Netfilter: - Introduce egress hook for looking at raw outgoing packets - Allow matching on and modifying inner headers / payload data - Add NFT_META_IFTYPE to match on the interface type either from ingress or egress Protocols: - Multi-Path TCP: - increase default max additional subflows to 2 - rework forward memory allocation - add getsockopts: MPTCP_INFO, MPTCP_TCPINFO, MPTCP_SUBFLOW_ADDRS - MCTP flow support allowing lower layer drivers to configure msg muxing as needed - Automatic Multicast Tunneling (AMT) driver based on RFC7450 - HSR support the redbox supervision frames (IEC-62439-3:2018) - Support for the ip6ip6 encapsulation of IOAM - Netlink interface for CAN-FD's Transmitter Delay Compensation - Support SMC-Rv2 eliminating the current same-subnet restriction, by exploiting the UDP encapsulation feature of RoCE adapters - TLS: add SM4 GCM/CCM crypto support - Bluetooth: initial support for link quality and audio/codec offload Driver APIs: - Add a batched interface for RX buffer allocation in AF_XDP buffer pool - ethtool: Add ability to control transceiver modules' power mode - phy: Introduce supported interfaces bitmap to express MAC capabilities and simplify PHY code - Drop rtnl_lock from DSA .port_fdb_{add,del} callbacks New drivers: - WiFi driver for Realtek 8852AE 802.11ax devices (rtw89) - Ethernet driver for ASIX AX88796C SPI device (x88796c) Drivers: - Broadcom PHYs - support 72165, 7712 16nm PHYs - support IDDQ-SR for additional power savings - PHY support for QCA8081, QCA9561 PHYs - NXP DPAA2: support for IRQ coalescing - NXP Ethernet (enetc): support for software TCP segmentation - Renesas Ethernet (ravb) - support DMAC and EMAC blocks of Gigabit-capable IP found on RZ/G2L SoC - Intel 100G Ethernet - support for eswitch offload of TC/OvS flow API, including offload of GRE, VxLAN, Geneve tunneling - support application device queues - ability to assign Rx and Tx queues to application threads - PTP and PPS (pulse-per-second) extensions - Broadcom Ethernet (bnxt) - devlink health reporting and device reload extensions - Mellanox Ethernet (mlx5) - offload macvlan interfaces - support HW offload of TC rules involving OVS internal ports - support HW-GRO and header/data split - support application device queues - Marvell OcteonTx2: - add XDP support for PF - add PTP support for VF - Qualcomm Ethernet switch (qca8k): support for QCA8328 - Realtek Ethernet DSA switch (rtl8366rb) - support bridge offload - support STP, fast aging, disabling address learning - support for Realtek RTL8365MB-VC, a 4+1 port 10M/100M/1GE switch - Mellanox Ethernet/IB switch (mlxsw) - multi-level qdisc hierarchy offload (e.g. RED, prio and shaping) - offload root TBF qdisc as port shaper - support multiple routing interface MAC address prefixes - support for IP-in-IP with IPv6 underlay - MediaTek WiFi (mt76) - mt7921 - ASPM, 6GHz, SDIO and testmode support - mt7915 - LED and TWT support - Qualcomm WiFi (ath11k) - include channel rx and tx time in survey dump statistics - support for 80P80 and 160 MHz bandwidths - support channel 2 in 6 GHz band - spectral scan support for QCN9074 - support for rx decapsulation offload (data frames in 802.3 format) - Qualcomm phone SoC WiFi (wcn36xx) - enable Idle Mode Power Save (IMPS) to reduce power consumption during idle - Bluetooth driver support for MediaTek MT7922 and MT7921 - Enable support for AOSP Bluetooth extension in Qualcomm WCN399x and Realtek 8822C/8852A - Microsoft vNIC driver (mana) - support hibernation and kexec - Google vNIC driver (gve) - support for jumbo frames - implement Rx page reuse Refactor: - Make all writes to netdev->dev_addr go thru helpers, so that we can add this address to the address rbtree and handle the updates - Various TCP cleanups and optimizations including improvements to CPU cache use - Simplify the gnet_stats, Qdisc stats' handling and remove qdisc->running sequence counter - Driver changes and API updates to address devlink locking deficiencies" * tag 'net-next-for-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2122 commits) Revert "net: avoid double accounting for pure zerocopy skbs" selftests: net: add arp_ndisc_evict_nocarrier net: ndisc: introduce ndisc_evict_nocarrier sysctl parameter net: arp: introduce arp_evict_nocarrier sysctl parameter libbpf: Deprecate AF_XDP support kbuild: Unify options for BTF generation for vmlinux and modules selftests/bpf: Add a testcase for 64-bit bounds propagation issue. bpf: Fix propagation of signed bounds from 64-bit min/max into 32-bit. bpf: Fix propagation of bounds from 64-bit min/max into 32-bit and var_off. net: vmxnet3: remove multiple false checks in vmxnet3_ethtool.c net: avoid double accounting for pure zerocopy skbs tcp: rename sk_wmem_free_skb netdevsim: fix uninit value in nsim_drv_configure_vfs() selftests/bpf: Fix also no-alu32 strobemeta selftest bpf: Add missing map_delete_elem method to bloom filter map selftests/bpf: Add bloom map success test for userspace calls bpf: Add alignment padding for "map_extra" + consolidate holes bpf: Bloom filter map naming fixups selftests/bpf: Add test cases for struct_ops prog bpf: Add dummy BPF STRUCT_OPS for test purpose ...
Showing the changes to include/uapi/linux (24 of 2296 files). Show all
Unified · Split
| @@ -0,0 +1,62 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ | |
| 2 | +/* | |
| 3 | + * Copyright (c) 2021 Taehee Yoo <ap420073@gmail.com> | |
| 4 | + */ | |
| 5 | +#ifndef _UAPI_AMT_H_ | |
| 6 | +#define _UAPI_AMT_H_ | |
| 7 | + | |
| 8 | +enum ifla_amt_mode { | |
| 9 | + /* AMT interface works as Gateway mode. | |
| 10 | + * The Gateway mode encapsulates IGMP/MLD traffic and decapsulates | |
| 11 | + * multicast traffic. | |
| 12 | + */ | |
| 13 | + AMT_MODE_GATEWAY = 0, | |
| 14 | + /* AMT interface works as Relay mode. | |
| 15 | + * The Relay mode encapsulates multicast traffic and decapsulates | |
| 16 | + * IGMP/MLD traffic. | |
| 17 | + */ | |
| 18 | + AMT_MODE_RELAY, | |
| 19 | + __AMT_MODE_MAX, | |
| 20 | +}; | |
| 21 | + | |
| 22 | +#define AMT_MODE_MAX (__AMT_MODE_MAX - 1) | |
| 23 | + | |
| 24 | +enum { | |
| 25 | + IFLA_AMT_UNSPEC, | |
| 26 | + /* This attribute specify mode etier Gateway or Relay. */ | |
| 27 | + IFLA_AMT_MODE, | |
| 28 | + /* This attribute specify Relay port. | |
| 29 | + * AMT interface is created as Gateway mode, this attribute is used | |
| 30 | + * to specify relay(remote) port. | |
| 31 | + * AMT interface is created as Relay mode, this attribute is used | |
| 32 | + * as local port. | |
| 33 | + */ | |
| 34 | + IFLA_AMT_RELAY_PORT, | |
| 35 | + /* This attribute specify Gateway port. | |
| 36 | + * AMT interface is created as Gateway mode, this attribute is used | |
| 37 | + * as local port. | |
| 38 | + * AMT interface is created as Relay mode, this attribute is not used. | |
| 39 | + */ | |
| 40 | + IFLA_AMT_GATEWAY_PORT, | |
| 41 | + /* This attribute specify physical device */ | |
| 42 | + IFLA_AMT_LINK, | |
| 43 | + /* This attribute specify local ip address */ | |
| 44 | + IFLA_AMT_LOCAL_IP, | |
| 45 | + /* This attribute specify Relay ip address. | |
| 46 | + * So, this is not used by Relay. | |
| 47 | + */ | |
| 48 | + IFLA_AMT_REMOTE_IP, | |
| 49 | + /* This attribute specify Discovery ip address. | |
| 50 | + * When Gateway get started, it send discovery message to find the | |
| 51 | + * Relay's ip address. | |
| 52 | + * So, this is not used by Relay. | |
| 53 | + */ | |
| 54 | + IFLA_AMT_DISCOVERY_IP, | |
| 55 | + /* This attribute specify number of maximum tunnel. */ | |
| 56 | + IFLA_AMT_MAX_TUNNELS, | |
| 57 | + __IFLA_AMT_MAX, | |
| 58 | +}; | |
| 59 | + | |
| 60 | +#define IFLA_AMT_MAX (__IFLA_AMT_MAX - 1) | |
| 61 | + | |
| 62 | +#endif /* _UAPI_AMT_H_ */ | |
| @@ -906,6 +906,7 @@ enum bpf_map_type { · 905 unmodified lines | ||
| 906 | 906 | BPF_MAP_TYPE_RINGBUF, |
| 907 | 907 | BPF_MAP_TYPE_INODE_STORAGE, |
| 908 | 908 | BPF_MAP_TYPE_TASK_STORAGE, |
| 909 | + BPF_MAP_TYPE_BLOOM_FILTER, | |
| 909 | 910 | }; |
| 910 | 911 | |
| 911 | 912 | /* Note that tracing related programs such as |
| @@ -1274,6 +1275,13 @@ union bpf_attr { · 362 unmodified lines | ||
| 1274 | 1275 | * struct stored as the |
| 1275 | 1276 | * map value |
| 1276 | 1277 | */ |
| 1278 | + /* Any per-map-type extra fields | |
| 1279 | + * | |
| 1280 | + * BPF_MAP_TYPE_BLOOM_FILTER - the lowest 4 bits indicate the | |
| 1281 | + * number of hash functions (if 0, the bloom filter will default | |
| 1282 | + * to using 5 hash functions). | |
| 1283 | + */ | |
| 1284 | + __u64 map_extra; | |
| 1277 | 1285 | }; |
| 1278 | 1286 | |
| 1279 | 1287 | struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ |
| @@ -1629,7 +1637,7 @@ union bpf_attr { · 349 unmodified lines | ||
| 1629 | 1637 | * u32 bpf_get_smp_processor_id(void) |
| 1630 | 1638 | * Description |
| 1631 | 1639 | * Get the SMP (symmetric multiprocessing) processor id. Note that |
| 1632 | − * all programs run with preemption disabled, which means that the | |
| 1640 | + * all programs run with migration disabled, which means that the | |
| 1633 | 1641 | * SMP processor id is stable during all the execution of the |
| 1634 | 1642 | * program. |
| 1635 | 1643 | * Return |
| @@ -4046,7 +4054,7 @@ union bpf_attr { · 2410 unmodified lines | ||
| 4046 | 4054 | * arguments. The *data* are a **u64** array and corresponding format string |
| 4047 | 4055 | * values are stored in the array. For strings and pointers where pointees |
| 4048 | 4056 | * are accessed, only the pointer values are stored in the *data* array. |
| 4049 | − * The *data_len* is the size of *data* in bytes. | |
| 4057 | + * The *data_len* is the size of *data* in bytes - must be a multiple of 8. | |
| 4050 | 4058 | * |
| 4051 | 4059 | * Formats **%s**, **%p{i,I}{4,6}** requires to read kernel memory. |
| 4052 | 4060 | * Reading kernel memory may fail due to either invalid address or |
| @@ -4751,7 +4759,8 @@ union bpf_attr { · 698 unmodified lines | ||
| 4751 | 4759 | * Each format specifier in **fmt** corresponds to one u64 element |
| 4752 | 4760 | * in the **data** array. For strings and pointers where pointees |
| 4753 | 4761 | * are accessed, only the pointer values are stored in the *data* |
| 4754 | − * array. The *data_len* is the size of *data* in bytes. | |
| 4762 | + * array. The *data_len* is the size of *data* in bytes - must be | |
| 4763 | + * a multiple of 8. | |
| 4755 | 4764 | * |
| 4756 | 4765 | * Formats **%s** and **%p{i,I}{4,6}** require to read kernel |
| 4757 | 4766 | * memory. Reading kernel memory may fail due to either invalid |
| @@ -4877,6 +4886,58 @@ union bpf_attr { · 119 unmodified lines | ||
| 4877 | 4886 | * Get the struct pt_regs associated with **task**. |
| 4878 | 4887 | * Return |
| 4879 | 4888 | * A pointer to struct pt_regs. |
| 4889 | + * | |
| 4890 | + * long bpf_get_branch_snapshot(void *entries, u32 size, u64 flags) | |
| 4891 | + * Description | |
| 4892 | + * Get branch trace from hardware engines like Intel LBR. The | |
| 4893 | + * hardware engine is stopped shortly after the helper is | |
| 4894 | + * called. Therefore, the user need to filter branch entries | |
| 4895 | + * based on the actual use case. To capture branch trace | |
| 4896 | + * before the trigger point of the BPF program, the helper | |
| 4897 | + * should be called at the beginning of the BPF program. | |
| 4898 | + * | |
| 4899 | + * The data is stored as struct perf_branch_entry into output | |
| 4900 | + * buffer *entries*. *size* is the size of *entries* in bytes. | |
| 4901 | + * *flags* is reserved for now and must be zero. | |
| 4902 | + * | |
| 4903 | + * Return | |
| 4904 | + * On success, number of bytes written to *buf*. On error, a | |
| 4905 | + * negative value. | |
| 4906 | + * | |
| 4907 | + * **-EINVAL** if *flags* is not zero. | |
| 4908 | + * | |
| 4909 | + * **-ENOENT** if architecture does not support branch records. | |
| 4910 | + * | |
| 4911 | + * long bpf_trace_vprintk(const char *fmt, u32 fmt_size, const void *data, u32 data_len) | |
| 4912 | + * Description | |
| 4913 | + * Behaves like **bpf_trace_printk**\ () helper, but takes an array of u64 | |
| 4914 | + * to format and can handle more format args as a result. | |
| 4915 | + * | |
| 4916 | + * Arguments are to be used as in **bpf_seq_printf**\ () helper. | |
| 4917 | + * Return | |
| 4918 | + * The number of bytes written to the buffer, or a negative error | |
| 4919 | + * in case of failure. | |
| 4920 | + * | |
| 4921 | + * struct unix_sock *bpf_skc_to_unix_sock(void *sk) | |
| 4922 | + * Description | |
| 4923 | + * Dynamically cast a *sk* pointer to a *unix_sock* pointer. | |
| 4924 | + * Return | |
| 4925 | + * *sk* if casting is valid, or **NULL** otherwise. | |
| 4926 | + * | |
| 4927 | + * long bpf_kallsyms_lookup_name(const char *name, int name_sz, int flags, u64 *res) | |
| 4928 | + * Description | |
| 4929 | + * Get the address of a kernel symbol, returned in *res*. *res* is | |
| 4930 | + * set to 0 if the symbol is not found. | |
| 4931 | + * Return | |
| 4932 | + * On success, zero. On error, a negative value. | |
| 4933 | + * | |
| 4934 | + * **-EINVAL** if *flags* is not zero. | |
| 4935 | + * | |
| 4936 | + * **-EINVAL** if string *name* is not the same size as *name_sz*. | |
| 4937 | + * | |
| 4938 | + * **-ENOENT** if symbol is not found. | |
| 4939 | + * | |
| 4940 | + * **-EPERM** if caller does not have permission to obtain kernel address. | |
| 4880 | 4941 | */ |
| 4881 | 4942 | #define __BPF_FUNC_MAPPER(FN) \ |
| 4882 | 4943 | FN(unspec), \ |
| @@ -5055,6 +5116,10 @@ union bpf_attr { · 172 unmodified lines | ||
| 5055 | 5116 | FN(get_func_ip), \ |
| 5056 | 5117 | FN(get_attach_cookie), \ |
| 5057 | 5118 | FN(task_pt_regs), \ |
| 5119 | + FN(get_branch_snapshot), \ | |
| 5120 | + FN(trace_vprintk), \ | |
| 5121 | + FN(skc_to_unix_sock), \ | |
| 5122 | + FN(kallsyms_lookup_name), \ | |
| 5058 | 5123 | /* */ |
| 5059 | 5124 | |
| 5060 | 5125 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper |
| @@ -5284,6 +5349,8 @@ struct __sk_buff { · 223 unmodified lines | ||
| 5284 | 5349 | __u32 gso_segs; |
| 5285 | 5350 | __bpf_md_ptr(struct bpf_sock *, sk); |
| 5286 | 5351 | __u32 gso_size; |
| 5352 | + __u32 :32; /* Padding, future use. */ | |
| 5353 | + __u64 hwtstamp; | |
| 5287 | 5354 | }; |
| 5288 | 5355 | |
| 5289 | 5356 | struct bpf_tunnel_key { |
| @@ -5577,6 +5644,7 @@ struct bpf_prog_info { · 287 unmodified lines | ||
| 5577 | 5644 | __u64 run_time_ns; |
| 5578 | 5645 | __u64 run_cnt; |
| 5579 | 5646 | __u64 recursion_misses; |
| 5647 | + __u32 verified_insns; | |
| 5580 | 5648 | } __attribute__((aligned(8))); |
| 5581 | 5649 | |
| 5582 | 5650 | struct bpf_map_info { |
| @@ -5594,6 +5662,8 @@ struct bpf_map_info { · 11 unmodified lines | ||
| 5594 | 5662 | __u32 btf_id; |
| 5595 | 5663 | __u32 btf_key_type_id; |
| 5596 | 5664 | __u32 btf_value_type_id; |
| 5665 | + __u32 :32; /* alignment pad */ | |
| 5666 | + __u64 map_extra; | |
| 5597 | 5667 | } __attribute__((aligned(8))); |
| 5598 | 5668 | |
| 5599 | 5669 | struct bpf_btf_info { |
| @@ -43,7 +43,7 @@ struct btf_type { · 42 unmodified lines | ||
| 43 | 43 | * "size" tells the size of the type it is describing. |
| 44 | 44 | * |
| 45 | 45 | * "type" is used by PTR, TYPEDEF, VOLATILE, CONST, RESTRICT, |
| 46 | − * FUNC, FUNC_PROTO and VAR. | |
| 46 | + * FUNC, FUNC_PROTO, VAR and DECL_TAG. | |
| 47 | 47 | * "type" is a type_id referring to another type. |
| 48 | 48 | */ |
| 49 | 49 | union { |
| @@ -56,25 +56,29 @@ struct btf_type { · 6 unmodified lines | ||
| 56 | 56 | #define BTF_INFO_VLEN(info) ((info) & 0xffff) |
| 57 | 57 | #define BTF_INFO_KFLAG(info) ((info) >> 31) |
| 58 | 58 | |
| 59 | −#define BTF_KIND_UNKN 0 /* Unknown */ | |
| 60 | −#define BTF_KIND_INT 1 /* Integer */ | |
| 61 | −#define BTF_KIND_PTR 2 /* Pointer */ | |
| 62 | −#define BTF_KIND_ARRAY 3 /* Array */ | |
| 63 | −#define BTF_KIND_STRUCT 4 /* Struct */ | |
| 64 | −#define BTF_KIND_UNION 5 /* Union */ | |
| 65 | −#define BTF_KIND_ENUM 6 /* Enumeration */ | |
| 66 | −#define BTF_KIND_FWD 7 /* Forward */ | |
| 67 | −#define BTF_KIND_TYPEDEF 8 /* Typedef */ | |
| 68 | −#define BTF_KIND_VOLATILE 9 /* Volatile */ | |
| 69 | −#define BTF_KIND_CONST 10 /* Const */ | |
| 70 | −#define BTF_KIND_RESTRICT 11 /* Restrict */ | |
| 71 | −#define BTF_KIND_FUNC 12 /* Function */ | |
| 72 | −#define BTF_KIND_FUNC_PROTO 13 /* Function Proto */ | |
| 73 | −#define BTF_KIND_VAR 14 /* Variable */ | |
| 74 | −#define BTF_KIND_DATASEC 15 /* Section */ | |
| 75 | −#define BTF_KIND_FLOAT 16 /* Floating point */ | |
| 76 | −#define BTF_KIND_MAX BTF_KIND_FLOAT | |
| 77 | −#define NR_BTF_KINDS (BTF_KIND_MAX + 1) | |
| 59 | +enum { | |
| 60 | + BTF_KIND_UNKN = 0, /* Unknown */ | |
| 61 | + BTF_KIND_INT = 1, /* Integer */ | |
| 62 | + BTF_KIND_PTR = 2, /* Pointer */ | |
| 63 | + BTF_KIND_ARRAY = 3, /* Array */ | |
| 64 | + BTF_KIND_STRUCT = 4, /* Struct */ | |
| 65 | + BTF_KIND_UNION = 5, /* Union */ | |
| 66 | + BTF_KIND_ENUM = 6, /* Enumeration */ | |
| 67 | + BTF_KIND_FWD = 7, /* Forward */ | |
| 68 | + BTF_KIND_TYPEDEF = 8, /* Typedef */ | |
| 69 | + BTF_KIND_VOLATILE = 9, /* Volatile */ | |
| 70 | + BTF_KIND_CONST = 10, /* Const */ | |
| 71 | + BTF_KIND_RESTRICT = 11, /* Restrict */ | |
| 72 | + BTF_KIND_FUNC = 12, /* Function */ | |
| 73 | + BTF_KIND_FUNC_PROTO = 13, /* Function Proto */ | |
| 74 | + BTF_KIND_VAR = 14, /* Variable */ | |
| 75 | + BTF_KIND_DATASEC = 15, /* Section */ | |
| 76 | + BTF_KIND_FLOAT = 16, /* Floating point */ | |
| 77 | + BTF_KIND_DECL_TAG = 17, /* Decl Tag */ | |
| 78 | + | |
| 79 | + NR_BTF_KINDS, | |
| 80 | + BTF_KIND_MAX = NR_BTF_KINDS - 1, | |
| 81 | +}; | |
| 78 | 82 | |
| 79 | 83 | /* For some specific BTF_KIND, "struct btf_type" is immediately |
| 80 | 84 | * followed by extra data. |
| @@ -170,4 +174,15 @@ struct btf_var_secinfo { · 89 unmodified lines | ||
| 170 | 174 | __u32 size; |
| 171 | 175 | }; |
| 172 | 176 | |
| 177 | +/* BTF_KIND_DECL_TAG is followed by a single "struct btf_decl_tag" to describe | |
| 178 | + * additional information related to the tag applied location. | |
| 179 | + * If component_idx == -1, the tag is applied to a struct, union, | |
| 180 | + * variable or function. Otherwise, it is applied to a struct/union | |
| 181 | + * member or a func argument, and component_idx indicates which member | |
| 182 | + * or argument (0 ... vlen-1). | |
| 183 | + */ | |
| 184 | +struct btf_decl_tag { | |
| 185 | + __s32 component_idx; | |
| 186 | +}; | |
| 187 | + | |
| 173 | 188 | #endif /* _UAPI__LINUX_BTF_H__ */ |
| @@ -101,6 +101,8 @@ struct can_ctrlmode { · 100 unmodified lines | ||
| 101 | 101 | #define CAN_CTRLMODE_PRESUME_ACK 0x40 /* Ignore missing CAN ACKs */ |
| 102 | 102 | #define CAN_CTRLMODE_FD_NON_ISO 0x80 /* CAN FD in non-ISO mode */ |
| 103 | 103 | #define CAN_CTRLMODE_CC_LEN8_DLC 0x100 /* Classic CAN DLC option */ |
| 104 | +#define CAN_CTRLMODE_TDC_AUTO 0x200 /* CAN transiver automatically calculates TDCV */ | |
| 105 | +#define CAN_CTRLMODE_TDC_MANUAL 0x400 /* TDCV is manually set up by user */ | |
| 104 | 106 | |
| 105 | 107 | /* |
| 106 | 108 | * CAN device statistics |
| @@ -134,10 +136,35 @@ enum { · 27 unmodified lines | ||
| 134 | 136 | IFLA_CAN_BITRATE_CONST, |
| 135 | 137 | IFLA_CAN_DATA_BITRATE_CONST, |
| 136 | 138 | IFLA_CAN_BITRATE_MAX, |
| 137 | − __IFLA_CAN_MAX | |
| 139 | + IFLA_CAN_TDC, | |
| 140 | + | |
| 141 | + /* add new constants above here */ | |
| 142 | + __IFLA_CAN_MAX, | |
| 143 | + IFLA_CAN_MAX = __IFLA_CAN_MAX - 1 | |
| 138 | 144 | }; |
| 139 | 145 | |
| 140 | −#define IFLA_CAN_MAX (__IFLA_CAN_MAX - 1) | |
| 146 | +/* | |
| 147 | + * CAN FD Transmitter Delay Compensation (TDC) | |
| 148 | + * | |
| 149 | + * Please refer to struct can_tdc_const and can_tdc in | |
| 150 | + * include/linux/can/bittiming.h for further details. | |
| 151 | + */ | |
| 152 | +enum { | |
| 153 | + IFLA_CAN_TDC_UNSPEC, | |
| 154 | + IFLA_CAN_TDC_TDCV_MIN, /* u32 */ | |
| 155 | + IFLA_CAN_TDC_TDCV_MAX, /* u32 */ | |
| 156 | + IFLA_CAN_TDC_TDCO_MIN, /* u32 */ | |
| 157 | + IFLA_CAN_TDC_TDCO_MAX, /* u32 */ | |
| 158 | + IFLA_CAN_TDC_TDCF_MIN, /* u32 */ | |
| 159 | + IFLA_CAN_TDC_TDCF_MAX, /* u32 */ | |
| 160 | + IFLA_CAN_TDC_TDCV, /* u32 */ | |
| 161 | + IFLA_CAN_TDC_TDCO, /* u32 */ | |
| 162 | + IFLA_CAN_TDC_TDCF, /* u32 */ | |
| 163 | + | |
| 164 | + /* add new constants above here */ | |
| 165 | + __IFLA_CAN_TDC, | |
| 166 | + IFLA_CAN_TDC_MAX = __IFLA_CAN_TDC - 1 | |
| 167 | +}; | |
| 141 | 168 | |
| 142 | 169 | /* u16 termination range: 1..65535 Ohms */ |
| 143 | 170 | #define CAN_TERMINATION_DISABLED 0 |
| @@ -551,6 +551,8 @@ enum devlink_attr { · 550 unmodified lines | ||
| 551 | 551 | DEVLINK_ATTR_RATE_NODE_NAME, /* string */ |
| 552 | 552 | DEVLINK_ATTR_RATE_PARENT_NODE_NAME, /* string */ |
| 553 | 553 | |
| 554 | + DEVLINK_ATTR_REGION_MAX_SNAPSHOTS, /* u32 */ | |
| 555 | + | |
| 554 | 556 | /* add new attributes above here, update the policy in devlink.c */ |
| 555 | 557 | |
| 556 | 558 | __DEVLINK_ATTR_MAX, |
| @@ -603,6 +603,7 @@ enum ethtool_link_ext_state { · 602 unmodified lines | ||
| 603 | 603 | ETHTOOL_LINK_EXT_STATE_CALIBRATION_FAILURE, |
| 604 | 604 | ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED, |
| 605 | 605 | ETHTOOL_LINK_EXT_STATE_OVERHEAT, |
| 606 | + ETHTOOL_LINK_EXT_STATE_MODULE, | |
| 606 | 607 | }; |
| 607 | 608 | |
| 608 | 609 | /* More information in addition to ETHTOOL_LINK_EXT_STATE_AUTONEG. */ |
| @@ -649,6 +650,11 @@ enum ethtool_link_ext_substate_cable_issue { · 40 unmodified lines | ||
| 649 | 650 | ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE, |
| 650 | 651 | }; |
| 651 | 652 | |
| 653 | +/* More information in addition to ETHTOOL_LINK_EXT_STATE_MODULE. */ | |
| 654 | +enum ethtool_link_ext_substate_module { | |
| 655 | + ETHTOOL_LINK_EXT_SUBSTATE_MODULE_CMIS_NOT_READY = 1, | |
| 656 | +}; | |
| 657 | + | |
| 652 | 658 | #define ETH_GSTRING_LEN 32 |
| 653 | 659 | |
| 654 | 660 | /** |
| @@ -706,6 +712,29 @@ enum ethtool_stringset { · 51 unmodified lines | ||
| 706 | 712 | ETH_SS_COUNT |
| 707 | 713 | }; |
| 708 | 714 | |
| 715 | +/** | |
| 716 | + * enum ethtool_module_power_mode_policy - plug-in module power mode policy | |
| 717 | + * @ETHTOOL_MODULE_POWER_MODE_POLICY_HIGH: Module is always in high power mode. | |
| 718 | + * @ETHTOOL_MODULE_POWER_MODE_POLICY_AUTO: Module is transitioned by the host | |
| 719 | + * to high power mode when the first port using it is put administratively | |
| 720 | + * up and to low power mode when the last port using it is put | |
| 721 | + * administratively down. | |
| 722 | + */ | |
| 723 | +enum ethtool_module_power_mode_policy { | |
| 724 | + ETHTOOL_MODULE_POWER_MODE_POLICY_HIGH = 1, | |
| 725 | + ETHTOOL_MODULE_POWER_MODE_POLICY_AUTO, | |
| 726 | +}; | |
| 727 | + | |
| 728 | +/** | |
| 729 | + * enum ethtool_module_power_mode - plug-in module power mode | |
| 730 | + * @ETHTOOL_MODULE_POWER_MODE_LOW: Module is in low power mode. | |
| 731 | + * @ETHTOOL_MODULE_POWER_MODE_HIGH: Module is in high power mode. | |
| 732 | + */ | |
| 733 | +enum ethtool_module_power_mode { | |
| 734 | + ETHTOOL_MODULE_POWER_MODE_LOW = 1, | |
| 735 | + ETHTOOL_MODULE_POWER_MODE_HIGH, | |
| 736 | +}; | |
| 737 | + | |
| 709 | 738 | /** |
| 710 | 739 | * struct ethtool_gstrings - string set for data tagging |
| 711 | 740 | * @cmd: Command number = %ETHTOOL_GSTRINGS |
| @@ -47,6 +47,8 @@ enum { · 46 unmodified lines | ||
| 47 | 47 | ETHTOOL_MSG_MODULE_EEPROM_GET, |
| 48 | 48 | ETHTOOL_MSG_STATS_GET, |
| 49 | 49 | ETHTOOL_MSG_PHC_VCLOCKS_GET, |
| 50 | + ETHTOOL_MSG_MODULE_GET, | |
| 51 | + ETHTOOL_MSG_MODULE_SET, | |
| 50 | 52 | |
| 51 | 53 | /* add new constants above here */ |
| 52 | 54 | __ETHTOOL_MSG_USER_CNT, |
| @@ -90,6 +92,8 @@ enum { · 37 unmodified lines | ||
| 90 | 92 | ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY, |
| 91 | 93 | ETHTOOL_MSG_STATS_GET_REPLY, |
| 92 | 94 | ETHTOOL_MSG_PHC_VCLOCKS_GET_REPLY, |
| 95 | + ETHTOOL_MSG_MODULE_GET_REPLY, | |
| 96 | + ETHTOOL_MSG_MODULE_NTF, | |
| 93 | 97 | |
| 94 | 98 | /* add new constants above here */ |
| 95 | 99 | __ETHTOOL_MSG_KERNEL_CNT, |
| @@ -833,6 +837,19 @@ enum { · 737 unmodified lines | ||
| 833 | 837 | ETHTOOL_A_STATS_RMON_MAX = (__ETHTOOL_A_STATS_RMON_CNT - 1) |
| 834 | 838 | }; |
| 835 | 839 | |
| 840 | +/* MODULE */ | |
| 841 | + | |
| 842 | +enum { | |
| 843 | + ETHTOOL_A_MODULE_UNSPEC, | |
| 844 | + ETHTOOL_A_MODULE_HEADER, /* nest - _A_HEADER_* */ | |
| 845 | + ETHTOOL_A_MODULE_POWER_MODE_POLICY, /* u8 */ | |
| 846 | + ETHTOOL_A_MODULE_POWER_MODE, /* u8 */ | |
| 847 | + | |
| 848 | + /* add new constants above here */ | |
| 849 | + __ETHTOOL_A_MODULE_CNT, | |
| 850 | + ETHTOOL_A_MODULE_MAX = (__ETHTOOL_A_MODULE_CNT - 1) | |
| 851 | +}; | |
| 852 | + | |
| 836 | 853 | /* generic netlink info */ |
| 837 | 854 | #define ETHTOOL_GENL_NAME "ethtool" |
| 838 | 855 | #define ETHTOOL_GENL_VERSION 1 |
| @@ -86,6 +86,7 @@ · 85 unmodified lines | ||
| 86 | 86 | * over Ethernet |
| 87 | 87 | */ |
| 88 | 88 | #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ |
| 89 | +#define ETH_P_REALTEK 0x8899 /* Multiple proprietary protocols */ | |
| 89 | 90 | #define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ |
| 90 | 91 | #define ETH_P_8021AD 0x88A8 /* 802.1ad Service VLAN */ |
| 91 | 92 | #define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */ |
| @@ -9,9 +9,38 @@ · 8 unmodified lines | ||
| 9 | 9 | #ifndef _UAPI_LINUX_IOAM6_IPTUNNEL_H |
| 10 | 10 | #define _UAPI_LINUX_IOAM6_IPTUNNEL_H |
| 11 | 11 | |
| 12 | +/* Encap modes: | |
| 13 | + * - inline: direct insertion | |
| 14 | + * - encap: ip6ip6 encapsulation | |
| 15 | + * - auto: inline for local packets, encap for in-transit packets | |
| 16 | + */ | |
| 17 | +enum { | |
| 18 | + __IOAM6_IPTUNNEL_MODE_MIN, | |
| 19 | + | |
| 20 | + IOAM6_IPTUNNEL_MODE_INLINE, | |
| 21 | + IOAM6_IPTUNNEL_MODE_ENCAP, | |
| 22 | + IOAM6_IPTUNNEL_MODE_AUTO, | |
| 23 | + | |
| 24 | + __IOAM6_IPTUNNEL_MODE_MAX, | |
| 25 | +}; | |
| 26 | + | |
| 27 | +#define IOAM6_IPTUNNEL_MODE_MIN (__IOAM6_IPTUNNEL_MODE_MIN + 1) | |
| 28 | +#define IOAM6_IPTUNNEL_MODE_MAX (__IOAM6_IPTUNNEL_MODE_MAX - 1) | |
| 29 | + | |
| 12 | 30 | enum { |
| 13 | 31 | IOAM6_IPTUNNEL_UNSPEC, |
| 32 | + | |
| 33 | + /* Encap mode */ | |
| 34 | + IOAM6_IPTUNNEL_MODE, /* u8 */ | |
| 35 | + | |
| 36 | + /* Tunnel dst address. | |
| 37 | + * For encap,auto modes. | |
| 38 | + */ | |
| 39 | + IOAM6_IPTUNNEL_DST, /* struct in6_addr */ | |
| 40 | + | |
| 41 | + /* IOAM Trace Header */ | |
| 14 | 42 | IOAM6_IPTUNNEL_TRACE, /* struct ioam6_trace_hdr */ |
| 43 | + | |
| 15 | 44 | __IOAM6_IPTUNNEL_MAX, |
| 16 | 45 | }; |
| 17 | 46 | |
| @@ -169,6 +169,7 @@ enum · 168 unmodified lines | ||
| 169 | 169 | IPV4_DEVCONF_DROP_UNICAST_IN_L2_MULTICAST, |
| 170 | 170 | IPV4_DEVCONF_DROP_GRATUITOUS_ARP, |
| 171 | 171 | IPV4_DEVCONF_BC_FORWARDING, |
| 172 | + IPV4_DEVCONF_ARP_EVICT_NOCARRIER, | |
| 172 | 173 | __IPV4_DEVCONF_MAX |
| 173 | 174 | }; |
| 174 | 175 | |
| @@ -193,6 +193,7 @@ enum { · 192 unmodified lines | ||
| 193 | 193 | DEVCONF_IOAM6_ENABLED, |
| 194 | 194 | DEVCONF_IOAM6_ID, |
| 195 | 195 | DEVCONF_IOAM6_ID_WIDE, |
| 196 | + DEVCONF_NDISC_EVICT_NOCARRIER, | |
| 196 | 197 | DEVCONF_MAX |
| 197 | 198 | }; |
| 198 | 199 | |
| @@ -11,6 +11,7 @@ · 10 unmodified lines | ||
| 11 | 11 | |
| 12 | 12 | #include <linux/types.h> |
| 13 | 13 | #include <linux/socket.h> |
| 14 | +#include <linux/netdevice.h> | |
| 14 | 15 | |
| 15 | 16 | typedef __u8 mctp_eid_t; |
| 16 | 17 | |
| @@ -28,6 +29,14 @@ struct sockaddr_mctp { · 11 unmodified lines | ||
| 28 | 29 | __u8 __smctp_pad1; |
| 29 | 30 | }; |
| 30 | 31 | |
| 32 | +struct sockaddr_mctp_ext { | |
| 33 | + struct sockaddr_mctp smctp_base; | |
| 34 | + int smctp_ifindex; | |
| 35 | + __u8 smctp_halen; | |
| 36 | + __u8 __smctp_pad0[3]; | |
| 37 | + __u8 smctp_haddr[MAX_ADDR_LEN]; | |
| 38 | +}; | |
| 39 | + | |
| 31 | 40 | #define MCTP_NET_ANY 0x0 |
| 32 | 41 | |
| 33 | 42 | #define MCTP_ADDR_NULL 0x00 |
| @@ -36,4 +45,6 @@ struct sockaddr_mctp { · 2 unmodified lines | ||
| 36 | 45 | #define MCTP_TAG_MASK 0x07 |
| 37 | 46 | #define MCTP_TAG_OWNER 0x08 |
| 38 | 47 | |
| 48 | +#define MCTP_OPT_ADDR_EXT 1 | |
| 49 | + | |
| 39 | 50 | #endif /* __UAPI_MCTP_H */ |
| @@ -53,12 +53,14 @@ · 52 unmodified lines | ||
| 53 | 53 | #define MDIO_AN_EEE_LPABLE 61 /* EEE link partner ability */ |
| 54 | 54 | #define MDIO_AN_EEE_ADV2 62 /* EEE advertisement 2 */ |
| 55 | 55 | #define MDIO_AN_EEE_LPABLE2 63 /* EEE link partner ability 2 */ |
| 56 | +#define MDIO_AN_CTRL2 64 /* AN THP bypass request control */ | |
| 56 | 57 | |
| 57 | 58 | /* Media-dependent registers. */ |
| 58 | 59 | #define MDIO_PMA_10GBT_SWAPPOL 130 /* 10GBASE-T pair swap & polarity */ |
| 59 | 60 | #define MDIO_PMA_10GBT_TXPWR 131 /* 10GBASE-T TX power control */ |
| 60 | 61 | #define MDIO_PMA_10GBT_SNR 133 /* 10GBASE-T SNR margin, lane A. |
| 61 | 62 | * Lanes B-D are numbered 134-136. */ |
| 63 | +#define MDIO_PMA_10GBR_FSRT_CSR 147 /* 10GBASE-R fast retrain status and control */ | |
| 62 | 64 | #define MDIO_PMA_10GBR_FECABLE 170 /* 10GBASE-R FEC ability */ |
| 63 | 65 | #define MDIO_PCS_10GBX_STAT1 24 /* 10GBASE-X PCS status 1 */ |
| 64 | 66 | #define MDIO_PCS_10GBRT_STAT1 32 /* 10GBASE-R/-T PCS status 1 */ |
| @@ -239,6 +241,9 @@ · 174 unmodified lines | ||
| 239 | 241 | #define MDIO_PMA_10GBR_FECABLE_ABLE 0x0001 /* FEC ability */ |
| 240 | 242 | #define MDIO_PMA_10GBR_FECABLE_ERRABLE 0x0002 /* FEC error indic. ability */ |
| 241 | 243 | |
| 244 | +/* PMA 10GBASE-R Fast Retrain status and control register. */ | |
| 245 | +#define MDIO_PMA_10GBR_FSRT_ENABLE 0x0001 /* Fast retrain enable */ | |
| 246 | + | |
| 242 | 247 | /* PCS 10GBASE-R/-T status register 1. */ |
| 243 | 248 | #define MDIO_PCS_10GBRT_STAT1_BLKLK 0x0001 /* Block lock attained */ |
| 244 | 249 | |
| @@ -247,6 +252,7 @@ · 2 unmodified lines | ||
| 247 | 252 | #define MDIO_PCS_10GBRT_STAT2_BER 0x3f00 |
| 248 | 253 | |
| 249 | 254 | /* AN 10GBASE-T control register. */ |
| 255 | +#define MDIO_AN_10GBT_CTRL_ADVFSRT2_5G 0x0020 /* Advertise 2.5GBASE-T fast retrain */ | |
| 250 | 256 | #define MDIO_AN_10GBT_CTRL_ADV2_5G 0x0080 /* Advertise 2.5GBASE-T */ |
| 251 | 257 | #define MDIO_AN_10GBT_CTRL_ADV5G 0x0100 /* Advertise 5GBASE-T */ |
| 252 | 258 | #define MDIO_AN_10GBT_CTRL_ADV10G 0x1000 /* Advertise 10GBASE-T */ |
| @@ -289,6 +295,9 @@ · 36 unmodified lines | ||
| 289 | 295 | #define MDIO_EEE_2_5GT 0x0001 /* 2.5GT EEE cap */ |
| 290 | 296 | #define MDIO_EEE_5GT 0x0002 /* 5GT EEE cap */ |
| 291 | 297 | |
| 298 | +/* AN MultiGBASE-T AN control 2 */ | |
| 299 | +#define MDIO_AN_THP_BP2_5GT 0x0008 /* 2.5GT THP bypass request */ | |
| 300 | + | |
| 292 | 301 | /* 2.5G/5G Extended abilities register. */ |
| 293 | 302 | #define MDIO_PMA_NG_EXTABLE_2_5GBT 0x0001 /* 2.5GBASET ability */ |
| 294 | 303 | #define MDIO_PMA_NG_EXTABLE_5GBT 0x0002 /* 5GBASET ability */ |
| @@ -4,6 +4,13 @@ · 3 unmodified lines | ||
| 4 | 4 | |
| 5 | 5 | #include <linux/const.h> |
| 6 | 6 | #include <linux/types.h> |
| 7 | +#include <linux/in.h> /* for sockaddr_in */ | |
| 8 | +#include <linux/in6.h> /* for sockaddr_in6 */ | |
| 9 | +#include <linux/socket.h> /* for sockaddr_storage and sa_family */ | |
| 10 | + | |
| 11 | +#ifndef __KERNEL__ | |
| 12 | +#include <sys/socket.h> /* for struct sockaddr */ | |
| 13 | +#endif | |
| 7 | 14 | |
| 8 | 15 | #define MPTCP_SUBFLOW_FLAG_MCAP_REM _BITUL(0) |
| 9 | 16 | #define MPTCP_SUBFLOW_FLAG_MCAP_LOC _BITUL(1) |
| @@ -193,4 +200,32 @@ enum mptcp_event_attr { · 183 unmodified lines | ||
| 193 | 200 | #define MPTCP_RST_EBADPERF 5 |
| 194 | 201 | #define MPTCP_RST_EMIDDLEBOX 6 |
| 195 | 202 | |
| 203 | +struct mptcp_subflow_data { | |
| 204 | + __u32 size_subflow_data; /* size of this structure in userspace */ | |
| 205 | + __u32 num_subflows; /* must be 0, set by kernel */ | |
| 206 | + __u32 size_kernel; /* must be 0, set by kernel */ | |
| 207 | + __u32 size_user; /* size of one element in data[] */ | |
| 208 | +} __attribute__((aligned(8))); | |
| 209 | + | |
| 210 | +struct mptcp_subflow_addrs { | |
| 211 | + union { | |
| 212 | + __kernel_sa_family_t sa_family; | |
| 213 | + struct sockaddr sa_local; | |
| 214 | + struct sockaddr_in sin_local; | |
| 215 | + struct sockaddr_in6 sin6_local; | |
| 216 | + struct __kernel_sockaddr_storage ss_local; | |
| 217 | + }; | |
| 218 | + union { | |
| 219 | + struct sockaddr sa_remote; | |
| 220 | + struct sockaddr_in sin_remote; | |
| 221 | + struct sockaddr_in6 sin6_remote; | |
| 222 | + struct __kernel_sockaddr_storage ss_remote; | |
| 223 | + }; | |
| 224 | +}; | |
| 225 | + | |
| 226 | +/* MPTCP socket options */ | |
| 227 | +#define MPTCP_INFO 1 | |
| 228 | +#define MPTCP_TCPINFO 2 | |
| 229 | +#define MPTCP_SUBFLOW_ADDRS 3 | |
| 230 | + | |
| 196 | 231 | #endif /* _UAPI_MPTCP_H */ |
| @@ -31,6 +31,7 @@ enum { · 30 unmodified lines | ||
| 31 | 31 | NDA_PROTOCOL, /* Originator of entry */ |
| 32 | 32 | NDA_NH_ID, |
| 33 | 33 | NDA_FDB_EXT_ATTRS, |
| 34 | + NDA_FLAGS_EXT, | |
| 34 | 35 | __NDA_MAX |
| 35 | 36 | }; |
| 36 | 37 | |
| @@ -40,14 +41,16 @@ enum { · 3 unmodified lines | ||
| 40 | 41 | * Neighbor Cache Entry Flags |
| 41 | 42 | */ |
| 42 | 43 | |
| 43 | −#define NTF_USE 0x01 | |
| 44 | −#define NTF_SELF 0x02 | |
| 45 | −#define NTF_MASTER 0x04 | |
| 46 | −#define NTF_PROXY 0x08 /* == ATF_PUBL */ | |
| 47 | −#define NTF_EXT_LEARNED 0x10 | |
| 48 | −#define NTF_OFFLOADED 0x20 | |
| 49 | −#define NTF_STICKY 0x40 | |
| 50 | −#define NTF_ROUTER 0x80 | |
| 44 | +#define NTF_USE (1 << 0) | |
| 45 | +#define NTF_SELF (1 << 1) | |
| 46 | +#define NTF_MASTER (1 << 2) | |
| 47 | +#define NTF_PROXY (1 << 3) /* == ATF_PUBL */ | |
| 48 | +#define NTF_EXT_LEARNED (1 << 4) | |
| 49 | +#define NTF_OFFLOADED (1 << 5) | |
| 50 | +#define NTF_STICKY (1 << 6) | |
| 51 | +#define NTF_ROUTER (1 << 7) | |
| 52 | +/* Extended flags under NDA_FLAGS_EXT: */ | |
| 53 | +#define NTF_EXT_MANAGED (1 << 0) | |
| 51 | 54 | |
| 52 | 55 | /* |
| 53 | 56 | * Neighbor Cache Entry States. |
| @@ -65,12 +68,22 @@ enum { · 11 unmodified lines | ||
| 65 | 68 | #define NUD_PERMANENT 0x80 |
| 66 | 69 | #define NUD_NONE 0x00 |
| 67 | 70 | |
| 68 | −/* NUD_NOARP & NUD_PERMANENT are pseudostates, they never change | |
| 69 | − * and make no address resolution or NUD. | |
| 70 | − * NUD_PERMANENT also cannot be deleted by garbage collectors. | |
| 71 | +/* NUD_NOARP & NUD_PERMANENT are pseudostates, they never change and make no | |
| 72 | + * address resolution or NUD. | |
| 73 | + * | |
| 74 | + * NUD_PERMANENT also cannot be deleted by garbage collectors. This holds true | |
| 75 | + * for dynamic entries with NTF_EXT_LEARNED flag as well. However, upon carrier | |
| 76 | + * down event, NUD_PERMANENT entries are not flushed whereas NTF_EXT_LEARNED | |
| 77 | + * flagged entries explicitly are (which is also consistent with the routing | |
| 78 | + * subsystem). | |
| 79 | + * | |
| 71 | 80 | * When NTF_EXT_LEARNED is set for a bridge fdb entry the different cache entry |
| 72 | 81 | * states don't make sense and thus are ignored. Such entries don't age and |
| 73 | 82 | * can roam. |
| 83 | + * | |
| 84 | + * NTF_EXT_MANAGED flagged neigbor entries are managed by the kernel on behalf | |
| 85 | + * of a user space control plane, and automatically refreshed so that (if | |
| 86 | + * possible) they remain in NUD_REACHABLE state. | |
| 74 | 87 | */ |
| 75 | 88 | |
| 76 | 89 | struct nda_cacheinfo { |
| @@ -51,6 +51,7 @@ enum nf_inet_hooks { · 50 unmodified lines | ||
| 51 | 51 | |
| 52 | 52 | enum nf_dev_hooks { |
| 53 | 53 | NF_NETDEV_INGRESS, |
| 54 | + NF_NETDEV_EGRESS, | |
| 54 | 55 | NF_NETDEV_NUMHOOKS |
| 55 | 56 | }; |
| 56 | 57 | |
| @@ -753,11 +753,13 @@ enum nft_dynset_attributes { · 752 unmodified lines | ||
| 753 | 753 | * @NFT_PAYLOAD_LL_HEADER: link layer header |
| 754 | 754 | * @NFT_PAYLOAD_NETWORK_HEADER: network header |
| 755 | 755 | * @NFT_PAYLOAD_TRANSPORT_HEADER: transport header |
| 756 | + * @NFT_PAYLOAD_INNER_HEADER: inner header / payload | |
| 756 | 757 | */ |
| 757 | 758 | enum nft_payload_bases { |
| 758 | 759 | NFT_PAYLOAD_LL_HEADER, |
| 759 | 760 | NFT_PAYLOAD_NETWORK_HEADER, |
| 760 | 761 | NFT_PAYLOAD_TRANSPORT_HEADER, |
| 762 | + NFT_PAYLOAD_INNER_HEADER, | |
| 761 | 763 | }; |
| 762 | 764 | |
| 763 | 765 | /** |
| @@ -896,7 +898,8 @@ enum nft_meta_keys { · 132 unmodified lines | ||
| 896 | 898 | NFT_META_OIF, |
| 897 | 899 | NFT_META_IIFNAME, |
| 898 | 900 | NFT_META_OIFNAME, |
| 899 | − NFT_META_IIFTYPE, | |
| 901 | + NFT_META_IFTYPE, | |
| 902 | +#define NFT_META_IIFTYPE NFT_META_IFTYPE | |
| 900 | 903 | NFT_META_OIFTYPE, |
| 901 | 904 | NFT_META_SKUID, |
| 902 | 905 | NFT_META_SKGID, |
| @@ -923,6 +926,7 @@ enum nft_meta_keys { · 20 unmodified lines | ||
| 923 | 926 | NFT_META_TIME_HOUR, |
| 924 | 927 | NFT_META_SDIF, |
| 925 | 928 | NFT_META_SDIFNAME, |
| 929 | + __NFT_META_IIFTYPE, | |
| 926 | 930 | }; |
| 927 | 931 | |
| 928 | 932 | /** |
| @@ -13,6 +13,35 @@ · 12 unmodified lines | ||
| 13 | 13 | * enum iwl_mvm_vendor_cmd - supported vendor commands |
| 14 | 14 | * @IWL_MVM_VENDOR_CMD_GET_CSME_CONN_INFO: reports CSME connection info. |
| 15 | 15 | * @IWL_MVM_VENDOR_CMD_HOST_GET_OWNERSHIP: asks for ownership on the device. |
| 16 | + * This is useful when the CSME firmware owns the device and the kernel | |
| 17 | + * wants to use it. In case the CSME firmware has no connection active the | |
| 18 | + * kernel will manage on its own to get ownership of the device. | |
| 19 | + * When the CSME firmware has an active connection, the user space | |
| 20 | + * involvement is required. The kernel will assert the RFKILL signal with | |
| 21 | + * the "device not owned" reason so that nobody can touch the device. Then | |
| 22 | + * the user space can run the following flow to be able to get connected | |
| 23 | + * to the very same AP the CSME firmware is currently connected to: | |
| 24 | + * | |
| 25 | + * 1) The user space (NetworkManager) boots and sees that the device is | |
| 26 | + * in RFKILL because the host doesn't own the device | |
| 27 | + * 2) The user space asks the kernel what AP the CSME firmware is | |
| 28 | + * connected to (with %IWL_MVM_VENDOR_CMD_GET_CSME_CONN_INFO) | |
| 29 | + * 3) The user space checks if it has a profile that matches the reply | |
| 30 | + * from the CSME firmware | |
| 31 | + * 4) The user space installs a network to the wpa_supplicant with a | |
| 32 | + * specific BSSID and a specific frequency | |
| 33 | + * 5) The user space prevents any type of full scan | |
| 34 | + * 6) The user space asks iwlmei to request ownership on the device (with | |
| 35 | + * this command) | |
| 36 | + * 7) iwlmei requests ownership from the CSME firmware | |
| 37 | + * 8) The CSME firmware grants ownership | |
| 38 | + * 9) iwlmei tells iwlwifi to lift the RFKILL | |
| 39 | + * 10) RFKILL OFF is reported to user space | |
| 40 | + * 11) The host boots the device, loads the firwmare, and connects to a | |
| 41 | + * specific BSSID without scanning including IP as fast as it can | |
| 42 | + * 12) The host reports to the CSME firmware that there is a connection | |
| 43 | + * 13) The TCP connection is preserved and the host has connectivity | |
| 44 | + * | |
| 16 | 45 | * @IWL_MVM_VENDOR_CMD_ROAMING_FORBIDDEN_EVENT: notifies if roaming is allowed. |
| 17 | 46 | * It contains a &IWL_MVM_VENDOR_ATTR_ROAMING_FORBIDDEN and a |
| 18 | 47 | * &IWL_MVM_VENDOR_ATTR_VIF_ADDR attributes. |
| @@ -300,6 +300,29 @@ · 299 unmodified lines | ||
| 300 | 300 | * the interface goes down. |
| 301 | 301 | */ |
| 302 | 302 | |
| 303 | +/** | |
| 304 | + * DOC: FILS shared key crypto offload | |
| 305 | + * | |
| 306 | + * This feature is applicable to drivers running in AP mode. | |
| 307 | + * | |
| 308 | + * FILS shared key crypto offload can be advertised by drivers by setting | |
| 309 | + * @NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD flag. The drivers that support | |
| 310 | + * FILS shared key crypto offload should be able to encrypt and decrypt | |
| 311 | + * association frames for FILS shared key authentication as per IEEE 802.11ai. | |
| 312 | + * With this capability, for FILS key derivation, drivers depend on userspace. | |
| 313 | + * | |
| 314 | + * After FILS key derivation, userspace shares the FILS AAD details with the | |
| 315 | + * driver and the driver stores the same to use in decryption of association | |
| 316 | + * request and in encryption of association response. The below parameters | |
| 317 | + * should be given to the driver in %NL80211_CMD_SET_FILS_AAD. | |
| 318 | + * %NL80211_ATTR_MAC - STA MAC address, used for storing FILS AAD per STA | |
| 319 | + * %NL80211_ATTR_FILS_KEK - Used for encryption or decryption | |
| 320 | + * %NL80211_ATTR_FILS_NONCES - Used for encryption or decryption | |
| 321 | + * (STA Nonce 16 bytes followed by AP Nonce 16 bytes) | |
| 322 | + * | |
| 323 | + * Once the association is done, the driver cleans the FILS AAD data. | |
| 324 | + */ | |
| 325 | + | |
| 303 | 326 | /** |
| 304 | 327 | * enum nl80211_commands - supported nl80211 commands |
| 305 | 328 | * |
| @@ -337,7 +360,10 @@ · 31 unmodified lines | ||
| 337 | 360 | * @NL80211_CMD_DEL_INTERFACE: Virtual interface was deleted, has attributes |
| 338 | 361 | * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_WIPHY. Can also be sent from |
| 339 | 362 | * userspace to request deletion of a virtual interface, then requires |
| 340 | − * attribute %NL80211_ATTR_IFINDEX. | |
| 363 | + * attribute %NL80211_ATTR_IFINDEX. If multiple BSSID advertisements are | |
| 364 | + * enabled using %NL80211_ATTR_MBSSID_CONFIG, %NL80211_ATTR_MBSSID_ELEMS, | |
| 365 | + * and if this command is used for the transmitting interface, then all | |
| 366 | + * the non-transmitting interfaces are deleted as well. | |
| 341 | 367 | * |
| 342 | 368 | * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified |
| 343 | 369 | * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC. |
| @@ -1200,6 +1226,12 @@ · 856 unmodified lines | ||
| 1200 | 1226 | * @NL80211_CMD_COLOR_CHANGE_COMPLETED: Notify userland that the color change |
| 1201 | 1227 | * has completed |
| 1202 | 1228 | * |
| 1229 | + * @NL80211_CMD_SET_FILS_AAD: Set FILS AAD data to the driver using - | |
| 1230 | + * &NL80211_ATTR_MAC - for STA MAC address | |
| 1231 | + * &NL80211_ATTR_FILS_KEK - for KEK | |
| 1232 | + * &NL80211_ATTR_FILS_NONCES - for FILS Nonces | |
| 1233 | + * (STA Nonce 16 bytes followed by AP Nonce 16 bytes) | |
| 1234 | + * | |
| 1203 | 1235 | * @NL80211_CMD_MAX: highest used command number |
| 1204 | 1236 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 1205 | 1237 | */ |
| @@ -1440,6 +1472,8 @@ enum nl80211_commands { · 234 unmodified lines | ||
| 1440 | 1472 | NL80211_CMD_COLOR_CHANGE_ABORTED, |
| 1441 | 1473 | NL80211_CMD_COLOR_CHANGE_COMPLETED, |
| 1442 | 1474 | |
| 1475 | + NL80211_CMD_SET_FILS_AAD, | |
| 1476 | + | |
| 1443 | 1477 | /* add new commands above here */ |
| 1444 | 1478 | |
| 1445 | 1479 | /* used to define NL80211_CMD_MAX below */ |
| @@ -2593,6 +2627,18 @@ enum nl80211_commands { · 1147 unmodified lines | ||
| 2593 | 2627 | * @NL80211_ATTR_COLOR_CHANGE_ELEMS: Nested set of attributes containing the IE |
| 2594 | 2628 | * information for the time while performing a color switch. |
| 2595 | 2629 | * |
| 2630 | + * @NL80211_ATTR_MBSSID_CONFIG: Nested attribute for multiple BSSID | |
| 2631 | + * advertisements (MBSSID) parameters in AP mode. | |
| 2632 | + * Kernel uses this attribute to indicate the driver's support for MBSSID | |
| 2633 | + * and enhanced multi-BSSID advertisements (EMA AP) to the userspace. | |
| 2634 | + * Userspace should use this attribute to configure per interface MBSSID | |
| 2635 | + * parameters. | |
| 2636 | + * See &enum nl80211_mbssid_config_attributes for details. | |
| 2637 | + * | |
| 2638 | + * @NL80211_ATTR_MBSSID_ELEMS: Nested parameter to pass multiple BSSID elements. | |
| 2639 | + * Mandatory parameter for the transmitting interface to enable MBSSID. | |
| 2640 | + * Optional for the non-transmitting interfaces. | |
| 2641 | + * | |
| 2596 | 2642 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 2597 | 2643 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 2598 | 2644 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| @@ -3096,6 +3142,9 @@ enum nl80211_attrs { · 497 unmodified lines | ||
| 3096 | 3142 | NL80211_ATTR_COLOR_CHANGE_COLOR, |
| 3097 | 3143 | NL80211_ATTR_COLOR_CHANGE_ELEMS, |
| 3098 | 3144 | |
| 3145 | + NL80211_ATTR_MBSSID_CONFIG, | |
| 3146 | + NL80211_ATTR_MBSSID_ELEMS, | |
| 3147 | + | |
| 3099 | 3148 | /* add attributes here, update the policy in nl80211.c */ |
| 3100 | 3149 | |
| 3101 | 3150 | __NL80211_ATTR_AFTER_LAST, |
| @@ -4929,6 +4978,7 @@ enum nl80211_txrate_gi { · 1827 unmodified lines | ||
| 4929 | 4978 | * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 69.12 GHz) |
| 4930 | 4979 | * @NL80211_BAND_6GHZ: around 6 GHz band (5.9 - 7.2 GHz) |
| 4931 | 4980 | * @NL80211_BAND_S1GHZ: around 900MHz, supported by S1G PHYs |
| 4981 | + * @NL80211_BAND_LC: light communication band (placeholder) | |
| 4932 | 4982 | * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace |
| 4933 | 4983 | * since newer kernel versions may support more bands |
| 4934 | 4984 | */ |
| @@ -4938,6 +4988,7 @@ enum nl80211_band { · 3 unmodified lines | ||
| 4938 | 4988 | NL80211_BAND_60GHZ, |
| 4939 | 4989 | NL80211_BAND_6GHZ, |
| 4940 | 4990 | NL80211_BAND_S1GHZ, |
| 4991 | + NL80211_BAND_LC, | |
| 4941 | 4992 | |
| 4942 | 4993 | NUM_NL80211_BANDS, |
| 4943 | 4994 | }; |
| @@ -5995,6 +6046,11 @@ enum nl80211_feature_flags { · 1051 unmodified lines | ||
| 5995 | 6046 | * @NL80211_EXT_FEATURE_BSS_COLOR: The driver supports BSS color collision |
| 5996 | 6047 | * detection and change announcemnts. |
| 5997 | 6048 | * |
| 6049 | + * @NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD: Driver running in AP mode supports | |
| 6050 | + * FILS encryption and decryption for (Re)Association Request and Response | |
| 6051 | + * frames. Userspace has to share FILS AAD details to the driver by using | |
| 6052 | + * @NL80211_CMD_SET_FILS_AAD. | |
| 6053 | + * | |
| 5998 | 6054 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
| 5999 | 6055 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
| 6000 | 6056 | */ |
| @@ -6060,6 +6116,7 @@ enum nl80211_ext_feature_index { · 59 unmodified lines | ||
| 6060 | 6116 | NL80211_EXT_FEATURE_SECURE_RTT, |
| 6061 | 6117 | NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE, |
| 6062 | 6118 | NL80211_EXT_FEATURE_BSS_COLOR, |
| 6119 | + NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD, | |
| 6063 | 6120 | |
| 6064 | 6121 | /* add new features before the definition below */ |
| 6065 | 6122 | NUM_NL80211_EXT_FEATURES, |
| @@ -7349,4 +7406,60 @@ enum nl80211_sar_specs_attrs { · 1283 unmodified lines | ||
| 7349 | 7406 | NL80211_SAR_ATTR_SPECS_MAX = __NL80211_SAR_ATTR_SPECS_LAST - 1, |
| 7350 | 7407 | }; |
| 7351 | 7408 | |
| 7409 | +/** | |
| 7410 | + * enum nl80211_mbssid_config_attributes - multiple BSSID (MBSSID) and enhanced | |
| 7411 | + * multi-BSSID advertisements (EMA) in AP mode. | |
| 7412 | + * Kernel uses some of these attributes to advertise driver's support for | |
| 7413 | + * MBSSID and EMA. | |
| 7414 | + * Remaining attributes should be used by the userspace to configure the | |
| 7415 | + * features. | |
| 7416 | + * | |
| 7417 | + * @__NL80211_MBSSID_CONFIG_ATTR_INVALID: Invalid | |
| 7418 | + * | |
| 7419 | + * @NL80211_MBSSID_CONFIG_ATTR_MAX_INTERFACES: Used by the kernel to advertise | |
| 7420 | + * the maximum number of MBSSID interfaces supported by the driver. | |
| 7421 | + * Driver should indicate MBSSID support by setting | |
| 7422 | + * wiphy->mbssid_max_interfaces to a value more than or equal to 2. | |
| 7423 | + * | |
| 7424 | + * @NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY: Used by the kernel | |
| 7425 | + * to advertise the maximum profile periodicity supported by the driver | |
| 7426 | + * if EMA is enabled. Driver should indicate EMA support to the userspace | |
| 7427 | + * by setting wiphy->ema_max_profile_periodicity to | |
| 7428 | + * a non-zero value. | |
| 7429 | + * | |
| 7430 | + * @NL80211_MBSSID_CONFIG_ATTR_INDEX: Mandatory parameter to pass the index of | |
| 7431 | + * this BSS (u8) in the multiple BSSID set. | |
| 7432 | + * Value must be set to 0 for the transmitting interface and non-zero for | |
| 7433 | + * all non-transmitting interfaces. The userspace will be responsible | |
| 7434 | + * for using unique indices for the interfaces. | |
| 7435 | + * Range: 0 to wiphy->mbssid_max_interfaces-1. | |
| 7436 | + * | |
| 7437 | + * @NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX: Mandatory parameter for | |
| 7438 | + * a non-transmitted profile which provides the interface index (u32) of | |
| 7439 | + * the transmitted profile. The value must match one of the interface | |
| 7440 | + * indices advertised by the kernel. Optional if the interface being set up | |
| 7441 | + * is the transmitting one, however, if provided then the value must match | |
| 7442 | + * the interface index of the same. | |
| 7443 | + * | |
| 7444 | + * @NL80211_MBSSID_CONFIG_ATTR_EMA: Flag used to enable EMA AP feature. | |
| 7445 | + * Setting this flag is permitted only if the driver advertises EMA support | |
| 7446 | + * by setting wiphy->ema_max_profile_periodicity to non-zero. | |
| 7447 | + * | |
| 7448 | + * @__NL80211_MBSSID_CONFIG_ATTR_LAST: Internal | |
| 7449 | + * @NL80211_MBSSID_CONFIG_ATTR_MAX: highest attribute | |
| 7450 | + */ | |
| 7451 | +enum nl80211_mbssid_config_attributes { | |
| 7452 | + __NL80211_MBSSID_CONFIG_ATTR_INVALID, | |
| 7453 | + | |
| 7454 | + NL80211_MBSSID_CONFIG_ATTR_MAX_INTERFACES, | |
| 7455 | + NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY, | |
| 7456 | + NL80211_MBSSID_CONFIG_ATTR_INDEX, | |
| 7457 | + NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX, | |
| 7458 | + NL80211_MBSSID_CONFIG_ATTR_EMA, | |
| 7459 | + | |
| 7460 | + /* keep last */ | |
| 7461 | + __NL80211_MBSSID_CONFIG_ATTR_LAST, | |
| 7462 | + NL80211_MBSSID_CONFIG_ATTR_MAX = __NL80211_MBSSID_CONFIG_ATTR_LAST - 1, | |
| 7463 | +}; | |
| 7464 | + | |
| 7352 | 7465 | #endif /* __LINUX_NL80211_H */ |
| @@ -840,6 +840,8 @@ enum { · 839 unmodified lines | ||
| 840 | 840 | TCA_FQ_CODEL_CE_THRESHOLD, |
| 841 | 841 | TCA_FQ_CODEL_DROP_BATCH_SIZE, |
| 842 | 842 | TCA_FQ_CODEL_MEMORY_LIMIT, |
| 843 | + TCA_FQ_CODEL_CE_THRESHOLD_SELECTOR, | |
| 844 | + TCA_FQ_CODEL_CE_THRESHOLD_MASK, | |
| 843 | 845 | __TCA_FQ_CODEL_MAX |
| 844 | 846 | }; |
| 845 | 847 | |
| @@ -38,6 +38,9 @@ enum { /* SMC PNET Table commands */ · 37 unmodified lines | ||
| 38 | 38 | #define SMC_GENL_FAMILY_VERSION 1 |
| 39 | 39 | |
| 40 | 40 | #define SMC_PCI_ID_STR_LEN 16 /* Max length of pci id string */ |
| 41 | +#define SMC_MAX_HOSTNAME_LEN 32 /* Max length of the hostname */ | |
| 42 | +#define SMC_MAX_UEID 4 /* Max number of user EIDs */ | |
| 43 | +#define SMC_MAX_EID_LEN 32 /* Max length of an EID */ | |
| 41 | 44 | |
| 42 | 45 | /* SMC_GENL_FAMILY commands */ |
| 43 | 46 | enum { |
| @@ -49,6 +52,13 @@ enum { · 5 unmodified lines | ||
| 49 | 52 | SMC_NETLINK_GET_DEV_SMCR, |
| 50 | 53 | SMC_NETLINK_GET_STATS, |
| 51 | 54 | SMC_NETLINK_GET_FBACK_STATS, |
| 55 | + SMC_NETLINK_DUMP_UEID, | |
| 56 | + SMC_NETLINK_ADD_UEID, | |
| 57 | + SMC_NETLINK_REMOVE_UEID, | |
| 58 | + SMC_NETLINK_FLUSH_UEID, | |
| 59 | + SMC_NETLINK_DUMP_SEID, | |
| 60 | + SMC_NETLINK_ENABLE_SEID, | |
| 61 | + SMC_NETLINK_DISABLE_SEID, | |
| 52 | 62 | }; |
| 53 | 63 | |
| 54 | 64 | /* SMC_GENL_FAMILY top level attributes */ |
| @@ -74,17 +84,28 @@ enum { · 19 unmodified lines | ||
| 74 | 84 | SMC_NLA_SYS_IS_ISM_V2, /* u8 */ |
| 75 | 85 | SMC_NLA_SYS_LOCAL_HOST, /* string */ |
| 76 | 86 | SMC_NLA_SYS_SEID, /* string */ |
| 87 | + SMC_NLA_SYS_IS_SMCR_V2, /* u8 */ | |
| 77 | 88 | __SMC_NLA_SYS_MAX, |
| 78 | 89 | SMC_NLA_SYS_MAX = __SMC_NLA_SYS_MAX - 1 |
| 79 | 90 | }; |
| 80 | 91 | |
| 81 | −/* SMC_NLA_LGR_V2 nested attributes */ | |
| 92 | +/* SMC_NLA_LGR_D_V2_COMMON and SMC_NLA_LGR_R_V2_COMMON nested attributes */ | |
| 82 | 93 | enum { |
| 83 | 94 | SMC_NLA_LGR_V2_VER, /* u8 */ |
| 84 | 95 | SMC_NLA_LGR_V2_REL, /* u8 */ |
| 85 | 96 | SMC_NLA_LGR_V2_OS, /* u8 */ |
| 86 | 97 | SMC_NLA_LGR_V2_NEG_EID, /* string */ |
| 87 | 98 | SMC_NLA_LGR_V2_PEER_HOST, /* string */ |
| 99 | + __SMC_NLA_LGR_V2_MAX, | |
| 100 | + SMC_NLA_LGR_V2_MAX = __SMC_NLA_LGR_V2_MAX - 1 | |
| 101 | +}; | |
| 102 | + | |
| 103 | +/* SMC_NLA_LGR_R_V2 nested attributes */ | |
| 104 | +enum { | |
| 105 | + SMC_NLA_LGR_R_V2_UNSPEC, | |
| 106 | + SMC_NLA_LGR_R_V2_DIRECT, /* u8 */ | |
| 107 | + __SMC_NLA_LGR_R_V2_MAX, | |
| 108 | + SMC_NLA_LGR_R_V2_MAX = __SMC_NLA_LGR_R_V2_MAX - 1 | |
| 88 | 109 | }; |
| 89 | 110 | |
| 90 | 111 | /* SMC_GEN_LGR_SMCR attributes */ |
| @@ -96,6 +117,8 @@ enum { · 5 unmodified lines | ||
| 96 | 117 | SMC_NLA_LGR_R_PNETID, /* string */ |
| 97 | 118 | SMC_NLA_LGR_R_VLAN_ID, /* u8 */ |
| 98 | 119 | SMC_NLA_LGR_R_CONNS_NUM, /* u32 */ |
| 120 | + SMC_NLA_LGR_R_V2_COMMON, /* nest */ | |
| 121 | + SMC_NLA_LGR_R_V2, /* nest */ | |
| 99 | 122 | __SMC_NLA_LGR_R_MAX, |
| 100 | 123 | SMC_NLA_LGR_R_MAX = __SMC_NLA_LGR_R_MAX - 1 |
| 101 | 124 | }; |
| @@ -128,7 +151,7 @@ enum { · 26 unmodified lines | ||
| 128 | 151 | SMC_NLA_LGR_D_PNETID, /* string */ |
| 129 | 152 | SMC_NLA_LGR_D_CHID, /* u16 */ |
| 130 | 153 | SMC_NLA_LGR_D_PAD, /* flag */ |
| 131 | − SMC_NLA_LGR_V2, /* nest */ | |
| 154 | + SMC_NLA_LGR_D_V2_COMMON, /* nest */ | |
| 132 | 155 | __SMC_NLA_LGR_D_MAX, |
| 133 | 156 | SMC_NLA_LGR_D_MAX = __SMC_NLA_LGR_D_MAX - 1 |
| 134 | 157 | }; |
| @@ -242,4 +265,21 @@ enum { · 107 unmodified lines | ||
| 242 | 265 | __SMC_NLA_FBACK_STATS_MAX, |
| 243 | 266 | SMC_NLA_FBACK_STATS_MAX = __SMC_NLA_FBACK_STATS_MAX - 1 |
| 244 | 267 | }; |
| 268 | + | |
| 269 | +/* SMC_NETLINK_UEID attributes */ | |
| 270 | +enum { | |
| 271 | + SMC_NLA_EID_TABLE_UNSPEC, | |
| 272 | + SMC_NLA_EID_TABLE_ENTRY, /* string */ | |
| 273 | + __SMC_NLA_EID_TABLE_MAX, | |
| 274 | + SMC_NLA_EID_TABLE_MAX = __SMC_NLA_EID_TABLE_MAX - 1 | |
| 275 | +}; | |
| 276 | + | |
| 277 | +/* SMC_NETLINK_SEID attributes */ | |
| 278 | +enum { | |
| 279 | + SMC_NLA_SEID_UNSPEC, | |
| 280 | + SMC_NLA_SEID_ENTRY, /* string */ | |
| 281 | + SMC_NLA_SEID_ENABLED, /* u8 */ | |
| 282 | + __SMC_NLA_SEID_TABLE_MAX, | |
| 283 | + SMC_NLA_SEID_TABLE_MAX = __SMC_NLA_SEID_TABLE_MAX - 1 | |
| 284 | +}; | |
| 245 | 285 | #endif /* _UAPI_LINUX_SMC_H */ |
| @@ -482,6 +482,7 @@ enum · 481 unmodified lines | ||
| 482 | 482 | NET_IPV4_CONF_PROMOTE_SECONDARIES=20, |
| 483 | 483 | NET_IPV4_CONF_ARP_ACCEPT=21, |
| 484 | 484 | NET_IPV4_CONF_ARP_NOTIFY=22, |
| 485 | + NET_IPV4_CONF_ARP_EVICT_NOCARRIER=23, | |
| 485 | 486 | }; |
| 486 | 487 | |
| 487 | 488 | /* /proc/sys/net/ipv4/netfilter */ |
| @@ -84,6 +84,20 @@ · 83 unmodified lines | ||
| 84 | 84 | #define TLS_CIPHER_CHACHA20_POLY1305_TAG_SIZE 16 |
| 85 | 85 | #define TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE 8 |
| 86 | 86 | |
| 87 | +#define TLS_CIPHER_SM4_GCM 55 | |
| 88 | +#define TLS_CIPHER_SM4_GCM_IV_SIZE 8 | |
| 89 | +#define TLS_CIPHER_SM4_GCM_KEY_SIZE 16 | |
| 90 | +#define TLS_CIPHER_SM4_GCM_SALT_SIZE 4 | |
| 91 | +#define TLS_CIPHER_SM4_GCM_TAG_SIZE 16 | |
| 92 | +#define TLS_CIPHER_SM4_GCM_REC_SEQ_SIZE 8 | |
| 93 | + | |
| 94 | +#define TLS_CIPHER_SM4_CCM 56 | |
| 95 | +#define TLS_CIPHER_SM4_CCM_IV_SIZE 8 | |
| 96 | +#define TLS_CIPHER_SM4_CCM_KEY_SIZE 16 | |
| 97 | +#define TLS_CIPHER_SM4_CCM_SALT_SIZE 4 | |
| 98 | +#define TLS_CIPHER_SM4_CCM_TAG_SIZE 16 | |
| 99 | +#define TLS_CIPHER_SM4_CCM_REC_SEQ_SIZE 8 | |
| 100 | + | |
| 87 | 101 | #define TLS_SET_RECORD_TYPE 1 |
| 88 | 102 | #define TLS_GET_RECORD_TYPE 2 |
| 89 | 103 | |
| @@ -124,6 +138,22 @@ struct tls12_crypto_info_chacha20_poly1305 { · 34 unmodified lines | ||
| 124 | 138 | unsigned char rec_seq[TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE]; |
| 125 | 139 | }; |
| 126 | 140 | |
| 141 | +struct tls12_crypto_info_sm4_gcm { | |
| 142 | + struct tls_crypto_info info; | |
| 143 | + unsigned char iv[TLS_CIPHER_SM4_GCM_IV_SIZE]; | |
| 144 | + unsigned char key[TLS_CIPHER_SM4_GCM_KEY_SIZE]; | |
| 145 | + unsigned char salt[TLS_CIPHER_SM4_GCM_SALT_SIZE]; | |
| 146 | + unsigned char rec_seq[TLS_CIPHER_SM4_GCM_REC_SEQ_SIZE]; | |
| 147 | +}; | |
| 148 | + | |
| 149 | +struct tls12_crypto_info_sm4_ccm { | |
| 150 | + struct tls_crypto_info info; | |
| 151 | + unsigned char iv[TLS_CIPHER_SM4_CCM_IV_SIZE]; | |
| 152 | + unsigned char key[TLS_CIPHER_SM4_CCM_KEY_SIZE]; | |
| 153 | + unsigned char salt[TLS_CIPHER_SM4_CCM_SALT_SIZE]; | |
| 154 | + unsigned char rec_seq[TLS_CIPHER_SM4_CCM_REC_SEQ_SIZE]; | |
| 155 | +}; | |
| 156 | + | |
| 127 | 157 | enum { |
| 128 | 158 | TLS_INFO_UNSPEC, |
| 129 | 159 | TLS_INFO_VERSION, |
| @@ -64,7 +64,7 @@ · 63 unmodified lines | ||
| 64 | 64 | * timeout for a STREAM socket. |
| 65 | 65 | */ |
| 66 | 66 | |
| 67 | −#define SO_VM_SOCKETS_CONNECT_TIMEOUT 6 | |
| 67 | +#define SO_VM_SOCKETS_CONNECT_TIMEOUT_OLD 6 | |
| 68 | 68 | |
| 69 | 69 | /* Option name for using non-blocking send/receive. Use as the option name |
| 70 | 70 | * for setsockopt(3) or getsockopt(3) to set or get the non-blocking |
| @@ -81,6 +81,17 @@ · 10 unmodified lines | ||
| 81 | 81 | |
| 82 | 82 | #define SO_VM_SOCKETS_NONBLOCK_TXRX 7 |
| 83 | 83 | |
| 84 | +#define SO_VM_SOCKETS_CONNECT_TIMEOUT_NEW 8 | |
| 85 | + | |
| 86 | +#if !defined(__KERNEL__) | |
| 87 | +#if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) | |
| 88 | +#define SO_VM_SOCKETS_CONNECT_TIMEOUT SO_VM_SOCKETS_CONNECT_TIMEOUT_OLD | |
| 89 | +#else | |
| 90 | +#define SO_VM_SOCKETS_CONNECT_TIMEOUT \ | |
| 91 | + (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_VM_SOCKETS_CONNECT_TIMEOUT_OLD : SO_VM_SOCKETS_CONNECT_TIMEOUT_NEW) | |
| 92 | +#endif | |
| 93 | +#endif | |
| 94 | + | |
| 84 | 95 | /* The vSocket equivalent of INADDR_ANY. This works for the svm_cid field of |
| 85 | 96 | * sockaddr_vm and indicates the context ID of the current endpoint. |
| 86 | 97 | */ |