History

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

Pull networking updates from David Miller: 1) Allow setting bluetooth L2CAP modes via socket option, from Luiz Augusto von Dentz. 2) Add GSO partial support to igc, from Sasha Neftin. 3) Several cleanups and improvements to r8169 from Heiner Kallweit. 4) Add IF_OPER_TESTING link state and use it when ethtool triggers a device self-test. From Andrew Lunn. 5) Start moving away from custom driver versions, use the globally defined kernel version instead, from Leon Romanovsky. 6) Support GRO vis gro_cells in DSA layer, from Alexander Lobakin. 7) Allow hard IRQ deferral during NAPI, from Eric Dumazet. 8) Add sriov and vf support to hinic, from Luo bin. 9) Support Media Redundancy Protocol (MRP) in the bridging code, from Horatiu Vultur. 10) Support netmap in the nft_nat code, from Pablo Neira Ayuso. 11) Allow UDPv6 encapsulation of ESP in the ipsec code, from Sabrina Dubroca. Also add ipv6 support for espintcp. 12) Lots of ReST conversions of the networking documentation, from Mauro Carvalho Chehab. 13) Support configuration of ethtool rxnfc flows in bcmgenet driver, from Doug Berger. 14) Allow to dump cgroup id and filter by it in inet_diag code, from Dmitry Yakunin. 15) Add infrastructure to export netlink attribute policies to userspace, from Johannes Berg. 16) Several optimizations to sch_fq scheduler, from Eric Dumazet. 17) Fallback to the default qdisc if qdisc init fails because otherwise a packet scheduler init failure will make a device inoperative. From Jesper Dangaard Brouer. 18) Several RISCV bpf jit optimizations, from Luke Nelson. 19) Correct the return type of the ->ndo_start_xmit() method in several drivers, it's netdev_tx_t but many drivers were using 'int'. From Yunjian Wang. 20) Add an ethtool interface for PHY master/slave config, from Oleksij Rempel. 21) Add BPF iterators, from Yonghang Song. 22) Add cable test infrastructure, including ethool interfaces, from Andrew Lunn. Marvell PHY driver is the first to support this facility. 23) Remove zero-length arrays all over, from Gustavo A. R. Silva. 24) Calculate and maintain an explicit frame size in XDP, from Jesper Dangaard Brouer. 25) Add CAP_BPF, from Alexei Starovoitov. 26) Support terse dumps in the packet scheduler, from Vlad Buslov. 27) Support XDP_TX bulking in dpaa2 driver, from Ioana Ciornei. 28) Add devm_register_netdev(), from Bartosz Golaszewski. 29) Minimize qdisc resets, from Cong Wang. 30) Get rid of kernel_getsockopt and kernel_setsockopt in order to eliminate set_fs/get_fs calls. From Christoph Hellwig. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2517 commits) selftests: net: ip_defrag: ignore EPERM net_failover: fixed rollback in net_failover_open() Revert "tipc: Fix potential tipc_aead refcnt leak in tipc_crypto_rcv" Revert "tipc: Fix potential tipc_node refcnt leak in tipc_rcv" vmxnet3: allow rx flow hash ops only when rss is enabled hinic: add set_channels ethtool_ops support selftests/bpf: Add a default $(CXX) value tools/bpf: Don't use $(COMPILE.c) bpf, selftests: Use bpf_probe_read_kernel s390/bpf: Use bcr 0,%0 as tail call nop filler s390/bpf: Maintain 8-byte stack alignment selftests/bpf: Fix verifier test selftests/bpf: Fix sample_cnt shared between two threads bpf, selftests: Adapt cls_redirect to call csum_level helper bpf: Add csum_level helper for fixing up csum levels bpf: Fix up bpf_skb_adjust_room helper's skb csum setting sfc: add missing annotation for efx_ef10_try_update_nic_stats_vf() crypto/chtls: IPv6 support for inline TLS Crypto/chcr: Fixes a coccinile check error Crypto/chcr: Fixes compilations warnings ...

Linus Torvalds committed 6 years ago

Commit cb8e59c2 parents 2e63f6c 065fcfd2097 files · +151766 −46213Browse files

Showing the changes to include/linux (69 of 2097 files). Show all

Unified · Split

69 files
  1. include/linux/avf/virtchnl.h +5 −0
  2. include/linux/bpf-cgroup.h +5 −19
  3. include/linux/bpf-netns.h +64 −0
  4. include/linux/bpf.h +116 −6
  5. include/linux/bpf_types.h +11 −0
  6. include/linux/bpf_verifier.h +7 −0
  7. include/linux/brcmphy.h +58 −0
  8. include/linux/capability.h +5 −0
  9. include/linux/compaction.h +1 −1
  10. include/linux/coredump.h +4 −0
  11. include/linux/delay.h +11 −0
  12. include/linux/dsa/8021q.h +57 −0
  13. include/linux/dsa/sja1105.h +3 −0
  14. include/linux/etherdevice.h +12 −0
  15. include/linux/ethtool_netlink.h +54 −0
  16. include/linux/file.h +2 −0
  17. include/linux/filter.h +2 −6
  18. include/linux/fs.h +3 −3
  19. include/linux/fsl/ptp_qoriq.h +1 −1
  20. include/linux/ftrace.h +1 −2
  21. include/linux/hugetlb.h +7 −8
  22. include/linux/ieee80211.h +359 −8
  23. include/linux/if_bridge.h +2 −0
  24. include/linux/if_team.h +2 −5
  25. include/linux/igmp.h +1 −1
  26. include/linux/inet_diag.h +5 −1
  27. include/linux/iopoll.h +43 −19
  28. include/linux/kprobes.h +1 −1
  29. include/linux/latencytop.h +2 −2
  30. include/linux/mdio.h +31 −0
  31. include/linux/mlx4/qp.h +1 −1
  32. include/linux/mlx5/accel.h +13 −1
  33. include/linux/mlx5/cmd.h +0 −51
  34. include/linux/mlx5/cq.h +1 −1
  35. include/linux/mlx5/device.h +41 −3
  36. include/linux/mlx5/driver.h +20 −15
  37. include/linux/mlx5/fs.h +1 −0
  38. include/linux/mlx5/mlx5_ifc.h +166 −58
  39. include/linux/mlx5/qp.h +7 −50
  40. include/linux/mlx5/transobj.h +6 −13
  41. include/linux/mlx5/vport.h +1 −2
  42. include/linux/mm.h +8 −6
  43. include/linux/mmzone.h +13 −14
  44. include/linux/net.h +0 −4
  45. include/linux/netdev_features.h +1 −1
  46. include/linux/netdevice.h +82 −8
  47. include/linux/netpoll.h +1 −9
  48. include/linux/nmi.h +5 −10
  49. include/linux/of_mdio.h +10 −1
  50. include/linux/perf_event.h +5 −8
  51. include/linux/phy.h +182 −11
  52. include/linux/phylink.h +3 −3
  53. include/linux/pid.h +3 −0
  54. include/linux/printk.h +1 −1
  55. include/linux/proc_fs.h +3 −0
  56. include/linux/ptp_clock_kernel.h +5 −1
  57. include/linux/qed/qed_if.h +23 −3
  58. include/linux/qed/qed_rdma_if.h +22 −0
  59. include/linux/sched/sysctl.h +15 −29
  60. include/linux/security.h +1 −1
  61. include/linux/skbuff.h +9 −27
  62. include/linux/skmsg.h +8 −0
  63. include/linux/socket.h +15 −2
  64. include/linux/sysctl.h +30 −31
  65. include/linux/tcp.h +13 −0
  66. include/linux/timer.h +1 −2
  67. include/linux/vermagic.h +4 −0
  68. include/linux/vmstat.h +4 −4
  69. include/linux/writeback.h +11 −17
include/linux/avf/virtchnl.h+5−0
@@ -476,6 +476,7 @@ struct virtchnl_rss_key { · 475 unmodified lines
476476 u16 vsi_id;
477477 u16 key_len;
478478 u8 key[1]; /* RSS hash key, packed bytes */
479+ u8 pad[1];
479480 };
480481
481482 VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_key);
@@ -484,6 +485,7 @@ struct virtchnl_rss_lut { · 2 unmodified lines
484485 u16 vsi_id;
485486 u16 lut_entries;
486487 u8 lut[1]; /* RSS lookup table */
488+ u8 pad[1];
487489 };
488490
489491 VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut);
@@ -572,6 +574,7 @@ struct virtchnl_filter { · 82 unmodified lines
572574 enum virtchnl_action action;
573575 u32 action_meta;
574576 u8 field_flags;
577+ u8 pad[3];
575578 };
576579
577580 VIRTCHNL_CHECK_STRUCT_LEN(272, virtchnl_filter);
@@ -610,6 +613,7 @@ struct virtchnl_pf_event { · 32 unmodified lines
610613 /* link_speed provided in Mbps */
611614 u32 link_speed;
612615 u8 link_status;
616+ u8 pad[3];
613617 } link_event_adv;
614618 } event_data;
615619
@@ -635,6 +639,7 @@ struct virtchnl_iwarp_qv_info { · 19 unmodified lines
635639 u16 ceq_idx;
636640 u16 aeq_idx;
637641 u8 itr_idx;
642+ u8 pad[3];
638643 };
639644
640645 VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_iwarp_qv_info);
include/linux/bpf-cgroup.h+5−19
@@ -57,8 +57,6 @@ struct bpf_cgroup_link { · 56 unmodified lines
5757 enum bpf_attach_type type;
5858 };
5959
60−extern const struct bpf_link_ops bpf_cgroup_link_lops;
61−
6260 struct bpf_prog_list {
6361 struct list_head node;
6462 struct bpf_prog *prog;
@@ -100,8 +98,6 @@ int __cgroup_bpf_attach(struct cgroup *cgrp, · 35 unmodified lines
10098 int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
10199 struct bpf_cgroup_link *link,
102100 enum bpf_attach_type type);
103−int __cgroup_bpf_replace(struct cgroup *cgrp, struct bpf_cgroup_link *link,
104− struct bpf_prog *new_prog);
105101 int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
106102 union bpf_attr __user *uattr);
107103
@@ -112,8 +108,6 @@ int cgroup_bpf_attach(struct cgroup *cgrp, · 4 unmodified lines
112108 u32 flags);
113109 int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
114110 enum bpf_attach_type type);
115−int cgroup_bpf_replace(struct bpf_link *link, struct bpf_prog *old_prog,
116− struct bpf_prog *new_prog);
117111 int cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
118112 union bpf_attr __user *uattr);
119113
@@ -138,8 +132,7 @@ int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor, · 18 unmodified lines
138132
139133 int __cgroup_bpf_run_filter_sysctl(struct ctl_table_header *head,
140134 struct ctl_table *table, int write,
141− void __user *buf, size_t *pcount,
142− loff_t *ppos, void **new_buf,
135+ void **buf, size_t *pcount, loff_t *ppos,
143136 enum bpf_attach_type type);
144137
145138 int __cgroup_bpf_run_filter_setsockopt(struct sock *sock, int *level,
@@ -302,12 +295,12 @@ int bpf_percpu_cgroup_storage_update(struct bpf_map *map, void *key, · 156 unmodified lines
302295 })
303296
304297
305−#define BPF_CGROUP_RUN_PROG_SYSCTL(head, table, write, buf, count, pos, nbuf) \
298+#define BPF_CGROUP_RUN_PROG_SYSCTL(head, table, write, buf, count, pos) \
306299 ({ \
307300 int __ret = 0; \
308301 if (cgroup_bpf_enabled) \
309302 __ret = __cgroup_bpf_run_filter_sysctl(head, table, write, \
310− buf, count, pos, nbuf, \
303+ buf, count, pos, \
311304 BPF_CGROUP_SYSCTL); \
312305 __ret; \
313306 })
@@ -354,7 +347,6 @@ int cgroup_bpf_prog_query(const union bpf_attr *attr, · 40 unmodified lines
354347 #else
355348
356349 struct bpf_prog;
357−struct bpf_link;
358350 struct cgroup_bpf {};
359351 static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; }
360352 static inline void cgroup_bpf_offline(struct cgroup *cgrp) {}
@@ -378,13 +370,6 @@ static inline int cgroup_bpf_link_attach(const union bpf_attr *attr, · 17 unmodified lines
378370 return -EINVAL;
379371 }
380372
381−static inline int cgroup_bpf_replace(struct bpf_link *link,
382− struct bpf_prog *old_prog,
383− struct bpf_prog *new_prog)
384−{
385− return -EINVAL;
386−}
387−
388373 static inline int cgroup_bpf_prog_query(const union bpf_attr *attr,
389374 union bpf_attr __user *uattr)
390375 {
@@ -411,6 +396,7 @@ static inline int bpf_percpu_cgroup_storage_update(struct bpf_map *map, · 20 unmodified lines
411396 }
412397
413398 #define cgroup_bpf_enabled (0)
399+#define BPF_CGROUP_RUN_SA_PROG_LOCK(sk, uaddr, type, t_ctx) ({ 0; })
414400 #define BPF_CGROUP_PRE_CONNECT_ENABLED(sk) (0)
415401 #define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; })
416402 #define BPF_CGROUP_RUN_PROG_INET_EGRESS(sk,skb) ({ 0; })
@@ -429,7 +415,7 @@ static inline int bpf_percpu_cgroup_storage_update(struct bpf_map *map, · 12 unmodified lines
429415 #define BPF_CGROUP_RUN_PROG_UDP6_RECVMSG_LOCK(sk, uaddr) ({ 0; })
430416 #define BPF_CGROUP_RUN_PROG_SOCK_OPS(sock_ops) ({ 0; })
431417 #define BPF_CGROUP_RUN_PROG_DEVICE_CGROUP(type,major,minor,access) ({ 0; })
432−#define BPF_CGROUP_RUN_PROG_SYSCTL(head,table,write,buf,count,pos,nbuf) ({ 0; })
418+#define BPF_CGROUP_RUN_PROG_SYSCTL(head,table,write,buf,count,pos) ({ 0; })
433419 #define BPF_CGROUP_GETSOCKOPT_MAX_OPTLEN(optlen) ({ 0; })
434420 #define BPF_CGROUP_RUN_PROG_GETSOCKOPT(sock, level, optname, optval, \
435421 optlen, max_optlen, retval) ({ retval; })
include/linux/bpf-netns.h+64−0
@@ -0,0 +1,64 @@
1+/* SPDX-License-Identifier: GPL-2.0 */
2+#ifndef _BPF_NETNS_H
3+#define _BPF_NETNS_H
4+
5+#include <linux/mutex.h>
6+#include <uapi/linux/bpf.h>
7+
8+enum netns_bpf_attach_type {
9+ NETNS_BPF_INVALID = -1,
10+ NETNS_BPF_FLOW_DISSECTOR = 0,
11+ MAX_NETNS_BPF_ATTACH_TYPE
12+};
13+
14+static inline enum netns_bpf_attach_type
15+to_netns_bpf_attach_type(enum bpf_attach_type attach_type)
16+{
17+ switch (attach_type) {
18+ case BPF_FLOW_DISSECTOR:
19+ return NETNS_BPF_FLOW_DISSECTOR;
20+ default:
21+ return NETNS_BPF_INVALID;
22+ }
23+}
24+
25+/* Protects updates to netns_bpf */
26+extern struct mutex netns_bpf_mutex;
27+
28+union bpf_attr;
29+struct bpf_prog;
30+
31+#ifdef CONFIG_NET
32+int netns_bpf_prog_query(const union bpf_attr *attr,
33+ union bpf_attr __user *uattr);
34+int netns_bpf_prog_attach(const union bpf_attr *attr,
35+ struct bpf_prog *prog);
36+int netns_bpf_prog_detach(const union bpf_attr *attr);
37+int netns_bpf_link_create(const union bpf_attr *attr,
38+ struct bpf_prog *prog);
39+#else
40+static inline int netns_bpf_prog_query(const union bpf_attr *attr,
41+ union bpf_attr __user *uattr)
42+{
43+ return -EOPNOTSUPP;
44+}
45+
46+static inline int netns_bpf_prog_attach(const union bpf_attr *attr,
47+ struct bpf_prog *prog)
48+{
49+ return -EOPNOTSUPP;
50+}
51+
52+static inline int netns_bpf_prog_detach(const union bpf_attr *attr)
53+{
54+ return -EOPNOTSUPP;
55+}
56+
57+static inline int netns_bpf_link_create(const union bpf_attr *attr,
58+ struct bpf_prog *prog)
59+{
60+ return -EOPNOTSUPP;
61+}
62+#endif
63+
64+#endif /* _BPF_NETNS_H */
include/linux/bpf.h+116−6
@@ -19,6 +19,7 @@ · 18 unmodified lines
1919 #include <linux/mutex.h>
2020 #include <linux/module.h>
2121 #include <linux/kallsyms.h>
22+#include <linux/capability.h>
2223
2324 struct bpf_verifier_env;
2425 struct bpf_verifier_log;
@@ -31,6 +32,7 @@ struct seq_file; · 6 unmodified lines
3132 struct btf;
3233 struct btf_type;
3334 struct exception_table_entry;
35+struct seq_operations;
3436
3537 extern struct idr btf_idr;
3638 extern spinlock_t btf_idr_lock;
@@ -88,6 +90,8 @@ struct bpf_map_ops { · 51 unmodified lines
8890 int (*map_direct_value_meta)(const struct bpf_map *map,
8991 u64 imm, u32 *off);
9092 int (*map_mmap)(struct bpf_map *map, struct vm_area_struct *vma);
93+ __poll_t (*map_poll)(struct bpf_map *map, struct file *filp,
94+ struct poll_table_struct *pts);
9195 };
9296
9397 struct bpf_map_memory {
@@ -118,7 +122,7 @@ struct bpf_map { · 24 unmodified lines
118122 struct bpf_map_memory memory;
119123 char name[BPF_OBJ_NAME_LEN];
120124 u32 btf_vmlinux_value_type_id;
121− bool unpriv_array;
125+ bool bypass_spec_v1;
122126 bool frozen; /* write-once; write-protected by freeze_mutex */
123127 /* 22 bytes hole */
124128
@@ -242,6 +246,9 @@ enum bpf_arg_type { · 117 unmodified lines
242246 ARG_PTR_TO_LONG, /* pointer to long */
243247 ARG_PTR_TO_SOCKET, /* pointer to bpf_sock (fullsock) */
244248 ARG_PTR_TO_BTF_ID, /* pointer to in-kernel struct */
249+ ARG_PTR_TO_ALLOC_MEM, /* pointer to dynamically allocated memory */
250+ ARG_PTR_TO_ALLOC_MEM_OR_NULL, /* pointer to dynamically allocated memory or NULL */
251+ ARG_CONST_ALLOC_SIZE_OR_ZERO, /* number of allocated bytes requested */
245252 };
246253
247254 /* type of values returned from helper functions */
@@ -253,6 +260,7 @@ enum bpf_return_type { · 5 unmodified lines
253260 RET_PTR_TO_SOCKET_OR_NULL, /* returns a pointer to a socket or NULL */
254261 RET_PTR_TO_TCP_SOCK_OR_NULL, /* returns a pointer to a tcp_sock or NULL */
255262 RET_PTR_TO_SOCK_COMMON_OR_NULL, /* returns a pointer to a sock_common or NULL */
263+ RET_PTR_TO_ALLOC_MEM_OR_NULL, /* returns a pointer to dynamically allocated memory or NULL */
256264 };
257265
258266 /* eBPF function prototype used by verifier to allow BPF_CALLs from eBPF programs
@@ -319,6 +327,9 @@ enum bpf_reg_type { · 60 unmodified lines
319327 PTR_TO_TP_BUFFER, /* reg points to a writable raw tp's buffer */
320328 PTR_TO_XDP_SOCK, /* reg points to struct xdp_sock */
321329 PTR_TO_BTF_ID, /* reg points to kernel struct */
330+ PTR_TO_BTF_ID_OR_NULL, /* reg points to kernel struct or NULL */
331+ PTR_TO_MEM, /* reg points to valid memory region */
332+ PTR_TO_MEM_OR_NULL, /* reg points to valid memory region or NULL */
322333 };
323334
324335 /* The information passed from prog-specific *_is_valid_access
@@ -641,6 +652,12 @@ struct bpf_jit_poke_descriptor { · 316 unmodified lines
641652 u16 reason;
642653 };
643654
655+/* reg_type info for ctx arguments */
656+struct bpf_ctx_arg_aux {
657+ u32 offset;
658+ enum bpf_reg_type reg_type;
659+};
660+
644661 struct bpf_prog_aux {
645662 atomic64_t refcnt;
646663 u32 used_map_cnt;
@@ -652,6 +669,8 @@ struct bpf_prog_aux { · 5 unmodified lines
652669 u32 func_cnt; /* used by non-func prog as the number of func progs */
653670 u32 func_idx; /* 0 for non-func prog, the index in func array for func prog */
654671 u32 attach_btf_id; /* in-kernel BTF type id to attach to */
672+ u32 ctx_arg_info_size;
673+ const struct bpf_ctx_arg_aux *ctx_arg_info;
655674 struct bpf_prog *linked_prog;
656675 bool verifier_zext; /* Zero extensions has been inserted by verifier. */
657676 bool offload_requested;
@@ -987,6 +1006,7 @@ _out: \ · 329 unmodified lines
9871006
9881007 #ifdef CONFIG_BPF_SYSCALL
9891008 DECLARE_PER_CPU(int, bpf_prog_active);
1009+extern struct mutex bpf_stats_enabled_mutex;
9901010
9911011 /*
9921012 * Block execution of BPF programs attached to instrumentation (perf,
@@ -1020,15 +1040,18 @@ static inline void bpf_enable_instrumentation(void) · 27 unmodified lines
10201040
10211041 extern const struct file_operations bpf_map_fops;
10221042 extern const struct file_operations bpf_prog_fops;
1043+extern const struct file_operations bpf_iter_fops;
10231044
10241045 #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \
10251046 extern const struct bpf_prog_ops _name ## _prog_ops; \
10261047 extern const struct bpf_verifier_ops _name ## _verifier_ops;
10271048 #define BPF_MAP_TYPE(_id, _ops) \
10281049 extern const struct bpf_map_ops _ops;
1050+#define BPF_LINK_TYPE(_id, _name)
10291051 #include <linux/bpf_types.h>
10301052 #undef BPF_PROG_TYPE
10311053 #undef BPF_MAP_TYPE
1054+#undef BPF_LINK_TYPE
10321055
10331056 extern const struct bpf_prog_ops bpf_offload_prog_ops;
10341057 extern const struct bpf_verifier_ops tc_cls_act_analyzer_ops;
@@ -1077,29 +1100,59 @@ int generic_map_update_batch(struct bpf_map *map, · 42 unmodified lines
10771100 int generic_map_delete_batch(struct bpf_map *map,
10781101 const union bpf_attr *attr,
10791102 union bpf_attr __user *uattr);
1103+struct bpf_map *bpf_map_get_curr_or_next(u32 *id);
10801104
10811105 extern int sysctl_unprivileged_bpf_disabled;
10821106
1107+static inline bool bpf_allow_ptr_leaks(void)
1108+{
1109+ return perfmon_capable();
1110+}
1111+
1112+static inline bool bpf_bypass_spec_v1(void)
1113+{
1114+ return perfmon_capable();
1115+}
1116+
1117+static inline bool bpf_bypass_spec_v4(void)
1118+{
1119+ return perfmon_capable();
1120+}
1121+
10831122 int bpf_map_new_fd(struct bpf_map *map, int flags);
10841123 int bpf_prog_new_fd(struct bpf_prog *prog);
10851124
10861125 struct bpf_link {
10871126 atomic64_t refcnt;
1127+ u32 id;
1128+ enum bpf_link_type type;
10881129 const struct bpf_link_ops *ops;
10891130 struct bpf_prog *prog;
10901131 struct work_struct work;
10911132 };
10921133
1134+struct bpf_link_primer {
1135+ struct bpf_link *link;
1136+ struct file *file;
1137+ int fd;
1138+ u32 id;
1139+};
1140+
10931141 struct bpf_link_ops {
10941142 void (*release)(struct bpf_link *link);
10951143 void (*dealloc)(struct bpf_link *link);
1096−
1144+ int (*update_prog)(struct bpf_link *link, struct bpf_prog *new_prog,
1145+ struct bpf_prog *old_prog);
1146+ void (*show_fdinfo)(const struct bpf_link *link, struct seq_file *seq);
1147+ int (*fill_link_info)(const struct bpf_link *link,
1148+ struct bpf_link_info *info);
10971149 };
10981150
1099−void bpf_link_init(struct bpf_link *link, const struct bpf_link_ops *ops,
1100− struct bpf_prog *prog);
1101−void bpf_link_cleanup(struct bpf_link *link, struct file *link_file,
1102− int link_fd);
1151+void bpf_link_init(struct bpf_link *link, enum bpf_link_type type,
1152+ const struct bpf_link_ops *ops, struct bpf_prog *prog);
1153+int bpf_link_prime(struct bpf_link *link, struct bpf_link_primer *primer);
1154+int bpf_link_settle(struct bpf_link_primer *primer);
1155+void bpf_link_cleanup(struct bpf_link_primer *primer);
11031156 void bpf_link_inc(struct bpf_link *link);
11041157 void bpf_link_put(struct bpf_link *link);
11051158 int bpf_link_new_fd(struct bpf_link *link);
@@ -1109,6 +1162,40 @@ struct bpf_link *bpf_link_get_from_fd(u32 ufd); · 3 unmodified lines
11091162 int bpf_obj_pin_user(u32 ufd, const char __user *pathname);
11101163 int bpf_obj_get_user(const char __user *pathname, int flags);
11111164
1165+#define BPF_ITER_FUNC_PREFIX "bpf_iter_"
1166+#define DEFINE_BPF_ITER_FUNC(target, args...) \
1167+ extern int bpf_iter_ ## target(args); \
1168+ int __init bpf_iter_ ## target(args) { return 0; }
1169+
1170+typedef int (*bpf_iter_init_seq_priv_t)(void *private_data);
1171+typedef void (*bpf_iter_fini_seq_priv_t)(void *private_data);
1172+
1173+#define BPF_ITER_CTX_ARG_MAX 2
1174+struct bpf_iter_reg {
1175+ const char *target;
1176+ const struct seq_operations *seq_ops;
1177+ bpf_iter_init_seq_priv_t init_seq_private;
1178+ bpf_iter_fini_seq_priv_t fini_seq_private;
1179+ u32 seq_priv_size;
1180+ u32 ctx_arg_info_size;
1181+ struct bpf_ctx_arg_aux ctx_arg_info[BPF_ITER_CTX_ARG_MAX];
1182+};
1183+
1184+struct bpf_iter_meta {
1185+ __bpf_md_ptr(struct seq_file *, seq);
1186+ u64 session_id;
1187+ u64 seq_num;
1188+};
1189+
1190+int bpf_iter_reg_target(const struct bpf_iter_reg *reg_info);
1191+void bpf_iter_unreg_target(const struct bpf_iter_reg *reg_info);
1192+bool bpf_iter_prog_supported(struct bpf_prog *prog);
1193+int bpf_iter_link_attach(const union bpf_attr *attr, struct bpf_prog *prog);
1194+int bpf_iter_new_fd(struct bpf_link *link);
1195+bool bpf_link_is_iter(struct bpf_link *link);
1196+struct bpf_prog *bpf_iter_get_info(struct bpf_iter_meta *meta, bool in_stop);
1197+int bpf_iter_run_prog(struct bpf_prog *prog, void *ctx);
1198+
11121199 int bpf_percpu_hash_copy(struct bpf_map *map, void *key, void *value);
11131200 int bpf_percpu_array_copy(struct bpf_map *map, void *key, void *value);
11141201 int bpf_percpu_hash_update(struct bpf_map *map, void *key, void *value,
@@ -1163,6 +1250,7 @@ int dev_map_enqueue(struct bpf_dtab_netdev *dst, struct xdp_buff *xdp, · 48 unmodified lines
11631250 struct net_device *dev_rx);
11641251 int dev_map_generic_redirect(struct bpf_dtab_netdev *dst, struct sk_buff *skb,
11651252 struct bpf_prog *xdp_prog);
1253+bool dev_map_can_have_prog(struct bpf_map *map);
11661254
11671255 struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key);
11681256 void __cpu_map_flush(void);
@@ -1215,6 +1303,7 @@ int btf_check_type_match(struct bpf_verifier_env *env, struct bpf_prog *prog, · 46 unmodified lines
12151303
12161304 struct bpf_prog *bpf_prog_by_id(u32 id);
12171305
1306+const struct bpf_func_proto *bpf_base_func_proto(enum bpf_func_id func_id);
12181307 #else /* !CONFIG_BPF_SYSCALL */
12191308 static inline struct bpf_prog *bpf_prog_get(u32 ufd)
12201309 {
@@ -1275,6 +1364,10 @@ static inline struct net_device *__dev_map_hash_lookup_elem(struct bpf_map *map · 54 unmodified lines
12751364 {
12761365 return NULL;
12771366 }
1367+static inline bool dev_map_can_have_prog(struct bpf_map *map)
1368+{
1369+ return false;
1370+}
12781371
12791372 static inline void __dev_flush(void)
12801373 {
@@ -1365,6 +1458,12 @@ static inline struct bpf_prog *bpf_prog_by_id(u32 id) · 84 unmodified lines
13651458 {
13661459 return ERR_PTR(-ENOTSUPP);
13671460 }
1461+
1462+static inline const struct bpf_func_proto *
1463+bpf_base_func_proto(enum bpf_func_id func_id)
1464+{
1465+ return NULL;
1466+}
13681467 #endif /* CONFIG_BPF_SYSCALL */
13691468
13701469 static inline struct bpf_prog *bpf_prog_get_type(u32 ufd,
@@ -1502,6 +1601,7 @@ extern const struct bpf_func_proto bpf_get_smp_processor_id_proto; · 131 unmodified lines
15021601 extern const struct bpf_func_proto bpf_get_numa_node_id_proto;
15031602 extern const struct bpf_func_proto bpf_tail_call_proto;
15041603 extern const struct bpf_func_proto bpf_ktime_get_ns_proto;
1604+extern const struct bpf_func_proto bpf_ktime_get_boot_ns_proto;
15051605 extern const struct bpf_func_proto bpf_get_current_pid_tgid_proto;
15061606 extern const struct bpf_func_proto bpf_get_current_uid_gid_proto;
15071607 extern const struct bpf_func_proto bpf_get_current_comm_proto;
@@ -1523,13 +1623,23 @@ extern const struct bpf_func_proto bpf_strtoul_proto; · 15 unmodified lines
15231623 extern const struct bpf_func_proto bpf_tcp_sock_proto;
15241624 extern const struct bpf_func_proto bpf_jiffies64_proto;
15251625 extern const struct bpf_func_proto bpf_get_ns_current_pid_tgid_proto;
1626+extern const struct bpf_func_proto bpf_event_output_data_proto;
1627+extern const struct bpf_func_proto bpf_ringbuf_output_proto;
1628+extern const struct bpf_func_proto bpf_ringbuf_reserve_proto;
1629+extern const struct bpf_func_proto bpf_ringbuf_submit_proto;
1630+extern const struct bpf_func_proto bpf_ringbuf_discard_proto;
1631+extern const struct bpf_func_proto bpf_ringbuf_query_proto;
15261632
15271633 const struct bpf_func_proto *bpf_tracing_func_proto(
15281634 enum bpf_func_id func_id, const struct bpf_prog *prog);
15291635
1636+const struct bpf_func_proto *tracing_prog_func_proto(
1637+ enum bpf_func_id func_id, const struct bpf_prog *prog);
1638+
15301639 /* Shared helpers among cBPF and eBPF. */
15311640 void bpf_user_rnd_init_once(void);
15321641 u64 bpf_user_rnd_u32(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5);
1642+u64 bpf_get_raw_cpu_id(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5);
15331643
15341644 #if defined(CONFIG_NET)
15351645 bool bpf_sock_common_is_valid_access(int off, int size,
include/linux/bpf_types.h+11−0
@@ -118,3 +118,14 @@ BPF_MAP_TYPE(BPF_MAP_TYPE_STACK, stack_map_ops) · 117 unmodified lines
118118 #if defined(CONFIG_BPF_JIT)
119119 BPF_MAP_TYPE(BPF_MAP_TYPE_STRUCT_OPS, bpf_struct_ops_map_ops)
120120 #endif
121+BPF_MAP_TYPE(BPF_MAP_TYPE_RINGBUF, ringbuf_map_ops)
122+
123+BPF_LINK_TYPE(BPF_LINK_TYPE_RAW_TRACEPOINT, raw_tracepoint)
124+BPF_LINK_TYPE(BPF_LINK_TYPE_TRACING, tracing)
125+#ifdef CONFIG_CGROUP_BPF
126+BPF_LINK_TYPE(BPF_LINK_TYPE_CGROUP, cgroup)
127+#endif
128+BPF_LINK_TYPE(BPF_LINK_TYPE_ITER, iter)
129+#ifdef CONFIG_NET
130+BPF_LINK_TYPE(BPF_LINK_TYPE_NETNS, netns)
131+#endif
include/linux/bpf_verifier.h+7−0
@@ -54,6 +54,8 @@ struct bpf_reg_state { · 53 unmodified lines
5454
5555 u32 btf_id; /* for PTR_TO_BTF_ID */
5656
57+ u32 mem_size; /* for PTR_TO_MEM | PTR_TO_MEM_OR_NULL */
58+
5759 /* Max size from any of the above. */
5860 unsigned long raw;
5961 };
@@ -63,6 +65,8 @@ struct bpf_reg_state { · 3 unmodified lines
6365 * offset, so they can share range knowledge.
6466 * For PTR_TO_MAP_VALUE_OR_NULL this is used to share which map value we
6567 * came from, when one is tested for != NULL.
68+ * For PTR_TO_MEM_OR_NULL this is used to identify memory allocation
69+ * for the purpose of tracking that it's freed.
6670 * For PTR_TO_SOCKET this is used to share which pointers retain the
6771 * same reference to the socket, to determine proper reference freeing.
6872 */
@@ -375,6 +379,9 @@ struct bpf_verifier_env { · 306 unmodified lines
375379 u32 used_map_cnt; /* number of used maps */
376380 u32 id_gen; /* used to generate unique reg IDs */
377381 bool allow_ptr_leaks;
382+ bool bpf_capable;
383+ bool bypass_spec_v1;
384+ bool bypass_spec_v4;
378385 bool seen_direct_write;
379386 struct bpf_insn_aux_data *insn_aux_data; /* array of per-insn state */
380387 const struct bpf_line_info *prev_linfo;
include/linux/brcmphy.h+58−0
@@ -15,7 +15,9 @@ · 14 unmodified lines
1515 #define PHY_ID_BCMAC131 0x0143bc70
1616 #define PHY_ID_BCM5481 0x0143bca0
1717 #define PHY_ID_BCM5395 0x0143bcf0
18+#define PHY_ID_BCM53125 0x03625f20
1819 #define PHY_ID_BCM54810 0x03625d00
20+#define PHY_ID_BCM54811 0x03625cc0
1921 #define PHY_ID_BCM5482 0x0143bcb0
2022 #define PHY_ID_BCM5411 0x00206070
2123 #define PHY_ID_BCM5421 0x002060e0
@@ -24,6 +26,7 @@ · 2 unmodified lines
2426 #define PHY_ID_BCM5461 0x002060c0
2527 #define PHY_ID_BCM54612E 0x03625e60
2628 #define PHY_ID_BCM54616S 0x03625d10
29+#define PHY_ID_BCM54140 0xae025009
2730 #define PHY_ID_BCM57780 0x03625d90
2831 #define PHY_ID_BCM89610 0x03625cd0
2932
@@ -114,6 +117,14 @@ · 84 unmodified lines
114117 #define MII_BCM54XX_SHD_VAL(x) ((x & 0x1f) << 10)
115118 #define MII_BCM54XX_SHD_DATA(x) ((x & 0x3ff) << 0)
116119
120+#define MII_BCM54XX_RDB_ADDR 0x1e
121+#define MII_BCM54XX_RDB_DATA 0x1f
122+
123+/* legacy access control via rdb/expansion register */
124+#define BCM54XX_RDB_REG0087 0x0087
125+#define BCM54XX_EXP_REG7E (MII_BCM54XX_EXP_SEL_ER + 0x7E)
126+#define BCM54XX_ACCESS_MODE_LEGACY_EN BIT(15)
127+
117128 /*
118129 * AUXILIARY CONTROL SHADOW ACCESS REGISTERS. (PHY REG 0x18)
119130 */
@@ -290,4 +301,51 @@ · 170 unmodified lines
290301 #define MII_BRCM_CORE_EXPB0 0xB0
291302 #define MII_BRCM_CORE_EXPB1 0xB1
292303
304+/* Enhanced Cable Diagnostics */
305+#define BCM54XX_RDB_ECD_CTRL 0x2a0
306+#define BCM54XX_EXP_ECD_CTRL (MII_BCM54XX_EXP_SEL_ER + 0xc0)
307+
308+#define BCM54XX_ECD_CTRL_CABLE_TYPE_CAT3 1 /* CAT3 or worse */
309+#define BCM54XX_ECD_CTRL_CABLE_TYPE_CAT5 0 /* CAT5 or better */
310+#define BCM54XX_ECD_CTRL_CABLE_TYPE_MASK BIT(0) /* cable type */
311+#define BCM54XX_ECD_CTRL_INVALID BIT(3) /* invalid result */
312+#define BCM54XX_ECD_CTRL_UNIT_CM 0 /* centimeters */
313+#define BCM54XX_ECD_CTRL_UNIT_M 1 /* meters */
314+#define BCM54XX_ECD_CTRL_UNIT_MASK BIT(10) /* cable length unit */
315+#define BCM54XX_ECD_CTRL_IN_PROGRESS BIT(11) /* test in progress */
316+#define BCM54XX_ECD_CTRL_BREAK_LINK BIT(12) /* unconnect link
317+ * during test
318+ */
319+#define BCM54XX_ECD_CTRL_CROSS_SHORT_DIS BIT(13) /* disable inter-pair
320+ * short check
321+ */
322+#define BCM54XX_ECD_CTRL_RUN BIT(15) /* run immediate */
323+
324+#define BCM54XX_RDB_ECD_FAULT_TYPE 0x2a1
325+#define BCM54XX_EXP_ECD_FAULT_TYPE (MII_BCM54XX_EXP_SEL_ER + 0xc1)
326+#define BCM54XX_ECD_FAULT_TYPE_INVALID 0x0
327+#define BCM54XX_ECD_FAULT_TYPE_OK 0x1
328+#define BCM54XX_ECD_FAULT_TYPE_OPEN 0x2
329+#define BCM54XX_ECD_FAULT_TYPE_SAME_SHORT 0x3 /* short same pair */
330+#define BCM54XX_ECD_FAULT_TYPE_CROSS_SHORT 0x4 /* short different pairs */
331+#define BCM54XX_ECD_FAULT_TYPE_BUSY 0x9
332+#define BCM54XX_ECD_FAULT_TYPE_PAIR_D_MASK GENMASK(3, 0)
333+#define BCM54XX_ECD_FAULT_TYPE_PAIR_C_MASK GENMASK(7, 4)
334+#define BCM54XX_ECD_FAULT_TYPE_PAIR_B_MASK GENMASK(11, 8)
335+#define BCM54XX_ECD_FAULT_TYPE_PAIR_A_MASK GENMASK(15, 12)
336+#define BCM54XX_ECD_PAIR_A_LENGTH_RESULTS 0x2a2
337+#define BCM54XX_ECD_PAIR_B_LENGTH_RESULTS 0x2a3
338+#define BCM54XX_ECD_PAIR_C_LENGTH_RESULTS 0x2a4
339+#define BCM54XX_ECD_PAIR_D_LENGTH_RESULTS 0x2a5
340+
341+#define BCM54XX_RDB_ECD_PAIR_A_LENGTH_RESULTS 0x2a2
342+#define BCM54XX_EXP_ECD_PAIR_A_LENGTH_RESULTS (MII_BCM54XX_EXP_SEL_ER + 0xc2)
343+#define BCM54XX_RDB_ECD_PAIR_B_LENGTH_RESULTS 0x2a3
344+#define BCM54XX_EXP_ECD_PAIR_B_LENGTH_RESULTS (MII_BCM54XX_EXP_SEL_ER + 0xc3)
345+#define BCM54XX_RDB_ECD_PAIR_C_LENGTH_RESULTS 0x2a4
346+#define BCM54XX_EXP_ECD_PAIR_C_LENGTH_RESULTS (MII_BCM54XX_EXP_SEL_ER + 0xc4)
347+#define BCM54XX_RDB_ECD_PAIR_D_LENGTH_RESULTS 0x2a5
348+#define BCM54XX_EXP_ECD_PAIR_D_LENGTH_RESULTS (MII_BCM54XX_EXP_SEL_ER + 0xc5)
349+#define BCM54XX_ECD_LENGTH_RESULTS_INVALID 0xffff
350+
293351 #endif /* _LINUX_BRCMPHY_H */
include/linux/capability.h+5−0
@@ -256,6 +256,11 @@ static inline bool perfmon_capable(void) · 255 unmodified lines
256256 return capable(CAP_PERFMON) || capable(CAP_SYS_ADMIN);
257257 }
258258
259+static inline bool bpf_capable(void)
260+{
261+ return capable(CAP_BPF) || capable(CAP_SYS_ADMIN);
262+}
263+
259264 /* audit system wants to get cap info from files as well */
260265 extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps);
261266
include/linux/compaction.h+1−1
@@ -86,7 +86,7 @@ static inline unsigned long compact_gap(unsigned int order) · 85 unmodified lines
8686 #ifdef CONFIG_COMPACTION
8787 extern int sysctl_compact_memory;
8888 extern int sysctl_compaction_handler(struct ctl_table *table, int write,
89− void __user *buffer, size_t *length, loff_t *ppos);
89+ void *buffer, size_t *length, loff_t *ppos);
9090 extern int sysctl_extfrag_threshold;
9191 extern int sysctl_compact_unevictable_allowed;
9292
include/linux/coredump.h+4−0
@@ -22,4 +22,8 @@ extern void do_coredump(const kernel_siginfo_t *siginfo); · 21 unmodified lines
2222 static inline void do_coredump(const kernel_siginfo_t *siginfo) {}
2323 #endif
2424
25+extern int core_uses_pid;
26+extern char core_pattern[];
27+extern unsigned int core_pipe_limit;
28+
2529 #endif /* _LINUX_COREDUMP_H */
include/linux/delay.h+11−0
@@ -65,4 +65,15 @@ static inline void ssleep(unsigned int seconds) · 64 unmodified lines
6565 msleep(seconds * 1000);
6666 }
6767
68+/* see Documentation/timers/timers-howto.rst for the thresholds */
69+static inline void fsleep(unsigned long usecs)
70+{
71+ if (usecs <= 10)
72+ udelay(usecs);
73+ else if (usecs <= 20000)
74+ usleep_range(usecs, 2 * usecs);
75+ else
76+ msleep(DIV_ROUND_UP(usecs, 1000));
77+}
78+
6879 #endif /* defined(_LINUX_DELAY_H) */
include/linux/dsa/8021q.h+57−0
@@ -12,11 +12,31 @@ struct sk_buff; · 11 unmodified lines
1212 struct net_device;
1313 struct packet_type;
1414
15+struct dsa_8021q_crosschip_link {
16+ struct list_head list;
17+ int port;
18+ struct dsa_switch *other_ds;
19+ int other_port;
20+ refcount_t refcount;
21+};
22+
23+#define DSA_8021Q_N_SUBVLAN 8
24+
1525 #if IS_ENABLED(CONFIG_NET_DSA_TAG_8021Q)
1626
1727 int dsa_port_setup_8021q_tagging(struct dsa_switch *ds, int index,
1828 bool enabled);
1929
30+int dsa_8021q_crosschip_bridge_join(struct dsa_switch *ds, int port,
31+ struct dsa_switch *other_ds,
32+ int other_port,
33+ struct list_head *crosschip_links);
34+
35+int dsa_8021q_crosschip_bridge_leave(struct dsa_switch *ds, int port,
36+ struct dsa_switch *other_ds,
37+ int other_port,
38+ struct list_head *crosschip_links);
39+
2040 struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
2141 u16 tpid, u16 tci);
2242
@@ -24,10 +44,16 @@ u16 dsa_8021q_tx_vid(struct dsa_switch *ds, int port); · 1 unmodified line
2444
2545 u16 dsa_8021q_rx_vid(struct dsa_switch *ds, int port);
2646
47+u16 dsa_8021q_rx_vid_subvlan(struct dsa_switch *ds, int port, u16 subvlan);
48+
2749 int dsa_8021q_rx_switch_id(u16 vid);
2850
2951 int dsa_8021q_rx_source_port(u16 vid);
3052
53+u16 dsa_8021q_rx_subvlan(u16 vid);
54+
55+bool vid_is_dsa_8021q(u16 vid);
56+
3157 #else
3258
3359 int dsa_port_setup_8021q_tagging(struct dsa_switch *ds, int index,
@@ -36,6 +62,22 @@ int dsa_port_setup_8021q_tagging(struct dsa_switch *ds, int index, · 2 unmodified lines
3662 return 0;
3763 }
3864
65+int dsa_8021q_crosschip_bridge_join(struct dsa_switch *ds, int port,
66+ struct dsa_switch *other_ds,
67+ int other_port,
68+ struct list_head *crosschip_links)
69+{
70+ return 0;
71+}
72+
73+int dsa_8021q_crosschip_bridge_leave(struct dsa_switch *ds, int port,
74+ struct dsa_switch *other_ds,
75+ int other_port,
76+ struct list_head *crosschip_links)
77+{
78+ return 0;
79+}
80+
3981 struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
4082 u16 tpid, u16 tci)
4183 {
@@ -52,6 +94,11 @@ u16 dsa_8021q_rx_vid(struct dsa_switch *ds, int port) · 10 unmodified lines
5294 return 0;
5395 }
5496
97+u16 dsa_8021q_rx_vid_subvlan(struct dsa_switch *ds, int port, u16 subvlan)
98+{
99+ return 0;
100+}
101+
55102 int dsa_8021q_rx_switch_id(u16 vid)
56103 {
57104 return 0;
@@ -62,6 +109,16 @@ int dsa_8021q_rx_source_port(u16 vid) · 4 unmodified lines
62109 return 0;
63110 }
64111
112+u16 dsa_8021q_rx_subvlan(u16 vid)
113+{
114+ return 0;
115+}
116+
117+bool vid_is_dsa_8021q(u16 vid)
118+{
119+ return false;
120+}
121+
65122 #endif /* IS_ENABLED(CONFIG_NET_DSA_TAG_8021Q) */
66123
67124 #endif /* _NET_DSA_8021Q_H */
include/linux/dsa/sja1105.h+3−0
@@ -9,6 +9,7 @@ · 8 unmodified lines
99
1010 #include <linux/skbuff.h>
1111 #include <linux/etherdevice.h>
12+#include <linux/dsa/8021q.h>
1213 #include <net/dsa.h>
1314
1415 #define ETH_P_SJA1105 ETH_P_DSA_8021Q
@@ -53,12 +54,14 @@ struct sja1105_skb_cb { · 38 unmodified lines
5354 ((struct sja1105_skb_cb *)DSA_SKB_CB_PRIV(skb))
5455
5556 struct sja1105_port {
57+ u16 subvlan_map[DSA_8021Q_N_SUBVLAN];
5658 struct kthread_worker *xmit_worker;
5759 struct kthread_work xmit_work;
5860 struct sk_buff_head xmit_queue;
5961 struct sja1105_tagger_data *data;
6062 struct dsa_port *dp;
6163 bool hwts_tx_en;
64+ u16 xmit_tpid;
6265 };
6366
6467 #endif /* _NET_DSA_SJA1105_H */
include/linux/etherdevice.h+12−0
@@ -20,6 +20,7 @@ · 19 unmodified lines
2020 #include <linux/if_ether.h>
2121 #include <linux/netdevice.h>
2222 #include <linux/random.h>
23+#include <linux/crc32.h>
2324 #include <asm/unaligned.h>
2425 #include <asm/bitsperlong.h>
2526
@@ -265,6 +266,17 @@ static inline void eth_hw_addr_random(struct net_device *dev) · 239 unmodified lines
265266 eth_random_addr(dev->dev_addr);
266267 }
267268
269+/**
270+ * eth_hw_addr_crc - Calculate CRC from netdev_hw_addr
271+ * @ha: pointer to hardware address
272+ *
273+ * Calculate CRC from a hardware address as basis for filter hashes.
274+ */
275+static inline u32 eth_hw_addr_crc(struct netdev_hw_addr *ha)
276+{
277+ return ether_crc(ETH_ALEN, ha->addr);
278+}
279+
268280 /**
269281 * ether_addr_copy - Copy an Ethernet address
270282 * @dst: Pointer to a six-byte array Ethernet address destination
include/linux/ethtool_netlink.h+54−0
@@ -14,4 +14,58 @@ enum ethtool_multicast_groups { · 13 unmodified lines
1414 ETHNL_MCGRP_MONITOR,
1515 };
1616
17+struct phy_device;
18+
19+#if IS_ENABLED(CONFIG_ETHTOOL_NETLINK)
20+int ethnl_cable_test_alloc(struct phy_device *phydev, u8 cmd);
21+void ethnl_cable_test_free(struct phy_device *phydev);
22+void ethnl_cable_test_finished(struct phy_device *phydev);
23+int ethnl_cable_test_result(struct phy_device *phydev, u8 pair, u8 result);
24+int ethnl_cable_test_fault_length(struct phy_device *phydev, u8 pair, u32 cm);
25+int ethnl_cable_test_amplitude(struct phy_device *phydev, u8 pair, s16 mV);
26+int ethnl_cable_test_pulse(struct phy_device *phydev, u16 mV);
27+int ethnl_cable_test_step(struct phy_device *phydev, u32 first, u32 last,
28+ u32 step);
29+#else
30+static inline int ethnl_cable_test_alloc(struct phy_device *phydev, u8 cmd)
31+{
32+ return -EOPNOTSUPP;
33+}
34+
35+static inline void ethnl_cable_test_free(struct phy_device *phydev)
36+{
37+}
38+
39+static inline void ethnl_cable_test_finished(struct phy_device *phydev)
40+{
41+}
42+static inline int ethnl_cable_test_result(struct phy_device *phydev, u8 pair,
43+ u8 result)
44+{
45+ return -EOPNOTSUPP;
46+}
47+
48+static inline int ethnl_cable_test_fault_length(struct phy_device *phydev,
49+ u8 pair, u32 cm)
50+{
51+ return -EOPNOTSUPP;
52+}
53+
54+static inline int ethnl_cable_test_amplitude(struct phy_device *phydev,
55+ u8 pair, s16 mV)
56+{
57+ return -EOPNOTSUPP;
58+}
59+
60+static inline int ethnl_cable_test_pulse(struct phy_device *phydev, u16 mV)
61+{
62+ return -EOPNOTSUPP;
63+}
64+
65+static inline int ethnl_cable_test_step(struct phy_device *phydev, u32 first,
66+ u32 last, u32 step)
67+{
68+ return -EOPNOTSUPP;
69+}
70+#endif /* IS_ENABLED(ETHTOOL_NETLINK) */
1771 #endif /* _LINUX_ETHTOOL_NETLINK_H_ */
include/linux/file.h+2−0
@@ -94,4 +94,6 @@ extern void fd_install(unsigned int fd, struct file *file); · 93 unmodified lines
9494 extern void flush_delayed_fput(void);
9595 extern void __fput_sync(struct file *);
9696
97+extern unsigned int sysctl_nr_open_min, sysctl_nr_open_max;
98+
9799 #endif /* __LINUX_FILE_H */
include/linux/filter.h+2−6
@@ -545,10 +545,8 @@ struct bpf_prog { · 544 unmodified lines
545545 unsigned int (*bpf_func)(const void *ctx,
546546 const struct bpf_insn *insn);
547547 /* Instructions for interpreter */
548− union {
549− struct sock_filter insns[0];
550− struct bpf_insn insnsi[0];
551− };
548+ struct sock_filter insns[0];
549+ struct bpf_insn insnsi[];
552550 };
553551
554552 struct sk_filter {
@@ -863,8 +861,6 @@ int bpf_prog_create(struct bpf_prog **pfp, struct sock_fprog_kern *fprog); · 308 unmodified lines
863861 int bpf_prog_create_from_user(struct bpf_prog **pfp, struct sock_fprog *fprog,
864862 bpf_aux_classic_check_t trans, bool save_orig);
865863 void bpf_prog_destroy(struct bpf_prog *fp);
866−const struct bpf_func_proto *
867−bpf_base_func_proto(enum bpf_func_id func_id);
868864
869865 int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
870866 int sk_attach_bpf(u32 ufd, struct sock *sk);
include/linux/fs.h+3−3
@@ -3555,11 +3555,11 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf, · 3554 unmodified lines
35553555
35563556 struct ctl_table;
35573557 int proc_nr_files(struct ctl_table *table, int write,
3558− void __user *buffer, size_t *lenp, loff_t *ppos);
3558+ void *buffer, size_t *lenp, loff_t *ppos);
35593559 int proc_nr_dentry(struct ctl_table *table, int write,
3560− void __user *buffer, size_t *lenp, loff_t *ppos);
3560+ void *buffer, size_t *lenp, loff_t *ppos);
35613561 int proc_nr_inodes(struct ctl_table *table, int write,
3562− void __user *buffer, size_t *lenp, loff_t *ppos);
3562+ void *buffer, size_t *lenp, loff_t *ppos);
35633563 int __init get_filesystem_list(char *buf);
35643564
35653565 #define __FMODE_EXEC ((__force int) FMODE_EXEC)
include/linux/fsl/ptp_qoriq.h+1−1
@@ -135,7 +135,7 @@ struct ptp_qoriq_registers { · 134 unmodified lines
135135 #define DEFAULT_CKSEL 1
136136 #define DEFAULT_TMR_PRSC 2
137137 #define DEFAULT_FIPER1_PERIOD 1000000000
138−#define DEFAULT_FIPER2_PERIOD 100000
138+#define DEFAULT_FIPER2_PERIOD 1000000000
139139
140140 struct ptp_qoriq {
141141 void __iomem *base;
include/linux/ftrace.h+1−2
@@ -1028,8 +1028,7 @@ extern void disable_trace_on_warning(void); · 1027 unmodified lines
10281028 extern int __disable_trace_on_warning;
10291029
10301030 int tracepoint_printk_sysctl(struct ctl_table *table, int write,
1031− void __user *buffer, size_t *lenp,
1032− loff_t *ppos);
1031+ void *buffer, size_t *lenp, loff_t *ppos);
10331032
10341033 #else /* CONFIG_TRACING */
10351034 static inline void disable_trace_on_warning(void) { }
include/linux/hugetlb.h+7−8
@@ -105,14 +105,13 @@ struct hugepage_subpool *hugepage_new_subpool(struct hstate *h, long max_hpages, · 104 unmodified lines
105105 void hugepage_put_subpool(struct hugepage_subpool *spool);
106106
107107 void reset_vma_resv_huge_pages(struct vm_area_struct *vma);
108−int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
109−int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
110−int hugetlb_treat_movable_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
111−
112−#ifdef CONFIG_NUMA
113−int hugetlb_mempolicy_sysctl_handler(struct ctl_table *, int,
114− void __user *, size_t *, loff_t *);
115−#endif
108+int hugetlb_sysctl_handler(struct ctl_table *, int, void *, size_t *, loff_t *);
109+int hugetlb_overcommit_handler(struct ctl_table *, int, void *, size_t *,
110+ loff_t *);
111+int hugetlb_treat_movable_handler(struct ctl_table *, int, void *, size_t *,
112+ loff_t *);
113+int hugetlb_mempolicy_sysctl_handler(struct ctl_table *, int, void *, size_t *,
114+ loff_t *);
116115
117116 int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *);
118117 long follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *,
include/linux/ieee80211.h+359−8
@@ -9,7 +9,7 @@ · 8 unmodified lines
99 * Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>
1010 * Copyright (c) 2013 - 2014 Intel Mobile Communications GmbH
1111 * Copyright (c) 2016 - 2017 Intel Deutschland GmbH
12− * Copyright (c) 2018 - 2019 Intel Corporation
12+ * Copyright (c) 2018 - 2020 Intel Corporation
1313 */
1414
1515 #ifndef LINUX_IEEE80211_H
@@ -105,6 +105,51 @@ · 89 unmodified lines
105105
106106 /* extension, added by 802.11ad */
107107 #define IEEE80211_STYPE_DMG_BEACON 0x0000
108+#define IEEE80211_STYPE_S1G_BEACON 0x0010
109+
110+/* bits unique to S1G beacon */
111+#define IEEE80211_S1G_BCN_NEXT_TBTT 0x100
112+
113+/* see 802.11ah-2016 9.9 NDP CMAC frames */
114+#define IEEE80211_S1G_1MHZ_NDP_BITS 25
115+#define IEEE80211_S1G_1MHZ_NDP_BYTES 4
116+#define IEEE80211_S1G_2MHZ_NDP_BITS 37
117+#define IEEE80211_S1G_2MHZ_NDP_BYTES 5
118+
119+#define IEEE80211_NDP_FTYPE_CTS 0
120+#define IEEE80211_NDP_FTYPE_CF_END 0
121+#define IEEE80211_NDP_FTYPE_PS_POLL 1
122+#define IEEE80211_NDP_FTYPE_ACK 2
123+#define IEEE80211_NDP_FTYPE_PS_POLL_ACK 3
124+#define IEEE80211_NDP_FTYPE_BA 4
125+#define IEEE80211_NDP_FTYPE_BF_REPORT_POLL 5
126+#define IEEE80211_NDP_FTYPE_PAGING 6
127+#define IEEE80211_NDP_FTYPE_PREQ 7
128+
129+#define SM64(f, v) ((((u64)v) << f##_S) & f)
130+
131+/* NDP CMAC frame fields */
132+#define IEEE80211_NDP_FTYPE 0x0000000000000007
133+#define IEEE80211_NDP_FTYPE_S 0x0000000000000000
134+
135+/* 1M Probe Request 11ah 9.9.3.1.1 */
136+#define IEEE80211_NDP_1M_PREQ_ANO 0x0000000000000008
137+#define IEEE80211_NDP_1M_PREQ_ANO_S 3
138+#define IEEE80211_NDP_1M_PREQ_CSSID 0x00000000000FFFF0
139+#define IEEE80211_NDP_1M_PREQ_CSSID_S 4
140+#define IEEE80211_NDP_1M_PREQ_RTYPE 0x0000000000100000
141+#define IEEE80211_NDP_1M_PREQ_RTYPE_S 20
142+#define IEEE80211_NDP_1M_PREQ_RSV 0x0000000001E00000
143+#define IEEE80211_NDP_1M_PREQ_RSV 0x0000000001E00000
144+/* 2M Probe Request 11ah 9.9.3.1.2 */
145+#define IEEE80211_NDP_2M_PREQ_ANO 0x0000000000000008
146+#define IEEE80211_NDP_2M_PREQ_ANO_S 3
147+#define IEEE80211_NDP_2M_PREQ_CSSID 0x0000000FFFFFFFF0
148+#define IEEE80211_NDP_2M_PREQ_CSSID_S 4
149+#define IEEE80211_NDP_2M_PREQ_RTYPE 0x0000001000000000
150+#define IEEE80211_NDP_2M_PREQ_RTYPE_S 36
151+
152+#define IEEE80211_ANO_NETTYPE_WILD 15
108153
109154 /* control extension - for IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTL_EXT */
110155 #define IEEE80211_CTL_EXT_POLL 0x2000
@@ -121,6 +166,21 @@ · 10 unmodified lines
121166 #define IEEE80211_MAX_SN IEEE80211_SN_MASK
122167 #define IEEE80211_SN_MODULO (IEEE80211_MAX_SN + 1)
123168
169+
170+/* PV1 Layout 11ah 9.8.3.1 */
171+#define IEEE80211_PV1_FCTL_VERS 0x0003
172+#define IEEE80211_PV1_FCTL_FTYPE 0x001c
173+#define IEEE80211_PV1_FCTL_STYPE 0x00e0
174+#define IEEE80211_PV1_FCTL_TODS 0x0100
175+#define IEEE80211_PV1_FCTL_MOREFRAGS 0x0200
176+#define IEEE80211_PV1_FCTL_PM 0x0400
177+#define IEEE80211_PV1_FCTL_MOREDATA 0x0800
178+#define IEEE80211_PV1_FCTL_PROTECTED 0x1000
179+#define IEEE80211_PV1_FCTL_END_SP 0x2000
180+#define IEEE80211_PV1_FCTL_RELAYED 0x4000
181+#define IEEE80211_PV1_FCTL_ACK_POLICY 0x8000
182+#define IEEE80211_PV1_FCTL_CTL_EXT 0x0f00
183+
124184 static inline bool ieee80211_sn_less(u16 sn1, u16 sn2)
125185 {
126186 return ((sn1 - sn2) & IEEE80211_SN_MASK) > (IEEE80211_SN_MODULO >> 1);
@@ -148,6 +208,7 @@ static inline u16 ieee80211_sn_sub(u16 sn1, u16 sn2) · 21 unmodified lines
148208 #define IEEE80211_MAX_FRAG_THRESHOLD 2352
149209 #define IEEE80211_MAX_RTS_THRESHOLD 2353
150210 #define IEEE80211_MAX_AID 2007
211+#define IEEE80211_MAX_AID_S1G 8191
151212 #define IEEE80211_MAX_TIM_LEN 251
152213 #define IEEE80211_MAX_MESH_PEERINGS 63
153214 /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
@@ -371,6 +432,17 @@ static inline bool ieee80211_is_data(__le16 fc) · 217 unmodified lines
371432 cpu_to_le16(IEEE80211_FTYPE_DATA);
372433 }
373434
435+/**
436+ * ieee80211_is_ext - check if type is IEEE80211_FTYPE_EXT
437+ * @fc: frame control bytes in little-endian byteorder
438+ */
439+static inline bool ieee80211_is_ext(__le16 fc)
440+{
441+ return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE)) ==
442+ cpu_to_le16(IEEE80211_FTYPE_EXT);
443+}
444+
445+
374446 /**
375447 * ieee80211_is_data_qos - check if type is IEEE80211_FTYPE_DATA and IEEE80211_STYPE_QOS_DATA is set
376448 * @fc: frame control bytes in little-endian byteorder
@@ -469,6 +541,18 @@ static inline bool ieee80211_is_beacon(__le16 fc) · 92 unmodified lines
469541 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON);
470542 }
471543
544+/**
545+ * ieee80211_is_s1g_beacon - check if IEEE80211_FTYPE_EXT &&
546+ * IEEE80211_STYPE_S1G_BEACON
547+ * @fc: frame control bytes in little-endian byteorder
548+ */
549+static inline bool ieee80211_is_s1g_beacon(__le16 fc)
550+{
551+ return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE |
552+ IEEE80211_FCTL_STYPE)) ==
553+ cpu_to_le16(IEEE80211_FTYPE_EXT | IEEE80211_STYPE_S1G_BEACON);
554+}
555+
472556 /**
473557 * ieee80211_is_atim - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ATIM
474558 * @fc: frame control bytes in little-endian byteorder
@@ -716,7 +800,7 @@ struct ieee80211_msrment_ie { · 241 unmodified lines
716800 u8 token;
717801 u8 mode;
718802 u8 type;
719− u8 request[0];
803+ u8 request[];
720804 } __packed;
721805
722806 /**
@@ -859,6 +943,7 @@ enum ieee80211_ht_chanwidth_values { · 136 unmodified lines
859943 * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_40MHZ: 40 MHz channel width
860944 * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_80MHZ: 80 MHz channel width
861945 * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_160MHZ: 160 MHz or 80+80 MHz channel width
946+ * @IEEE80211_OPMODE_NOTIF_BW_160_80P80: 160 / 80+80 MHz indicator flag
862947 * @IEEE80211_OPMODE_NOTIF_RX_NSS_MASK: number of spatial streams mask
863948 * (the NSS value is the value of this field + 1)
864949 * @IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT: number of spatial streams shift
@@ -866,11 +951,12 @@ enum ieee80211_ht_chanwidth_values { · 1 unmodified line
866951 * using a beamforming steering matrix
867952 */
868953 enum ieee80211_vht_opmode_bits {
869− IEEE80211_OPMODE_NOTIF_CHANWIDTH_MASK = 3,
954+ IEEE80211_OPMODE_NOTIF_CHANWIDTH_MASK = 0x03,
870955 IEEE80211_OPMODE_NOTIF_CHANWIDTH_20MHZ = 0,
871956 IEEE80211_OPMODE_NOTIF_CHANWIDTH_40MHZ = 1,
872957 IEEE80211_OPMODE_NOTIF_CHANWIDTH_80MHZ = 2,
873958 IEEE80211_OPMODE_NOTIF_CHANWIDTH_160MHZ = 3,
959+ IEEE80211_OPMODE_NOTIF_BW_160_80P80 = 0x04,
874960 IEEE80211_OPMODE_NOTIF_RX_NSS_MASK = 0x70,
875961 IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT = 4,
876962 IEEE80211_OPMODE_NOTIF_RX_NSS_TYPE_BF = 0x80,
@@ -898,6 +984,59 @@ struct ieee80211_addba_ext_ie { · 21 unmodified lines
898984 u8 data;
899985 } __packed;
900986
987+/**
988+ * struct ieee80211_s1g_bcn_compat_ie
989+ *
990+ * S1G Beacon Compatibility element
991+ */
992+struct ieee80211_s1g_bcn_compat_ie {
993+ __le16 compat_info;
994+ __le16 beacon_int;
995+ __le32 tsf_completion;
996+} __packed;
997+
998+/**
999+ * struct ieee80211_s1g_oper_ie
1000+ *
1001+ * S1G Operation element
1002+ */
1003+struct ieee80211_s1g_oper_ie {
1004+ u8 ch_width;
1005+ u8 oper_class;
1006+ u8 primary_ch;
1007+ u8 oper_ch;
1008+ __le16 basic_mcs_nss;
1009+} __packed;
1010+
1011+/**
1012+ * struct ieee80211_aid_response_ie
1013+ *
1014+ * AID Response element
1015+ */
1016+struct ieee80211_aid_response_ie {
1017+ __le16 aid;
1018+ u8 switch_count;
1019+ __le16 response_int;
1020+} __packed;
1021+
1022+struct ieee80211_s1g_cap {
1023+ u8 capab_info[10];
1024+ u8 supp_mcs_nss[5];
1025+} __packed;
1026+
1027+struct ieee80211_ext {
1028+ __le16 frame_control;
1029+ __le16 duration;
1030+ union {
1031+ struct {
1032+ u8 sa[ETH_ALEN];
1033+ __le32 timestamp;
1034+ u8 change_seq;
1035+ u8 variable[0];
1036+ } __packed s1g_beacon;
1037+ } u;
1038+} __packed __aligned(2);
1039+
9011040 struct ieee80211_mgmt {
9021041 __le16 frame_control;
9031042 __le16 duration;
@@ -1065,6 +1204,7 @@ struct ieee80211_mgmt { · 161 unmodified lines
10651204 /* Supported rates membership selectors */
10661205 #define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127
10671206 #define BSS_MEMBERSHIP_SELECTOR_VHT_PHY 126
1207+#define BSS_MEMBERSHIP_SELECTOR_HE_PHY 122
10681208
10691209 /* mgmt header + 1 byte category code */
10701210 #define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u)
@@ -1641,7 +1781,7 @@ struct ieee80211_he_operation { · 570 unmodified lines
16411781 __le32 he_oper_params;
16421782 __le16 he_mcs_nss_set;
16431783 /* Optional 0,1,3,4,5,7 or 8 bytes: depends on @he_oper_params */
1644− u8 optional[0];
1784+ u8 optional[];
16451785 } __packed;
16461786
16471787 /**
@@ -1653,7 +1793,7 @@ struct ieee80211_he_operation { · 5 unmodified lines
16531793 struct ieee80211_he_spr {
16541794 u8 he_sr_control;
16551795 /* Optional 0 to 19 bytes: depends on @he_sr_control */
1656− u8 optional[0];
1796+ u8 optional[];
16571797 } __packed;
16581798
16591799 /**
@@ -1731,6 +1871,9 @@ struct ieee80211_mu_edca_param_set { · 71 unmodified lines
17311871 * @ext_nss_bw_capable: indicates whether or not the local transmitter
17321872 * (rate scaling algorithm) can deal with the new logic
17331873 * (dot11VHTExtendedNSSBWCapable)
1874+ * @max_vht_nss: current maximum NSS as advertised by the STA in
1875+ * operating mode notification, can be 0 in which case the
1876+ * capability data will be used to derive this (from MCS support)
17341877 *
17351878 * Due to the VHT Extended NSS Bandwidth Support, the maximum NSS can
17361879 * vary for a given BW/MCS. This function parses the data.
@@ -1739,7 +1882,8 @@ struct ieee80211_mu_edca_param_set { · 2 unmodified lines
17391882 */
17401883 int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap,
17411884 enum ieee80211_vht_chanwidth bw,
1742− int mcs, bool ext_nss_bw_capable);
1885+ int mcs, bool ext_nss_bw_capable,
1886+ unsigned int max_vht_nss);
17431887
17441888 /* 802.11ax HE MAC capabilities */
17451889 #define IEEE80211_HE_MAC_CAP0_HTC_HE 0x01
@@ -1814,6 +1958,8 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap, · 68 unmodified lines
18141958 #define IEEE80211_HE_MAC_CAP3_FLEX_TWT_SCHED 0x40
18151959 #define IEEE80211_HE_MAC_CAP3_RX_CTRL_FRAME_TO_MULTIBSS 0x80
18161960
1961+#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT 3
1962+
18171963 #define IEEE80211_HE_MAC_CAP4_BSRP_BQRP_A_MPDU_AGG 0x01
18181964 #define IEEE80211_HE_MAC_CAP4_QTP 0x02
18191965 #define IEEE80211_HE_MAC_CAP4_BQR 0x04
@@ -1835,6 +1981,9 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap, · 15 unmodified lines
18351981 #define IEEE80211_HE_MAC_CAP5_PUNCTURED_SOUNDING 0x40
18361982 #define IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX 0x80
18371983
1984+#define IEEE80211_HE_VHT_MAX_AMPDU_FACTOR 20
1985+#define IEEE80211_HE_HT_MAX_AMPDU_FACTOR 16
1986+
18381987 /* 802.11ax HE PHY capabilities */
18391988 #define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G 0x02
18401989 #define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G 0x04
@@ -2060,6 +2209,28 @@ ieee80211_he_ppe_size(u8 ppe_thres_hdr, const u8 *phy_cap_info) · 219 unmodified lines
20602209 #define IEEE80211_HE_OPERATION_PARTIAL_BSS_COLOR 0x40000000
20612210 #define IEEE80211_HE_OPERATION_BSS_COLOR_DISABLED 0x80000000
20622211
2212+/**
2213+ * ieee80211_he_6ghz_oper - HE 6 GHz operation Information field
2214+ * @primary: primary channel
2215+ * @control: control flags
2216+ * @ccfs0: channel center frequency segment 0
2217+ * @ccfs1: channel center frequency segment 1
2218+ * @minrate: minimum rate (in 1 Mbps units)
2219+ */
2220+struct ieee80211_he_6ghz_oper {
2221+ u8 primary;
2222+#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH 0x3
2223+#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_20MHZ 0
2224+#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_40MHZ 1
2225+#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_80MHZ 2
2226+#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_160MHZ 3
2227+#define IEEE80211_HE_6GHZ_OPER_CTRL_DUP_BEACON 0x4
2228+ u8 control;
2229+ u8 ccfs0;
2230+ u8 ccfs1;
2231+ u8 minrate;
2232+} __packed;
2233+
20632234 /*
20642235 * ieee80211_he_oper_size - calculate 802.11ax HE Operations IE size
20652236 * @he_oper_ie: byte data of the He Operations IE, stating from the byte
@@ -2086,7 +2257,7 @@ ieee80211_he_oper_size(const u8 *he_oper_ie) · 20 unmodified lines
20862257 if (he_oper_params & IEEE80211_HE_OPERATION_CO_HOSTED_BSS)
20872258 oper_len++;
20882259 if (he_oper_params & IEEE80211_HE_OPERATION_6GHZ_OP_INFO)
2089− oper_len += 4;
2260+ oper_len += sizeof(struct ieee80211_he_6ghz_oper);
20902261
20912262 /* Add the first byte (extension ID) to the total length */
20922263 oper_len++;
@@ -2094,6 +2265,34 @@ ieee80211_he_oper_size(const u8 *he_oper_ie) · 1 unmodified line
20942265 return oper_len;
20952266 }
20962267
2268+/**
2269+ * ieee80211_he_6ghz_oper - obtain 6 GHz operation field
2270+ * @he_oper: HE operation element (must be pre-validated for size)
2271+ * but may be %NULL
2272+ *
2273+ * Return: a pointer to the 6 GHz operation field, or %NULL
2274+ */
2275+static inline const struct ieee80211_he_6ghz_oper *
2276+ieee80211_he_6ghz_oper(const struct ieee80211_he_operation *he_oper)
2277+{
2278+ const u8 *ret = (void *)&he_oper->optional;
2279+ u32 he_oper_params;
2280+
2281+ if (!he_oper)
2282+ return NULL;
2283+
2284+ he_oper_params = le32_to_cpu(he_oper->he_oper_params);
2285+
2286+ if (!(he_oper_params & IEEE80211_HE_OPERATION_6GHZ_OP_INFO))
2287+ return NULL;
2288+ if (he_oper_params & IEEE80211_HE_OPERATION_VHT_OPER_INFO)
2289+ ret += 3;
2290+ if (he_oper_params & IEEE80211_HE_OPERATION_CO_HOSTED_BSS)
2291+ ret++;
2292+
2293+ return (void *)ret;
2294+}
2295+
20972296 /* HE Spatial Reuse defines */
20982297 #define IEEE80211_HE_SPR_NON_SRG_OFFSET_PRESENT 0x4
20992298 #define IEEE80211_HE_SPR_SRG_INFORMATION_PRESENT 0x8
@@ -2130,6 +2329,86 @@ ieee80211_he_spr_size(const u8 *he_spr_ie) · 30 unmodified lines
21302329 return spr_len;
21312330 }
21322331
2332+/* S1G Capabilities Information field */
2333+#define S1G_CAPAB_B0_S1G_LONG BIT(0)
2334+#define S1G_CAPAB_B0_SGI_1MHZ BIT(1)
2335+#define S1G_CAPAB_B0_SGI_2MHZ BIT(2)
2336+#define S1G_CAPAB_B0_SGI_4MHZ BIT(3)
2337+#define S1G_CAPAB_B0_SGI_8MHZ BIT(4)
2338+#define S1G_CAPAB_B0_SGI_16MHZ BIT(5)
2339+#define S1G_CAPAB_B0_SUPP_CH_WIDTH_MASK (BIT(6) | BIT(7))
2340+#define S1G_CAPAB_B0_SUPP_CH_WIDTH_SHIFT 6
2341+
2342+#define S1G_CAPAB_B1_RX_LDPC BIT(0)
2343+#define S1G_CAPAB_B1_TX_STBC BIT(1)
2344+#define S1G_CAPAB_B1_RX_STBC BIT(2)
2345+#define S1G_CAPAB_B1_SU_BFER BIT(3)
2346+#define S1G_CAPAB_B1_SU_BFEE BIT(4)
2347+#define S1G_CAPAB_B1_BFEE_STS_MASK (BIT(5) | BIT(6) | BIT(7))
2348+#define S1G_CAPAB_B1_BFEE_STS_SHIFT 5
2349+
2350+#define S1G_CAPAB_B2_SOUNDING_DIMENSIONS_MASK (BIT(0) | BIT(1) | BIT(2))
2351+#define S1G_CAPAB_B2_SOUNDING_DIMENSIONS_SHIFT 0
2352+#define S1G_CAPAB_B2_MU_BFER BIT(3)
2353+#define S1G_CAPAB_B2_MU_BFEE BIT(4)
2354+#define S1G_CAPAB_B2_PLUS_HTC_VHT BIT(5)
2355+#define S1G_CAPAB_B2_TRAVELING_PILOT_MASK (BIT(6) | BIT(7))
2356+#define S1G_CAPAB_B2_TRAVELING_PILOT_SHIFT 6
2357+
2358+#define S1G_CAPAB_B3_RD_RESPONDER BIT(0)
2359+#define S1G_CAPAB_B3_HT_DELAYED_BA BIT(1)
2360+#define S1G_CAPAB_B3_MAX_MPDU_LEN BIT(2)
2361+#define S1G_CAPAB_B3_MAX_AMPDU_LEN_EXP_MASK (BIT(3) | BIT(4))
2362+#define S1G_CAPAB_B3_MAX_AMPDU_LEN_EXP_SHIFT 3
2363+#define S1G_CAPAB_B3_MIN_MPDU_START_MASK (BIT(5) | BIT(6) | BIT(7))
2364+#define S1G_CAPAB_B3_MIN_MPDU_START_SHIFT 5
2365+
2366+#define S1G_CAPAB_B4_UPLINK_SYNC BIT(0)
2367+#define S1G_CAPAB_B4_DYNAMIC_AID BIT(1)
2368+#define S1G_CAPAB_B4_BAT BIT(2)
2369+#define S1G_CAPAB_B4_TIME_ADE BIT(3)
2370+#define S1G_CAPAB_B4_NON_TIM BIT(4)
2371+#define S1G_CAPAB_B4_GROUP_AID BIT(5)
2372+#define S1G_CAPAB_B4_STA_TYPE_MASK (BIT(6) | BIT(7))
2373+#define S1G_CAPAB_B4_STA_TYPE_SHIFT 6
2374+
2375+#define S1G_CAPAB_B5_CENT_AUTH_CONTROL BIT(0)
2376+#define S1G_CAPAB_B5_DIST_AUTH_CONTROL BIT(1)
2377+#define S1G_CAPAB_B5_AMSDU BIT(2)
2378+#define S1G_CAPAB_B5_AMPDU BIT(3)
2379+#define S1G_CAPAB_B5_ASYMMETRIC_BA BIT(4)
2380+#define S1G_CAPAB_B5_FLOW_CONTROL BIT(5)
2381+#define S1G_CAPAB_B5_SECTORIZED_BEAM_MASK (BIT(6) | BIT(7))
2382+#define S1G_CAPAB_B5_SECTORIZED_BEAM_SHIFT 6
2383+
2384+#define S1G_CAPAB_B6_OBSS_MITIGATION BIT(0)
2385+#define S1G_CAPAB_B6_FRAGMENT_BA BIT(1)
2386+#define S1G_CAPAB_B6_NDP_PS_POLL BIT(2)
2387+#define S1G_CAPAB_B6_RAW_OPERATION BIT(3)
2388+#define S1G_CAPAB_B6_PAGE_SLICING BIT(4)
2389+#define S1G_CAPAB_B6_TXOP_SHARING_IMP_ACK BIT(5)
2390+#define S1G_CAPAB_B6_VHT_LINK_ADAPT_MASK (BIT(6) | BIT(7))
2391+#define S1G_CAPAB_B6_VHT_LINK_ADAPT_SHIFT 6
2392+
2393+#define S1G_CAPAB_B7_TACK_AS_PS_POLL BIT(0)
2394+#define S1G_CAPAB_B7_DUP_1MHZ BIT(1)
2395+#define S1G_CAPAB_B7_MCS_NEGOTIATION BIT(2)
2396+#define S1G_CAPAB_B7_1MHZ_CTL_RESPONSE_PREAMBLE BIT(3)
2397+#define S1G_CAPAB_B7_NDP_BFING_REPORT_POLL BIT(4)
2398+#define S1G_CAPAB_B7_UNSOLICITED_DYN_AID BIT(5)
2399+#define S1G_CAPAB_B7_SECTOR_TRAINING_OPERATION BIT(6)
2400+#define S1G_CAPAB_B7_TEMP_PS_MODE_SWITCH BIT(7)
2401+
2402+#define S1G_CAPAB_B8_TWT_GROUPING BIT(0)
2403+#define S1G_CAPAB_B8_BDT BIT(1)
2404+#define S1G_CAPAB_B8_COLOR_MASK (BIT(2) | BIT(3) | BIT(4))
2405+#define S1G_CAPAB_B8_COLOR_SHIFT 2
2406+#define S1G_CAPAB_B8_TWT_REQUEST BIT(5)
2407+#define S1G_CAPAB_B8_TWT_RESPOND BIT(6)
2408+#define S1G_CAPAB_B8_PV1_FRAME BIT(7)
2409+
2410+#define S1G_CAPAB_B9_LINK_ADAPT_PER_CONTROL_RESPONSE BIT(0)
2411+
21332412 /* Authentication algorithms */
21342413 #define WLAN_AUTH_OPEN 0
21352414 #define WLAN_AUTH_SHARED_KEY 1
@@ -2525,8 +2804,14 @@ enum ieee80211_eid { · 389 unmodified lines
25252804 WLAN_EID_QUIET_CHANNEL = 198,
25262805 WLAN_EID_OPMODE_NOTIF = 199,
25272806
2807+ WLAN_EID_REDUCED_NEIGHBOR_REPORT = 201,
2808+
2809+ WLAN_EID_S1G_BCN_COMPAT = 213,
2810+ WLAN_EID_S1G_SHORT_BCN_INTERVAL = 214,
2811+ WLAN_EID_S1G_CAPABILITIES = 217,
25282812 WLAN_EID_VENDOR_SPECIFIC = 221,
25292813 WLAN_EID_QOS_PARAMETER = 222,
2814+ WLAN_EID_S1G_OPERATION = 232,
25302815 WLAN_EID_CAG_NUMBER = 237,
25312816 WLAN_EID_AP_CSN = 239,
25322817 WLAN_EID_FILS_INDICATION = 240,
@@ -2554,9 +2839,19 @@ enum ieee80211_eid_ext { · 21 unmodified lines
25542839 WLAN_EID_EXT_UORA = 37,
25552840 WLAN_EID_EXT_HE_MU_EDCA = 38,
25562841 WLAN_EID_EXT_HE_SPR = 39,
2842+ WLAN_EID_EXT_NDP_FEEDBACK_REPORT_PARAMSET = 41,
2843+ WLAN_EID_EXT_BSS_COLOR_CHG_ANN = 42,
2844+ WLAN_EID_EXT_QUIET_TIME_PERIOD_SETUP = 43,
2845+ WLAN_EID_EXT_ESS_REPORT = 45,
2846+ WLAN_EID_EXT_OPS = 46,
2847+ WLAN_EID_EXT_HE_BSS_LOAD = 47,
25572848 WLAN_EID_EXT_MAX_CHANNEL_SWITCH_TIME = 52,
25582849 WLAN_EID_EXT_MULTIPLE_BSSID_CONFIGURATION = 55,
25592850 WLAN_EID_EXT_NON_INHERITANCE = 56,
2851+ WLAN_EID_EXT_KNOWN_BSSID = 57,
2852+ WLAN_EID_EXT_SHORT_SSID_LIST = 58,
2853+ WLAN_EID_EXT_HE_6GHZ_CAPA = 59,
2854+ WLAN_EID_EXT_UL_MU_POWER_CAPA = 60,
25602855 };
25612856
25622857 /* Action category code */
@@ -2787,7 +3082,7 @@ enum ieee80211_tdls_actioncode { · 224 unmodified lines
27873082 #define WLAN_EXT_CAPA10_OBSS_NARROW_BW_RU_TOLERANCE_SUPPORT BIT(7)
27883083
27893084 /* Defines support for enhanced multi-bssid advertisement*/
2790−#define WLAN_EXT_CAPA11_EMA_SUPPORT BIT(1)
3085+#define WLAN_EXT_CAPA11_EMA_SUPPORT BIT(3)
27913086
27923087 /* TDLS specific payload type in the LLC/SNAP header */
27933088 #define WLAN_TDLS_SNAP_RFTYPE 0x2
@@ -3099,6 +3394,24 @@ struct ieee80211_tspec_ie { · 305 unmodified lines
30993394 __le16 medium_time;
31003395 } __packed;
31013396
3397+struct ieee80211_he_6ghz_capa {
3398+ /* uses IEEE80211_HE_6GHZ_CAP_* below */
3399+ __le16 capa;
3400+} __packed;
3401+
3402+/* HE 6 GHz band capabilities */
3403+/* uses enum ieee80211_min_mpdu_spacing values */
3404+#define IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START 0x0007
3405+/* uses enum ieee80211_vht_max_ampdu_length_exp values */
3406+#define IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP 0x0038
3407+/* uses IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_* values */
3408+#define IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN 0x00c0
3409+/* WLAN_HT_CAP_SM_PS_* values */
3410+#define IEEE80211_HE_6GHZ_CAP_SM_PS 0x0600
3411+#define IEEE80211_HE_6GHZ_CAP_RD_RESPONDER 0x0800
3412+#define IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS 0x1000
3413+#define IEEE80211_HE_6GHZ_CAP_TX_ANTPAT_CONS 0x2000
3414+
31023415 /**
31033416 * ieee80211_get_qos_ctl - get pointer to qos control bytes
31043417 * @hdr: the frame
@@ -3323,6 +3636,18 @@ static inline int ieee80211_get_tdls_action(struct sk_buff *skb, u32 hdr_size) · 218 unmodified lines
33233636 #define TU_TO_JIFFIES(x) (usecs_to_jiffies((x) * 1024))
33243637 #define TU_TO_EXP_TIME(x) (jiffies + TU_TO_JIFFIES(x))
33253638
3639+/* convert frequencies */
3640+#define MHZ_TO_KHZ(freq) ((freq) * 1000)
3641+#define KHZ_TO_MHZ(freq) ((freq) / 1000)
3642+#define PR_KHZ(f) KHZ_TO_MHZ(f), f % 1000
3643+#define KHZ_F "%d.%03d"
3644+
3645+/* convert powers */
3646+#define DBI_TO_MBI(gain) ((gain) * 100)
3647+#define MBI_TO_DBI(gain) ((gain) / 100)
3648+#define DBM_TO_MBM(gain) ((gain) * 100)
3649+#define MBM_TO_DBM(gain) ((gain) / 100)
3650+
33263651 /**
33273652 * ieee80211_action_contains_tpc - checks if the frame contains TPC element
33283653 * @skb: the skb containing the frame, length will be checked
@@ -3430,4 +3755,30 @@ static inline bool for_each_element_completed(const struct element *element, · 101 unmodified lines
34303755 #define WLAN_RSNX_CAPA_PROTECTED_TWT BIT(4)
34313756 #define WLAN_RSNX_CAPA_SAE_H2E BIT(5)
34323757
3758+/*
3759+ * reduced neighbor report, based on Draft P802.11ax_D5.0,
3760+ * section 9.4.2.170
3761+ */
3762+#define IEEE80211_AP_INFO_TBTT_HDR_TYPE 0x03
3763+#define IEEE80211_AP_INFO_TBTT_HDR_FILTERED 0x04
3764+#define IEEE80211_AP_INFO_TBTT_HDR_COLOC 0x08
3765+#define IEEE80211_AP_INFO_TBTT_HDR_COUNT 0xF0
3766+#define IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM 8
3767+#define IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM 12
3768+
3769+#define IEEE80211_RNR_TBTT_PARAMS_OCT_RECOMMENDED 0x01
3770+#define IEEE80211_RNR_TBTT_PARAMS_SAME_SSID 0x02
3771+#define IEEE80211_RNR_TBTT_PARAMS_MULTI_BSSID 0x04
3772+#define IEEE80211_RNR_TBTT_PARAMS_TRANSMITTED_BSSID 0x08
3773+#define IEEE80211_RNR_TBTT_PARAMS_COLOC_ESS 0x10
3774+#define IEEE80211_RNR_TBTT_PARAMS_PROBE_ACTIVE 0x20
3775+#define IEEE80211_RNR_TBTT_PARAMS_COLOC_AP 0x40
3776+
3777+struct ieee80211_neighbor_ap_info {
3778+ u8 tbtt_info_hdr;
3779+ u8 tbtt_info_len;
3780+ u8 op_class;
3781+ u8 channel;
3782+} __packed;
3783+
34333784 #endif /* LINUX_IEEE80211_H */
include/linux/if_bridge.h+2−0
@@ -47,6 +47,8 @@ struct br_ip_list { · 46 unmodified lines
4747 #define BR_BCAST_FLOOD BIT(14)
4848 #define BR_NEIGH_SUPPRESS BIT(15)
4949 #define BR_ISOLATED BIT(16)
50+#define BR_MRP_AWARE BIT(17)
51+#define BR_MRP_LOST_CONT BIT(18)
5052
5153 #define BR_DEFAULT_AGEING_TIME (300 * HZ)
5254
include/linux/if_team.h+2−5
@@ -67,7 +67,7 @@ struct team_port { · 66 unmodified lines
6767 u16 queue_id;
6868 struct list_head qom_list; /* node in queue override mapping list */
6969 struct rcu_head rcu;
70− long mode_priv[0];
70+ long mode_priv[];
7171 };
7272
7373 static inline struct team_port *team_port_get_rcu(const struct net_device *dev)
@@ -102,10 +102,7 @@ static inline bool team_port_dev_txable(const struct net_device *port_dev) · 28 unmodified lines
102102 static inline void team_netpoll_send_skb(struct team_port *port,
103103 struct sk_buff *skb)
104104 {
105− struct netpoll *np = port->np;
106−
107− if (np)
108− netpoll_send_skb(np, skb);
105+ netpoll_send_skb(port->np, skb);
109106 }
110107 #else
111108 static inline void team_netpoll_send_skb(struct team_port *port,
include/linux/igmp.h+1−1
@@ -123,7 +123,7 @@ extern int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf,int ifindex); · 122 unmodified lines
123123 extern int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf,
124124 struct ip_msfilter __user *optval, int __user *optlen);
125125 extern int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf,
126− struct group_filter __user *optval, int __user *optlen);
126+ struct sockaddr_storage __user *p);
127127 extern int ip_mc_sf_allow(struct sock *sk, __be32 local, __be32 rmt,
128128 int dif, int sdif);
129129 extern void ip_mc_init_dev(struct in_device *);
include/linux/inet_diag.h+5−1
@@ -71,7 +71,11 @@ static inline size_t inet_diag_msg_attrs_size(void) · 70 unmodified lines
7171 + nla_total_size(1) /* INET_DIAG_SKV6ONLY */
7272 #endif
7373 + nla_total_size(4) /* INET_DIAG_MARK */
74− + nla_total_size(4); /* INET_DIAG_CLASS_ID */
74+ + nla_total_size(4) /* INET_DIAG_CLASS_ID */
75+#ifdef CONFIG_SOCK_CGROUP_DATA
76+ + nla_total_size_64bit(sizeof(u64)) /* INET_DIAG_CGROUP_ID */
77+#endif
78+ ;
7579 }
7680 int inet_diag_msg_attrs_fill(struct sock *sk, struct sk_buff *skb,
7781 struct inet_diag_msg *r, int ext,
include/linux/iopoll.h+43−19
@@ -57,6 +57,48 @@ · 56 unmodified lines
5757 (cond) ? 0 : -ETIMEDOUT; \
5858 })
5959
60+/**
61+ * read_poll_timeout_atomic - Periodically poll an address until a condition is
62+ * met or a timeout occurs
63+ * @op: accessor function (takes @addr as its only argument)
64+ * @addr: Address to poll
65+ * @val: Variable to read the value into
66+ * @cond: Break condition (usually involving @val)
67+ * @delay_us: Time to udelay between reads in us (0 tight-loops). Should
68+ * be less than ~10us since udelay is used (see
69+ * Documentation/timers/timers-howto.rst).
70+ * @timeout_us: Timeout in us, 0 means never timeout
71+ * @delay_before_read: if it is true, delay @delay_us before read.
72+ *
73+ * Returns 0 on success and -ETIMEDOUT upon a timeout. In either
74+ * case, the last read value at @args is stored in @val.
75+ *
76+ * When available, you'll probably want to use one of the specialized
77+ * macros defined below rather than this macro directly.
78+ */
79+#define read_poll_timeout_atomic(op, val, cond, delay_us, timeout_us, \
80+ delay_before_read, args...) \
81+({ \
82+ u64 __timeout_us = (timeout_us); \
83+ unsigned long __delay_us = (delay_us); \
84+ ktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \
85+ if (delay_before_read && __delay_us) \
86+ udelay(__delay_us); \
87+ for (;;) { \
88+ (val) = op(args); \
89+ if (cond) \
90+ break; \
91+ if (__timeout_us && \
92+ ktime_compare(ktime_get(), __timeout) > 0) { \
93+ (val) = op(args); \
94+ break; \
95+ } \
96+ if (__delay_us) \
97+ udelay(__delay_us); \
98+ } \
99+ (cond) ? 0 : -ETIMEDOUT; \
100+})
101+
60102 /**
61103 * readx_poll_timeout - Periodically poll an address until a condition is met or a timeout occurs
62104 * @op: accessor function (takes @addr as its only argument)
@@ -96,25 +138,7 @@ · 33 unmodified lines
96138 * macros defined below rather than this macro directly.
97139 */
98140 #define readx_poll_timeout_atomic(op, addr, val, cond, delay_us, timeout_us) \
99−({ \
100− u64 __timeout_us = (timeout_us); \
101− unsigned long __delay_us = (delay_us); \
102− ktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \
103− for (;;) { \
104− (val) = op(addr); \
105− if (cond) \
106− break; \
107− if (__timeout_us && \
108− ktime_compare(ktime_get(), __timeout) > 0) { \
109− (val) = op(addr); \
110− break; \
111− } \
112− if (__delay_us) \
113− udelay(__delay_us); \
114− } \
115− (cond) ? 0 : -ETIMEDOUT; \
116−})
117−
141+ read_poll_timeout_atomic(op, val, cond, delay_us, timeout_us, false, addr)
118142
119143 #define readb_poll_timeout(addr, val, cond, delay_us, timeout_us) \
120144 readx_poll_timeout(readb, addr, val, cond, delay_us, timeout_us)
include/linux/kprobes.h+1−1
@@ -312,7 +312,7 @@ DEFINE_INSN_CACHE_OPS(optinsn); · 311 unmodified lines
312312 #ifdef CONFIG_SYSCTL
313313 extern int sysctl_kprobes_optimization;
314314 extern int proc_kprobes_optimization_handler(struct ctl_table *table,
315− int write, void __user *buffer,
315+ int write, void *buffer,
316316 size_t *length, loff_t *ppos);
317317 #endif
318318 extern void wait_for_kprobe_optimizer(void);
include/linux/latencytop.h+2−2
@@ -38,8 +38,8 @@ account_scheduler_latency(struct task_struct *task, int usecs, int inter) · 37 unmodified lines
3838
3939 void clear_tsk_latency_tracing(struct task_struct *p);
4040
41−extern int sysctl_latencytop(struct ctl_table *table, int write,
42− void __user *buffer, size_t *lenp, loff_t *ppos);
41+int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
42+ size_t *lenp, loff_t *ppos);
4343
4444 #else
4545
include/linux/mdio.h+31−0
@@ -9,6 +9,13 @@ · 8 unmodified lines
99 #include <uapi/linux/mdio.h>
1010 #include <linux/mod_devicetable.h>
1111
12+/* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit
13+ * IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips.
14+ */
15+#define MII_ADDR_C45 (1<<30)
16+#define MII_DEVADDR_C45_SHIFT 16
17+#define MII_REGADDR_C45_MASK GENMASK(15, 0)
18+
1219 struct gpio_desc;
1320 struct mii_bus;
1421
@@ -326,6 +333,30 @@ int mdiobus_write_nested(struct mii_bus *bus, int addr, u32 regnum, u16 val); · 311 unmodified lines
326333 int mdiobus_modify(struct mii_bus *bus, int addr, u32 regnum, u16 mask,
327334 u16 set);
328335
336+static inline u32 mdiobus_c45_addr(int devad, u16 regnum)
337+{
338+ return MII_ADDR_C45 | devad << MII_DEVADDR_C45_SHIFT | regnum;
339+}
340+
341+static inline int __mdiobus_c45_read(struct mii_bus *bus, int prtad, int devad,
342+ u16 regnum)
343+{
344+ return __mdiobus_read(bus, prtad, mdiobus_c45_addr(devad, regnum));
345+}
346+
347+static inline int __mdiobus_c45_write(struct mii_bus *bus, int prtad, int devad,
348+ u16 regnum, u16 val)
349+{
350+ return __mdiobus_write(bus, prtad, mdiobus_c45_addr(devad, regnum),
351+ val);
352+}
353+
354+static inline int mdiobus_c45_read(struct mii_bus *bus, int prtad, int devad,
355+ u16 regnum)
356+{
357+ return mdiobus_read(bus, prtad, mdiobus_c45_addr(devad, regnum));
358+}
359+
329360 int mdiobus_register_device(struct mdio_device *mdiodev);
330361 int mdiobus_unregister_device(struct mdio_device *mdiodev);
331362 bool mdiobus_is_registered_device(struct mii_bus *bus, int addr);
include/linux/mlx4/qp.h+1−1
@@ -362,7 +362,7 @@ struct mlx4_wqe_datagram_seg { · 361 unmodified lines
362362
363363 struct mlx4_wqe_lso_seg {
364364 __be32 mss_hdr_size;
365− __be32 header[0];
365+ __be32 header[];
366366 };
367367
368368 enum mlx4_wqe_bind_seg_flags2 {
include/linux/mlx5/accel.h+13−1
@@ -76,7 +76,7 @@ struct aes_gcm_keymat { · 75 unmodified lines
7676 struct mlx5_accel_esp_xfrm_attrs {
7777 enum mlx5_accel_esp_action action;
7878 u32 esn;
79− u32 spi;
79+ __be32 spi;
8080 u32 seq;
8181 u32 tfc_pad;
8282 u32 flags;
@@ -92,6 +92,18 @@ struct mlx5_accel_esp_xfrm_attrs { · 9 unmodified lines
9292 union {
9393 struct aes_gcm_keymat aes_gcm;
9494 } keymat;
95+
96+ union {
97+ __be32 a4;
98+ __be32 a6[4];
99+ } saddr;
100+
101+ union {
102+ __be32 a4;
103+ __be32 a6[4];
104+ } daddr;
105+
106+ u8 is_ipv6;
95107 };
96108
97109 struct mlx5_accel_esp_xfrm {
include/linux/mlx5/cmd.h+0−51
@@ -1,51 +0,0 @@
1−/*
2− * Copyright (c) 2013-2015, Mellanox Technologies. All rights reserved.
3− *
4− * This software is available to you under a choice of one of two
5− * licenses. You may choose to be licensed under the terms of the GNU
6− * General Public License (GPL) Version 2, available from the file
7− * COPYING in the main directory of this source tree, or the
8− * OpenIB.org BSD license below:
9− *
10− * Redistribution and use in source and binary forms, with or
11− * without modification, are permitted provided that the following
12− * conditions are met:
13− *
14− * - Redistributions of source code must retain the above
15− * copyright notice, this list of conditions and the following
16− * disclaimer.
17− *
18− * - Redistributions in binary form must reproduce the above
19− * copyright notice, this list of conditions and the following
20− * disclaimer in the documentation and/or other materials
21− * provided with the distribution.
22− *
23− * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24− * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25− * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26− * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27− * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28− * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29− * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30− * SOFTWARE.
31− */
32−
33−#ifndef MLX5_CMD_H
34−#define MLX5_CMD_H
35−
36−#include <linux/types.h>
37−
38−struct manage_pages_layout {
39− u64 ptr;
40− u32 reserved;
41− u16 num_entries;
42− u16 func_id;
43−};
44−
45−
46−struct mlx5_cmd_alloc_uar_imm_out {
47− u32 rsvd[3];
48− u32 uarn;
49−};
50−
51−#endif /* MLX5_CMD_H */
include/linux/mlx5/cq.h+1−1
@@ -188,7 +188,7 @@ int mlx5_core_create_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq, · 187 unmodified lines
188188 u32 *in, int inlen, u32 *out, int outlen);
189189 int mlx5_core_destroy_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq);
190190 int mlx5_core_query_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq,
191− u32 *out, int outlen);
191+ u32 *out);
192192 int mlx5_core_modify_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq,
193193 u32 *in, int inlen);
194194 int mlx5_core_modify_cq_moderation(struct mlx5_core_dev *dev,
include/linux/mlx5/device.h+41−3
@@ -364,6 +364,7 @@ enum { · 363 unmodified lines
364364 enum {
365365 MLX5_GENERAL_SUBTYPE_DELAY_DROP_TIMEOUT = 0x1,
366366 MLX5_GENERAL_SUBTYPE_PCI_POWER_CHANGE_EVENT = 0x5,
367+ MLX5_GENERAL_SUBTYPE_PCI_SYNC_FOR_FW_UPDATE_EVENT = 0x8,
367368 };
368369
369370 enum {
@@ -449,10 +450,12 @@ enum { · 79 unmodified lines
449450
450451 enum {
451452 MLX5_OPC_MOD_TLS_TIS_STATIC_PARAMS = 0x1,
453+ MLX5_OPC_MOD_TLS_TIR_STATIC_PARAMS = 0x2,
452454 };
453455
454456 enum {
455457 MLX5_OPC_MOD_TLS_TIS_PROGRESS_PARAMS = 0x1,
458+ MLX5_OPC_MOD_TLS_TIR_PROGRESS_PARAMS = 0x2,
456459 };
457460
458461 enum {
@@ -689,6 +692,19 @@ struct mlx5_eqe_temp_warning { · 230 unmodified lines
689692 __be64 sensor_warning_lsb;
690693 } __packed;
691694
695+#define SYNC_RST_STATE_MASK 0xf
696+
697+enum sync_rst_state_type {
698+ MLX5_SYNC_RST_STATE_RESET_REQUEST = 0x0,
699+ MLX5_SYNC_RST_STATE_RESET_NOW = 0x1,
700+ MLX5_SYNC_RST_STATE_RESET_ABORT = 0x2,
701+};
702+
703+struct mlx5_eqe_sync_fw_update {
704+ u8 reserved_at_0[3];
705+ u8 sync_rst_state;
706+};
707+
692708 union ev_data {
693709 __be32 raw[7];
694710 struct mlx5_eqe_cmd cmd;
@@ -707,6 +723,7 @@ union ev_data { · 12 unmodified lines
707723 struct mlx5_eqe_dct dct;
708724 struct mlx5_eqe_temp_warning temp_warning;
709725 struct mlx5_eqe_xrq_err xrq_err;
726+ struct mlx5_eqe_sync_fw_update sync_fw_update;
710727 } __packed;
711728
712729 struct mlx5_eqe {
@@ -749,7 +766,7 @@ struct mlx5_err_cqe { · 36 unmodified lines
749766 };
750767
751768 struct mlx5_cqe64 {
752− u8 outer_l3_tunneled;
769+ u8 tls_outer_l3_tunneled;
753770 u8 rsvd0;
754771 __be16 wqe_id;
755772 u8 lro_tcppsh_abort_dupack;
@@ -767,7 +784,12 @@ struct mlx5_cqe64 { · 11 unmodified lines
767784 u8 l4_l3_hdr_type;
768785 __be16 vlan_info;
769786 __be32 srqn; /* [31:24]: lro_num_seg, [23:0]: srqn */
770− __be32 imm_inval_pkey;
787+ union {
788+ __be32 immediate;
789+ __be32 inval_rkey;
790+ __be32 pkey;
791+ __be32 ft_metadata;
792+ };
771793 u8 rsvd40[4];
772794 __be32 byte_cnt;
773795 __be32 timestamp_h;
@@ -834,7 +856,12 @@ static inline u8 get_cqe_l3_hdr_type(struct mlx5_cqe64 *cqe) · 60 unmodified lines
834856
835857 static inline bool cqe_is_tunneled(struct mlx5_cqe64 *cqe)
836858 {
837− return cqe->outer_l3_tunneled & 0x1;
859+ return cqe->tls_outer_l3_tunneled & 0x1;
860+}
861+
862+static inline u8 get_cqe_tls_offload(struct mlx5_cqe64 *cqe)
863+{
864+ return (cqe->tls_outer_l3_tunneled >> 3) & 0x3;
838865 }
839866
840867 static inline bool cqe_has_vlan(struct mlx5_cqe64 *cqe)
@@ -922,6 +949,13 @@ enum { · 81 unmodified lines
922949 CQE_L4_OK = 1 << 2,
923950 };
924951
952+enum {
953+ CQE_TLS_OFFLOAD_NOT_DECRYPTED = 0x0,
954+ CQE_TLS_OFFLOAD_DECRYPTED = 0x1,
955+ CQE_TLS_OFFLOAD_RESYNC = 0x2,
956+ CQE_TLS_OFFLOAD_ERROR = 0x3,
957+};
958+
925959 struct mlx5_sig_err_cqe {
926960 u8 rsvd0[16];
927961 __be32 expected_trans_sig;
@@ -1107,6 +1141,7 @@ enum mlx5_cap_type { · 179 unmodified lines
11071141 MLX5_CAP_TLS,
11081142 MLX5_CAP_VDPA_EMULATION = 0x13,
11091143 MLX5_CAP_DEV_EVENT = 0x14,
1144+ MLX5_CAP_IPSEC,
11101145 /* NUM OF CAP Types */
11111146 MLX5_CAP_NUM
11121147 };
@@ -1324,6 +1359,9 @@ enum mlx5_qcam_feature_groups { · 211 unmodified lines
13241359 MLX5_GET64(device_virtio_emulation_cap, \
13251360 (mdev)->caps.hca_cur[MLX5_CAP_VDPA_EMULATION], cap)
13261361
1362+#define MLX5_CAP_IPSEC(mdev, cap)\
1363+ MLX5_GET(ipsec_cap, (mdev)->caps.hca_cur[MLX5_CAP_IPSEC], cap)
1364+
13271365 enum {
13281366 MLX5_CMD_STAT_OK = 0x0,
13291367 MLX5_CMD_STAT_INT_ERR = 0x1,
include/linux/mlx5/driver.h+20−15
@@ -130,6 +130,7 @@ enum { · 129 unmodified lines
130130 MLX5_REG_NODE_DESC = 0x6001,
131131 MLX5_REG_HOST_ENDIANNESS = 0x7004,
132132 MLX5_REG_MCIA = 0x9014,
133+ MLX5_REG_MFRL = 0x9028,
133134 MLX5_REG_MLCR = 0x902b,
134135 MLX5_REG_MTRC_CAP = 0x9040,
135136 MLX5_REG_MTRC_CONF = 0x9041,
@@ -200,7 +201,7 @@ struct mlx5_rsc_debug { · 64 unmodified lines
200201 void *object;
201202 enum dbg_rsc_type type;
202203 struct dentry *root;
203− struct mlx5_field_desc fields[0];
204+ struct mlx5_field_desc fields[];
204205 };
205206
206207 enum mlx5_dev_event {
@@ -297,7 +298,7 @@ struct mlx5_cmd { · 90 unmodified lines
297298 struct mlx5_cmd_debug dbg;
298299 struct cmd_msg_cache cache[MLX5_NUM_COMMAND_CACHES];
299300 int checksum_disabled;
300− struct mlx5_cmd_stats stats[MLX5_CMD_OP_MAX];
301+ struct mlx5_cmd_stats *stats;
301302 };
302303
303304 struct mlx5_port_caps {
@@ -549,7 +550,6 @@ struct mlx5_priv { · 245 unmodified lines
549550 struct mlx5_core_health health;
550551
551552 /* start: qp staff */
552− struct mlx5_qp_table qp_table;
553553 struct dentry *qp_debugfs;
554554 struct dentry *eq_debugfs;
555555 struct dentry *cq_debugfs;
@@ -695,7 +695,6 @@ struct mlx5_core_dev { · 139 unmodified lines
695695 unsigned long intf_state;
696696 struct mlx5_priv priv;
697697 struct mlx5_profile *profile;
698− atomic_t num_qps;
699698 u32 issi;
700699 struct mlx5e_resources mlx5e_res;
701700 struct mlx5_dm *dm;
@@ -833,11 +832,6 @@ static inline u16 fw_rev_sub(struct mlx5_core_dev *dev) · 131 unmodified lines
833832 return ioread32be(&dev->iseg->cmdif_rev_fw_sub) & 0xffff;
834833 }
835834
836−static inline u16 cmdif_rev(struct mlx5_core_dev *dev)
837−{
838− return ioread32be(&dev->iseg->cmdif_rev_fw_sub) >> 16;
839−}
840−
841835 static inline u32 mlx5_base_mkey(const u32 key)
842836 {
843837 return key & 0xffffff00u;
@@ -919,6 +913,19 @@ int mlx5_cmd_exec_cb(struct mlx5_async_ctx *ctx, void *in, int in_size, · 75 unmodified lines
919913
920914 int mlx5_cmd_exec(struct mlx5_core_dev *dev, void *in, int in_size, void *out,
921915 int out_size);
916+
917+#define mlx5_cmd_exec_inout(dev, ifc_cmd, in, out) \
918+ ({ \
919+ mlx5_cmd_exec(dev, in, MLX5_ST_SZ_BYTES(ifc_cmd##_in), out, \
920+ MLX5_ST_SZ_BYTES(ifc_cmd##_out)); \
921+ })
922+
923+#define mlx5_cmd_exec_in(dev, ifc_cmd, in) \
924+ ({ \
925+ u32 _out[MLX5_ST_SZ_DW(ifc_cmd##_out)] = {}; \
926+ mlx5_cmd_exec_inout(dev, ifc_cmd, in, _out); \
927+ })
928+
922929 int mlx5_cmd_exec_polling(struct mlx5_core_dev *dev, void *in, int in_size,
923930 void *out, int out_size);
924931 void mlx5_cmd_mbox_status(void *out, u8 *status, u32 *syndrome);
@@ -1016,11 +1023,6 @@ int mlx5_core_roce_gid_set(struct mlx5_core_dev *dev, unsigned int index, · 91 unmodified lines
10161023 u8 roce_version, u8 roce_l3_type, const u8 *gid,
10171024 const u8 *mac, bool vlan, u16 vlan_id, u8 port_num);
10181025
1019−static inline int fw_initializing(struct mlx5_core_dev *dev)
1020−{
1021− return ioread32be(&dev->iseg->initializing) >> 31;
1022−}
1023−
10241026 static inline u32 mlx5_mkey_to_idx(u32 mkey)
10251027 {
10261028 return mkey >> 8;
@@ -1078,6 +1080,8 @@ bool mlx5_lag_is_sriov(struct mlx5_core_dev *dev); · 51 unmodified lines
10781080 bool mlx5_lag_is_multipath(struct mlx5_core_dev *dev);
10791081 bool mlx5_lag_is_active(struct mlx5_core_dev *dev);
10801082 struct net_device *mlx5_lag_get_roce_netdev(struct mlx5_core_dev *dev);
1083+u8 mlx5_lag_get_slave_port(struct mlx5_core_dev *dev,
1084+ struct net_device *slave);
10811085 int mlx5_lag_query_cong_counters(struct mlx5_core_dev *dev,
10821086 u64 *values,
10831087 int num_counters,
@@ -1085,7 +1089,8 @@ int mlx5_lag_query_cong_counters(struct mlx5_core_dev *dev, · 1 unmodified line
10851089 struct mlx5_uars_page *mlx5_get_uars_page(struct mlx5_core_dev *mdev);
10861090 void mlx5_put_uars_page(struct mlx5_core_dev *mdev, struct mlx5_uars_page *up);
10871091 int mlx5_dm_sw_icm_alloc(struct mlx5_core_dev *dev, enum mlx5_sw_icm_type type,
1088− u64 length, u16 uid, phys_addr_t *addr, u32 *obj_id);
1092+ u64 length, u32 log_alignment, u16 uid,
1093+ phys_addr_t *addr, u32 *obj_id);
10891094 int mlx5_dm_sw_icm_dealloc(struct mlx5_core_dev *dev, enum mlx5_sw_icm_type type,
10901095 u64 length, u16 uid, phys_addr_t addr, u32 obj_id);
10911096
include/linux/mlx5/fs.h+1−0
@@ -42,6 +42,7 @@ enum { · 41 unmodified lines
4242 MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO = 1 << 16,
4343 MLX5_FLOW_CONTEXT_ACTION_ENCRYPT = 1 << 17,
4444 MLX5_FLOW_CONTEXT_ACTION_DECRYPT = 1 << 18,
45+ MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_NS = 1 << 19,
4546 };
4647
4748 enum {
include/linux/mlx5/mlx5_ifc.h+166−58
@@ -74,6 +74,7 @@ enum { · 73 unmodified lines
7474 MLX5_SET_HCA_CAP_OP_MOD_GENERAL_DEVICE = 0x0,
7575 MLX5_SET_HCA_CAP_OP_MOD_ODP = 0x2,
7676 MLX5_SET_HCA_CAP_OP_MOD_ATOMIC = 0x3,
77+ MLX5_SET_HCA_CAP_OP_MOD_ROCE = 0x4,
7778 };
7879
7980 enum {
@@ -583,9 +584,7 @@ struct mlx5_ifc_fte_match_set_misc2_bits { · 503 unmodified lines
583584
584585 u8 metadata_reg_a[0x20];
585586
586− u8 metadata_reg_b[0x20];
587−
588− u8 reserved_at_1c0[0x40];
587+ u8 reserved_at_1a0[0x60];
589588 };
590589
591590 struct mlx5_ifc_fte_match_set_misc3_bits {
@@ -885,7 +884,8 @@ struct mlx5_ifc_per_protocol_networking_offload_caps_bits { · 293 unmodified lines
885884 u8 tunnel_stateless_vxlan_gpe[0x1];
886885 u8 tunnel_stateless_ipv4_over_vxlan[0x1];
887886 u8 tunnel_stateless_ip_over_ip[0x1];
888− u8 reserved_at_2a[0x6];
887+ u8 insert_trailer[0x1];
888+ u8 reserved_at_2b[0x5];
889889 u8 max_vxlan_udp_ports[0x8];
890890 u8 reserved_at_38[0x6];
891891 u8 max_geneve_opt_len[0x1];
@@ -903,7 +903,9 @@ struct mlx5_ifc_per_protocol_networking_offload_caps_bits { · 11 unmodified lines
903903
904904 struct mlx5_ifc_roce_cap_bits {
905905 u8 roce_apm[0x1];
906− u8 reserved_at_1[0x1f];
906+ u8 reserved_at_1[0x3];
907+ u8 sw_r_roce_src_udp_port[0x1];
908+ u8 reserved_at_5[0x1b];
907909
908910 u8 reserved_at_20[0x60];
909911
@@ -1097,6 +1099,23 @@ struct mlx5_ifc_tls_cap_bits { · 187 unmodified lines
10971099 u8 reserved_at_20[0x7e0];
10981100 };
10991101
1102+struct mlx5_ifc_ipsec_cap_bits {
1103+ u8 ipsec_full_offload[0x1];
1104+ u8 ipsec_crypto_offload[0x1];
1105+ u8 ipsec_esn[0x1];
1106+ u8 ipsec_crypto_esp_aes_gcm_256_encrypt[0x1];
1107+ u8 ipsec_crypto_esp_aes_gcm_128_encrypt[0x1];
1108+ u8 ipsec_crypto_esp_aes_gcm_256_decrypt[0x1];
1109+ u8 ipsec_crypto_esp_aes_gcm_128_decrypt[0x1];
1110+ u8 reserved_at_7[0x4];
1111+ u8 log_max_ipsec_offload[0x5];
1112+ u8 reserved_at_10[0x10];
1113+
1114+ u8 min_log_ipsec_full_replay_window[0x8];
1115+ u8 max_log_ipsec_full_replay_window[0x8];
1116+ u8 reserved_at_30[0x7d0];
1117+};
1118+
11001119 enum {
11011120 MLX5_WQ_TYPE_LINKED_LIST = 0x0,
11021121 MLX5_WQ_TYPE_CYCLIC = 0x1,
@@ -1189,7 +1208,9 @@ struct mlx5_ifc_cmd_hca_cap_bits { · 86 unmodified lines
11891208 u8 reserved_at_99[0x2];
11901209 u8 log_max_qp[0x5];
11911210
1192− u8 reserved_at_a0[0xb];
1211+ u8 reserved_at_a0[0x3];
1212+ u8 ece_support[0x1];
1213+ u8 reserved_at_a4[0x7];
11931214 u8 log_max_srq[0x5];
11941215 u8 reserved_at_b0[0x10];
11951216
@@ -1223,7 +1244,9 @@ struct mlx5_ifc_cmd_hca_cap_bits { · 27 unmodified lines
12231244 u8 reserved_at_130[0xa];
12241245 u8 log_max_ra_res_dc[0x6];
12251246
1226− u8 reserved_at_140[0x9];
1247+ u8 reserved_at_140[0x6];
1248+ u8 release_all_pages[0x1];
1249+ u8 reserved_at_147[0x2];
12271250 u8 roce_accl[0x1];
12281251 u8 log_max_ra_req_qp[0x6];
12291252 u8 reserved_at_150[0xa];
@@ -1296,7 +1319,9 @@ struct mlx5_ifc_cmd_hca_cap_bits { · 66 unmodified lines
12961319 u8 wol_p[0x1];
12971320
12981321 u8 stat_rate_support[0x10];
1299− u8 reserved_at_1f0[0xc];
1322+ u8 reserved_at_1f0[0x1];
1323+ u8 pci_sync_for_fw_update_event[0x1];
1324+ u8 reserved_at_1f2[0xa];
13001325 u8 cqe_version[0x4];
13011326
13021327 u8 compact_address_vector[0x1];
@@ -1461,13 +1486,14 @@ struct mlx5_ifc_cmd_hca_cap_bits { · 158 unmodified lines
14611486
14621487 u8 reserved_at_460[0x3];
14631488 u8 log_max_uctx[0x5];
1464− u8 reserved_at_468[0x3];
1489+ u8 reserved_at_468[0x2];
1490+ u8 ipsec_offload[0x1];
14651491 u8 log_max_umem[0x5];
14661492 u8 max_num_eqs[0x10];
14671493
14681494 u8 reserved_at_480[0x1];
14691495 u8 tls_tx[0x1];
1470− u8 reserved_at_482[0x1];
1496+ u8 tls_rx[0x1];
14711497 u8 log_max_l2_table[0x5];
14721498 u8 reserved_at_488[0x8];
14731499 u8 log_uar_page_sz[0x10];
@@ -1677,7 +1703,7 @@ struct mlx5_ifc_wq_bits { · 203 unmodified lines
16771703
16781704 u8 reserved_at_140[0x4c0];
16791705
1680− struct mlx5_ifc_cmd_pas_bits pas[0];
1706+ struct mlx5_ifc_cmd_pas_bits pas[];
16811707 };
16821708
16831709 struct mlx5_ifc_rq_num_bits {
@@ -1895,7 +1921,7 @@ struct mlx5_ifc_resource_dump_menu_segment_bits { · 211 unmodified lines
18951921 u8 reserved_at_20[0x10];
18961922 u8 num_of_records[0x10];
18971923
1898− struct mlx5_ifc_resource_dump_menu_record_bits record[0];
1924+ struct mlx5_ifc_resource_dump_menu_record_bits record[];
18991925 };
19001926
19011927 struct mlx5_ifc_resource_dump_resource_segment_bits {
@@ -1907,7 +1933,7 @@ struct mlx5_ifc_resource_dump_resource_segment_bits { · 5 unmodified lines
19071933
19081934 u8 index2[0x20];
19091935
1910− u8 payload[0][0x20];
1936+ u8 payload[][0x20];
19111937 };
19121938
19131939 struct mlx5_ifc_resource_dump_terminate_segment_bits {
@@ -2984,7 +3010,7 @@ struct mlx5_ifc_flow_context_bits { · 1070 unmodified lines
29843010
29853011 u8 reserved_at_1200[0x600];
29863012
2987− union mlx5_ifc_dest_format_struct_flow_counter_list_auto_bits destination[0];
3013+ union mlx5_ifc_dest_format_struct_flow_counter_list_auto_bits destination[];
29883014 };
29893015
29903016 enum {
@@ -3112,7 +3138,8 @@ struct mlx5_ifc_tirc_bits { · 121 unmodified lines
31123138 u8 reserved_at_0[0x20];
31133139
31143140 u8 disp_type[0x4];
3115− u8 reserved_at_24[0x1c];
3141+ u8 tls_en[0x1];
3142+ u8 reserved_at_25[0x1b];
31163143
31173144 u8 reserved_at_40[0x40];
31183145
@@ -3276,7 +3303,7 @@ struct mlx5_ifc_rqtc_bits { · 157 unmodified lines
32763303
32773304 u8 reserved_at_e0[0x6a0];
32783305
3279− struct mlx5_ifc_rq_num_bits rq_num[0];
3306+ struct mlx5_ifc_rq_num_bits rq_num[];
32803307 };
32813308
32823309 enum {
@@ -3388,7 +3415,7 @@ struct mlx5_ifc_nic_vport_context_bits { · 105 unmodified lines
33883415
33893416 u8 reserved_at_7e0[0x20];
33903417
3391− u8 current_uc_mac_address[0][0x40];
3418+ u8 current_uc_mac_address[][0x40];
33923419 };
33933420
33943421 enum {
@@ -4140,7 +4167,8 @@ enum { · 745 unmodified lines
41404167 MLX5_SET_FTE_MODIFY_ENABLE_MASK_ACTION = 0x0,
41414168 MLX5_SET_FTE_MODIFY_ENABLE_MASK_FLOW_TAG = 0x1,
41424169 MLX5_SET_FTE_MODIFY_ENABLE_MASK_DESTINATION_LIST = 0x2,
4143− MLX5_SET_FTE_MODIFY_ENABLE_MASK_FLOW_COUNTERS = 0x3
4170+ MLX5_SET_FTE_MODIFY_ENABLE_MASK_FLOW_COUNTERS = 0x3,
4171+ MLX5_SET_FTE_MODIFY_ENABLE_MASK_IPSEC_OBJ_ID = 0x4
41444172 };
41454173
41464174 struct mlx5_ifc_set_fte_out_bits {
@@ -4190,7 +4218,8 @@ struct mlx5_ifc_rts2rts_qp_out_bits { · 43 unmodified lines
41904218
41914219 u8 syndrome[0x20];
41924220
4193− u8 reserved_at_40[0x40];
4221+ u8 reserved_at_40[0x20];
4222+ u8 ece[0x20];
41944223 };
41954224
41964225 struct mlx5_ifc_rts2rts_qp_in_bits {
@@ -4207,7 +4236,7 @@ struct mlx5_ifc_rts2rts_qp_in_bits { · 10 unmodified lines
42074236
42084237 u8 opt_param_mask[0x20];
42094238
4210− u8 reserved_at_a0[0x20];
4239+ u8 ece[0x20];
42114240
42124241 struct mlx5_ifc_qpc_bits qpc;
42134242
@@ -4220,7 +4249,8 @@ struct mlx5_ifc_rtr2rts_qp_out_bits { · 6 unmodified lines
42204249
42214250 u8 syndrome[0x20];
42224251
4223− u8 reserved_at_40[0x40];
4252+ u8 reserved_at_40[0x20];
4253+ u8 ece[0x20];
42244254 };
42254255
42264256 struct mlx5_ifc_rtr2rts_qp_in_bits {
@@ -4237,7 +4267,7 @@ struct mlx5_ifc_rtr2rts_qp_in_bits { · 10 unmodified lines
42374267
42384268 u8 opt_param_mask[0x20];
42394269
4240− u8 reserved_at_a0[0x20];
4270+ u8 ece[0x20];
42414271
42424272 struct mlx5_ifc_qpc_bits qpc;
42434273
@@ -4310,7 +4340,7 @@ struct mlx5_ifc_query_xrc_srq_out_bits { · 66 unmodified lines
43104340
43114341 u8 reserved_at_280[0x600];
43124342
4313− u8 pas[0][0x40];
4343+ u8 pas[][0x40];
43144344 };
43154345
43164346 struct mlx5_ifc_query_xrc_srq_in_bits {
@@ -4588,7 +4618,7 @@ struct mlx5_ifc_query_srq_out_bits { · 271 unmodified lines
45884618
45894619 u8 reserved_at_280[0x600];
45904620
4591− u8 pas[0][0x40];
4621+ u8 pas[][0x40];
45924622 };
45934623
45944624 struct mlx5_ifc_query_srq_in_bits {
@@ -4789,7 +4819,8 @@ struct mlx5_ifc_query_qp_out_bits { · 194 unmodified lines
47894819
47904820 u8 syndrome[0x20];
47914821
4792− u8 reserved_at_40[0x40];
4822+ u8 reserved_at_40[0x20];
4823+ u8 ece[0x20];
47934824
47944825 u8 opt_param_mask[0x20];
47954826
@@ -4799,7 +4830,7 @@ struct mlx5_ifc_query_qp_out_bits { · 3 unmodified lines
47994830
48004831 u8 reserved_at_800[0x80];
48014832
4802− u8 pas[0][0x40];
4833+ u8 pas[][0x40];
48034834 };
48044835
48054836 struct mlx5_ifc_query_qp_in_bits {
@@ -5132,7 +5163,7 @@ struct mlx5_ifc_query_hca_vport_pkey_out_bits { · 326 unmodified lines
51325163
51335164 u8 reserved_at_40[0x40];
51345165
5135− struct mlx5_ifc_pkey_bits pkey[0];
5166+ struct mlx5_ifc_pkey_bits pkey[];
51365167 };
51375168
51385169 struct mlx5_ifc_query_hca_vport_pkey_in_bits {
@@ -5168,7 +5199,7 @@ struct mlx5_ifc_query_hca_vport_gid_out_bits { · 29 unmodified lines
51685199 u8 gids_num[0x10];
51695200 u8 reserved_at_70[0x10];
51705201
5171− struct mlx5_ifc_array128_auto_bits gid[0];
5202+ struct mlx5_ifc_array128_auto_bits gid[];
51725203 };
51735204
51745205 struct mlx5_ifc_query_hca_vport_gid_in_bits {
@@ -5436,7 +5467,7 @@ struct mlx5_ifc_query_flow_counter_out_bits { · 261 unmodified lines
54365467
54375468 u8 reserved_at_40[0x40];
54385469
5439− struct mlx5_ifc_traffic_counter_bits flow_statistics[0];
5470+ struct mlx5_ifc_traffic_counter_bits flow_statistics[];
54405471 };
54415472
54425473 struct mlx5_ifc_query_flow_counter_in_bits {
@@ -5530,7 +5561,7 @@ struct mlx5_ifc_query_eq_out_bits { · 87 unmodified lines
55305561
55315562 u8 reserved_at_300[0x580];
55325563
5533− u8 pas[0][0x40];
5564+ u8 pas[][0x40];
55345565 };
55355566
55365567 struct mlx5_ifc_query_eq_in_bits {
@@ -5555,7 +5586,7 @@ struct mlx5_ifc_packet_reformat_context_in_bits { · 18 unmodified lines
55555586 u8 reserved_at_20[0x10];
55565587 u8 reformat_data[2][0x8];
55575588
5558− u8 more_reformat_data[0][0x8];
5589+ u8 more_reformat_data[][0x8];
55595590 };
55605591
55615592 struct mlx5_ifc_query_packet_reformat_context_out_bits {
@@ -5566,7 +5597,7 @@ struct mlx5_ifc_query_packet_reformat_context_out_bits { · 4 unmodified lines
55665597
55675598 u8 reserved_at_40[0xa0];
55685599
5569− struct mlx5_ifc_packet_reformat_context_in_bits packet_reformat_context[0];
5600+ struct mlx5_ifc_packet_reformat_context_in_bits packet_reformat_context[];
55705601 };
55715602
55725603 struct mlx5_ifc_query_packet_reformat_context_in_bits {
@@ -5667,9 +5698,9 @@ struct mlx5_ifc_copy_action_in_bits { · 94 unmodified lines
56675698 u8 reserved_at_38[0x8];
56685699 };
56695700
5670−union mlx5_ifc_set_action_in_add_action_in_auto_bits {
5671− struct mlx5_ifc_set_action_in_bits set_action_in;
5672− struct mlx5_ifc_add_action_in_bits add_action_in;
5701+union mlx5_ifc_set_add_copy_action_in_auto_bits {
5702+ struct mlx5_ifc_set_action_in_bits set_action_in;
5703+ struct mlx5_ifc_add_action_in_bits add_action_in;
56735704 struct mlx5_ifc_copy_action_in_bits copy_action_in;
56745705 u8 reserved_at_0[0x40];
56755706 };
@@ -5743,7 +5774,7 @@ struct mlx5_ifc_alloc_modify_header_context_in_bits { · 67 unmodified lines
57435774 u8 reserved_at_68[0x10];
57445775 u8 num_of_actions[0x8];
57455776
5746− union mlx5_ifc_set_action_in_add_action_in_auto_bits actions[0];
5777+ union mlx5_ifc_set_add_copy_action_in_auto_bits actions[0];
57475778 };
57485779
57495780 struct mlx5_ifc_dealloc_modify_header_context_out_bits {
@@ -5805,7 +5836,7 @@ struct mlx5_ifc_query_cq_out_bits { · 55 unmodified lines
58055836
58065837 u8 reserved_at_280[0x600];
58075838
5808− u8 pas[0][0x40];
5839+ u8 pas[][0x40];
58095840 };
58105841
58115842 struct mlx5_ifc_query_cq_in_bits {
@@ -6412,7 +6443,7 @@ struct mlx5_ifc_modify_cq_in_bits { · 600 unmodified lines
64126443
64136444 u8 reserved_at_300[0x580];
64146445
6415− u8 pas[0][0x40];
6446+ u8 pas[][0x40];
64166447 };
64176448
64186449 struct mlx5_ifc_modify_cong_status_out_bits {
@@ -6476,7 +6507,7 @@ struct mlx5_ifc_manage_pages_out_bits { · 57 unmodified lines
64766507
64776508 u8 reserved_at_60[0x20];
64786509
6479− u8 pas[0][0x40];
6510+ u8 pas[][0x40];
64806511 };
64816512
64826513 enum {
@@ -6498,7 +6529,7 @@ struct mlx5_ifc_manage_pages_in_bits { · 15 unmodified lines
64986529
64996530 u8 input_num_entries[0x20];
65006531
6501− u8 pas[0][0x40];
6532+ u8 pas[][0x40];
65026533 };
65036534
65046535 struct mlx5_ifc_mad_ifc_out_bits {
@@ -6554,7 +6585,8 @@ struct mlx5_ifc_init2rtr_qp_out_bits { · 49 unmodified lines
65546585
65556586 u8 syndrome[0x20];
65566587
6557− u8 reserved_at_40[0x40];
6588+ u8 reserved_at_40[0x20];
6589+ u8 ece[0x20];
65586590 };
65596591
65606592 struct mlx5_ifc_init2rtr_qp_in_bits {
@@ -6571,7 +6603,7 @@ struct mlx5_ifc_init2rtr_qp_in_bits { · 10 unmodified lines
65716603
65726604 u8 opt_param_mask[0x20];
65736605
6574− u8 reserved_at_a0[0x20];
6606+ u8 ece[0x20];
65756607
65766608 struct mlx5_ifc_qpc_bits qpc;
65776609
@@ -7453,7 +7485,7 @@ struct mlx5_ifc_create_xrc_srq_in_bits { · 875 unmodified lines
74537485
74547486 u8 reserved_at_300[0x580];
74557487
7456− u8 pas[0][0x40];
7488+ u8 pas[][0x40];
74577489 };
74587490
74597491 struct mlx5_ifc_create_tis_out_bits {
@@ -7529,7 +7561,7 @@ struct mlx5_ifc_create_srq_in_bits { · 69 unmodified lines
75297561
75307562 u8 reserved_at_280[0x600];
75317563
7532− u8 pas[0][0x40];
7564+ u8 pas[][0x40];
75337565 };
75347566
75357567 struct mlx5_ifc_create_sq_out_bits {
@@ -7667,7 +7699,7 @@ struct mlx5_ifc_create_qp_out_bits { · 131 unmodified lines
76677699 u8 reserved_at_40[0x8];
76687700 u8 qpn[0x18];
76697701
7670− u8 reserved_at_60[0x20];
7702+ u8 ece[0x20];
76717703 };
76727704
76737705 struct mlx5_ifc_create_qp_in_bits {
@@ -7681,7 +7713,7 @@ struct mlx5_ifc_create_qp_in_bits { · 7 unmodified lines
76817713
76827714 u8 opt_param_mask[0x20];
76837715
7684− u8 reserved_at_a0[0x20];
7716+ u8 ece[0x20];
76857717
76867718 struct mlx5_ifc_qpc_bits qpc;
76877719
@@ -7690,7 +7722,7 @@ struct mlx5_ifc_create_qp_in_bits { · 2 unmodified lines
76907722 u8 wq_umem_valid[0x1];
76917723 u8 reserved_at_861[0x1f];
76927724
7693− u8 pas[0][0x40];
7725+ u8 pas[][0x40];
76947726 };
76957727
76967728 struct mlx5_ifc_create_psv_out_bits {
@@ -7761,7 +7793,7 @@ struct mlx5_ifc_create_mkey_in_bits { · 64 unmodified lines
77617793
77627794 u8 reserved_at_320[0x560];
77637795
7764− u8 klm_pas_mtt[0][0x20];
7796+ u8 klm_pas_mtt[][0x20];
77657797 };
77667798
77677799 enum {
@@ -7894,7 +7926,7 @@ struct mlx5_ifc_create_eq_in_bits { · 126 unmodified lines
78947926
78957927 u8 reserved_at_3c0[0x4c0];
78967928
7897− u8 pas[0][0x40];
7929+ u8 pas[][0x40];
78987930 };
78997931
79007932 struct mlx5_ifc_create_dct_out_bits {
@@ -7951,7 +7983,7 @@ struct mlx5_ifc_create_cq_in_bits { · 50 unmodified lines
79517983 u8 cq_umem_valid[0x1];
79527984 u8 reserved_at_2e1[0x59f];
79537985
7954− u8 pas[0][0x40];
7986+ u8 pas[][0x40];
79557987 };
79567988
79577989 struct mlx5_ifc_config_int_moderation_out_bits {
@@ -8307,7 +8339,7 @@ struct mlx5_ifc_access_register_out_bits { · 349 unmodified lines
83078339
83088340 u8 reserved_at_40[0x40];
83098341
8310− u8 register_data[0][0x20];
8342+ u8 register_data[][0x20];
83118343 };
83128344
83138345 enum {
@@ -8327,7 +8359,7 @@ struct mlx5_ifc_access_register_in_bits { · 13 unmodified lines
83278359
83288360 u8 argument[0x20];
83298361
8330− u8 register_data[0][0x20];
8362+ u8 register_data[][0x20];
83318363 };
83328364
83338365 struct mlx5_ifc_sltp_reg_bits {
@@ -9344,7 +9376,7 @@ struct mlx5_ifc_cmd_in_bits { · 1010 unmodified lines
93449376 u8 reserved_at_20[0x10];
93459377 u8 op_mod[0x10];
93469378
9347− u8 command[0][0x20];
9379+ u8 command[][0x20];
93489380 };
93499381
93509382 struct mlx5_ifc_cmd_if_box_bits {
@@ -9638,7 +9670,7 @@ struct mlx5_ifc_mcqi_reg_bits { · 287 unmodified lines
96389670 u8 reserved_at_a0[0x10];
96399671 u8 data_size[0x10];
96409672
9641− union mlx5_ifc_mcqi_reg_data_bits data[0];
9673+ union mlx5_ifc_mcqi_reg_data_bits data[];
96429674 };
96439675
96449676 struct mlx5_ifc_mcc_reg_bits {
@@ -9680,6 +9712,29 @@ struct mlx5_ifc_mcda_reg_bits { · 35 unmodified lines
96809712 u8 data[0][0x20];
96819713 };
96829714
9715+enum {
9716+ MLX5_MFRL_REG_RESET_TYPE_FULL_CHIP = BIT(0),
9717+ MLX5_MFRL_REG_RESET_TYPE_NET_PORT_ALIVE = BIT(1),
9718+};
9719+
9720+enum {
9721+ MLX5_MFRL_REG_RESET_LEVEL0 = BIT(0),
9722+ MLX5_MFRL_REG_RESET_LEVEL3 = BIT(3),
9723+ MLX5_MFRL_REG_RESET_LEVEL6 = BIT(6),
9724+};
9725+
9726+struct mlx5_ifc_mfrl_reg_bits {
9727+ u8 reserved_at_0[0x20];
9728+
9729+ u8 reserved_at_20[0x2];
9730+ u8 pci_sync_for_fw_update_start[0x1];
9731+ u8 pci_sync_for_fw_update_resp[0x2];
9732+ u8 rst_type_sel[0x3];
9733+ u8 reserved_at_28[0x8];
9734+ u8 reset_type[0x8];
9735+ u8 reset_level[0x8];
9736+};
9737+
96839738 struct mlx5_ifc_mirc_reg_bits {
96849739 u8 reserved_at_0[0x18];
96859740 u8 status_code[0x8];
@@ -9743,6 +9798,7 @@ union mlx5_ifc_ports_control_registers_document_bits { · 57 unmodified lines
97439798 struct mlx5_ifc_mcc_reg_bits mcc_reg;
97449799 struct mlx5_ifc_mcda_reg_bits mcda_reg;
97459800 struct mlx5_ifc_mirc_reg_bits mirc_reg;
9801+ struct mlx5_ifc_mfrl_reg_bits mfrl_reg;
97469802 u8 reserved_at_0[0x60e0];
97479803 };
97489804
@@ -10200,7 +10256,7 @@ struct mlx5_ifc_umem_bits { · 451 unmodified lines
1020010256
1020110257 u8 num_of_mtt[0x40];
1020210258
10203− struct mlx5_ifc_mtt_bits mtt[0];
10259+ struct mlx5_ifc_mtt_bits mtt[];
1020410260 };
1020510261
1020610262 struct mlx5_ifc_uctx_bits {
@@ -10325,7 +10381,7 @@ struct mlx5_ifc_mtrc_stdb_bits { · 118 unmodified lines
1032510381 u8 reserved_at_4[0x4];
1032610382 u8 read_size[0x18];
1032710383 u8 start_offset[0x20];
10328− u8 string_db_data[0];
10384+ u8 string_db_data[];
1032910385 };
1033010386
1033110387 struct mlx5_ifc_mtrc_ctrl_bits {
@@ -10379,7 +10435,7 @@ struct mlx5_ifc_query_esw_functions_out_bits { · 47 unmodified lines
1037910435 struct mlx5_ifc_host_params_context_bits host_params_context;
1038010436
1038110437 u8 reserved_at_280[0x180];
10382− u8 host_sf_enable[0][0x40];
10438+ u8 host_sf_enable[][0x40];
1038310439 };
1038410440
1038510441 struct mlx5_ifc_sf_partition_bits {
@@ -10399,7 +10455,7 @@ struct mlx5_ifc_query_sf_partitions_out_bits { · 13 unmodified lines
1039910455
1040010456 u8 reserved_at_60[0x20];
1040110457
10402− struct mlx5_ifc_sf_partition_bits sf_partition[0];
10458+ struct mlx5_ifc_sf_partition_bits sf_partition[];
1040310459 };
1040410460
1040510461 struct mlx5_ifc_query_sf_partitions_in_bits {
@@ -10465,10 +10521,62 @@ struct mlx5_ifc_affiliated_event_header_bits { · 59 unmodified lines
1046510521
1046610522 enum {
1046710523 MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_ENCRYPTION_KEY = BIT(0xc),
10524+ MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_IPSEC = BIT(0x13),
1046810525 };
1046910526
1047010527 enum {
1047110528 MLX5_GENERAL_OBJECT_TYPES_ENCRYPTION_KEY = 0xc,
10529+ MLX5_GENERAL_OBJECT_TYPES_IPSEC = 0x13,
10530+};
10531+
10532+enum {
10533+ MLX5_IPSEC_OBJECT_ICV_LEN_16B,
10534+ MLX5_IPSEC_OBJECT_ICV_LEN_12B,
10535+ MLX5_IPSEC_OBJECT_ICV_LEN_8B,
10536+};
10537+
10538+struct mlx5_ifc_ipsec_obj_bits {
10539+ u8 modify_field_select[0x40];
10540+ u8 full_offload[0x1];
10541+ u8 reserved_at_41[0x1];
10542+ u8 esn_en[0x1];
10543+ u8 esn_overlap[0x1];
10544+ u8 reserved_at_44[0x2];
10545+ u8 icv_length[0x2];
10546+ u8 reserved_at_48[0x4];
10547+ u8 aso_return_reg[0x4];
10548+ u8 reserved_at_50[0x10];
10549+
10550+ u8 esn_msb[0x20];
10551+
10552+ u8 reserved_at_80[0x8];
10553+ u8 dekn[0x18];
10554+
10555+ u8 salt[0x20];
10556+
10557+ u8 implicit_iv[0x40];
10558+
10559+ u8 reserved_at_100[0x700];
10560+};
10561+
10562+struct mlx5_ifc_create_ipsec_obj_in_bits {
10563+ struct mlx5_ifc_general_obj_in_cmd_hdr_bits general_obj_in_cmd_hdr;
10564+ struct mlx5_ifc_ipsec_obj_bits ipsec_object;
10565+};
10566+
10567+enum {
10568+ MLX5_MODIFY_IPSEC_BITMASK_ESN_OVERLAP = BIT(0),
10569+ MLX5_MODIFY_IPSEC_BITMASK_ESN_MSB = BIT(1),
10570+};
10571+
10572+struct mlx5_ifc_query_ipsec_obj_out_bits {
10573+ struct mlx5_ifc_general_obj_out_cmd_hdr_bits general_obj_out_cmd_hdr;
10574+ struct mlx5_ifc_ipsec_obj_bits ipsec_object;
10575+};
10576+
10577+struct mlx5_ifc_modify_ipsec_obj_in_bits {
10578+ struct mlx5_ifc_general_obj_in_cmd_hdr_bits general_obj_in_cmd_hdr;
10579+ struct mlx5_ifc_ipsec_obj_bits ipsec_object;
1047210580 };
1047310581
1047410582 struct mlx5_ifc_encryption_key_obj_bits {
include/linux/mlx5/qp.h+7−50
@@ -229,6 +229,11 @@ enum { · 228 unmodified lines
229229
230230 enum {
231231 MLX5_ETH_WQE_SVLAN = 1 << 0,
232+ MLX5_ETH_WQE_TRAILER_HDR_OUTER_IP_ASSOC = 1 << 26,
233+ MLX5_ETH_WQE_TRAILER_HDR_OUTER_L4_ASSOC = 1 << 27,
234+ MLX5_ETH_WQE_TRAILER_HDR_INNER_IP_ASSOC = 3 << 26,
235+ MLX5_ETH_WQE_TRAILER_HDR_INNER_L4_ASSOC = 1 << 28,
236+ MLX5_ETH_WQE_INSERT_TRAILER = 1 << 30,
232237 MLX5_ETH_WQE_INSERT_VLAN = 1 << 15,
233238 };
234239
@@ -257,6 +262,7 @@ struct mlx5_wqe_eth_seg { · 22 unmodified lines
257262 __be16 type;
258263 __be16 vlan_tci;
259264 } insert;
265+ __be32 trailer;
260266 };
261267 };
262268
@@ -402,7 +408,7 @@ struct mlx5_wqe_signature_seg { · 139 unmodified lines
402408
403409 struct mlx5_wqe_inline_seg {
404410 __be32 byte_count;
405− __be32 data[0];
411+ __be32 data[];
406412 };
407413
408414 enum mlx5_sig_type {
@@ -553,57 +559,8 @@ struct mlx5_qp_context { · 144 unmodified lines
553559 u8 rsvd1[24];
554560 };
555561
556−static inline struct mlx5_core_qp *__mlx5_qp_lookup(struct mlx5_core_dev *dev, u32 qpn)
557−{
558− return radix_tree_lookup(&dev->priv.qp_table.tree, qpn);
559−}
560−
561−int mlx5_core_create_dct(struct mlx5_core_dev *dev,
562− struct mlx5_core_dct *qp,
563− u32 *in, int inlen,
564− u32 *out, int outlen);
565−int mlx5_core_create_qp(struct mlx5_core_dev *dev,
566− struct mlx5_core_qp *qp,
567− u32 *in,
568− int inlen);
569−int mlx5_core_qp_modify(struct mlx5_core_dev *dev, u16 opcode,
570− u32 opt_param_mask, void *qpc,
571− struct mlx5_core_qp *qp);
572−int mlx5_core_destroy_qp(struct mlx5_core_dev *dev,
573− struct mlx5_core_qp *qp);
574−int mlx5_core_destroy_dct(struct mlx5_core_dev *dev,
575− struct mlx5_core_dct *dct);
576−int mlx5_core_qp_query(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp,
577− u32 *out, int outlen);
578−int mlx5_core_dct_query(struct mlx5_core_dev *dev, struct mlx5_core_dct *dct,
579− u32 *out, int outlen);
580−
581−int mlx5_core_set_delay_drop(struct mlx5_core_dev *dev,
582− u32 timeout_usec);
583−
584−int mlx5_core_xrcd_alloc(struct mlx5_core_dev *dev, u32 *xrcdn);
585−int mlx5_core_xrcd_dealloc(struct mlx5_core_dev *dev, u32 xrcdn);
586−void mlx5_init_qp_table(struct mlx5_core_dev *dev);
587−void mlx5_cleanup_qp_table(struct mlx5_core_dev *dev);
588562 int mlx5_debug_qp_add(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp);
589563 void mlx5_debug_qp_remove(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp);
590−int mlx5_core_create_rq_tracked(struct mlx5_core_dev *dev, u32 *in, int inlen,
591− struct mlx5_core_qp *rq);
592−void mlx5_core_destroy_rq_tracked(struct mlx5_core_dev *dev,
593− struct mlx5_core_qp *rq);
594−int mlx5_core_create_sq_tracked(struct mlx5_core_dev *dev, u32 *in, int inlen,
595− struct mlx5_core_qp *sq);
596−void mlx5_core_destroy_sq_tracked(struct mlx5_core_dev *dev,
597− struct mlx5_core_qp *sq);
598−int mlx5_core_alloc_q_counter(struct mlx5_core_dev *dev, u16 *counter_id);
599−int mlx5_core_dealloc_q_counter(struct mlx5_core_dev *dev, u16 counter_id);
600−int mlx5_core_query_q_counter(struct mlx5_core_dev *dev, u16 counter_id,
601− int reset, void *out, int out_size);
602−
603−struct mlx5_core_rsc_common *mlx5_core_res_hold(struct mlx5_core_dev *dev,
604− int res_num,
605− enum mlx5_res_type res_type);
606−void mlx5_core_res_put(struct mlx5_core_rsc_common *res);
607564
608565 static inline const char *mlx5_qp_type_str(int type)
609566 {
include/linux/mlx5/transobj.h+6−13
@@ -39,27 +39,20 @@ int mlx5_core_alloc_transport_domain(struct mlx5_core_dev *dev, u32 *tdn); · 38 unmodified lines
3939 void mlx5_core_dealloc_transport_domain(struct mlx5_core_dev *dev, u32 tdn);
4040 int mlx5_core_create_rq(struct mlx5_core_dev *dev, u32 *in, int inlen,
4141 u32 *rqn);
42−int mlx5_core_modify_rq(struct mlx5_core_dev *dev, u32 rqn, u32 *in, int inlen);
42+int mlx5_core_modify_rq(struct mlx5_core_dev *dev, u32 rqn, u32 *in);
4343 void mlx5_core_destroy_rq(struct mlx5_core_dev *dev, u32 rqn);
4444 int mlx5_core_query_rq(struct mlx5_core_dev *dev, u32 rqn, u32 *out);
4545 int mlx5_core_create_sq(struct mlx5_core_dev *dev, u32 *in, int inlen,
4646 u32 *sqn);
47−int mlx5_core_modify_sq(struct mlx5_core_dev *dev, u32 sqn, u32 *in, int inlen);
47+int mlx5_core_modify_sq(struct mlx5_core_dev *dev, u32 sqn, u32 *in);
4848 void mlx5_core_destroy_sq(struct mlx5_core_dev *dev, u32 sqn);
4949 int mlx5_core_query_sq(struct mlx5_core_dev *dev, u32 sqn, u32 *out);
5050 int mlx5_core_query_sq_state(struct mlx5_core_dev *dev, u32 sqn, u8 *state);
51−int mlx5_core_create_tir(struct mlx5_core_dev *dev, u32 *in, int inlen,
52− u32 *tirn);
53−int mlx5_core_create_tir_out(struct mlx5_core_dev *dev,
54− u32 *in, int inlen,
55− u32 *out, int outlen);
56−int mlx5_core_modify_tir(struct mlx5_core_dev *dev, u32 tirn, u32 *in,
57− int inlen);
51+int mlx5_core_create_tir(struct mlx5_core_dev *dev, u32 *in, u32 *tirn);
52+int mlx5_core_modify_tir(struct mlx5_core_dev *dev, u32 tirn, u32 *in);
5853 void mlx5_core_destroy_tir(struct mlx5_core_dev *dev, u32 tirn);
59−int mlx5_core_create_tis(struct mlx5_core_dev *dev, u32 *in, int inlen,
60− u32 *tisn);
61−int mlx5_core_modify_tis(struct mlx5_core_dev *dev, u32 tisn, u32 *in,
62− int inlen);
54+int mlx5_core_create_tis(struct mlx5_core_dev *dev, u32 *in, u32 *tisn);
55+int mlx5_core_modify_tis(struct mlx5_core_dev *dev, u32 tisn, u32 *in);
6356 void mlx5_core_destroy_tis(struct mlx5_core_dev *dev, u32 tisn);
6457 int mlx5_core_create_rqt(struct mlx5_core_dev *dev, u32 *in, int inlen,
6558 u32 *rqtn);
include/linux/mlx5/vport.h+1−2
@@ -127,8 +127,7 @@ int mlx5_query_vport_down_stats(struct mlx5_core_dev *mdev, u16 vport, · 126 unmodified lines
127127 u8 other_vport, u64 *rx_discard_vport_down,
128128 u64 *tx_discard_vport_down);
129129 int mlx5_core_query_vport_counter(struct mlx5_core_dev *dev, u8 other_vport,
130− int vf, u8 port_num, void *out,
131− size_t out_sz);
130+ int vf, u8 port_num, void *out);
132131 int mlx5_core_modify_hca_vport_context(struct mlx5_core_dev *dev,
133132 u8 other_vport, u8 port_num,
134133 int vf,
include/linux/mm.h+8−6
@@ -201,10 +201,10 @@ extern int sysctl_overcommit_memory; · 200 unmodified lines
201201 extern int sysctl_overcommit_ratio;
202202 extern unsigned long sysctl_overcommit_kbytes;
203203
204−extern int overcommit_ratio_handler(struct ctl_table *, int, void __user *,
205− size_t *, loff_t *);
206−extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *,
207− size_t *, loff_t *);
204+int overcommit_ratio_handler(struct ctl_table *, int, void *, size_t *,
205+ loff_t *);
206+int overcommit_kbytes_handler(struct ctl_table *, int, void *, size_t *,
207+ loff_t *);
208208
209209 #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
210210
@@ -2993,8 +2993,8 @@ extern bool process_shares_mm(struct task_struct *p, struct mm_struct *mm); · 2782 unmodified lines
29932993
29942994 #ifdef CONFIG_SYSCTL
29952995 extern int sysctl_drop_caches;
2996−int drop_caches_sysctl_handler(struct ctl_table *, int,
2997− void __user *, size_t *, loff_t *);
2996+int drop_caches_sysctl_handler(struct ctl_table *, int, void *, size_t *,
2997+ loff_t *);
29982998 #endif
29992999
30003000 void drop_slab(void);
@@ -3177,5 +3177,7 @@ unsigned long wp_shared_mapping_range(struct address_space *mapping, · 176 unmodified lines
31773177 pgoff_t first_index, pgoff_t nr);
31783178 #endif
31793179
3180+extern int sysctl_nr_trim_pages;
3181+
31803182 #endif /* __KERNEL__ */
31813183 #endif /* _LINUX_MM_H */
include/linux/mmzone.h+13−14
@@ -911,24 +911,23 @@ static inline int is_highmem(struct zone *zone) · 910 unmodified lines
911911
912912 /* These two functions are used to setup the per zone pages min values */
913913 struct ctl_table;
914−int min_free_kbytes_sysctl_handler(struct ctl_table *, int,
915− void __user *, size_t *, loff_t *);
916−int watermark_boost_factor_sysctl_handler(struct ctl_table *, int,
917− void __user *, size_t *, loff_t *);
918−int watermark_scale_factor_sysctl_handler(struct ctl_table *, int,
919− void __user *, size_t *, loff_t *);
914+
915+int min_free_kbytes_sysctl_handler(struct ctl_table *, int, void *, size_t *,
916+ loff_t *);
917+int watermark_scale_factor_sysctl_handler(struct ctl_table *, int, void *,
918+ size_t *, loff_t *);
920919 extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES];
921−int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int,
922− void __user *, size_t *, loff_t *);
920+int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, void *,
921+ size_t *, loff_t *);
923922 int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int,
924− void __user *, size_t *, loff_t *);
923+ void *, size_t *, loff_t *);
925924 int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,
926− void __user *, size_t *, loff_t *);
925+ void *, size_t *, loff_t *);
927926 int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,
928− void __user *, size_t *, loff_t *);
929−
930−extern int numa_zonelist_order_handler(struct ctl_table *, int,
931− void __user *, size_t *, loff_t *);
927+ void *, size_t *, loff_t *);
928+int numa_zonelist_order_handler(struct ctl_table *, int,
929+ void *, size_t *, loff_t *);
930+extern int percpu_pagelist_fraction;
932931 extern char numa_zonelist_order[];
933932 #define NUMA_ZONELIST_ORDER_LEN 16
934933
include/linux/net.h+0−4
@@ -303,10 +303,6 @@ int kernel_connect(struct socket *sock, struct sockaddr *addr, int addrlen, · 302 unmodified lines
303303 int flags);
304304 int kernel_getsockname(struct socket *sock, struct sockaddr *addr);
305305 int kernel_getpeername(struct socket *sock, struct sockaddr *addr);
306−int kernel_getsockopt(struct socket *sock, int level, int optname, char *optval,
307− int *optlen);
308−int kernel_setsockopt(struct socket *sock, int level, int optname, char *optval,
309− unsigned int optlen);
310306 int kernel_sendpage(struct socket *sock, struct page *page, int offset,
311307 size_t size, int flags);
312308 int kernel_sendpage_locked(struct sock *sk, struct page *page, int offset,
include/linux/netdev_features.h+1−1
@@ -89,7 +89,7 @@ enum { · 88 unmodified lines
8989 * Add your fresh new feature above and remember to update
9090 * netdev_features_strings[] in net/core/ethtool.c and maybe
9191 * some feature mask #defines below. Please also describe it
92− * in Documentation/networking/netdev-features.txt.
92+ * in Documentation/networking/netdev-features.rst.
9393 */
9494
9595 /**/NETDEV_FEATURE_COUNT
include/linux/netdevice.h+82−8
@@ -53,6 +53,7 @@ struct netpoll_info; · 52 unmodified lines
5353 struct device;
5454 struct phy_device;
5555 struct dsa_port;
56+struct ip_tunnel_parm;
5657 struct macsec_context;
5758 struct macsec_ops;
5859
@@ -288,6 +289,7 @@ enum netdev_state_t { · 229 unmodified lines
288289 __LINK_STATE_NOCARRIER,
289290 __LINK_STATE_LINKWATCH_PENDING,
290291 __LINK_STATE_DORMANT,
292+ __LINK_STATE_TESTING,
291293 };
292294
293295
@@ -328,6 +330,7 @@ struct napi_struct { · 34 unmodified lines
328330
329331 unsigned long state;
330332 int weight;
333+ int defer_hard_irqs_count;
331334 unsigned long gro_bitmask;
332335 int (*poll)(struct napi_struct *, int);
333336 #ifdef CONFIG_NETPOLL
@@ -1146,6 +1149,12 @@ struct netdev_net_notifier { · 812 unmodified lines
11461149 * int (*ndo_del_slave)(struct net_device *dev, struct net_device *slave_dev);
11471150 * Called to release previously enslaved netdev.
11481151 *
1152+ * struct net_device *(*ndo_get_xmit_slave)(struct net_device *dev,
1153+ * struct sk_buff *skb,
1154+ * bool all_slaves);
1155+ * Get the xmit slave of master device. If all_slaves is true, function
1156+ * assume all the slaves can transmit.
1157+ *
11491158 * Feature/offload setting functions.
11501159 * netdev_features_t (*ndo_fix_features)(struct net_device *dev,
11511160 * netdev_features_t features);
@@ -1266,6 +1275,9 @@ struct netdev_net_notifier { · 114 unmodified lines
12661275 * Get devlink port instance associated with a given netdev.
12671276 * Called with a reference on the netdevice and devlink locks only,
12681277 * rtnl_lock is not held.
1278+ * int (*ndo_tunnel_ctl)(struct net_device *dev, struct ip_tunnel_parm *p,
1279+ * int cmd);
1280+ * Add, change, delete or get information on an IPv4 tunnel.
12691281 */
12701282 struct net_device_ops {
12711283 int (*ndo_init)(struct net_device *dev);
@@ -1389,6 +1401,9 @@ struct net_device_ops { · 117 unmodified lines
13891401 struct netlink_ext_ack *extack);
13901402 int (*ndo_del_slave)(struct net_device *dev,
13911403 struct net_device *slave_dev);
1404+ struct net_device* (*ndo_get_xmit_slave)(struct net_device *dev,
1405+ struct sk_buff *skb,
1406+ bool all_slaves);
13921407 netdev_features_t (*ndo_fix_features)(struct net_device *dev,
13931408 netdev_features_t features);
13941409 int (*ndo_set_features)(struct net_device *dev,
@@ -1468,6 +1483,8 @@ struct net_device_ops { · 73 unmodified lines
14681483 int (*ndo_xsk_wakeup)(struct net_device *dev,
14691484 u32 queue_id, u32 flags);
14701485 struct devlink_port * (*ndo_get_devlink_port)(struct net_device *dev);
1486+ int (*ndo_tunnel_ctl)(struct net_device *dev,
1487+ struct ip_tunnel_parm *p, int cmd);
14711488 };
14721489
14731490 /**
@@ -1803,13 +1820,11 @@ enum netdev_priv_flags { · 329 unmodified lines
18031820 * @phydev: Physical device may attach itself
18041821 * for hardware timestamping
18051822 * @sfp_bus: attached &struct sfp_bus structure.
1806− * @qdisc_tx_busylock_key: lockdep class annotating Qdisc->busylock
1807− * spinlock
1808− * @qdisc_running_key: lockdep class annotating Qdisc->running seqcount
1809− * @qdisc_xmit_lock_key: lockdep class annotating
1810− * netdev_queue->_xmit_lock spinlock
1823+ *
18111824 * @addr_list_lock_key: lockdep class annotating
18121825 * net_device->addr_list_lock spinlock
1826+ * @qdisc_tx_busylock: lockdep class annotating Qdisc->busylock spinlock
1827+ * @qdisc_running_key: lockdep class annotating Qdisc->running seqcount
18131828 *
18141829 * @proto_down: protocol port state information can be sent to the
18151830 * switch driver and used to set the phys state of the
@@ -1994,6 +2009,7 @@ struct net_device { · 178 unmodified lines
19942009
19952010 struct bpf_prog __rcu *xdp_prog;
19962011 unsigned long gro_flush_timeout;
2012+ int napi_defer_hard_irqs;
19972013 rx_handler_func_t __rcu *rx_handler;
19982014 void __rcu *rx_handler_data;
19992015
@@ -2109,10 +2125,9 @@ struct net_device { · 109 unmodified lines
21092125 #endif
21102126 struct phy_device *phydev;
21112127 struct sfp_bus *sfp_bus;
2112− struct lock_class_key qdisc_tx_busylock_key;
2113− struct lock_class_key qdisc_running_key;
2114− struct lock_class_key qdisc_xmit_lock_key;
21152128 struct lock_class_key addr_list_lock_key;
2129+ struct lock_class_key *qdisc_tx_busylock;
2130+ struct lock_class_key *qdisc_running_key;
21162131 bool proto_down;
21172132 unsigned wol_enabled:1;
21182133
@@ -2197,6 +2212,20 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev, · 78 unmodified lines
21972212 f(dev, &dev->_tx[i], arg);
21982213 }
21992214
2215+#define netdev_lockdep_set_classes(dev) \
2216+{ \
2217+ static struct lock_class_key qdisc_tx_busylock_key; \
2218+ static struct lock_class_key qdisc_running_key; \
2219+ static struct lock_class_key qdisc_xmit_lock_key; \
2220+ unsigned int i; \
2221+ \
2222+ (dev)->qdisc_tx_busylock = &qdisc_tx_busylock_key; \
2223+ (dev)->qdisc_running_key = &qdisc_running_key; \
2224+ for (i = 0; i < (dev)->num_tx_queues; i++) \
2225+ lockdep_set_class(&(dev)->_tx[i]._xmit_lock, \
2226+ &qdisc_xmit_lock_key); \
2227+}
2228+
22002229 u16 netdev_pick_tx(struct net_device *dev, struct sk_buff *skb,
22012230 struct net_device *sb_dev);
22022231 struct netdev_queue *netdev_core_pick_tx(struct net_device *dev,
@@ -2731,6 +2760,9 @@ void netdev_freemem(struct net_device *dev); · 528 unmodified lines
27312760 void synchronize_net(void);
27322761 int init_dummy_netdev(struct net_device *dev);
27332762
2763+struct net_device *netdev_get_xmit_slave(struct net_device *dev,
2764+ struct sk_buff *skb,
2765+ bool all_slaves);
27342766 struct net_device *dev_get_by_index(struct net *net, int ifindex);
27352767 struct net_device *__dev_get_by_index(struct net *net, int ifindex);
27362768 struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
@@ -3907,6 +3939,46 @@ static inline bool netif_dormant(const struct net_device *dev) · 1170 unmodified lines
39073939 }
39083940
39093941
3942+/**
3943+ * netif_testing_on - mark device as under test.
3944+ * @dev: network device
3945+ *
3946+ * Mark device as under test (as per RFC2863).
3947+ *
3948+ * The testing state indicates that some test(s) must be performed on
3949+ * the interface. After completion, of the test, the interface state
3950+ * will change to up, dormant, or down, as appropriate.
3951+ */
3952+static inline void netif_testing_on(struct net_device *dev)
3953+{
3954+ if (!test_and_set_bit(__LINK_STATE_TESTING, &dev->state))
3955+ linkwatch_fire_event(dev);
3956+}
3957+
3958+/**
3959+ * netif_testing_off - set device as not under test.
3960+ * @dev: network device
3961+ *
3962+ * Device is not in testing state.
3963+ */
3964+static inline void netif_testing_off(struct net_device *dev)
3965+{
3966+ if (test_and_clear_bit(__LINK_STATE_TESTING, &dev->state))
3967+ linkwatch_fire_event(dev);
3968+}
3969+
3970+/**
3971+ * netif_testing - test if device is under test
3972+ * @dev: network device
3973+ *
3974+ * Check if device is under test
3975+ */
3976+static inline bool netif_testing(const struct net_device *dev)
3977+{
3978+ return test_bit(__LINK_STATE_TESTING, &dev->state);
3979+}
3980+
3981+
39103982 /**
39113983 * netif_oper_up - test if device is operational
39123984 * @dev: network device
@@ -4208,6 +4280,8 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, · 295 unmodified lines
42084280 int register_netdev(struct net_device *dev);
42094281 void unregister_netdev(struct net_device *dev);
42104282
4283+int devm_register_netdev(struct device *dev, struct net_device *ndev);
4284+
42114285 /* General hardware address lists handling functions */
42124286 int __hw_addr_sync(struct netdev_hw_addr_list *to_list,
42134287 struct netdev_hw_addr_list *from_list, int addr_len);
include/linux/netpoll.h+1−9
@@ -63,15 +63,7 @@ int netpoll_setup(struct netpoll *np); · 62 unmodified lines
6363 void __netpoll_cleanup(struct netpoll *np);
6464 void __netpoll_free(struct netpoll *np);
6565 void netpoll_cleanup(struct netpoll *np);
66−void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
67− struct net_device *dev);
68−static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
69−{
70− unsigned long flags;
71− local_irq_save(flags);
72− netpoll_send_skb_on_dev(np, skb, np->dev);
73− local_irq_restore(flags);
74−}
66+netdev_tx_t netpoll_send_skb(struct netpoll *np, struct sk_buff *skb);
7567
7668 #ifdef CONFIG_NETPOLL
7769 static inline void *netpoll_poll_lock(struct napi_struct *napi)
include/linux/nmi.h+5−10
@@ -202,16 +202,11 @@ static inline void watchdog_update_hrtimer_threshold(u64 period) { } · 201 unmodified lines
202202 #endif
203203
204204 struct ctl_table;
205−extern int proc_watchdog(struct ctl_table *, int ,
206− void __user *, size_t *, loff_t *);
207−extern int proc_nmi_watchdog(struct ctl_table *, int ,
208− void __user *, size_t *, loff_t *);
209−extern int proc_soft_watchdog(struct ctl_table *, int ,
210− void __user *, size_t *, loff_t *);
211−extern int proc_watchdog_thresh(struct ctl_table *, int ,
212− void __user *, size_t *, loff_t *);
213−extern int proc_watchdog_cpumask(struct ctl_table *, int,
214− void __user *, size_t *, loff_t *);
205+int proc_watchdog(struct ctl_table *, int, void *, size_t *, loff_t *);
206+int proc_nmi_watchdog(struct ctl_table *, int , void *, size_t *, loff_t *);
207+int proc_soft_watchdog(struct ctl_table *, int , void *, size_t *, loff_t *);
208+int proc_watchdog_thresh(struct ctl_table *, int , void *, size_t *, loff_t *);
209+int proc_watchdog_cpumask(struct ctl_table *, int, void *, size_t *, loff_t *);
215210
216211 #ifdef CONFIG_HAVE_ACPI_APEI_NMI
217212 #include <asm/nmi.h>
include/linux/of_mdio.h+10−1
@@ -30,7 +30,9 @@ extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np); · 29 unmodified lines
3030 extern int of_phy_register_fixed_link(struct device_node *np);
3131 extern void of_phy_deregister_fixed_link(struct device_node *np);
3232 extern bool of_phy_is_fixed_link(struct device_node *np);
33−
33+extern int of_mdiobus_phy_device_register(struct mii_bus *mdio,
34+ struct phy_device *phy,
35+ struct device_node *child, u32 addr);
3436
3537 static inline int of_mdio_parse_addr(struct device *dev,
3638 const struct device_node *np)
@@ -118,6 +120,13 @@ static inline bool of_phy_is_fixed_link(struct device_node *np) · 81 unmodified lines
118120 {
119121 return false;
120122 }
123+
124+static inline int of_mdiobus_phy_device_register(struct mii_bus *mdio,
125+ struct phy_device *phy,
126+ struct device_node *child, u32 addr)
127+{
128+ return -ENOSYS;
129+}
121130 #endif
122131
123132
include/linux/perf_event.h+5−8
@@ -1280,15 +1280,12 @@ extern int sysctl_perf_cpu_time_max_percent; · 1279 unmodified lines
12801280
12811281 extern void perf_sample_event_took(u64 sample_len_ns);
12821282
1283−extern int perf_proc_update_handler(struct ctl_table *table, int write,
1284− void __user *buffer, size_t *lenp,
1285− loff_t *ppos);
1286−extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
1287− void __user *buffer, size_t *lenp,
1288− loff_t *ppos);
1289−
1283+int perf_proc_update_handler(struct ctl_table *table, int write,
1284+ void *buffer, size_t *lenp, loff_t *ppos);
1285+int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
1286+ void *buffer, size_t *lenp, loff_t *ppos);
12901287 int perf_event_max_stack_handler(struct ctl_table *table, int write,
1291− void __user *buffer, size_t *lenp, loff_t *ppos);
1288+ void *buffer, size_t *lenp, loff_t *ppos);
12921289
12931290 /* Access to perf_event_open(2) syscall. */
12941291 #define PERF_SECURITY_OPEN 0
include/linux/phy.h+182−11
@@ -15,6 +15,7 @@ · 14 unmodified lines
1515 #include <linux/spinlock.h>
1616 #include <linux/ethtool.h>
1717 #include <linux/linkmode.h>
18+#include <linux/netlink.h>
1819 #include <linux/mdio.h>
1920 #include <linux/mii.h>
2021 #include <linux/mii_timestamper.h>
@@ -25,6 +26,7 @@ · 4 unmodified lines
2526 #include <linux/u64_stats_sync.h>
2627 #include <linux/irqreturn.h>
2728 #include <linux/iopoll.h>
29+#include <linux/refcount.h>
2830
2931 #include <linux/atomic.h>
3032
@@ -77,6 +79,7 @@ extern const int phy_10gbit_features_array[1]; · 46 unmodified lines
7779
7880 #define PHY_IS_INTERNAL 0x00000001
7981 #define PHY_RST_AFTER_CLK_EN 0x00000002
82+#define PHY_POLL_CABLE_TEST 0x00000004
8083 #define MDIO_DEVICE_IS_PHY 0x80000000
8184
8285 /* Interface Mode definitions */
@@ -206,12 +209,6 @@ static inline const char *phy_modes(phy_interface_t interface) · 123 unmodified lines
206209
207210 #define MII_BUS_ID_SIZE 61
208211
209−/* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit
210− IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips. */
211−#define MII_ADDR_C45 (1<<30)
212−#define MII_DEVADDR_C45_SHIFT 16
213−#define MII_REGADDR_C45_MASK GENMASK(15, 0)
214−
215212 struct device;
216213 struct phylink;
217214 struct sfp_bus;
@@ -227,6 +224,28 @@ struct mdio_bus_stats { · 9 unmodified lines
227224 struct u64_stats_sync syncp;
228225 };
229226
227+/* Represents a shared structure between different phydev's in the same
228+ * package, for example a quad PHY. See phy_package_join() and
229+ * phy_package_leave().
230+ */
231+struct phy_package_shared {
232+ int addr;
233+ refcount_t refcnt;
234+ unsigned long flags;
235+ size_t priv_size;
236+
237+ /* private data pointer */
238+ /* note that this pointer is shared between different phydevs and
239+ * the user has to take care of appropriate locking. It is allocated
240+ * and freed automatically by phy_package_join() and
241+ * phy_package_leave().
242+ */
243+ void *priv;
244+};
245+
246+/* used as bit number in atomic bitops */
247+#define PHY_SHARED_F_INIT_DONE 0
248+
230249 /*
231250 * The Bus class for PHYs. Devices which provide access to
232251 * PHYs should register using this structure
@@ -241,6 +260,9 @@ struct mii_bus { · 8 unmodified lines
241260 int (*reset)(struct mii_bus *bus);
242261 struct mdio_bus_stats stats[PHY_MAX_ADDR];
243262
263+ unsigned int is_managed:1; /* is device-managed */
264+ unsigned int is_managed_registered:1;
265+
244266 /*
245267 * A lock to ensure that only one thing can read/write
246268 * the MDIO bus at a time
@@ -275,6 +297,12 @@ struct mii_bus { · 28 unmodified lines
275297 int reset_delay_us;
276298 /* RESET GPIO descriptor pointer */
277299 struct gpio_desc *reset_gpiod;
300+
301+ /* protect access to the shared element */
302+ struct mutex shared_lock;
303+
304+ /* shared state across different PHYs */
305+ struct phy_package_shared *shared[PHY_MAX_ADDR];
278306 };
279307 #define to_mii_bus(d) container_of(d, struct mii_bus, dev)
280308
@@ -286,6 +314,20 @@ static inline struct mii_bus *mdiobus_alloc(void) · 5 unmodified lines
286314
287315 int __mdiobus_register(struct mii_bus *bus, struct module *owner);
288316 #define mdiobus_register(bus) __mdiobus_register(bus, THIS_MODULE)
317+static inline int devm_mdiobus_register(struct mii_bus *bus)
318+{
319+ int ret;
320+
321+ if (!bus->is_managed)
322+ return -EPERM;
323+
324+ ret = mdiobus_register(bus);
325+ if (!ret)
326+ bus->is_managed_registered = 1;
327+
328+ return ret;
329+}
330+
289331 void mdiobus_unregister(struct mii_bus *bus);
290332 void mdiobus_free(struct mii_bus *bus);
291333 struct mii_bus *devm_mdiobus_alloc_size(struct device *dev, int sizeof_priv);
@@ -326,6 +368,12 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr); · 34 unmodified lines
326368 * - irq or timer will set NOLINK if link goes down
327369 * - phy_stop moves to HALTED
328370 *
371+ * CABLETEST: PHY is performing a cable test. Packet reception/sending
372+ * is not expected to work, carrier will be indicated as down. PHY will be
373+ * poll once per second, or on interrupt for it current state.
374+ * Once complete, move to UP to restart the PHY.
375+ * - phy_stop aborts the running test and moves to HALTED
376+ *
329377 * HALTED: PHY is up, but no polling or interrupts are done. Or
330378 * PHY is in an error state.
331379 * - phy_start moves to UP
@@ -337,6 +385,7 @@ enum phy_state { · 5 unmodified lines
337385 PHY_UP,
338386 PHY_RUNNING,
339387 PHY_NOLINK,
388+ PHY_CABLETEST,
340389 };
341390
342391 /**
@@ -431,6 +480,9 @@ struct phy_device { · 88 unmodified lines
431480 int duplex;
432481 int pause;
433482 int asym_pause;
483+ u8 master_slave_get;
484+ u8 master_slave_set;
485+ u8 master_slave_state;
434486
435487 /* Union of PHY and Attached devices' supported link modes */
436488 /* See ethtool.h for more info */
@@ -461,6 +513,15 @@ struct phy_device { · 24 unmodified lines
461513 /* For use by PHYs to maintain extra state */
462514 void *priv;
463515
516+ /* shared data pointer */
517+ /* For use by PHYs inside the same package that need a shared state. */
518+ struct phy_package_shared *shared;
519+
520+ /* Reporting cable test results */
521+ struct sk_buff *skb;
522+ void *ehdr;
523+ struct nlattr *nest;
524+
464525 /* Interrupt and Polling infrastructure */
465526 struct delayed_work state_queue;
466527
@@ -476,7 +537,7 @@ struct phy_device { · 9 unmodified lines
476537 u8 mdix;
477538 u8 mdix_ctrl;
478539
479− void (*phy_link_change)(struct phy_device *, bool up, bool do_carrier);
540+ void (*phy_link_change)(struct phy_device *phydev, bool up);
480541 void (*adjust_link)(struct net_device *dev);
481542
482543 #if IS_ENABLED(CONFIG_MACSEC)
@@ -487,6 +548,18 @@ struct phy_device { · 4 unmodified lines
487548 #define to_phy_device(d) container_of(to_mdio_device(d), \
488549 struct phy_device, mdio)
489550
551+/* A structure containing possible configuration parameters
552+ * for a TDR cable test. The driver does not need to implement
553+ * all the parameters, but should report what is actually used.
554+ */
555+struct phy_tdr_config {
556+ u32 first;
557+ u32 last;
558+ u32 step;
559+ s8 pair;
560+};
561+#define PHY_PAIR_ALL -1
562+
490563 /* struct phy_driver: Driver structure for a particular PHY type
491564 *
492565 * driver_data: static driver data
@@ -636,6 +709,18 @@ struct phy_driver { · 143 unmodified lines
636709 int (*module_eeprom)(struct phy_device *dev,
637710 struct ethtool_eeprom *ee, u8 *data);
638711
712+ /* Start a cable test */
713+ int (*cable_test_start)(struct phy_device *dev);
714+
715+ /* Start a raw TDR cable test */
716+ int (*cable_test_tdr_start)(struct phy_device *dev,
717+ const struct phy_tdr_config *config);
718+
719+ /* Once per second, or on interrupt, request the status of the
720+ * test.
721+ */
722+ int (*cable_test_get_status)(struct phy_device *dev, bool *finished);
723+
639724 /* Get statistics from the phy using ethtool */
640725 int (*get_sset_count)(struct phy_device *dev);
641726 void (*get_strings)(struct phy_device *dev, u8 *data);
@@ -649,6 +734,8 @@ struct phy_driver { · 7 unmodified lines
649734 struct ethtool_tunable *tuna,
650735 const void *data);
651736 int (*set_loopback)(struct phy_device *dev, bool enable);
737+ int (*get_sqi)(struct phy_device *dev);
738+ int (*get_sqi_max)(struct phy_device *dev);
652739 };
653740 #define to_phy_driver(d) container_of(to_mdio_common_driver(d), \
654741 struct phy_driver, mdiodrv)
@@ -993,6 +1080,10 @@ static inline bool phy_interrupt_is_valid(struct phy_device *phydev) · 338 unmodified lines
9931080 */
9941081 static inline bool phy_polling_mode(struct phy_device *phydev)
9951082 {
1083+ if (phydev->state == PHY_CABLETEST)
1084+ if (phydev->drv->flags & PHY_POLL_CABLE_TEST)
1085+ return true;
1086+
9961087 return phydev->irq == PHY_POLL;
9971088 }
9981089
@@ -1174,6 +1265,34 @@ int phy_speed_up(struct phy_device *phydev); · 175 unmodified lines
11741265 int phy_restart_aneg(struct phy_device *phydev);
11751266 int phy_reset_after_clk_enable(struct phy_device *phydev);
11761267
1268+#if IS_ENABLED(CONFIG_PHYLIB)
1269+int phy_start_cable_test(struct phy_device *phydev,
1270+ struct netlink_ext_ack *extack);
1271+int phy_start_cable_test_tdr(struct phy_device *phydev,
1272+ struct netlink_ext_ack *extack,
1273+ const struct phy_tdr_config *config);
1274+#else
1275+static inline
1276+int phy_start_cable_test(struct phy_device *phydev,
1277+ struct netlink_ext_ack *extack)
1278+{
1279+ NL_SET_ERR_MSG(extack, "Kernel not compiled with PHYLIB support");
1280+ return -EOPNOTSUPP;
1281+}
1282+static inline
1283+int phy_start_cable_test_tdr(struct phy_device *phydev,
1284+ struct netlink_ext_ack *extack,
1285+ const struct phy_tdr_config *config)
1286+{
1287+ NL_SET_ERR_MSG(extack, "Kernel not compiled with PHYLIB support");
1288+ return -EOPNOTSUPP;
1289+}
1290+#endif
1291+
1292+int phy_cable_test_result(struct phy_device *phydev, u8 pair, u16 result);
1293+int phy_cable_test_fault_length(struct phy_device *phydev, u8 pair,
1294+ u16 cm);
1295+
11771296 static inline void phy_device_reset(struct phy_device *phydev, int value)
11781297 {
11791298 mdio_device_reset(&phydev->mdio, value);
@@ -1234,10 +1353,6 @@ static inline int genphy_config_aneg(struct phy_device *phydev) · 54 unmodified lines
12341353 return __genphy_config_aneg(phydev, false);
12351354 }
12361355
1237−static inline int genphy_no_soft_reset(struct phy_device *phydev)
1238−{
1239− return 0;
1240−}
12411356 static inline int genphy_no_ack_interrupt(struct phy_device *phydev)
12421357 {
12431358 return 0;
@@ -1341,6 +1456,10 @@ int phy_ethtool_get_link_ksettings(struct net_device *ndev, · 97 unmodified lines
13411456 int phy_ethtool_set_link_ksettings(struct net_device *ndev,
13421457 const struct ethtool_link_ksettings *cmd);
13431458 int phy_ethtool_nway_reset(struct net_device *ndev);
1459+int phy_package_join(struct phy_device *phydev, int addr, size_t priv_size);
1460+void phy_package_leave(struct phy_device *phydev);
1461+int devm_phy_package_join(struct device *dev, struct phy_device *phydev,
1462+ int addr, size_t priv_size);
13441463
13451464 #if IS_ENABLED(CONFIG_PHYLIB)
13461465 int __init mdio_bus_init(void);
@@ -1393,6 +1512,58 @@ static inline int phy_ethtool_get_stats(struct phy_device *phydev, · 46 unmodified lines
13931512 return 0;
13941513 }
13951514
1515+static inline int phy_package_read(struct phy_device *phydev, u32 regnum)
1516+{
1517+ struct phy_package_shared *shared = phydev->shared;
1518+
1519+ if (!shared)
1520+ return -EIO;
1521+
1522+ return mdiobus_read(phydev->mdio.bus, shared->addr, regnum);
1523+}
1524+
1525+static inline int __phy_package_read(struct phy_device *phydev, u32 regnum)
1526+{
1527+ struct phy_package_shared *shared = phydev->shared;
1528+
1529+ if (!shared)
1530+ return -EIO;
1531+
1532+ return __mdiobus_read(phydev->mdio.bus, shared->addr, regnum);
1533+}
1534+
1535+static inline int phy_package_write(struct phy_device *phydev,
1536+ u32 regnum, u16 val)
1537+{
1538+ struct phy_package_shared *shared = phydev->shared;
1539+
1540+ if (!shared)
1541+ return -EIO;
1542+
1543+ return mdiobus_write(phydev->mdio.bus, shared->addr, regnum, val);
1544+}
1545+
1546+static inline int __phy_package_write(struct phy_device *phydev,
1547+ u32 regnum, u16 val)
1548+{
1549+ struct phy_package_shared *shared = phydev->shared;
1550+
1551+ if (!shared)
1552+ return -EIO;
1553+
1554+ return __mdiobus_write(phydev->mdio.bus, shared->addr, regnum, val);
1555+}
1556+
1557+static inline bool phy_package_init_once(struct phy_device *phydev)
1558+{
1559+ struct phy_package_shared *shared = phydev->shared;
1560+
1561+ if (!shared)
1562+ return false;
1563+
1564+ return !test_and_set_bit(PHY_SHARED_F_INIT_DONE, &shared->flags);
1565+}
1566+
13961567 extern struct bus_type mdio_bus_type;
13971568
13981569 struct mdio_board_info {
include/linux/phylink.h+3−3
@@ -67,6 +67,9 @@ struct phylink_config { · 66 unmodified lines
6767 struct device *dev;
6868 enum phylink_op_type type;
6969 bool pcs_poll;
70+ bool poll_fixed_state;
71+ void (*get_fixed_state)(struct phylink_config *config,
72+ struct phylink_link_state *state);
7073 };
7174
7275 /**
@@ -366,9 +369,6 @@ void phylink_destroy(struct phylink *); · 293 unmodified lines
366369 int phylink_connect_phy(struct phylink *, struct phy_device *);
367370 int phylink_of_phy_connect(struct phylink *, struct device_node *, u32 flags);
368371 void phylink_disconnect_phy(struct phylink *);
369−int phylink_fixed_state_cb(struct phylink *,
370− void (*cb)(struct net_device *dev,
371− struct phylink_link_state *));
372372
373373 void phylink_mac_change(struct phylink *, bool up);
374374
include/linux/pid.h+3−0
@@ -108,6 +108,9 @@ extern void transfer_pid(struct task_struct *old, struct task_struct *new, · 107 unmodified lines
108108 struct pid_namespace;
109109 extern struct pid_namespace init_pid_ns;
110110
111+extern int pid_max;
112+extern int pid_max_min, pid_max_max;
113+
111114 /*
112115 * look up a PID in the hash table. Must be called with the tasklist_lock
113116 * or rcu_read_lock() held.
include/linux/printk.h+1−1
@@ -189,7 +189,7 @@ extern int printk_delay_msec; · 188 unmodified lines
189189 extern int dmesg_restrict;
190190
191191 extern int
192−devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void __user *buf,
192+devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void *buf,
193193 size_t *lenp, loff_t *ppos);
194194
195195 extern void wake_up_klogd(void);
include/linux/proc_fs.h+3−0
@@ -105,6 +105,9 @@ struct proc_dir_entry *proc_create_net_single_write(const char *name, umode_t mo · 104 unmodified lines
105105 void *data);
106106 extern struct pid *tgid_pidfd_to_pid(const struct file *file);
107107
108+extern int bpf_iter_init_seq_net(void *priv_data);
109+extern void bpf_iter_fini_seq_net(void *priv_data);
110+
108111 #ifdef CONFIG_PROC_PID_ARCH_STATUS
109112 /*
110113 * The architecture which selects CONFIG_PROC_PID_ARCH_STATUS must
include/linux/ptp_clock_kernel.h+5−1
@@ -36,7 +36,7 @@ struct ptp_system_timestamp { · 35 unmodified lines
3636 };
3737
3838 /**
39− * struct ptp_clock_info - decribes a PTP hardware clock
39+ * struct ptp_clock_info - describes a PTP hardware clock
4040 *
4141 * @owner: The clock driver should set to THIS_MODULE.
4242 * @name: A short "friendly name" to identify the clock and to
@@ -65,6 +65,9 @@ struct ptp_system_timestamp { · 22 unmodified lines
6565 * parameter delta: Desired frequency offset from nominal frequency
6666 * in parts per billion
6767 *
68+ * @adjphase: Adjusts the phase offset of the hardware clock.
69+ * parameter delta: Desired change in nanoseconds.
70+ *
6871 * @adjtime: Shifts the time of the hardware clock.
6972 * parameter delta: Desired change in nanoseconds.
7073 *
@@ -128,6 +131,7 @@ struct ptp_clock_info { · 57 unmodified lines
128131 struct ptp_pin_desc *pin_config;
129132 int (*adjfine)(struct ptp_clock_info *ptp, long scaled_ppm);
130133 int (*adjfreq)(struct ptp_clock_info *ptp, s32 delta);
134+ int (*adjphase)(struct ptp_clock_info *ptp, s32 phase);
131135 int (*adjtime)(struct ptp_clock_info *ptp, s64 delta);
132136 int (*gettime64)(struct ptp_clock_info *ptp, struct timespec64 *ts);
133137 int (*gettimex64)(struct ptp_clock_info *ptp, struct timespec64 *ts,
include/linux/qed/qed_if.h+23−3
@@ -607,6 +607,16 @@ struct qed_sb_info { · 606 unmodified lines
607607 struct qed_dev *cdev;
608608 };
609609
610+enum qed_hw_err_type {
611+ QED_HW_ERR_FAN_FAIL,
612+ QED_HW_ERR_MFW_RESP_FAIL,
613+ QED_HW_ERR_HW_ATTN,
614+ QED_HW_ERR_DMAE_FAIL,
615+ QED_HW_ERR_RAMROD_FAIL,
616+ QED_HW_ERR_FW_ASSERT,
617+ QED_HW_ERR_LAST,
618+};
619+
610620 enum qed_dev_type {
611621 QED_DEV_TYPE_BB,
612622 QED_DEV_TYPE_AH,
@@ -811,10 +821,11 @@ enum qed_nvm_flash_cmd { · 198 unmodified lines
811821
812822 struct qed_common_cb_ops {
813823 void (*arfs_filter_op)(void *dev, void *fltr, u8 fw_rc);
814− void (*link_update)(void *dev,
815− struct qed_link_output *link);
824+ void (*link_update)(void *dev, struct qed_link_output *link);
816825 void (*schedule_recovery_handler)(void *dev);
817− void (*dcbx_aen)(void *dev, struct qed_dcbx_get *get, u32 mib_type);
826+ void (*schedule_hw_err_handler)(void *dev,
827+ enum qed_hw_err_type err_type);
828+ void (*dcbx_aen)(void *dev, struct qed_dcbx_get *get, u32 mib_type);
818829 void (*get_generic_tlv_data)(void *dev, struct qed_generic_tlvs *data);
819830 void (*get_protocol_tlv_data)(void *dev, void *data);
820831 };
@@ -1034,6 +1045,15 @@ struct qed_common_ops { · 213 unmodified lines
10341045 */
10351046 int (*set_led)(struct qed_dev *cdev,
10361047 enum qed_led_mode mode);
1048+
1049+/**
1050+ * @brief attn_clr_enable - Prevent attentions from being reasserted
1051+ *
1052+ * @param cdev
1053+ * @param clr_enable
1054+ */
1055+ void (*attn_clr_enable)(struct qed_dev *cdev, bool clr_enable);
1056+
10371057 /**
10381058 * @brief db_recovery_add - add doorbell information to the doorbell
10391059 * recovery mechanism.
include/linux/qed/qed_rdma_if.h+22−0
@@ -53,6 +53,13 @@ enum qed_roce_qp_state { · 52 unmodified lines
5353 QED_ROCE_QP_STATE_SQE
5454 };
5555
56+enum qed_rdma_qp_type {
57+ QED_RDMA_QP_TYPE_RC,
58+ QED_RDMA_QP_TYPE_XRC_INI,
59+ QED_RDMA_QP_TYPE_XRC_TGT,
60+ QED_RDMA_QP_TYPE_INVAL = 0xffff,
61+};
62+
5663 enum qed_rdma_tid_type {
5764 QED_RDMA_TID_REGISTERED_MR,
5865 QED_RDMA_TID_FMR,
@@ -291,6 +298,12 @@ struct qed_rdma_create_srq_in_params { · 232 unmodified lines
291298 u16 num_pages;
292299 u16 pd_id;
293300 u16 page_size;
301+
302+ /* XRC related only */
303+ bool reserved_key_en;
304+ bool is_xrc;
305+ u32 cq_cid;
306+ u16 xrcd_id;
294307 };
295308
296309 struct qed_rdma_destroy_cq_in_params {
@@ -319,7 +332,12 @@ struct qed_rdma_create_qp_in_params { · 22 unmodified lines
319332 u16 rq_num_pages;
320333 u64 rq_pbl_ptr;
321334 u16 srq_id;
335+ u16 xrcd_id;
322336 u8 stats_queue;
337+ enum qed_rdma_qp_type qp_type;
338+ u8 flags;
339+#define QED_ROCE_EDPM_MODE_MASK 0x1
340+#define QED_ROCE_EDPM_MODE_SHIFT 0
323341 };
324342
325343 struct qed_rdma_create_qp_out_params {
@@ -429,11 +447,13 @@ struct qed_rdma_create_srq_out_params { · 103 unmodified lines
429447
430448 struct qed_rdma_destroy_srq_in_params {
431449 u16 srq_id;
450+ bool is_xrc;
432451 };
433452
434453 struct qed_rdma_modify_srq_in_params {
435454 u32 wqe_limit;
436455 u16 srq_id;
456+ bool is_xrc;
437457 };
438458
439459 struct qed_rdma_stats_out_params {
@@ -611,6 +631,8 @@ struct qed_rdma_ops { · 171 unmodified lines
611631 int (*rdma_set_rdma_int)(struct qed_dev *cdev, u16 cnt);
612632 int (*rdma_alloc_pd)(void *rdma_cxt, u16 *pd);
613633 void (*rdma_dealloc_pd)(void *rdma_cxt, u16 pd);
634+ int (*rdma_alloc_xrcd)(void *rdma_cxt, u16 *xrcd);
635+ void (*rdma_dealloc_xrcd)(void *rdma_cxt, u16 xrcd);
614636 int (*rdma_create_cq)(void *rdma_cxt,
615637 struct qed_rdma_create_cq_in_params *params,
616638 u16 *icid);
include/linux/sched/sysctl.h+15−29
@@ -12,9 +12,8 @@ extern unsigned int sysctl_hung_task_panic; · 11 unmodified lines
1212 extern unsigned long sysctl_hung_task_timeout_secs;
1313 extern unsigned long sysctl_hung_task_check_interval_secs;
1414 extern int sysctl_hung_task_warnings;
15−extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
16− void __user *buffer,
17− size_t *lenp, loff_t *ppos);
15+int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
16+ void *buffer, size_t *lenp, loff_t *ppos);
1817 #else
1918 /* Avoid need for ifdefs elsewhere in the code */
2019 enum { sysctl_hung_task_timeout_secs = 0 };
@@ -43,8 +42,7 @@ extern __read_mostly unsigned int sysctl_sched_migration_cost; · 22 unmodified lines
4342 extern __read_mostly unsigned int sysctl_sched_nr_migrate;
4443
4544 int sched_proc_update_handler(struct ctl_table *table, int write,
46− void __user *buffer, size_t *length,
47− loff_t *ppos);
45+ void *buffer, size_t *length, loff_t *ppos);
4846 #endif
4947
5048 /*
@@ -72,33 +70,21 @@ extern unsigned int sysctl_sched_autogroup_enabled; · 21 unmodified lines
7270 extern int sysctl_sched_rr_timeslice;
7371 extern int sched_rr_timeslice;
7472
75−extern int sched_rr_handler(struct ctl_table *table, int write,
76− void __user *buffer, size_t *lenp,
77− loff_t *ppos);
78−
79−extern int sched_rt_handler(struct ctl_table *table, int write,
80− void __user *buffer, size_t *lenp,
81− loff_t *ppos);
82−
83−#ifdef CONFIG_UCLAMP_TASK
84−extern int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
85− void __user *buffer, size_t *lenp,
86− loff_t *ppos);
87−#endif
88−
89−extern int sysctl_numa_balancing(struct ctl_table *table, int write,
90− void __user *buffer, size_t *lenp,
91− loff_t *ppos);
92−
93−extern int sysctl_schedstats(struct ctl_table *table, int write,
94− void __user *buffer, size_t *lenp,
95− loff_t *ppos);
73+int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
74+ size_t *lenp, loff_t *ppos);
75+int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
76+ size_t *lenp, loff_t *ppos);
77+int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
78+ void *buffer, size_t *lenp, loff_t *ppos);
79+int sysctl_numa_balancing(struct ctl_table *table, int write, void *buffer,
80+ size_t *lenp, loff_t *ppos);
81+int sysctl_schedstats(struct ctl_table *table, int write, void *buffer,
82+ size_t *lenp, loff_t *ppos);
9683
9784 #if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
9885 extern unsigned int sysctl_sched_energy_aware;
99−extern int sched_energy_aware_handler(struct ctl_table *table, int write,
100− void __user *buffer, size_t *lenp,
101− loff_t *ppos);
86+int sched_energy_aware_handler(struct ctl_table *table, int write,
87+ void *buffer, size_t *lenp, loff_t *ppos);
10288 #endif
10389
10490 #endif /* _LINUX_SCHED_SYSCTL_H */
include/linux/security.h+1−1
@@ -211,7 +211,7 @@ struct request_sock; · 210 unmodified lines
211211
212212 #ifdef CONFIG_MMU
213213 extern int mmap_min_addr_handler(struct ctl_table *table, int write,
214− void __user *buffer, size_t *lenp, loff_t *ppos);
214+ void *buffer, size_t *lenp, loff_t *ppos);
215215 #endif
216216
217217 /* security_inode_init_security callback function to write xattrs */
include/linux/skbuff.h+9−27
@@ -1283,32 +1283,6 @@ void skb_flow_dissector_init(struct flow_dissector *flow_dissector, · 1282 unmodified lines
12831283 const struct flow_dissector_key *key,
12841284 unsigned int key_count);
12851285
1286−#ifdef CONFIG_NET
1287−int skb_flow_dissector_prog_query(const union bpf_attr *attr,
1288− union bpf_attr __user *uattr);
1289−int skb_flow_dissector_bpf_prog_attach(const union bpf_attr *attr,
1290− struct bpf_prog *prog);
1291−
1292−int skb_flow_dissector_bpf_prog_detach(const union bpf_attr *attr);
1293−#else
1294−static inline int skb_flow_dissector_prog_query(const union bpf_attr *attr,
1295− union bpf_attr __user *uattr)
1296−{
1297− return -EOPNOTSUPP;
1298−}
1299−
1300−static inline int skb_flow_dissector_bpf_prog_attach(const union bpf_attr *attr,
1301− struct bpf_prog *prog)
1302−{
1303− return -EOPNOTSUPP;
1304−}
1305−
1306−static inline int skb_flow_dissector_bpf_prog_detach(const union bpf_attr *attr)
1307−{
1308− return -EOPNOTSUPP;
1309−}
1310−#endif
1311−
13121286 struct bpf_flow_dissector;
13131287 bool bpf_flow_dissect(struct bpf_prog *prog, struct bpf_flow_dissector *ctx,
13141288 __be16 proto, int nhoff, int hlen, unsigned int flags);
@@ -3945,6 +3919,14 @@ static inline void __skb_incr_checksum_unnecessary(struct sk_buff *skb) · 2630 unmodified lines
39453919 }
39463920 }
39473921
3922+static inline void __skb_reset_checksum_unnecessary(struct sk_buff *skb)
3923+{
3924+ if (skb->ip_summed == CHECKSUM_UNNECESSARY) {
3925+ skb->ip_summed = CHECKSUM_NONE;
3926+ skb->csum_level = 0;
3927+ }
3928+}
3929+
39483930 /* Check if we need to perform checksum complete validation.
39493931 *
39503932 * Returns true if checksum complete is needed, false otherwise
@@ -4165,7 +4147,7 @@ struct skb_ext { · 214 unmodified lines
41654147 char data[] __aligned(8);
41664148 };
41674149
4168−struct skb_ext *__skb_ext_alloc(void);
4150+struct skb_ext *__skb_ext_alloc(gfp_t flags);
41694151 void *__skb_ext_set(struct sk_buff *skb, enum skb_ext_id id,
41704152 struct skb_ext *ext);
41714153 void *skb_ext_add(struct sk_buff *skb, enum skb_ext_id id);
include/linux/skmsg.h+8−0
@@ -437,4 +437,12 @@ static inline void psock_progs_drop(struct sk_psock_progs *progs) · 436 unmodified lines
437437 psock_set_prog(&progs->skb_verdict, NULL);
438438 }
439439
440+int sk_psock_tls_strp_read(struct sk_psock *psock, struct sk_buff *skb);
441+
442+static inline bool sk_psock_strp_enabled(struct sk_psock *psock)
443+{
444+ if (!psock)
445+ return false;
446+ return psock->parser.enabled;
447+}
440448 #endif /* _LINUX_SKMSG_H */
include/linux/socket.h+15−2
@@ -50,7 +50,17 @@ struct msghdr { · 49 unmodified lines
5050 void *msg_name; /* ptr to socket address structure */
5151 int msg_namelen; /* size of socket address structure */
5252 struct iov_iter msg_iter; /* data */
53− void *msg_control; /* ancillary data */
53+
54+ /*
55+ * Ancillary data. msg_control_user is the user buffer used for the
56+ * recv* side when msg_control_is_user is set, msg_control is the kernel
57+ * buffer used for all other cases.
58+ */
59+ union {
60+ void *msg_control;
61+ void __user *msg_control_user;
62+ };
63+ bool msg_control_is_user : 1;
5464 __kernel_size_t msg_controllen; /* ancillary data buffer length */
5565 unsigned int msg_flags; /* flags on received message */
5666 struct kiocb *msg_iocb; /* ptr to iocb for async requests */
@@ -94,7 +104,10 @@ struct cmsghdr { · 37 unmodified lines
94104
95105 #define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )
96106
97−#define CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + sizeof(struct cmsghdr)))
107+#define CMSG_DATA(cmsg) \
108+ ((void *)(cmsg) + sizeof(struct cmsghdr))
109+#define CMSG_USER_DATA(cmsg) \
110+ ((void __user *)(cmsg) + sizeof(struct cmsghdr))
98111 #define CMSG_SPACE(len) (sizeof(struct cmsghdr) + CMSG_ALIGN(len))
99112 #define CMSG_LEN(len) (sizeof(struct cmsghdr) + (len))
100113
include/linux/sysctl.h+30−31
@@ -44,35 +44,26 @@ struct ctl_dir; · 43 unmodified lines
4444
4545 extern const int sysctl_vals[];
4646
47−typedef int proc_handler (struct ctl_table *ctl, int write,
48− void __user *buffer, size_t *lenp, loff_t *ppos);
49−
50−extern int proc_dostring(struct ctl_table *, int,
51− void __user *, size_t *, loff_t *);
52−extern int proc_dointvec(struct ctl_table *, int,
53− void __user *, size_t *, loff_t *);
54−extern int proc_douintvec(struct ctl_table *, int,
55− void __user *, size_t *, loff_t *);
56−extern int proc_dointvec_minmax(struct ctl_table *, int,
57− void __user *, size_t *, loff_t *);
58−extern int proc_douintvec_minmax(struct ctl_table *table, int write,
59− void __user *buffer, size_t *lenp,
60− loff_t *ppos);
61−extern int proc_dointvec_jiffies(struct ctl_table *, int,
62− void __user *, size_t *, loff_t *);
63−extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int,
64− void __user *, size_t *, loff_t *);
65−extern int proc_dointvec_ms_jiffies(struct ctl_table *, int,
66− void __user *, size_t *, loff_t *);
67−extern int proc_doulongvec_minmax(struct ctl_table *, int,
68− void __user *, size_t *, loff_t *);
69−extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
70− void __user *, size_t *, loff_t *);
71−extern int proc_do_large_bitmap(struct ctl_table *, int,
72− void __user *, size_t *, loff_t *);
73−extern int proc_do_static_key(struct ctl_table *table, int write,
74− void __user *buffer, size_t *lenp,
75− loff_t *ppos);
47+typedef int proc_handler(struct ctl_table *ctl, int write, void *buffer,
48+ size_t *lenp, loff_t *ppos);
49+
50+int proc_dostring(struct ctl_table *, int, void *, size_t *, loff_t *);
51+int proc_dointvec(struct ctl_table *, int, void *, size_t *, loff_t *);
52+int proc_douintvec(struct ctl_table *, int, void *, size_t *, loff_t *);
53+int proc_dointvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *);
54+int proc_douintvec_minmax(struct ctl_table *table, int write, void *buffer,
55+ size_t *lenp, loff_t *ppos);
56+int proc_dointvec_jiffies(struct ctl_table *, int, void *, size_t *, loff_t *);
57+int proc_dointvec_userhz_jiffies(struct ctl_table *, int, void *, size_t *,
58+ loff_t *);
59+int proc_dointvec_ms_jiffies(struct ctl_table *, int, void *, size_t *,
60+ loff_t *);
61+int proc_doulongvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *);
62+int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, void *,
63+ size_t *, loff_t *);
64+int proc_do_large_bitmap(struct ctl_table *, int, void *, size_t *, loff_t *);
65+int proc_do_static_key(struct ctl_table *table, int write, void *buffer,
66+ size_t *lenp, loff_t *ppos);
7667
7768 /*
7869 * Register a set of sysctl names by calling register_sysctl_table
@@ -207,7 +198,15 @@ void unregister_sysctl_table(struct ctl_table_header * table); · 128 unmodified lines
207198
208199 extern int sysctl_init(void);
209200
201+extern int pwrsw_enabled;
202+extern int unaligned_enabled;
203+extern int unaligned_dump_stack;
204+extern int no_unaligned_warning;
205+
210206 extern struct ctl_table sysctl_mount_point[];
207+extern struct ctl_table random_table[];
208+extern struct ctl_table firmware_config_table[];
209+extern struct ctl_table epoll_table[];
211210
212211 #else /* CONFIG_SYSCTL */
213212 static inline struct ctl_table_header *register_sysctl_table(struct ctl_table * table)
@@ -238,7 +237,7 @@ static inline void setup_sysctl_set(struct ctl_table_set *p, · 24 unmodified lines
238237
239238 #endif /* CONFIG_SYSCTL */
240239
241−int sysctl_max_threads(struct ctl_table *table, int write,
242− void __user *buffer, size_t *lenp, loff_t *ppos);
240+int sysctl_max_threads(struct ctl_table *table, int write, void *buffer,
241+ size_t *lenp, loff_t *ppos);
243242
244243 #endif /* _LINUX_SYSCTL_H */
include/linux/tcp.h+13−0
@@ -120,6 +120,9 @@ struct tcp_request_sock { · 119 unmodified lines
120120 u64 snt_synack; /* first SYNACK sent time */
121121 bool tfo_listener;
122122 bool is_mptcp;
123+#if IS_ENABLED(CONFIG_MPTCP)
124+ bool drop_req;
125+#endif
123126 u32 txhash;
124127 u32 rcv_isn;
125128 u32 snt_isn;
@@ -217,6 +220,7 @@ struct tcp_sock { · 91 unmodified lines
217220 } rack;
218221 u16 advmss; /* Advertised MSS */
219222 u8 compressed_ack;
223+ u8 dup_ack_counter;
220224 u32 chrono_start; /* Start time in jiffies of a TCP chrono */
221225 u32 chrono_stat[3]; /* Time in jiffies for chrono_stat stats */
222226 u8 chrono_type:2, /* current chronograph type */
@@ -493,4 +497,13 @@ static inline u16 tcp_mss_clamp(const struct tcp_sock *tp, u16 mss) · 270 unmodified lines
493497 int tcp_skb_shift(struct sk_buff *to, struct sk_buff *from, int pcount,
494498 int shiftlen);
495499
500+void tcp_sock_set_cork(struct sock *sk, bool on);
501+int tcp_sock_set_keepcnt(struct sock *sk, int val);
502+int tcp_sock_set_keepidle(struct sock *sk, int val);
503+int tcp_sock_set_keepintvl(struct sock *sk, int val);
504+void tcp_sock_set_nodelay(struct sock *sk);
505+void tcp_sock_set_quickack(struct sock *sk, int val);
506+int tcp_sock_set_syncnt(struct sock *sk, int val);
507+void tcp_sock_set_user_timeout(struct sock *sk, u32 val);
508+
496509 #endif /* _LINUX_TCP_H */
include/linux/timer.h+1−2
@@ -201,8 +201,7 @@ struct ctl_table; · 200 unmodified lines
201201
202202 extern unsigned int sysctl_timer_migration;
203203 int timer_migration_handler(struct ctl_table *table, int write,
204− void __user *buffer, size_t *lenp,
205− loff_t *ppos);
204+ void *buffer, size_t *lenp, loff_t *ppos);
206205 #endif
207206
208207 unsigned long __round_jiffies(unsigned long j, int cpu);
include/linux/vermagic.h+4−0
@@ -2,6 +2,10 @@ · 1 unmodified line
22 #ifndef _LINUX_VERMAGIC_H
33 #define _LINUX_VERMAGIC_H
44
5+#ifndef INCLUDE_VERMAGIC
6+#error "This header can be included from kernel/module.c or *.mod.c only"
7+#endif
8+
59 #include <generated/utsrelease.h>
610 #include <asm/vermagic.h>
711
include/linux/vmstat.h+4−4
@@ -16,8 +16,8 @@ extern int sysctl_stat_interval; · 15 unmodified lines
1616 #define DISABLE_NUMA_STAT 0
1717 extern int sysctl_vm_numa_stat;
1818 DECLARE_STATIC_KEY_TRUE(vm_numa_stat_key);
19−extern int sysctl_vm_numa_stat_handler(struct ctl_table *table,
20− int write, void __user *buffer, size_t *length, loff_t *ppos);
19+int sysctl_vm_numa_stat_handler(struct ctl_table *table, int write,
20+ void *buffer, size_t *length, loff_t *ppos);
2121 #endif
2222
2323 struct reclaim_stat {
@@ -274,8 +274,8 @@ void cpu_vm_stats_fold(int cpu); · 250 unmodified lines
274274 void refresh_zone_stat_thresholds(void);
275275
276276 struct ctl_table;
277−int vmstat_refresh(struct ctl_table *, int write,
278− void __user *buffer, size_t *lenp, loff_t *ppos);
277+int vmstat_refresh(struct ctl_table *, int write, void *buffer, size_t *lenp,
278+ loff_t *ppos);
279279
280280 void drain_zonestat(struct zone *zone, struct per_cpu_pageset *);
281281
include/linux/writeback.h+11−17
@@ -362,24 +362,18 @@ extern int vm_highmem_is_dirtyable; · 361 unmodified lines
362362 extern int block_dump;
363363 extern int laptop_mode;
364364
365−extern int dirty_background_ratio_handler(struct ctl_table *table, int write,
366− void __user *buffer, size_t *lenp,
367− loff_t *ppos);
368−extern int dirty_background_bytes_handler(struct ctl_table *table, int write,
369− void __user *buffer, size_t *lenp,
370− loff_t *ppos);
371−extern int dirty_ratio_handler(struct ctl_table *table, int write,
372− void __user *buffer, size_t *lenp,
373− loff_t *ppos);
374−extern int dirty_bytes_handler(struct ctl_table *table, int write,
375− void __user *buffer, size_t *lenp,
376− loff_t *ppos);
365+int dirty_background_ratio_handler(struct ctl_table *table, int write,
366+ void *buffer, size_t *lenp, loff_t *ppos);
367+int dirty_background_bytes_handler(struct ctl_table *table, int write,
368+ void *buffer, size_t *lenp, loff_t *ppos);
369+int dirty_ratio_handler(struct ctl_table *table, int write,
370+ void *buffer, size_t *lenp, loff_t *ppos);
371+int dirty_bytes_handler(struct ctl_table *table, int write,
372+ void *buffer, size_t *lenp, loff_t *ppos);
377373 int dirtytime_interval_handler(struct ctl_table *table, int write,
378− void __user *buffer, size_t *lenp, loff_t *ppos);
379−
380−struct ctl_table;
381−int dirty_writeback_centisecs_handler(struct ctl_table *, int,
382− void __user *, size_t *, loff_t *);
374+ void *buffer, size_t *lenp, loff_t *ppos);
375+int dirty_writeback_centisecs_handler(struct ctl_table *table, int write,
376+ void *buffer, size_t *lenp, loff_t *ppos);
383377
384378 void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty);
385379 unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh);