History

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

Pull networking updates from David Miller: 1) Add WireGuard 2) Add HE and TWT support to ath11k driver, from John Crispin. 3) Add ESP in TCP encapsulation support, from Sabrina Dubroca. 4) Add variable window congestion control to TIPC, from Jon Maloy. 5) Add BCM84881 PHY driver, from Russell King. 6) Start adding netlink support for ethtool operations, from Michal Kubecek. 7) Add XDP drop and TX action support to ena driver, from Sameeh Jubran. 8) Add new ipv4 route notifications so that mlxsw driver does not have to handle identical routes itself. From Ido Schimmel. 9) Add BPF dynamic program extensions, from Alexei Starovoitov. 10) Support RX and TX timestamping in igc, from Vinicius Costa Gomes. 11) Add support for macsec HW offloading, from Antoine Tenart. 12) Add initial support for MPTCP protocol, from Christoph Paasch, Matthieu Baerts, Florian Westphal, Peter Krystad, and many others. 13) Add Octeontx2 PF support, from Sunil Goutham, Geetha sowjanya, Linu Cherian, and others. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1469 commits) net: phy: add default ARCH_BCM_IPROC for MDIO_BCM_IPROC udp: segment looped gso packets correctly netem: change mailing list qed: FW 8.42.2.0 debug features qed: rt init valid initialization changed qed: Debug feature: ilt and mdump qed: FW 8.42.2.0 Add fw overlay feature qed: FW 8.42.2.0 HSI changes qed: FW 8.42.2.0 iscsi/fcoe changes qed: Add abstraction for different hsi values per chip qed: FW 8.42.2.0 Additional ll2 type qed: Use dmae to write to widebus registers in fw_funcs qed: FW 8.42.2.0 Parser offsets modified qed: FW 8.42.2.0 Queue Manager changes qed: FW 8.42.2.0 Expose new registers and change windows qed: FW 8.42.2.0 Internal ram offsets modifications MAINTAINERS: Add entry for Marvell OcteonTX2 Physical Function driver Documentation: net: octeontx2: Add RVU HW and drivers overview octeontx2-pf: ethtool RSS config support octeontx2-pf: Add basic ethtool support ...

Linus Torvalds committed 6 years ago

Commit bd2463a2 parents a78208e f76e4c11827 files · +157546 −32784Browse files

Showing the changes to include/linux (40 of 1827 files). Show all

Unified · Split

40 files
  1. include/linux/bitmap.h +4 −0
  2. include/linux/bpf-cgroup.h +3 −1
  3. include/linux/bpf.h +206 −8
  4. include/linux/bpf_types.h +9 −0
  5. include/linux/bpf_verifier.h +8 −2
  6. include/linux/btf.h +52 −0
  7. include/linux/dsa/sja1105.h +3 −3
  8. include/linux/etherdevice.h +0 −1
  9. include/linux/ethtool_netlink.h +17 −0
  10. include/linux/filter.h +34 −19
  11. include/linux/fsl/enetc_mdio.h +55 −0
  12. include/linux/fsl/ptp_qoriq.h +1 −0
  13. include/linux/mii.h +50 −0
  14. include/linux/mii_timestamper.h +121 −0
  15. include/linux/mlx4/device.h +1 −1
  16. include/linux/mlx5/device.h +22 −1
  17. include/linux/mlx5/driver.h +3 −3
  18. include/linux/mlx5/fs.h +12 −8
  19. include/linux/mlx5/mlx5_ifc.h +230 −7
  20. include/linux/mmc/sdio_ids.h +2 −0
  21. include/linux/net.h +1 −0
  22. include/linux/netdev_features.h +8 −1
  23. include/linux/netdevice.h +88 −26
  24. include/linux/phy.h +96 −27
  25. include/linux/phylink.h +2 −0
  26. include/linux/platform_data/eth_ixp4xx.h +19 −0
  27. include/linux/platform_data/wan_ixp4xx_hss.h +17 −0
  28. include/linux/ptp_clock_kernel.h +9 −0
  29. include/linux/ptr_ring.h +1 −0
  30. include/linux/qed/common_hsi.h +29 −15
  31. include/linux/qed/eth_common.h +56 −22
  32. include/linux/qed/iscsi_common.h +24 −40
  33. include/linux/qed/qed_if.h +13 −1
  34. include/linux/qed/qed_ll2_if.h +7 −0
  35. include/linux/qed/storage_common.h +2 −1
  36. include/linux/sfp.h +66 −29
  37. include/linux/skbuff.h +23 −3
  38. include/linux/stmmac.h +14 −0
  39. include/linux/tcp.h +37 −0
  40. include/linux/usb/usbnet.h +1 −1
include/linux/bitmap.h+4−0
@@ -53,6 +53,7 @@ · 52 unmodified lines
5353 * bitmap_find_next_zero_area_off(buf, len, pos, n, mask) as above
5454 * bitmap_shift_right(dst, src, n, nbits) *dst = *src >> n
5555 * bitmap_shift_left(dst, src, n, nbits) *dst = *src << n
56+ * bitmap_cut(dst, src, first, n, nbits) Cut n bits from first, copy rest
5657 * bitmap_replace(dst, old, new, mask, nbits) *dst = (*old & ~(*mask)) | (*new & *mask)
5758 * bitmap_remap(dst, src, old, new, nbits) *dst = map(old, new)(src)
5859 * bitmap_bitremap(oldbit, old, new, nbits) newbit = map(old, new)(oldbit)
@@ -133,6 +134,9 @@ extern void __bitmap_shift_right(unsigned long *dst, const unsigned long *src, · 74 unmodified lines
133134 unsigned int shift, unsigned int nbits);
134135 extern void __bitmap_shift_left(unsigned long *dst, const unsigned long *src,
135136 unsigned int shift, unsigned int nbits);
137+extern void bitmap_cut(unsigned long *dst, const unsigned long *src,
138+ unsigned int first, unsigned int cut,
139+ unsigned int nbits);
136140 extern int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
137141 const unsigned long *bitmap2, unsigned int nbits);
138142 extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
include/linux/bpf-cgroup.h+3−1
@@ -85,6 +85,7 @@ int cgroup_bpf_inherit(struct cgroup *cgrp); · 84 unmodified lines
8585 void cgroup_bpf_offline(struct cgroup *cgrp);
8686
8787 int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
88+ struct bpf_prog *replace_prog,
8889 enum bpf_attach_type type, u32 flags);
8990 int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
9091 enum bpf_attach_type type);
@@ -93,7 +94,8 @@ int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr, · 2 unmodified lines
9394
9495 /* Wrapper for __cgroup_bpf_*() protected by cgroup_mutex */
9596 int cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
96− enum bpf_attach_type type, u32 flags);
97+ struct bpf_prog *replace_prog, enum bpf_attach_type type,
98+ u32 flags);
9799 int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
98100 enum bpf_attach_type type, u32 flags);
99101 int cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
include/linux/bpf.h+206−8
@@ -17,6 +17,7 @@ · 16 unmodified lines
1717 #include <linux/u64_stats_sync.h>
1818 #include <linux/refcount.h>
1919 #include <linux/mutex.h>
20+#include <linux/module.h>
2021
2122 struct bpf_verifier_env;
2223 struct bpf_verifier_log;
@@ -43,6 +44,15 @@ struct bpf_map_ops { · 20 unmodified lines
4344 int (*map_get_next_key)(struct bpf_map *map, void *key, void *next_key);
4445 void (*map_release_uref)(struct bpf_map *map);
4546 void *(*map_lookup_elem_sys_only)(struct bpf_map *map, void *key);
47+ int (*map_lookup_batch)(struct bpf_map *map, const union bpf_attr *attr,
48+ union bpf_attr __user *uattr);
49+ int (*map_lookup_and_delete_batch)(struct bpf_map *map,
50+ const union bpf_attr *attr,
51+ union bpf_attr __user *uattr);
52+ int (*map_update_batch)(struct bpf_map *map, const union bpf_attr *attr,
53+ union bpf_attr __user *uattr);
54+ int (*map_delete_batch)(struct bpf_map *map, const union bpf_attr *attr,
55+ union bpf_attr __user *uattr);
4656
4757 /* funcs callable from userspace and from eBPF programs */
4858 void *(*map_lookup_elem)(struct bpf_map *map, void *key);
@@ -106,6 +116,7 @@ struct bpf_map { · 57 unmodified lines
106116 struct btf *btf;
107117 struct bpf_map_memory memory;
108118 char name[BPF_OBJ_NAME_LEN];
119+ u32 btf_vmlinux_value_type_id;
109120 bool unpriv_array;
110121 bool frozen; /* write-once; write-protected by freeze_mutex */
111122 /* 22 bytes hole */
@@ -183,7 +194,8 @@ static inline bool bpf_map_offload_neutral(const struct bpf_map *map) · 71 unmodified lines
183194
184195 static inline bool bpf_map_support_seq_show(const struct bpf_map *map)
185196 {
186− return map->btf && map->ops->map_seq_show_elem;
197+ return (map->btf_value_type_id || map->btf_vmlinux_value_type_id) &&
198+ map->ops->map_seq_show_elem;
187199 }
188200
189201 int map_check_no_btf(const struct bpf_map *map,
@@ -349,6 +361,10 @@ struct bpf_verifier_ops { · 159 unmodified lines
349361 const struct bpf_insn *src,
350362 struct bpf_insn *dst,
351363 struct bpf_prog *prog, u32 *target_size);
364+ int (*btf_struct_access)(struct bpf_verifier_log *log,
365+ const struct btf_type *t, int off, int size,
366+ enum bpf_access_type atype,
367+ u32 *next_btf_id);
352368 };
353369
354370 struct bpf_prog_offload_ops {
@@ -437,7 +453,8 @@ struct btf_func_model { · 82 unmodified lines
437453 * fentry = a set of program to run before calling original function
438454 * fexit = a set of program to run after original function
439455 */
440−int arch_prepare_bpf_trampoline(void *image, struct btf_func_model *m, u32 flags,
456+int arch_prepare_bpf_trampoline(void *image, void *image_end,
457+ const struct btf_func_model *m, u32 flags,
441458 struct bpf_prog **fentry_progs, int fentry_cnt,
442459 struct bpf_prog **fexit_progs, int fexit_cnt,
443460 void *orig_call);
@@ -448,7 +465,8 @@ void notrace __bpf_prog_exit(struct bpf_prog *prog, u64 start); · 4 unmodified lines
448465 enum bpf_tramp_prog_type {
449466 BPF_TRAMP_FENTRY,
450467 BPF_TRAMP_FEXIT,
451− BPF_TRAMP_MAX
468+ BPF_TRAMP_MAX,
469+ BPF_TRAMP_REPLACE, /* more than MAX */
452470 };
453471
454472 struct bpf_trampoline {
@@ -463,6 +481,11 @@ struct bpf_trampoline { · 8 unmodified lines
463481 void *addr;
464482 bool ftrace_managed;
465483 } func;
484+ /* if !NULL this is BPF_PROG_TYPE_EXT program that extends another BPF
485+ * program by replacing one of its functions. func.addr is the address
486+ * of the function it replaced.
487+ */
488+ struct bpf_prog *extension_prog;
466489 /* list of BPF programs using this trampoline */
467490 struct hlist_head progs_hlist[BPF_TRAMP_MAX];
468491 /* Number of attached programs. A counter per kind. */
@@ -471,11 +494,75 @@ struct bpf_trampoline { · 2 unmodified lines
471494 void *image;
472495 u64 selector;
473496 };
497+
498+#define BPF_DISPATCHER_MAX 48 /* Fits in 2048B */
499+
500+struct bpf_dispatcher_prog {
501+ struct bpf_prog *prog;
502+ refcount_t users;
503+};
504+
505+struct bpf_dispatcher {
506+ /* dispatcher mutex */
507+ struct mutex mutex;
508+ void *func;
509+ struct bpf_dispatcher_prog progs[BPF_DISPATCHER_MAX];
510+ int num_progs;
511+ void *image;
512+ u32 image_off;
513+};
514+
515+static __always_inline unsigned int bpf_dispatcher_nopfunc(
516+ const void *ctx,
517+ const struct bpf_insn *insnsi,
518+ unsigned int (*bpf_func)(const void *,
519+ const struct bpf_insn *))
520+{
521+ return bpf_func(ctx, insnsi);
522+}
474523 #ifdef CONFIG_BPF_JIT
475524 struct bpf_trampoline *bpf_trampoline_lookup(u64 key);
476525 int bpf_trampoline_link_prog(struct bpf_prog *prog);
477526 int bpf_trampoline_unlink_prog(struct bpf_prog *prog);
478527 void bpf_trampoline_put(struct bpf_trampoline *tr);
528+#define BPF_DISPATCHER_INIT(name) { \
529+ .mutex = __MUTEX_INITIALIZER(name.mutex), \
530+ .func = &name##func, \
531+ .progs = {}, \
532+ .num_progs = 0, \
533+ .image = NULL, \
534+ .image_off = 0 \
535+}
536+
537+#define DEFINE_BPF_DISPATCHER(name) \
538+ noinline unsigned int name##func( \
539+ const void *ctx, \
540+ const struct bpf_insn *insnsi, \
541+ unsigned int (*bpf_func)(const void *, \
542+ const struct bpf_insn *)) \
543+ { \
544+ return bpf_func(ctx, insnsi); \
545+ } \
546+ EXPORT_SYMBOL(name##func); \
547+ struct bpf_dispatcher name = BPF_DISPATCHER_INIT(name);
548+#define DECLARE_BPF_DISPATCHER(name) \
549+ unsigned int name##func( \
550+ const void *ctx, \
551+ const struct bpf_insn *insnsi, \
552+ unsigned int (*bpf_func)(const void *, \
553+ const struct bpf_insn *)); \
554+ extern struct bpf_dispatcher name;
555+#define BPF_DISPATCHER_FUNC(name) name##func
556+#define BPF_DISPATCHER_PTR(name) (&name)
557+void bpf_dispatcher_change_prog(struct bpf_dispatcher *d, struct bpf_prog *from,
558+ struct bpf_prog *to);
559+struct bpf_image {
560+ struct latch_tree_node tnode;
561+ unsigned char data[];
562+};
563+#define BPF_IMAGE_SIZE (PAGE_SIZE - sizeof(struct bpf_image))
564+bool is_bpf_image_address(unsigned long address);
565+void *bpf_image_alloc(void);
479566 #else
480567 static inline struct bpf_trampoline *bpf_trampoline_lookup(u64 key)
481568 {
@@ -490,9 +577,21 @@ static inline int bpf_trampoline_unlink_prog(struct bpf_prog *prog) · 8 unmodified lines
490577 return -ENOTSUPP;
491578 }
492579 static inline void bpf_trampoline_put(struct bpf_trampoline *tr) {}
580+#define DEFINE_BPF_DISPATCHER(name)
581+#define DECLARE_BPF_DISPATCHER(name)
582+#define BPF_DISPATCHER_FUNC(name) bpf_dispatcher_nopfunc
583+#define BPF_DISPATCHER_PTR(name) NULL
584+static inline void bpf_dispatcher_change_prog(struct bpf_dispatcher *d,
585+ struct bpf_prog *from,
586+ struct bpf_prog *to) {}
587+static inline bool is_bpf_image_address(unsigned long address)
588+{
589+ return false;
590+}
493591 #endif
494592
495593 struct bpf_func_info_aux {
594+ u16 linkage;
496595 bool unreliable;
497596 };
498597
@@ -603,6 +702,73 @@ struct bpf_array_aux { · 104 unmodified lines
603702 struct work_struct work;
604703 };
605704
705+struct bpf_struct_ops_value;
706+struct btf_type;
707+struct btf_member;
708+
709+#define BPF_STRUCT_OPS_MAX_NR_MEMBERS 64
710+struct bpf_struct_ops {
711+ const struct bpf_verifier_ops *verifier_ops;
712+ int (*init)(struct btf *btf);
713+ int (*check_member)(const struct btf_type *t,
714+ const struct btf_member *member);
715+ int (*init_member)(const struct btf_type *t,
716+ const struct btf_member *member,
717+ void *kdata, const void *udata);
718+ int (*reg)(void *kdata);
719+ void (*unreg)(void *kdata);
720+ const struct btf_type *type;
721+ const struct btf_type *value_type;
722+ const char *name;
723+ struct btf_func_model func_models[BPF_STRUCT_OPS_MAX_NR_MEMBERS];
724+ u32 type_id;
725+ u32 value_id;
726+};
727+
728+#if defined(CONFIG_BPF_JIT) && defined(CONFIG_BPF_SYSCALL)
729+#define BPF_MODULE_OWNER ((void *)((0xeB9FUL << 2) + POISON_POINTER_DELTA))
730+const struct bpf_struct_ops *bpf_struct_ops_find(u32 type_id);
731+void bpf_struct_ops_init(struct btf *btf);
732+bool bpf_struct_ops_get(const void *kdata);
733+void bpf_struct_ops_put(const void *kdata);
734+int bpf_struct_ops_map_sys_lookup_elem(struct bpf_map *map, void *key,
735+ void *value);
736+static inline bool bpf_try_module_get(const void *data, struct module *owner)
737+{
738+ if (owner == BPF_MODULE_OWNER)
739+ return bpf_struct_ops_get(data);
740+ else
741+ return try_module_get(owner);
742+}
743+static inline void bpf_module_put(const void *data, struct module *owner)
744+{
745+ if (owner == BPF_MODULE_OWNER)
746+ bpf_struct_ops_put(data);
747+ else
748+ module_put(owner);
749+}
750+#else
751+static inline const struct bpf_struct_ops *bpf_struct_ops_find(u32 type_id)
752+{
753+ return NULL;
754+}
755+static inline void bpf_struct_ops_init(struct btf *btf) { }
756+static inline bool bpf_try_module_get(const void *data, struct module *owner)
757+{
758+ return try_module_get(owner);
759+}
760+static inline void bpf_module_put(const void *data, struct module *owner)
761+{
762+ module_put(owner);
763+}
764+static inline int bpf_struct_ops_map_sys_lookup_elem(struct bpf_map *map,
765+ void *key,
766+ void *value)
767+{
768+ return -EINVAL;
769+}
770+#endif
771+
606772 struct bpf_array {
607773 struct bpf_map map;
608774 u32 elem_size;
@@ -841,6 +1007,15 @@ void *bpf_map_area_alloc(u64 size, int numa_node); · 232 unmodified lines
8411007 void *bpf_map_area_mmapable_alloc(u64 size, int numa_node);
8421008 void bpf_map_area_free(void *base);
8431009 void bpf_map_init_from_attr(struct bpf_map *map, union bpf_attr *attr);
1010+int generic_map_lookup_batch(struct bpf_map *map,
1011+ const union bpf_attr *attr,
1012+ union bpf_attr __user *uattr);
1013+int generic_map_update_batch(struct bpf_map *map,
1014+ const union bpf_attr *attr,
1015+ union bpf_attr __user *uattr);
1016+int generic_map_delete_batch(struct bpf_map *map,
1017+ const union bpf_attr *attr,
1018+ union bpf_attr __user *uattr);
8441019
8451020 extern int sysctl_unprivileged_bpf_disabled;
8461021
@@ -897,14 +1072,16 @@ struct sk_buff; · 50 unmodified lines
8971072
8981073 struct bpf_dtab_netdev *__dev_map_lookup_elem(struct bpf_map *map, u32 key);
8991074 struct bpf_dtab_netdev *__dev_map_hash_lookup_elem(struct bpf_map *map, u32 key);
900−void __dev_map_flush(struct bpf_map *map);
1075+void __dev_flush(void);
1076+int dev_xdp_enqueue(struct net_device *dev, struct xdp_buff *xdp,
1077+ struct net_device *dev_rx);
9011078 int dev_map_enqueue(struct bpf_dtab_netdev *dst, struct xdp_buff *xdp,
9021079 struct net_device *dev_rx);
9031080 int dev_map_generic_redirect(struct bpf_dtab_netdev *dst, struct sk_buff *skb,
9041081 struct bpf_prog *xdp_prog);
9051082
9061083 struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key);
907−void __cpu_map_flush(struct bpf_map *map);
1084+void __cpu_map_flush(void);
9081085 int cpu_map_enqueue(struct bpf_cpu_map_entry *rcpu, struct xdp_buff *xdp,
9091086 struct net_device *dev_rx);
9101087
@@ -941,7 +1118,15 @@ int btf_distill_func_proto(struct bpf_verifier_log *log, · 30 unmodified lines
9411118 const char *func_name,
9421119 struct btf_func_model *m);
9431120
944−int btf_check_func_arg_match(struct bpf_verifier_env *env, int subprog);
1121+struct bpf_reg_state;
1122+int btf_check_func_arg_match(struct bpf_verifier_env *env, int subprog,
1123+ struct bpf_reg_state *regs);
1124+int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog,
1125+ struct bpf_reg_state *reg);
1126+int btf_check_type_match(struct bpf_verifier_env *env, struct bpf_prog *prog,
1127+ struct btf *btf, const struct btf_type *t);
1128+
1129+struct bpf_prog *bpf_prog_by_id(u32 id);
9451130
9461131 #else /* !CONFIG_BPF_SYSCALL */
9471132 static inline struct bpf_prog *bpf_prog_get(u32 ufd)
@@ -1004,13 +1189,20 @@ static inline struct net_device *__dev_map_hash_lookup_elem(struct bpf_map *map · 56 unmodified lines
10041189 return NULL;
10051190 }
10061191
1007−static inline void __dev_map_flush(struct bpf_map *map)
1192+static inline void __dev_flush(void)
10081193 {
10091194 }
10101195
10111196 struct xdp_buff;
10121197 struct bpf_dtab_netdev;
10131198
1199+static inline
1200+int dev_xdp_enqueue(struct net_device *dev, struct xdp_buff *xdp,
1201+ struct net_device *dev_rx)
1202+{
1203+ return 0;
1204+}
1205+
10141206 static inline
10151207 int dev_map_enqueue(struct bpf_dtab_netdev *dst, struct xdp_buff *xdp,
10161208 struct net_device *dev_rx)
@@ -1033,7 +1225,7 @@ struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key) · 16 unmodified lines
10331225 return NULL;
10341226 }
10351227
1036−static inline void __cpu_map_flush(struct bpf_map *map)
1228+static inline void __cpu_map_flush(void)
10371229 {
10381230 }
10391231
@@ -1074,6 +1266,11 @@ static inline int bpf_prog_test_run_flow_dissector(struct bpf_prog *prog, · 34 unmodified lines
10741266 static inline void bpf_map_put(struct bpf_map *map)
10751267 {
10761268 }
1269+
1270+static inline struct bpf_prog *bpf_prog_by_id(u32 id)
1271+{
1272+ return ERR_PTR(-ENOTSUPP);
1273+}
10771274 #endif /* CONFIG_BPF_SYSCALL */
10781275
10791276 static inline struct bpf_prog *bpf_prog_get_type(u32 ufd,
@@ -1227,6 +1424,7 @@ extern const struct bpf_func_proto bpf_get_local_storage_proto; · 147 unmodified lines
12271424 extern const struct bpf_func_proto bpf_strtol_proto;
12281425 extern const struct bpf_func_proto bpf_strtoul_proto;
12291426 extern const struct bpf_func_proto bpf_tcp_sock_proto;
1427+extern const struct bpf_func_proto bpf_jiffies64_proto;
12301428
12311429 /* Shared helpers among cBPF and eBPF. */
12321430 void bpf_user_rnd_init_once(void);
include/linux/bpf_types.h+9−0
@@ -65,6 +65,12 @@ BPF_PROG_TYPE(BPF_PROG_TYPE_LIRC_MODE2, lirc_mode2, · 64 unmodified lines
6565 BPF_PROG_TYPE(BPF_PROG_TYPE_SK_REUSEPORT, sk_reuseport,
6666 struct sk_reuseport_md, struct sk_reuseport_kern)
6767 #endif
68+#if defined(CONFIG_BPF_JIT)
69+BPF_PROG_TYPE(BPF_PROG_TYPE_STRUCT_OPS, bpf_struct_ops,
70+ void *, void *)
71+BPF_PROG_TYPE(BPF_PROG_TYPE_EXT, bpf_extension,
72+ void *, void *)
73+#endif
6874
6975 BPF_MAP_TYPE(BPF_MAP_TYPE_ARRAY, array_map_ops)
7076 BPF_MAP_TYPE(BPF_MAP_TYPE_PERCPU_ARRAY, percpu_array_map_ops)
@@ -105,3 +111,6 @@ BPF_MAP_TYPE(BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, reuseport_array_ops) · 34 unmodified lines
105111 #endif
106112 BPF_MAP_TYPE(BPF_MAP_TYPE_QUEUE, queue_map_ops)
107113 BPF_MAP_TYPE(BPF_MAP_TYPE_STACK, stack_map_ops)
114+#if defined(CONFIG_BPF_JIT)
115+BPF_MAP_TYPE(BPF_MAP_TYPE_STRUCT_OPS, bpf_struct_ops_map_ops)
116+#endif
include/linux/bpf_verifier.h+8−2
@@ -304,11 +304,13 @@ struct bpf_insn_aux_data { · 303 unmodified lines
304304 u64 map_key_state; /* constant (32 bit) key tracking for maps */
305305 int ctx_field_size; /* the ctx field size for load insn, maybe 0 */
306306 int sanitize_stack_off; /* stack slot to be cleared */
307− bool seen; /* this insn was processed by the verifier */
307+ u32 seen; /* this insn was processed by the verifier at env->pass_cnt */
308308 bool zext_dst; /* this insn zero extends dst reg */
309309 u8 alu_state; /* used in combination with alu_limit */
310− bool prune_point;
310+
311+ /* below fields are initialized once */
311312 unsigned int orig_idx; /* original instruction index */
313+ bool prune_point;
312314 };
313315
314316 #define MAX_USED_MAPS 64 /* max number of maps accessed by one eBPF program */
@@ -379,6 +381,7 @@ struct bpf_verifier_env { · 64 unmodified lines
379381 int *insn_stack;
380382 int cur_stack;
381383 } cfg;
384+ u32 pass_cnt; /* number of times do_check() was called */
382385 u32 subprog_cnt;
383386 /* number of instructions analyzed by the verifier */
384387 u32 prev_insn_processed, insn_processed;
@@ -428,4 +431,7 @@ bpf_prog_offload_replace_insn(struct bpf_verifier_env *env, u32 off, · 43 unmodified lines
428431 void
429432 bpf_prog_offload_remove_insns(struct bpf_verifier_env *env, u32 off, u32 cnt);
430433
434+int check_ctx_reg(struct bpf_verifier_env *env,
435+ const struct bpf_reg_state *reg, int regno);
436+
431437 #endif /* _LINUX_BPF_VERIFIER_H */
include/linux/btf.h+52−0
@@ -7,6 +7,8 @@ · 6 unmodified lines
77 #include <linux/types.h>
88 #include <uapi/linux/btf.h>
99
10+#define BTF_TYPE_EMIT(type) ((void)(type *)0)
11+
1012 struct btf;
1113 struct btf_member;
1214 struct btf_type;
@@ -53,6 +55,22 @@ bool btf_member_is_reg_int(const struct btf *btf, const struct btf_type *s, · 40 unmodified lines
5355 u32 expected_offset, u32 expected_size);
5456 int btf_find_spin_lock(const struct btf *btf, const struct btf_type *t);
5557 bool btf_type_is_void(const struct btf_type *t);
58+s32 btf_find_by_name_kind(const struct btf *btf, const char *name, u8 kind);
59+const struct btf_type *btf_type_skip_modifiers(const struct btf *btf,
60+ u32 id, u32 *res_id);
61+const struct btf_type *btf_type_resolve_ptr(const struct btf *btf,
62+ u32 id, u32 *res_id);
63+const struct btf_type *btf_type_resolve_func_ptr(const struct btf *btf,
64+ u32 id, u32 *res_id);
65+const struct btf_type *
66+btf_resolve_size(const struct btf *btf, const struct btf_type *type,
67+ u32 *type_size, const struct btf_type **elem_type,
68+ u32 *total_nelems);
69+
70+#define for_each_member(i, struct_type, member) \
71+ for (i = 0, member = btf_type_member(struct_type); \
72+ i < btf_type_vlen(struct_type); \
73+ i++, member++)
5674
5775 static inline bool btf_type_is_ptr(const struct btf_type *t)
5876 {
@@ -84,6 +102,40 @@ static inline bool btf_type_is_func_proto(const struct btf_type *t) · 25 unmodified lines
84102 return BTF_INFO_KIND(t->info) == BTF_KIND_FUNC_PROTO;
85103 }
86104
105+static inline u16 btf_type_vlen(const struct btf_type *t)
106+{
107+ return BTF_INFO_VLEN(t->info);
108+}
109+
110+static inline u16 btf_func_linkage(const struct btf_type *t)
111+{
112+ return BTF_INFO_VLEN(t->info);
113+}
114+
115+static inline bool btf_type_kflag(const struct btf_type *t)
116+{
117+ return BTF_INFO_KFLAG(t->info);
118+}
119+
120+static inline u32 btf_member_bit_offset(const struct btf_type *struct_type,
121+ const struct btf_member *member)
122+{
123+ return btf_type_kflag(struct_type) ? BTF_MEMBER_BIT_OFFSET(member->offset)
124+ : member->offset;
125+}
126+
127+static inline u32 btf_member_bitfield_size(const struct btf_type *struct_type,
128+ const struct btf_member *member)
129+{
130+ return btf_type_kflag(struct_type) ? BTF_MEMBER_BITFIELD_SIZE(member->offset)
131+ : 0;
132+}
133+
134+static inline const struct btf_member *btf_type_member(const struct btf_type *t)
135+{
136+ return (const struct btf_member *)(t + 1);
137+}
138+
87139 #ifdef CONFIG_BPF_SYSCALL
88140 const struct btf_type *btf_type_by_id(const struct btf *btf, u32 type_id);
89141 const char *btf_name_by_offset(const struct btf *btf, u32 offset);
include/linux/dsa/sja1105.h+3−3
@@ -37,8 +37,6 @@ · 36 unmodified lines
3737 * the structure defined in struct sja1105_private.
3838 */
3939 struct sja1105_tagger_data {
40− struct sk_buff_head skb_rxtstamp_queue;
41− struct work_struct rxtstamp_work;
4240 struct sk_buff *stampable_skb;
4341 /* Protects concurrent access to the meta state machine
4442 * from taggers running on multiple ports on SMP systems
@@ -55,10 +53,12 @@ struct sja1105_skb_cb { · 10 unmodified lines
5553 ((struct sja1105_skb_cb *)DSA_SKB_CB_PRIV(skb))
5654
5755 struct sja1105_port {
56+ struct kthread_worker *xmit_worker;
57+ struct kthread_work xmit_work;
58+ struct sk_buff_head xmit_queue;
5859 struct sja1105_tagger_data *data;
5960 struct dsa_port *dp;
6061 bool hwts_tx_en;
61− int mgmt_slot;
6262 };
6363
6464 #endif /* _NET_DSA_SJA1105_H */
include/linux/etherdevice.h+0−1
@@ -43,7 +43,6 @@ __be16 eth_header_parse_protocol(const struct sk_buff *skb); · 42 unmodified lines
4343 int eth_prepare_mac_addr_change(struct net_device *dev, void *p);
4444 void eth_commit_mac_addr_change(struct net_device *dev, void *p);
4545 int eth_mac_addr(struct net_device *dev, void *p);
46−int eth_change_mtu(struct net_device *dev, int new_mtu);
4746 int eth_validate_addr(struct net_device *dev);
4847
4948 struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs,
include/linux/ethtool_netlink.h+17−0
@@ -0,0 +1,17 @@
1+/* SPDX-License-Identifier: GPL-2.0-only */
2+
3+#ifndef _LINUX_ETHTOOL_NETLINK_H_
4+#define _LINUX_ETHTOOL_NETLINK_H_
5+
6+#include <uapi/linux/ethtool_netlink.h>
7+#include <linux/ethtool.h>
8+#include <linux/netdevice.h>
9+
10+#define __ETHTOOL_LINK_MODE_MASK_NWORDS \
11+ DIV_ROUND_UP(__ETHTOOL_LINK_MODE_MASK_NBITS, 32)
12+
13+enum ethtool_multicast_groups {
14+ ETHNL_MCGRP_MONITOR,
15+};
16+
17+#endif /* _LINUX_ETHTOOL_NETLINK_H_ */
include/linux/filter.h+34−19
@@ -559,23 +559,26 @@ struct sk_filter { · 558 unmodified lines
559559
560560 DECLARE_STATIC_KEY_FALSE(bpf_stats_enabled_key);
561561
562−#define BPF_PROG_RUN(prog, ctx) ({ \
563− u32 ret; \
564− cant_sleep(); \
565− if (static_branch_unlikely(&bpf_stats_enabled_key)) { \
566− struct bpf_prog_stats *stats; \
567− u64 start = sched_clock(); \
568− ret = (*(prog)->bpf_func)(ctx, (prog)->insnsi); \
569− stats = this_cpu_ptr(prog->aux->stats); \
570− u64_stats_update_begin(&stats->syncp); \
571− stats->cnt++; \
572− stats->nsecs += sched_clock() - start; \
573− u64_stats_update_end(&stats->syncp); \
574− } else { \
575− ret = (*(prog)->bpf_func)(ctx, (prog)->insnsi); \
576− } \
562+#define __BPF_PROG_RUN(prog, ctx, dfunc) ({ \
563+ u32 ret; \
564+ cant_sleep(); \
565+ if (static_branch_unlikely(&bpf_stats_enabled_key)) { \
566+ struct bpf_prog_stats *stats; \
567+ u64 start = sched_clock(); \
568+ ret = dfunc(ctx, (prog)->insnsi, (prog)->bpf_func); \
569+ stats = this_cpu_ptr(prog->aux->stats); \
570+ u64_stats_update_begin(&stats->syncp); \
571+ stats->cnt++; \
572+ stats->nsecs += sched_clock() - start; \
573+ u64_stats_update_end(&stats->syncp); \
574+ } else { \
575+ ret = dfunc(ctx, (prog)->insnsi, (prog)->bpf_func); \
576+ } \
577577 ret; })
578578
579+#define BPF_PROG_RUN(prog, ctx) __BPF_PROG_RUN(prog, ctx, \
580+ bpf_dispatcher_nopfunc)
581+
579582 #define BPF_SKB_CB_LEN QDISC_CB_PRIV_LEN
580583
581584 struct bpf_skb_data_end {
@@ -589,7 +592,6 @@ struct bpf_redirect_info { · 7 unmodified lines
589592 u32 tgt_index;
590593 void *tgt_value;
591594 struct bpf_map *map;
592− struct bpf_map *map_to_flush;
593595 u32 kern_flags;
594596 };
595597
@@ -699,6 +701,8 @@ static inline u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog, · 103 unmodified lines
699701 return res;
700702 }
701703
704+DECLARE_BPF_DISPATCHER(bpf_dispatcher_xdp)
705+
702706 static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog,
703707 struct xdp_buff *xdp)
704708 {
@@ -708,9 +712,12 @@ static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog, · 3 unmodified lines
708712 * already takes rcu_read_lock() when fetching the program, so
709713 * it's not necessary here anymore.
710714 */
711− return BPF_PROG_RUN(prog, xdp);
715+ return __BPF_PROG_RUN(prog, xdp,
716+ BPF_DISPATCHER_FUNC(bpf_dispatcher_xdp));
712717 }
713718
719+void bpf_prog_change_xdp(struct bpf_prog *prev_prog, struct bpf_prog *prog);
720+
714721 static inline u32 bpf_prog_insn_size(const struct bpf_prog *prog)
715722 {
716723 return prog->len * sizeof(struct bpf_insn);
@@ -836,6 +843,8 @@ int bpf_prog_create(struct bpf_prog **pfp, struct sock_fprog_kern *fprog); · 119 unmodified lines
836843 int bpf_prog_create_from_user(struct bpf_prog **pfp, struct sock_fprog *fprog,
837844 bpf_aux_classic_check_t trans, bool save_orig);
838845 void bpf_prog_destroy(struct bpf_prog *fp);
846+const struct bpf_func_proto *
847+bpf_base_func_proto(enum bpf_func_id func_id);
839848
840849 int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
841850 int sk_attach_bpf(u32 ufd, struct sock *sk);
@@ -909,7 +918,7 @@ static inline int xdp_ok_fwd_dev(const struct net_device *fwd, · 67 unmodified lines
909918 return 0;
910919 }
911920
912−/* The pair of xdp_do_redirect and xdp_do_flush_map MUST be called in the
921+/* The pair of xdp_do_redirect and xdp_do_flush MUST be called in the
913922 * same cpu context. Further for best results no more than a single map
914923 * for the do_redirect/do_flush pair should be used. This limitation is
915924 * because we only track one map and force a flush when the map changes.
@@ -920,7 +929,13 @@ int xdp_do_generic_redirect(struct net_device *dev, struct sk_buff *skb, · 4 unmodified lines
920929 int xdp_do_redirect(struct net_device *dev,
921930 struct xdp_buff *xdp,
922931 struct bpf_prog *prog);
923−void xdp_do_flush_map(void);
932+void xdp_do_flush(void);
933+
934+/* The xdp_do_flush_map() helper has been renamed to drop the _map suffix, as
935+ * it is no longer only flushing maps. Keep this define for compatibility
936+ * until all drivers are updated - do not use xdp_do_flush_map() in new code!
937+ */
938+#define xdp_do_flush_map xdp_do_flush
924939
925940 void bpf_warn_invalid_xdp_action(u32 act);
926941
include/linux/fsl/enetc_mdio.h+55−0
@@ -0,0 +1,55 @@
1+/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
2+/* Copyright 2019 NXP */
3+
4+#ifndef _FSL_ENETC_MDIO_H_
5+#define _FSL_ENETC_MDIO_H_
6+
7+#include <linux/phy.h>
8+
9+/* PCS registers */
10+#define ENETC_PCS_LINK_TIMER1 0x12
11+#define ENETC_PCS_LINK_TIMER1_VAL 0x06a0
12+#define ENETC_PCS_LINK_TIMER2 0x13
13+#define ENETC_PCS_LINK_TIMER2_VAL 0x0003
14+#define ENETC_PCS_IF_MODE 0x14
15+#define ENETC_PCS_IF_MODE_SGMII_EN BIT(0)
16+#define ENETC_PCS_IF_MODE_USE_SGMII_AN BIT(1)
17+#define ENETC_PCS_IF_MODE_SGMII_SPEED(x) (((x) << 2) & GENMASK(3, 2))
18+
19+/* Not a mistake, the SerDes PLL needs to be set at 3.125 GHz by Reset
20+ * Configuration Word (RCW, outside Linux control) for 2.5G SGMII mode. The PCS
21+ * still thinks it's at gigabit.
22+ */
23+enum enetc_pcs_speed {
24+ ENETC_PCS_SPEED_10 = 0,
25+ ENETC_PCS_SPEED_100 = 1,
26+ ENETC_PCS_SPEED_1000 = 2,
27+ ENETC_PCS_SPEED_2500 = 2,
28+};
29+
30+struct enetc_hw;
31+
32+struct enetc_mdio_priv {
33+ struct enetc_hw *hw;
34+ int mdio_base;
35+};
36+
37+#if IS_REACHABLE(CONFIG_FSL_ENETC_MDIO)
38+
39+int enetc_mdio_read(struct mii_bus *bus, int phy_id, int regnum);
40+int enetc_mdio_write(struct mii_bus *bus, int phy_id, int regnum, u16 value);
41+struct enetc_hw *enetc_hw_alloc(struct device *dev, void __iomem *port_regs);
42+
43+#else
44+
45+static inline int enetc_mdio_read(struct mii_bus *bus, int phy_id, int regnum)
46+{ return -EINVAL; }
47+static inline int enetc_mdio_write(struct mii_bus *bus, int phy_id, int regnum,
48+ u16 value)
49+{ return -EINVAL; }
50+struct enetc_hw *enetc_hw_alloc(struct device *dev, void __iomem *port_regs)
51+{ return ERR_PTR(-EINVAL); }
52+
53+#endif
54+
55+#endif
include/linux/fsl/ptp_qoriq.h+1−0
@@ -192,6 +192,7 @@ int ptp_qoriq_settime(struct ptp_clock_info *ptp, · 191 unmodified lines
192192 const struct timespec64 *ts);
193193 int ptp_qoriq_enable(struct ptp_clock_info *ptp,
194194 struct ptp_clock_request *rq, int on);
195+int extts_clean_up(struct ptp_qoriq *ptp_qoriq, int index, bool update_event);
195196 #ifdef CONFIG_DEBUG_FS
196197 void ptp_qoriq_create_debugfs(struct ptp_qoriq *ptp_qoriq);
197198 void ptp_qoriq_remove_debugfs(struct ptp_qoriq *ptp_qoriq);
include/linux/mii.h+50−0
@@ -372,6 +372,56 @@ static inline u32 mii_lpa_to_ethtool_lpa_x(u32 lpa) · 371 unmodified lines
372372 return result | mii_adv_to_ethtool_adv_x(lpa);
373373 }
374374
375+/**
376+ * mii_lpa_mod_linkmode_adv_sgmii
377+ * @lp_advertising: pointer to destination link mode.
378+ * @lpa: value of the MII_LPA register
379+ *
380+ * A small helper function that translates MII_LPA bits to
381+ * linkmode advertisement settings for SGMII.
382+ * Leaves other bits unchanged.
383+ */
384+static inline void
385+mii_lpa_mod_linkmode_lpa_sgmii(unsigned long *lp_advertising, u32 lpa)
386+{
387+ u32 speed_duplex = lpa & LPA_SGMII_DPX_SPD_MASK;
388+
389+ linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT, lp_advertising,
390+ speed_duplex == LPA_SGMII_1000HALF);
391+
392+ linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, lp_advertising,
393+ speed_duplex == LPA_SGMII_1000FULL);
394+
395+ linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, lp_advertising,
396+ speed_duplex == LPA_SGMII_100HALF);
397+
398+ linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, lp_advertising,
399+ speed_duplex == LPA_SGMII_100FULL);
400+
401+ linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT, lp_advertising,
402+ speed_duplex == LPA_SGMII_10HALF);
403+
404+ linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT, lp_advertising,
405+ speed_duplex == LPA_SGMII_10FULL);
406+}
407+
408+/**
409+ * mii_lpa_to_linkmode_adv_sgmii
410+ * @advertising: pointer to destination link mode.
411+ * @lpa: value of the MII_LPA register
412+ *
413+ * A small helper function that translates MII_ADVERTISE bits
414+ * to linkmode advertisement settings when in SGMII mode.
415+ * Clears the old value of advertising.
416+ */
417+static inline void mii_lpa_to_linkmode_lpa_sgmii(unsigned long *lp_advertising,
418+ u32 lpa)
419+{
420+ linkmode_zero(lp_advertising);
421+
422+ mii_lpa_mod_linkmode_lpa_sgmii(lp_advertising, lpa);
423+}
424+
375425 /**
376426 * mii_adv_mod_linkmode_adv_t
377427 * @advertising:pointer to destination link mode.
include/linux/mii_timestamper.h+121−0
@@ -0,0 +1,121 @@
1+/* SPDX-License-Identifier: GPL-2.0 */
2+/*
3+ * Support for generic time stamping devices on MII buses.
4+ * Copyright (C) 2018 Richard Cochran <richardcochran@gmail.com>
5+ */
6+#ifndef _LINUX_MII_TIMESTAMPER_H
7+#define _LINUX_MII_TIMESTAMPER_H
8+
9+#include <linux/device.h>
10+#include <linux/ethtool.h>
11+#include <linux/skbuff.h>
12+
13+struct phy_device;
14+
15+/**
16+ * struct mii_timestamper - Callback interface to MII time stamping devices.
17+ *
18+ * @rxtstamp: Requests a Rx timestamp for 'skb'. If the skb is accepted,
19+ * the MII time stamping device promises to deliver it using
20+ * netif_rx() as soon as a timestamp becomes available. One of
21+ * the PTP_CLASS_ values is passed in 'type'. The function
22+ * must return true if the skb is accepted for delivery.
23+ *
24+ * @txtstamp: Requests a Tx timestamp for 'skb'. The MII time stamping
25+ * device promises to deliver it using skb_complete_tx_timestamp()
26+ * as soon as a timestamp becomes available. One of the PTP_CLASS_
27+ * values is passed in 'type'.
28+ *
29+ * @hwtstamp: Handles SIOCSHWTSTAMP ioctl for hardware time stamping.
30+ *
31+ * @link_state: Allows the device to respond to changes in the link
32+ * state. The caller invokes this function while holding
33+ * the phy_device mutex.
34+ *
35+ * @ts_info: Handles ethtool queries for hardware time stamping.
36+ * @device: Remembers the device to which the instance belongs.
37+ *
38+ * Drivers for PHY time stamping devices should embed their
39+ * mii_timestamper within a private structure, obtaining a reference
40+ * to it using container_of().
41+ *
42+ * Drivers for non-PHY time stamping devices should return a pointer
43+ * to a mii_timestamper from the probe_channel() callback of their
44+ * mii_timestamping_ctrl interface.
45+ */
46+struct mii_timestamper {
47+ bool (*rxtstamp)(struct mii_timestamper *mii_ts,
48+ struct sk_buff *skb, int type);
49+
50+ void (*txtstamp)(struct mii_timestamper *mii_ts,
51+ struct sk_buff *skb, int type);
52+
53+ int (*hwtstamp)(struct mii_timestamper *mii_ts,
54+ struct ifreq *ifreq);
55+
56+ void (*link_state)(struct mii_timestamper *mii_ts,
57+ struct phy_device *phydev);
58+
59+ int (*ts_info)(struct mii_timestamper *mii_ts,
60+ struct ethtool_ts_info *ts_info);
61+
62+ struct device *device;
63+};
64+
65+/**
66+ * struct mii_timestamping_ctrl - MII time stamping controller interface.
67+ *
68+ * @probe_channel: Callback into the controller driver announcing the
69+ * presence of the 'port' channel. The 'device' field
70+ * had been passed to register_mii_tstamp_controller().
71+ * The driver must return either a pointer to a valid
72+ * MII timestamper instance or PTR_ERR.
73+ *
74+ * @release_channel: Releases an instance obtained via .probe_channel.
75+ */
76+struct mii_timestamping_ctrl {
77+ struct mii_timestamper *(*probe_channel)(struct device *device,
78+ unsigned int port);
79+ void (*release_channel)(struct device *device,
80+ struct mii_timestamper *mii_ts);
81+};
82+
83+#ifdef CONFIG_NETWORK_PHY_TIMESTAMPING
84+
85+int register_mii_tstamp_controller(struct device *device,
86+ struct mii_timestamping_ctrl *ctrl);
87+
88+void unregister_mii_tstamp_controller(struct device *device);
89+
90+struct mii_timestamper *register_mii_timestamper(struct device_node *node,
91+ unsigned int port);
92+
93+void unregister_mii_timestamper(struct mii_timestamper *mii_ts);
94+
95+#else
96+
97+static inline
98+int register_mii_tstamp_controller(struct device *device,
99+ struct mii_timestamping_ctrl *ctrl)
100+{
101+ return -EOPNOTSUPP;
102+}
103+
104+static inline void unregister_mii_tstamp_controller(struct device *device)
105+{
106+}
107+
108+static inline
109+struct mii_timestamper *register_mii_timestamper(struct device_node *node,
110+ unsigned int port)
111+{
112+ return NULL;
113+}
114+
115+static inline void unregister_mii_timestamper(struct mii_timestamper *mii_ts)
116+{
117+}
118+
119+#endif
120+
121+#endif
include/linux/mlx4/device.h+1−1
@@ -47,7 +47,7 @@ · 46 unmodified lines
4747 #define DEFAULT_UAR_PAGE_SHIFT 12
4848
4949 #define MAX_MSIX_P_PORT 17
50−#define MAX_MSIX 64
50+#define MAX_MSIX 128
5151 #define MIN_MSIX_P_PORT 5
5252 #define MLX4_IS_LEGACY_EQ_MODE(dev_cap) ((dev_cap).num_comp_vectors < \
5353 (dev_cap).num_ports * MIN_MSIX_P_PORT)
include/linux/mlx5/device.h+22−1
@@ -1105,6 +1105,7 @@ enum mlx5_cap_type { · 1104 unmodified lines
11051105 MLX5_CAP_DEV_MEM,
11061106 MLX5_CAP_RESERVED_16,
11071107 MLX5_CAP_TLS,
1108+ MLX5_CAP_VDPA_EMULATION = 0x13,
11081109 MLX5_CAP_DEV_EVENT = 0x14,
11091110 /* NUM OF CAP Types */
11101111 MLX5_CAP_NUM
@@ -1120,6 +1121,9 @@ enum mlx5_pcam_feature_groups { · 9 unmodified lines
11201121
11211122 enum mlx5_mcam_reg_groups {
11221123 MLX5_MCAM_REGS_FIRST_128 = 0x0,
1124+ MLX5_MCAM_REGS_0x9080_0x90FF = 0x1,
1125+ MLX5_MCAM_REGS_0x9100_0x917F = 0x2,
1126+ MLX5_MCAM_REGS_NUM = 0x3,
11231127 };
11241128
11251129 enum mlx5_mcam_feature_groups {
@@ -1268,7 +1272,16 @@ enum mlx5_qcam_feature_groups { · 142 unmodified lines
12681272 MLX5_GET(pcam_reg, (mdev)->caps.pcam, port_access_reg_cap_mask.regs_5000_to_507f.reg)
12691273
12701274 #define MLX5_CAP_MCAM_REG(mdev, reg) \
1271− MLX5_GET(mcam_reg, (mdev)->caps.mcam, mng_access_reg_cap_mask.access_regs.reg)
1275+ MLX5_GET(mcam_reg, (mdev)->caps.mcam[MLX5_MCAM_REGS_FIRST_128], \
1276+ mng_access_reg_cap_mask.access_regs.reg)
1277+
1278+#define MLX5_CAP_MCAM_REG1(mdev, reg) \
1279+ MLX5_GET(mcam_reg, (mdev)->caps.mcam[MLX5_MCAM_REGS_0x9080_0x90FF], \
1280+ mng_access_reg_cap_mask.access_regs1.reg)
1281+
1282+#define MLX5_CAP_MCAM_REG2(mdev, reg) \
1283+ MLX5_GET(mcam_reg, (mdev)->caps.mcam[MLX5_MCAM_REGS_0x9100_0x917F], \
1284+ mng_access_reg_cap_mask.access_regs2.reg)
12721285
12731286 #define MLX5_CAP_MCAM_FEATURE(mdev, fld) \
12741287 MLX5_GET(mcam_reg, (mdev)->caps.mcam, mng_feature_cap_mask.enhanced_features.fld)
@@ -1297,6 +1310,14 @@ enum mlx5_qcam_feature_groups { · 22 unmodified lines
12971310 #define MLX5_CAP_DEV_EVENT(mdev, cap)\
12981311 MLX5_ADDR_OF(device_event_cap, (mdev)->caps.hca_cur[MLX5_CAP_DEV_EVENT], cap)
12991312
1313+#define MLX5_CAP_DEV_VDPA_EMULATION(mdev, cap)\
1314+ MLX5_GET(device_virtio_emulation_cap, \
1315+ (mdev)->caps.hca_cur[MLX5_CAP_VDPA_EMULATION], cap)
1316+
1317+#define MLX5_CAP64_DEV_VDPA_EMULATION(mdev, cap)\
1318+ MLX5_GET64(device_virtio_emulation_cap, \
1319+ (mdev)->caps.hca_cur[MLX5_CAP_VDPA_EMULATION], cap)
1320+
13001321 enum {
13011322 MLX5_CMD_STAT_OK = 0x0,
13021323 MLX5_CMD_STAT_INT_ERR = 0x1,
include/linux/mlx5/driver.h+3−3
@@ -145,6 +145,8 @@ enum { · 144 unmodified lines
145145 MLX5_REG_MCC = 0x9062,
146146 MLX5_REG_MCDA = 0x9063,
147147 MLX5_REG_MCAM = 0x907f,
148+ MLX5_REG_MIRC = 0x9162,
149+ MLX5_REG_RESOURCE_DUMP = 0xC000,
148150 };
149151
150152 enum mlx5_qpts_trust_state {
@@ -684,7 +686,7 @@ struct mlx5_core_dev { · 533 unmodified lines
684686 u32 hca_cur[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)];
685687 u32 hca_max[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)];
686688 u32 pcam[MLX5_ST_SZ_DW(pcam_reg)];
687− u32 mcam[MLX5_ST_SZ_DW(mcam_reg)];
689+ u32 mcam[MLX5_MCAM_REGS_NUM][MLX5_ST_SZ_DW(mcam_reg)];
688690 u32 fpga[MLX5_ST_SZ_DW(fpga_cap)];
689691 u32 qcam[MLX5_ST_SZ_DW(qcam_reg)];
690692 u8 embedded_cpu;
@@ -928,8 +930,6 @@ void mlx5_start_health_poll(struct mlx5_core_dev *dev); · 237 unmodified lines
928930 void mlx5_stop_health_poll(struct mlx5_core_dev *dev, bool disable_health);
929931 void mlx5_drain_health_wq(struct mlx5_core_dev *dev);
930932 void mlx5_trigger_health_work(struct mlx5_core_dev *dev);
931−int mlx5_buf_alloc_node(struct mlx5_core_dev *dev, int size,
932− struct mlx5_frag_buf *buf, int node);
933933 int mlx5_buf_alloc(struct mlx5_core_dev *dev,
934934 int size, struct mlx5_frag_buf *buf);
935935 void mlx5_buf_free(struct mlx5_core_dev *dev, struct mlx5_frag_buf *buf);
include/linux/mlx5/fs.h+12−8
@@ -48,6 +48,7 @@ enum { · 47 unmodified lines
4848 MLX5_FLOW_TABLE_TUNNEL_EN_REFORMAT = BIT(0),
4949 MLX5_FLOW_TABLE_TUNNEL_EN_DECAP = BIT(1),
5050 MLX5_FLOW_TABLE_TERMINATION = BIT(2),
51+ MLX5_FLOW_TABLE_UNMANAGED = BIT(3),
5152 };
5253
5354 #define LEFTOVERS_RULE_NUM 2
@@ -145,25 +146,27 @@ mlx5_get_flow_vport_acl_namespace(struct mlx5_core_dev *dev, · 91 unmodified lines
145146 enum mlx5_flow_namespace_type type,
146147 int vport);
147148
148−struct mlx5_flow_table *
149−mlx5_create_auto_grouped_flow_table(struct mlx5_flow_namespace *ns,
150− int prio,
151− int num_flow_table_entries,
152− int max_num_groups,
153− u32 level,
154− u32 flags);
155−
156149 struct mlx5_flow_table_attr {
157150 int prio;
158151 int max_fte;
159152 u32 level;
160153 u32 flags;
154+ struct mlx5_flow_table *next_ft;
155+
156+ struct {
157+ int max_num_groups;
158+ int num_reserved_entries;
159+ } autogroup;
161160 };
162161
163162 struct mlx5_flow_table *
164163 mlx5_create_flow_table(struct mlx5_flow_namespace *ns,
165164 struct mlx5_flow_table_attr *ft_attr);
166165
166+struct mlx5_flow_table *
167+mlx5_create_auto_grouped_flow_table(struct mlx5_flow_namespace *ns,
168+ struct mlx5_flow_table_attr *ft_attr);
169+
167170 struct mlx5_flow_table *
168171 mlx5_create_vport_flow_table(struct mlx5_flow_namespace *ns,
169172 int prio,
@@ -194,6 +197,7 @@ struct mlx5_fs_vlan { · 24 unmodified lines
194197
195198 enum {
196199 FLOW_ACT_NO_APPEND = BIT(0),
200+ FLOW_ACT_IGNORE_FLOW_LEVEL = BIT(1),
197201 };
198202
199203 struct mlx5_flow_act {
include/linux/mlx5/mlx5_ifc.h+230−7
@@ -87,6 +87,7 @@ enum { · 86 unmodified lines
8787 enum {
8888 MLX5_GENERAL_OBJ_TYPES_CAP_SW_ICM = (1ULL << MLX5_OBJ_TYPE_SW_ICM),
8989 MLX5_GENERAL_OBJ_TYPES_CAP_GENEVE_TLV_OPT = (1ULL << 11),
90+ MLX5_GENERAL_OBJ_TYPES_CAP_VIRTIO_NET_Q = (1ULL << 13),
9091 };
9192
9293 enum {
@@ -374,8 +375,17 @@ struct mlx5_ifc_flow_table_fields_supported_bits { · 281 unmodified lines
374375 u8 outer_esp_spi[0x1];
375376 u8 reserved_at_58[0x2];
376377 u8 bth_dst_qp[0x1];
378+ u8 reserved_at_5b[0x5];
377379
378− u8 reserved_at_5b[0x25];
380+ u8 reserved_at_60[0x18];
381+ u8 metadata_reg_c_7[0x1];
382+ u8 metadata_reg_c_6[0x1];
383+ u8 metadata_reg_c_5[0x1];
384+ u8 metadata_reg_c_4[0x1];
385+ u8 metadata_reg_c_3[0x1];
386+ u8 metadata_reg_c_2[0x1];
387+ u8 metadata_reg_c_1[0x1];
388+ u8 metadata_reg_c_0[0x1];
379389 };
380390
381391 struct mlx5_ifc_flow_table_prop_layout_bits {
@@ -400,7 +410,8 @@ struct mlx5_ifc_flow_table_prop_layout_bits { · 18 unmodified lines
400410 u8 reformat_l3_tunnel_to_l2[0x1];
401411 u8 reformat_l2_to_l3_tunnel[0x1];
402412 u8 reformat_and_modify_action[0x1];
403− u8 reserved_at_15[0x2];
413+ u8 ignore_flow_level[0x1];
414+ u8 reserved_at_16[0x1];
404415 u8 table_miss_action_domain[0x1];
405416 u8 termination_table[0x1];
406417 u8 reserved_at_19[0x7];
@@ -721,7 +732,9 @@ enum { · 314 unmodified lines
721732
722733 struct mlx5_ifc_flow_table_eswitch_cap_bits {
723734 u8 fdb_to_vport_reg_c_id[0x8];
724− u8 reserved_at_8[0xf];
735+ u8 reserved_at_8[0xd];
736+ u8 fdb_modify_header_fwd_to_table[0x1];
737+ u8 reserved_at_16[0x1];
725738 u8 flow_source[0x1];
726739 u8 reserved_at_18[0x2];
727740 u8 multi_fdb_encap[0x1];
@@ -822,7 +835,9 @@ struct mlx5_ifc_qos_cap_bits { · 94 unmodified lines
822835 struct mlx5_ifc_debug_cap_bits {
823836 u8 core_dump_general[0x1];
824837 u8 core_dump_qp[0x1];
825− u8 reserved_at_2[0x1e];
838+ u8 reserved_at_2[0x7];
839+ u8 resource_dump[0x1];
840+ u8 reserved_at_a[0x16];
826841
827842 u8 reserved_at_20[0x2];
828843 u8 stall_detect[0x1];
@@ -953,6 +968,19 @@ struct mlx5_ifc_device_event_cap_bits { · 124 unmodified lines
953968 u8 user_unaffiliated_events[4][0x40];
954969 };
955970
971+struct mlx5_ifc_device_virtio_emulation_cap_bits {
972+ u8 reserved_at_0[0x20];
973+
974+ u8 reserved_at_20[0x13];
975+ u8 log_doorbell_stride[0x5];
976+ u8 reserved_at_38[0x3];
977+ u8 log_doorbell_bar_size[0x5];
978+
979+ u8 doorbell_bar_offset[0x40];
980+
981+ u8 reserved_at_80[0x780];
982+};
983+
956984 enum {
957985 MLX5_ATOMIC_CAPS_ATOMIC_SIZE_QP_1_BYTE = 0x0,
958986 MLX5_ATOMIC_CAPS_ATOMIC_SIZE_QP_2_BYTES = 0x2,
@@ -1753,6 +1781,132 @@ struct mlx5_ifc_resize_field_select_bits { · 794 unmodified lines
17531781 u8 resize_field_select[0x20];
17541782 };
17551783
1784+struct mlx5_ifc_resource_dump_bits {
1785+ u8 more_dump[0x1];
1786+ u8 inline_dump[0x1];
1787+ u8 reserved_at_2[0xa];
1788+ u8 seq_num[0x4];
1789+ u8 segment_type[0x10];
1790+
1791+ u8 reserved_at_20[0x10];
1792+ u8 vhca_id[0x10];
1793+
1794+ u8 index1[0x20];
1795+
1796+ u8 index2[0x20];
1797+
1798+ u8 num_of_obj1[0x10];
1799+ u8 num_of_obj2[0x10];
1800+
1801+ u8 reserved_at_a0[0x20];
1802+
1803+ u8 device_opaque[0x40];
1804+
1805+ u8 mkey[0x20];
1806+
1807+ u8 size[0x20];
1808+
1809+ u8 address[0x40];
1810+
1811+ u8 inline_data[52][0x20];
1812+};
1813+
1814+struct mlx5_ifc_resource_dump_menu_record_bits {
1815+ u8 reserved_at_0[0x4];
1816+ u8 num_of_obj2_supports_active[0x1];
1817+ u8 num_of_obj2_supports_all[0x1];
1818+ u8 must_have_num_of_obj2[0x1];
1819+ u8 support_num_of_obj2[0x1];
1820+ u8 num_of_obj1_supports_active[0x1];
1821+ u8 num_of_obj1_supports_all[0x1];
1822+ u8 must_have_num_of_obj1[0x1];
1823+ u8 support_num_of_obj1[0x1];
1824+ u8 must_have_index2[0x1];
1825+ u8 support_index2[0x1];
1826+ u8 must_have_index1[0x1];
1827+ u8 support_index1[0x1];
1828+ u8 segment_type[0x10];
1829+
1830+ u8 segment_name[4][0x20];
1831+
1832+ u8 index1_name[4][0x20];
1833+
1834+ u8 index2_name[4][0x20];
1835+};
1836+
1837+struct mlx5_ifc_resource_dump_segment_header_bits {
1838+ u8 length_dw[0x10];
1839+ u8 segment_type[0x10];
1840+};
1841+
1842+struct mlx5_ifc_resource_dump_command_segment_bits {
1843+ struct mlx5_ifc_resource_dump_segment_header_bits segment_header;
1844+
1845+ u8 segment_called[0x10];
1846+ u8 vhca_id[0x10];
1847+
1848+ u8 index1[0x20];
1849+
1850+ u8 index2[0x20];
1851+
1852+ u8 num_of_obj1[0x10];
1853+ u8 num_of_obj2[0x10];
1854+};
1855+
1856+struct mlx5_ifc_resource_dump_error_segment_bits {
1857+ struct mlx5_ifc_resource_dump_segment_header_bits segment_header;
1858+
1859+ u8 reserved_at_20[0x10];
1860+ u8 syndrome_id[0x10];
1861+
1862+ u8 reserved_at_40[0x40];
1863+
1864+ u8 error[8][0x20];
1865+};
1866+
1867+struct mlx5_ifc_resource_dump_info_segment_bits {
1868+ struct mlx5_ifc_resource_dump_segment_header_bits segment_header;
1869+
1870+ u8 reserved_at_20[0x18];
1871+ u8 dump_version[0x8];
1872+
1873+ u8 hw_version[0x20];
1874+
1875+ u8 fw_version[0x20];
1876+};
1877+
1878+struct mlx5_ifc_resource_dump_menu_segment_bits {
1879+ struct mlx5_ifc_resource_dump_segment_header_bits segment_header;
1880+
1881+ u8 reserved_at_20[0x10];
1882+ u8 num_of_records[0x10];
1883+
1884+ struct mlx5_ifc_resource_dump_menu_record_bits record[0];
1885+};
1886+
1887+struct mlx5_ifc_resource_dump_resource_segment_bits {
1888+ struct mlx5_ifc_resource_dump_segment_header_bits segment_header;
1889+
1890+ u8 reserved_at_20[0x20];
1891+
1892+ u8 index1[0x20];
1893+
1894+ u8 index2[0x20];
1895+
1896+ u8 payload[0][0x20];
1897+};
1898+
1899+struct mlx5_ifc_resource_dump_terminate_segment_bits {
1900+ struct mlx5_ifc_resource_dump_segment_header_bits segment_header;
1901+};
1902+
1903+struct mlx5_ifc_menu_resource_dump_response_bits {
1904+ struct mlx5_ifc_resource_dump_info_segment_bits info;
1905+ struct mlx5_ifc_resource_dump_command_segment_bits cmd;
1906+ struct mlx5_ifc_resource_dump_menu_segment_bits menu;
1907+ struct mlx5_ifc_resource_dump_terminate_segment_bits terminate;
1908+};
1909+
17561910 enum {
17571911 MLX5_MODIFY_FIELD_SELECT_MODIFY_FIELD_SELECT_CQ_PERIOD = 0x1,
17581912 MLX5_MODIFY_FIELD_SELECT_MODIFY_FIELD_SELECT_CQ_MAX_COUNT = 0x2,
@@ -2026,7 +2180,9 @@ struct mlx5_ifc_eth_per_prio_grp_data_layout_bits { · 267 unmodified lines
20262180
20272181 u8 rx_pause_transition_low[0x20];
20282182
2029− u8 reserved_at_3c0[0x40];
2183+ u8 rx_discards_high[0x20];
2184+
2185+ u8 rx_discards_low[0x20];
20302186
20312187 u8 device_stall_minor_watermark_cnt_high[0x20];
20322188
@@ -2751,6 +2907,7 @@ union mlx5_ifc_hca_cap_union_bits { · 718 unmodified lines
27512907 struct mlx5_ifc_fpga_cap_bits fpga_cap;
27522908 struct mlx5_ifc_tls_cap_bits tls_cap;
27532909 struct mlx5_ifc_device_mem_cap_bits device_mem_cap;
2910+ struct mlx5_ifc_device_virtio_emulation_cap_bits virtio_emulation_cap;
27542911 u8 reserved_at_0[0x8000];
27552912 };
27562913
@@ -3998,7 +4155,8 @@ struct mlx5_ifc_set_fte_in_bits { · 1241 unmodified lines
39984155 u8 reserved_at_a0[0x8];
39994156 u8 table_id[0x18];
40004157
4001− u8 reserved_at_c0[0x18];
4158+ u8 ignore_flow_level[0x1];
4159+ u8 reserved_at_c1[0x17];
40024160 u8 modify_enable_mask[0x8];
40034161
40044162 u8 reserved_at_e0[0x20];
@@ -5466,15 +5624,32 @@ struct mlx5_ifc_add_action_in_bits { · 1461 unmodified lines
54665624 u8 data[0x20];
54675625 };
54685626
5627+struct mlx5_ifc_copy_action_in_bits {
5628+ u8 action_type[0x4];
5629+ u8 src_field[0xc];
5630+ u8 reserved_at_10[0x3];
5631+ u8 src_offset[0x5];
5632+ u8 reserved_at_18[0x3];
5633+ u8 length[0x5];
5634+
5635+ u8 reserved_at_20[0x4];
5636+ u8 dst_field[0xc];
5637+ u8 reserved_at_30[0x3];
5638+ u8 dst_offset[0x5];
5639+ u8 reserved_at_38[0x8];
5640+};
5641+
54695642 union mlx5_ifc_set_action_in_add_action_in_auto_bits {
54705643 struct mlx5_ifc_set_action_in_bits set_action_in;
54715644 struct mlx5_ifc_add_action_in_bits add_action_in;
5645+ struct mlx5_ifc_copy_action_in_bits copy_action_in;
54725646 u8 reserved_at_0[0x40];
54735647 };
54745648
54755649 enum {
54765650 MLX5_ACTION_TYPE_SET = 0x1,
54775651 MLX5_ACTION_TYPE_ADD = 0x2,
5652+ MLX5_ACTION_TYPE_COPY = 0x3,
54785653 };
54795654
54805655 enum {
@@ -5510,6 +5685,8 @@ enum { · 29 unmodified lines
55105685 MLX5_ACTION_IN_FIELD_METADATA_REG_C_3 = 0x54,
55115686 MLX5_ACTION_IN_FIELD_METADATA_REG_C_4 = 0x55,
55125687 MLX5_ACTION_IN_FIELD_METADATA_REG_C_5 = 0x56,
5688+ MLX5_ACTION_IN_FIELD_METADATA_REG_C_6 = 0x57,
5689+ MLX5_ACTION_IN_FIELD_METADATA_REG_C_7 = 0x58,
55135690 MLX5_ACTION_IN_FIELD_OUT_TCP_SEQ_NUM = 0x59,
55145691 MLX5_ACTION_IN_FIELD_OUT_TCP_ACK_NUM = 0x5B,
55155692 };
@@ -8406,6 +8583,18 @@ struct mlx5_ifc_pplm_reg_bits { · 2890 unmodified lines
84068583 u8 fec_override_admin_50g[0x4];
84078584 u8 fec_override_admin_25g[0x4];
84088585 u8 fec_override_admin_10g_40g[0x4];
8586+
8587+ u8 fec_override_cap_400g_8x[0x10];
8588+ u8 fec_override_cap_200g_4x[0x10];
8589+
8590+ u8 fec_override_cap_100g_2x[0x10];
8591+ u8 fec_override_cap_50g_1x[0x10];
8592+
8593+ u8 fec_override_admin_400g_8x[0x10];
8594+ u8 fec_override_admin_200g_4x[0x10];
8595+
8596+ u8 fec_override_admin_100g_2x[0x10];
8597+ u8 fec_override_admin_50g_1x[0x10];
84098598 };
84108599
84118600 struct mlx5_ifc_ppcnt_reg_bits {
@@ -8732,7 +8921,9 @@ struct mlx5_ifc_mpegc_reg_bits { · 320 unmodified lines
87328921 };
87338922
87348923 struct mlx5_ifc_pcam_enhanced_features_bits {
8735− u8 reserved_at_0[0x6d];
8924+ u8 reserved_at_0[0x68];
8925+ u8 fec_50G_per_lane_in_pplm[0x1];
8926+ u8 reserved_at_69[0x4];
87368927 u8 rx_icrc_encapsulated_counter[0x1];
87378928 u8 reserved_at_6e[0x4];
87388929 u8 ptys_extended_ethernet[0x1];
@@ -8817,6 +9008,28 @@ struct mlx5_ifc_mcam_access_reg_bits { · 78 unmodified lines
88179008 u8 regs_31_to_0[0x20];
88189009 };
88199010
9011+struct mlx5_ifc_mcam_access_reg_bits1 {
9012+ u8 regs_127_to_96[0x20];
9013+
9014+ u8 regs_95_to_64[0x20];
9015+
9016+ u8 regs_63_to_32[0x20];
9017+
9018+ u8 regs_31_to_0[0x20];
9019+};
9020+
9021+struct mlx5_ifc_mcam_access_reg_bits2 {
9022+ u8 regs_127_to_99[0x1d];
9023+ u8 mirc[0x1];
9024+ u8 regs_97_to_96[0x2];
9025+
9026+ u8 regs_95_to_64[0x20];
9027+
9028+ u8 regs_63_to_32[0x20];
9029+
9030+ u8 regs_31_to_0[0x20];
9031+};
9032+
88209033 struct mlx5_ifc_mcam_reg_bits {
88219034 u8 reserved_at_0[0x8];
88229035 u8 feature_group[0x8];
@@ -8827,6 +9040,8 @@ struct mlx5_ifc_mcam_reg_bits { · 4 unmodified lines
88279040
88289041 union {
88299042 struct mlx5_ifc_mcam_access_reg_bits access_regs;
9043+ struct mlx5_ifc_mcam_access_reg_bits1 access_regs1;
9044+ struct mlx5_ifc_mcam_access_reg_bits2 access_regs2;
88309045 u8 reserved_at_0[0x80];
88319046 } mng_access_reg_cap_mask;
88329047
@@ -9432,6 +9647,13 @@ struct mlx5_ifc_mcda_reg_bits { · 599 unmodified lines
94329647 u8 data[0][0x20];
94339648 };
94349649
9650+struct mlx5_ifc_mirc_reg_bits {
9651+ u8 reserved_at_0[0x18];
9652+ u8 status_code[0x8];
9653+
9654+ u8 reserved_at_20[0x20];
9655+};
9656+
94359657 union mlx5_ifc_ports_control_registers_document_bits {
94369658 struct mlx5_ifc_bufferx_reg_bits bufferx_reg;
94379659 struct mlx5_ifc_eth_2819_cntrs_grp_data_layout_bits eth_2819_cntrs_grp_data_layout;
@@ -9487,6 +9709,7 @@ union mlx5_ifc_ports_control_registers_document_bits { · 49 unmodified lines
94879709 struct mlx5_ifc_mcqi_reg_bits mcqi_reg;
94889710 struct mlx5_ifc_mcc_reg_bits mcc_reg;
94899711 struct mlx5_ifc_mcda_reg_bits mcda_reg;
9712+ struct mlx5_ifc_mirc_reg_bits mirc_reg;
94909713 u8 reserved_at_0[0x60e0];
94919714 };
94929715
include/linux/mmc/sdio_ids.h+2−0
@@ -41,8 +41,10 @@ · 40 unmodified lines
4141 #define SDIO_DEVICE_ID_BROADCOM_43455 0xa9bf
4242 #define SDIO_DEVICE_ID_BROADCOM_4354 0x4354
4343 #define SDIO_DEVICE_ID_BROADCOM_4356 0x4356
44+#define SDIO_DEVICE_ID_BROADCOM_4359 0x4359
4445 #define SDIO_DEVICE_ID_CYPRESS_4373 0x4373
4546 #define SDIO_DEVICE_ID_CYPRESS_43012 43012
47+#define SDIO_DEVICE_ID_CYPRESS_89359 0x4355
4648
4749 #define SDIO_VENDOR_ID_INTEL 0x0089
4850 #define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX 0x1402
include/linux/net.h+1−0
@@ -171,6 +171,7 @@ struct proto_ops { · 170 unmodified lines
171171 int (*compat_getsockopt)(struct socket *sock, int level,
172172 int optname, char __user *optval, int __user *optlen);
173173 #endif
174+ void (*show_fdinfo)(struct seq_file *m, struct socket *sock);
174175 int (*sendmsg) (struct socket *sock, struct msghdr *m,
175176 size_t total_len);
176177 /* Notes for implementing recvmsg:
include/linux/netdev_features.h+8−1
@@ -53,8 +53,9 @@ enum { · 52 unmodified lines
5353 NETIF_F_GSO_ESP_BIT, /* ... ESP with TSO */
5454 NETIF_F_GSO_UDP_BIT, /* ... UFO, deprecated except tuntap */
5555 NETIF_F_GSO_UDP_L4_BIT, /* ... UDP payload GSO (not UFO) */
56+ NETIF_F_GSO_FRAGLIST_BIT, /* ... Fraglist GSO */
5657 /**/NETIF_F_GSO_LAST = /* last bit, see GSO_MASK */
57− NETIF_F_GSO_UDP_L4_BIT,
58+ NETIF_F_GSO_FRAGLIST_BIT,
5859
5960 NETIF_F_FCOE_CRC_BIT, /* FCoE CRC32 */
6061 NETIF_F_SCTP_CRC_BIT, /* SCTP checksum offload */
@@ -80,6 +81,7 @@ enum { · 19 unmodified lines
8081
8182 NETIF_F_GRO_HW_BIT, /* Hardware Generic receive offload */
8283 NETIF_F_HW_TLS_RECORD_BIT, /* Offload TLS record */
84+ NETIF_F_GRO_FRAGLIST_BIT, /* Fraglist GRO */
8385
8486 /*
8587 * Add your fresh new feature above and remember to update
@@ -150,6 +152,8 @@ enum { · 64 unmodified lines
150152 #define NETIF_F_GSO_UDP_L4 __NETIF_F(GSO_UDP_L4)
151153 #define NETIF_F_HW_TLS_TX __NETIF_F(HW_TLS_TX)
152154 #define NETIF_F_HW_TLS_RX __NETIF_F(HW_TLS_RX)
155+#define NETIF_F_GRO_FRAGLIST __NETIF_F(GRO_FRAGLIST)
156+#define NETIF_F_GSO_FRAGLIST __NETIF_F(GSO_FRAGLIST)
153157
154158 /* Finds the next feature with the highest number of the range of start till 0.
155159 */
@@ -226,6 +230,9 @@ static inline int find_next_netdev_feature(u64 feature, unsigned long start) · 70 unmodified lines
226230 /* changeable features with no special hardware requirements */
227231 #define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO)
228232
233+/* Changeable features with no special hardware requirements that defaults to off. */
234+#define NETIF_F_SOFT_FEATURES_OFF NETIF_F_GRO_FRAGLIST
235+
229236 #define NETIF_F_VLAN_FEATURES (NETIF_F_HW_VLAN_CTAG_FILTER | \
230237 NETIF_F_HW_VLAN_CTAG_RX | \
231238 NETIF_F_HW_VLAN_CTAG_TX | \
include/linux/netdevice.h+88−26
@@ -849,6 +849,8 @@ enum tc_setup_type { · 848 unmodified lines
849849 TC_SETUP_QDISC_GRED,
850850 TC_SETUP_QDISC_TAPRIO,
851851 TC_SETUP_FT,
852+ TC_SETUP_QDISC_ETS,
853+ TC_SETUP_QDISC_TBF,
852854 };
853855
854856 /* These structures hold the attributes of bpf state that are being passed
@@ -875,6 +877,7 @@ enum bpf_netdev_command { · 20 unmodified lines
875877 struct bpf_prog_offload_ops;
876878 struct netlink_ext_ack;
877879 struct xdp_umem;
880+struct xdp_dev_bulk_queue;
878881
879882 struct netdev_bpf {
880883 enum bpf_netdev_command command;
@@ -936,6 +939,11 @@ struct netdev_name_node { · 55 unmodified lines
936939 int netdev_name_node_alt_create(struct net_device *dev, const char *name);
937940 int netdev_name_node_alt_destroy(struct net_device *dev, const char *name);
938941
942+struct netdev_net_notifier {
943+ struct list_head list;
944+ struct notifier_block *nb;
945+};
946+
939947 /*
940948 * This structure defines the management hooks for network devices.
941949 * The following hooks can be defined; unless noted otherwise, they are
@@ -1014,7 +1022,7 @@ int netdev_name_node_alt_destroy(struct net_device *dev, const char *name); · 72 unmodified lines
10141022 * Called when a user wants to change the Maximum Transfer Unit
10151023 * of a device.
10161024 *
1017− * void (*ndo_tx_timeout)(struct net_device *dev);
1025+ * void (*ndo_tx_timeout)(struct net_device *dev, unsigned int txqueue);
10181026 * Callback used when the transmitter has not made any progress
10191027 * for dev->watchdog ticks.
10201028 *
@@ -1281,7 +1289,8 @@ struct net_device_ops { · 260 unmodified lines
12811289 int new_mtu);
12821290 int (*ndo_neigh_setup)(struct net_device *dev,
12831291 struct neigh_parms *);
1284− void (*ndo_tx_timeout) (struct net_device *dev);
1292+ void (*ndo_tx_timeout) (struct net_device *dev,
1293+ unsigned int txqueue);
12851294
12861295 void (*ndo_get_stats64)(struct net_device *dev,
12871296 struct rtnl_link_stats64 *storage);
@@ -1707,6 +1716,7 @@ enum netdev_priv_flags { · 419 unmodified lines
17071716 * @miniq_ingress: ingress/clsact qdisc specific data for
17081717 * ingress processing
17091718 * @ingress_queue: XXX: need comments on this one
1719+ * @nf_hooks_ingress: netfilter hooks executed for ingress packets
17101720 * @broadcast: hw bcast address
17111721 *
17121722 * @rx_cpu_rmap: CPU reverse-mapping for RX completion interrupts,
@@ -1788,6 +1798,10 @@ enum netdev_priv_flags { · 75 unmodified lines
17881798 *
17891799 * @wol_enabled: Wake-on-LAN is enabled
17901800 *
1801+ * @net_notifier_list: List of per-net netdev notifier block
1802+ * that follow this device when it is moved
1803+ * to another network namespace.
1804+ *
17911805 * FIXME: cleanup struct net_device such that network protocol info
17921806 * moves out.
17931807 */
@@ -1983,12 +1997,10 @@ struct net_device { · 189 unmodified lines
19831997 unsigned int num_tx_queues;
19841998 unsigned int real_num_tx_queues;
19851999 struct Qdisc *qdisc;
1986−#ifdef CONFIG_NET_SCHED
1987− DECLARE_HASHTABLE (qdisc_hash, 4);
1988−#endif
19892000 unsigned int tx_queue_len;
19902001 spinlock_t tx_global_lock;
1991− int watchdog_timeo;
2002+
2003+ struct xdp_dev_bulk_queue __percpu *xdp_bulkq;
19922004
19932005 #ifdef CONFIG_XPS
19942006 struct xps_dev_maps __rcu *xps_cpus_map;
@@ -1998,11 +2010,15 @@ struct net_device { · 3 unmodified lines
19982010 struct mini_Qdisc __rcu *miniq_egress;
19992011 #endif
20002012
2013+#ifdef CONFIG_NET_SCHED
2014+ DECLARE_HASHTABLE (qdisc_hash, 4);
2015+#endif
20012016 /* These may be needed for future network-power-down code. */
20022017 struct timer_list watchdog_timer;
2018+ int watchdog_timeo;
20032019
2004− int __percpu *pcpu_refcnt;
20052020 struct list_head todo_list;
2021+ int __percpu *pcpu_refcnt;
20062022
20072023 struct list_head link_watch_list;
20082024
@@ -2078,6 +2094,8 @@ struct net_device { · 69 unmodified lines
20782094 struct lock_class_key addr_list_lock_key;
20792095 bool proto_down;
20802096 unsigned wol_enabled:1;
2097+
2098+ struct list_head net_notifier_list;
20812099 };
20822100 #define to_net_dev(d) container_of(d, struct net_device, dev)
20832101
@@ -2319,7 +2337,8 @@ struct napi_gro_cb { · 235 unmodified lines
23192337 /* Number of gro_receive callbacks this packet already went through */
23202338 u8 recursion_counter:4;
23212339
2322− /* 1 bit hole */
2340+ /* GRO is done by frag_list pointer chaining. */
2341+ u8 is_flist:1;
23232342
23242343 /* used to support CHECKSUM_COMPLETE for tunneling protocols */
23252344 __wsum csum;
@@ -2521,6 +2540,12 @@ int unregister_netdevice_notifier(struct notifier_block *nb); · 195 unmodified lines
25212540 int register_netdevice_notifier_net(struct net *net, struct notifier_block *nb);
25222541 int unregister_netdevice_notifier_net(struct net *net,
25232542 struct notifier_block *nb);
2543+int register_netdevice_notifier_dev_net(struct net_device *dev,
2544+ struct notifier_block *nb,
2545+ struct netdev_net_notifier *nn);
2546+int unregister_netdevice_notifier_dev_net(struct net_device *dev,
2547+ struct notifier_block *nb,
2548+ struct netdev_net_notifier *nn);
25242549
25252550 struct netdev_notifier_info {
25262551 struct net_device *dev;
@@ -2687,6 +2712,7 @@ struct net_device *dev_get_by_napi_id(unsigned int napi_id); · 160 unmodified lines
26872712 int netdev_get_name(struct net *net, char *name, int ifindex);
26882713 int dev_restart(struct net_device *dev);
26892714 int skb_gro_receive(struct sk_buff *p, struct sk_buff *skb);
2715+int skb_gro_receive_list(struct sk_buff *p, struct sk_buff *skb);
26902716
26912717 static inline unsigned int skb_gro_offset(const struct sk_buff *skb)
26922718 {
@@ -2823,16 +2849,16 @@ static inline bool __skb_gro_checksum_convert_check(struct sk_buff *skb) · 130 unmodified lines
28232849 }
28242850
28252851 static inline void __skb_gro_checksum_convert(struct sk_buff *skb,
2826− __sum16 check, __wsum pseudo)
2852+ __wsum pseudo)
28272853 {
28282854 NAPI_GRO_CB(skb)->csum = ~pseudo;
28292855 NAPI_GRO_CB(skb)->csum_valid = 1;
28302856 }
28312857
2832−#define skb_gro_checksum_try_convert(skb, proto, check, compute_pseudo) \
2858+#define skb_gro_checksum_try_convert(skb, proto, compute_pseudo) \
28332859 do { \
28342860 if (__skb_gro_checksum_convert_check(skb)) \
2835− __skb_gro_checksum_convert(skb, check, \
2861+ __skb_gro_checksum_convert(skb, \
28362862 compute_pseudo(skb, proto)); \
28372863 } while (0)
28382864
@@ -3887,22 +3913,48 @@ void netif_device_attach(struct net_device *dev); · 1048 unmodified lines
38873913 */
38883914
38893915 enum {
3890− NETIF_MSG_DRV = 0x0001,
3891− NETIF_MSG_PROBE = 0x0002,
3892− NETIF_MSG_LINK = 0x0004,
3893− NETIF_MSG_TIMER = 0x0008,
3894− NETIF_MSG_IFDOWN = 0x0010,
3895− NETIF_MSG_IFUP = 0x0020,
3896− NETIF_MSG_RX_ERR = 0x0040,
3897− NETIF_MSG_TX_ERR = 0x0080,
3898− NETIF_MSG_TX_QUEUED = 0x0100,
3899− NETIF_MSG_INTR = 0x0200,
3900− NETIF_MSG_TX_DONE = 0x0400,
3901− NETIF_MSG_RX_STATUS = 0x0800,
3902− NETIF_MSG_PKTDATA = 0x1000,
3903− NETIF_MSG_HW = 0x2000,
3904− NETIF_MSG_WOL = 0x4000,
3916+ NETIF_MSG_DRV_BIT,
3917+ NETIF_MSG_PROBE_BIT,
3918+ NETIF_MSG_LINK_BIT,
3919+ NETIF_MSG_TIMER_BIT,
3920+ NETIF_MSG_IFDOWN_BIT,
3921+ NETIF_MSG_IFUP_BIT,
3922+ NETIF_MSG_RX_ERR_BIT,
3923+ NETIF_MSG_TX_ERR_BIT,
3924+ NETIF_MSG_TX_QUEUED_BIT,
3925+ NETIF_MSG_INTR_BIT,
3926+ NETIF_MSG_TX_DONE_BIT,
3927+ NETIF_MSG_RX_STATUS_BIT,
3928+ NETIF_MSG_PKTDATA_BIT,
3929+ NETIF_MSG_HW_BIT,
3930+ NETIF_MSG_WOL_BIT,
3931+
3932+ /* When you add a new bit above, update netif_msg_class_names array
3933+ * in net/ethtool/common.c
3934+ */
3935+ NETIF_MSG_CLASS_COUNT,
39053936 };
3937+/* Both ethtool_ops interface and internal driver implementation use u32 */
3938+static_assert(NETIF_MSG_CLASS_COUNT <= 32);
3939+
3940+#define __NETIF_MSG_BIT(bit) ((u32)1 << (bit))
3941+#define __NETIF_MSG(name) __NETIF_MSG_BIT(NETIF_MSG_ ## name ## _BIT)
3942+
3943+#define NETIF_MSG_DRV __NETIF_MSG(DRV)
3944+#define NETIF_MSG_PROBE __NETIF_MSG(PROBE)
3945+#define NETIF_MSG_LINK __NETIF_MSG(LINK)
3946+#define NETIF_MSG_TIMER __NETIF_MSG(TIMER)
3947+#define NETIF_MSG_IFDOWN __NETIF_MSG(IFDOWN)
3948+#define NETIF_MSG_IFUP __NETIF_MSG(IFUP)
3949+#define NETIF_MSG_RX_ERR __NETIF_MSG(RX_ERR)
3950+#define NETIF_MSG_TX_ERR __NETIF_MSG(TX_ERR)
3951+#define NETIF_MSG_TX_QUEUED __NETIF_MSG(TX_QUEUED)
3952+#define NETIF_MSG_INTR __NETIF_MSG(INTR)
3953+#define NETIF_MSG_TX_DONE __NETIF_MSG(TX_DONE)
3954+#define NETIF_MSG_RX_STATUS __NETIF_MSG(RX_STATUS)
3955+#define NETIF_MSG_PKTDATA __NETIF_MSG(PKTDATA)
3956+#define NETIF_MSG_HW __NETIF_MSG(HW)
3957+#define NETIF_MSG_WOL __NETIF_MSG(WOL)
39063958
39073959 #define netif_msg_drv(p) ((p)->msg_enable & NETIF_MSG_DRV)
39083960 #define netif_msg_probe(p) ((p)->msg_enable & NETIF_MSG_PROBE)
@@ -4393,6 +4445,15 @@ struct netdev_notifier_bonding_info { · 484 unmodified lines
43934445 void netdev_bonding_info_change(struct net_device *dev,
43944446 struct netdev_bonding_info *bonding_info);
43954447
4448+#if IS_ENABLED(CONFIG_ETHTOOL_NETLINK)
4449+void ethtool_notify(struct net_device *dev, unsigned int cmd, const void *data);
4450+#else
4451+static inline void ethtool_notify(struct net_device *dev, unsigned int cmd,
4452+ const void *data)
4453+{
4454+}
4455+#endif
4456+
43964457 static inline
43974458 struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features)
43984459 {
@@ -4554,6 +4615,7 @@ static inline bool net_gso_ok(netdev_features_t features, int gso_type) · 155 unmodified lines
45544615 BUILD_BUG_ON(SKB_GSO_ESP != (NETIF_F_GSO_ESP >> NETIF_F_GSO_SHIFT));
45554616 BUILD_BUG_ON(SKB_GSO_UDP != (NETIF_F_GSO_UDP >> NETIF_F_GSO_SHIFT));
45564617 BUILD_BUG_ON(SKB_GSO_UDP_L4 != (NETIF_F_GSO_UDP_L4 >> NETIF_F_GSO_SHIFT));
4618+ BUILD_BUG_ON(SKB_GSO_FRAGLIST != (NETIF_F_GSO_FRAGLIST >> NETIF_F_GSO_SHIFT));
45574619
45584620 return (features & feature) == feature;
45594621 }
include/linux/phy.h+96−27
@@ -17,10 +17,12 @@ · 16 unmodified lines
1717 #include <linux/linkmode.h>
1818 #include <linux/mdio.h>
1919 #include <linux/mii.h>
20+#include <linux/mii_timestamper.h>
2021 #include <linux/module.h>
2122 #include <linux/timer.h>
2223 #include <linux/workqueue.h>
2324 #include <linux/mod_devicetable.h>
25+#include <linux/u64_stats_sync.h>
2426
2527 #include <linux/atomic.h>
2628
@@ -99,9 +101,11 @@ typedef enum { · 72 unmodified lines
99101 PHY_INTERFACE_MODE_2500BASEX,
100102 PHY_INTERFACE_MODE_RXAUI,
101103 PHY_INTERFACE_MODE_XAUI,
102− /* 10GBASE-KR, XFI, SFI - single lane 10G Serdes */
103− PHY_INTERFACE_MODE_10GKR,
104+ /* 10GBASE-R, XFI, SFI - single lane 10G Serdes */
105+ PHY_INTERFACE_MODE_10GBASER,
104106 PHY_INTERFACE_MODE_USXGMII,
107+ /* 10GBASE-KR - with Clause 73 AN */
108+ PHY_INTERFACE_MODE_10GKR,
105109 PHY_INTERFACE_MODE_MAX,
106110 } phy_interface_t;
107111
@@ -175,10 +179,12 @@ static inline const char *phy_modes(phy_interface_t interface) · 67 unmodified lines
175179 return "rxaui";
176180 case PHY_INTERFACE_MODE_XAUI:
177181 return "xaui";
178− case PHY_INTERFACE_MODE_10GKR:
179− return "10gbase-kr";
182+ case PHY_INTERFACE_MODE_10GBASER:
183+ return "10gbase-r";
180184 case PHY_INTERFACE_MODE_USXGMII:
181185 return "usxgmii";
186+ case PHY_INTERFACE_MODE_10GKR:
187+ return "10gbase-kr";
182188 default:
183189 return "unknown";
184190 }
@@ -207,6 +213,15 @@ struct sfp_bus; · 22 unmodified lines
207213 struct sfp_upstream_ops;
208214 struct sk_buff;
209215
216+struct mdio_bus_stats {
217+ u64_stats_t transfers;
218+ u64_stats_t errors;
219+ u64_stats_t writes;
220+ u64_stats_t reads;
221+ /* Must be last, add new statistics above */
222+ struct u64_stats_sync syncp;
223+};
224+
210225 /*
211226 * The Bus class for PHYs. Devices which provide access to
212227 * PHYs should register using this structure
@@ -219,6 +234,7 @@ struct mii_bus { · 6 unmodified lines
219234 int (*read)(struct mii_bus *bus, int addr, int regnum);
220235 int (*write)(struct mii_bus *bus, int addr, int regnum, u16 val);
221236 int (*reset)(struct mii_bus *bus);
237+ struct mdio_bus_stats stats[PHY_MAX_ADDR];
222238
223239 /*
224240 * A lock to ensure that only one thing can read/write
@@ -327,6 +343,9 @@ struct phy_c45_device_ids { · 102 unmodified lines
327343 u32 device_ids[8];
328344 };
329345
346+struct macsec_context;
347+struct macsec_ops;
348+
330349 /* phy_device: An instance of a PHY
331350 *
332351 * drv: Pointer to the driver for this PHY instance
@@ -349,6 +368,7 @@ struct phy_c45_device_ids { · 16 unmodified lines
349368 * attached_dev: The attached enet driver's device instance ptr
350369 * adjust_link: Callback for the enet controller to respond to
351370 * changes in the link state.
371+ * macsec_ops: MACsec offloading ops.
352372 *
353373 * speed, duplex, pause, supported, advertising, lp_advertising,
354374 * and autoneg are used like in mii_if_info
@@ -441,12 +461,18 @@ struct phy_device { · 86 unmodified lines
441461 struct sfp_bus *sfp_bus;
442462 struct phylink *phylink;
443463 struct net_device *attached_dev;
464+ struct mii_timestamper *mii_ts;
444465
445466 u8 mdix;
446467 u8 mdix_ctrl;
447468
448469 void (*phy_link_change)(struct phy_device *, bool up, bool do_carrier);
449470 void (*adjust_link)(struct net_device *dev);
471+
472+#if IS_ENABLED(CONFIG_MACSEC)
473+ /* MACsec management functions */
474+ const struct macsec_ops *macsec_ops;
475+#endif
450476 };
451477 #define to_phy_device(d) container_of(to_mdio_device(d), \
452478 struct phy_device, mdio)
@@ -546,29 +572,6 @@ struct phy_driver { · 93 unmodified lines
546572 */
547573 int (*match_phy_device)(struct phy_device *phydev);
548574
549− /* Handles ethtool queries for hardware time stamping. */
550− int (*ts_info)(struct phy_device *phydev, struct ethtool_ts_info *ti);
551−
552− /* Handles SIOCSHWTSTAMP ioctl for hardware time stamping. */
553− int (*hwtstamp)(struct phy_device *phydev, struct ifreq *ifr);
554−
555− /*
556− * Requests a Rx timestamp for 'skb'. If the skb is accepted,
557− * the phy driver promises to deliver it using netif_rx() as
558− * soon as a timestamp becomes available. One of the
559− * PTP_CLASS_ values is passed in 'type'. The function must
560− * return true if the skb is accepted for delivery.
561− */
562− bool (*rxtstamp)(struct phy_device *dev, struct sk_buff *skb, int type);
563−
564− /*
565− * Requests a Tx timestamp for 'skb'. The phy driver promises
566− * to deliver it using skb_complete_tx_timestamp() as soon as a
567− * timestamp becomes available. One of the PTP_CLASS_ values
568− * is passed in 'type'.
569− */
570− void (*txtstamp)(struct phy_device *dev, struct sk_buff *skb, int type);
571−
572575 /* Some devices (e.g. qnap TS-119P II) require PHY register changes to
573576 * enable Wake on LAN, so set_wol is provided to be called in the
574577 * ethernet driver's set_wol function. */
@@ -936,6 +939,66 @@ static inline bool phy_polling_mode(struct phy_device *phydev) · 361 unmodified lines
936939 return phydev->irq == PHY_POLL;
937940 }
938941
942+/**
943+ * phy_has_hwtstamp - Tests whether a PHY time stamp configuration.
944+ * @phydev: the phy_device struct
945+ */
946+static inline bool phy_has_hwtstamp(struct phy_device *phydev)
947+{
948+ return phydev && phydev->mii_ts && phydev->mii_ts->hwtstamp;
949+}
950+
951+/**
952+ * phy_has_rxtstamp - Tests whether a PHY supports receive time stamping.
953+ * @phydev: the phy_device struct
954+ */
955+static inline bool phy_has_rxtstamp(struct phy_device *phydev)
956+{
957+ return phydev && phydev->mii_ts && phydev->mii_ts->rxtstamp;
958+}
959+
960+/**
961+ * phy_has_tsinfo - Tests whether a PHY reports time stamping and/or
962+ * PTP hardware clock capabilities.
963+ * @phydev: the phy_device struct
964+ */
965+static inline bool phy_has_tsinfo(struct phy_device *phydev)
966+{
967+ return phydev && phydev->mii_ts && phydev->mii_ts->ts_info;
968+}
969+
970+/**
971+ * phy_has_txtstamp - Tests whether a PHY supports transmit time stamping.
972+ * @phydev: the phy_device struct
973+ */
974+static inline bool phy_has_txtstamp(struct phy_device *phydev)
975+{
976+ return phydev && phydev->mii_ts && phydev->mii_ts->txtstamp;
977+}
978+
979+static inline int phy_hwtstamp(struct phy_device *phydev, struct ifreq *ifr)
980+{
981+ return phydev->mii_ts->hwtstamp(phydev->mii_ts, ifr);
982+}
983+
984+static inline bool phy_rxtstamp(struct phy_device *phydev, struct sk_buff *skb,
985+ int type)
986+{
987+ return phydev->mii_ts->rxtstamp(phydev->mii_ts, skb, type);
988+}
989+
990+static inline int phy_ts_info(struct phy_device *phydev,
991+ struct ethtool_ts_info *tsinfo)
992+{
993+ return phydev->mii_ts->ts_info(phydev->mii_ts, tsinfo);
994+}
995+
996+static inline void phy_txtstamp(struct phy_device *phydev, struct sk_buff *skb,
997+ int type)
998+{
999+ phydev->mii_ts->txtstamp(phydev->mii_ts, skb, type);
1000+}
1001+
9391002 /**
9401003 * phy_is_internal - Convenience function for testing if a PHY is internal
9411004 * @phydev: the phy_device struct
@@ -1088,17 +1151,21 @@ static inline void phy_unlock_mdio_bus(struct phy_device *phydev) · 146 unmodified lines
10881151
10891152 void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
10901153 __printf(2, 3);
1154+char *phy_attached_info_irq(struct phy_device *phydev)
1155+ __malloc;
10911156 void phy_attached_info(struct phy_device *phydev);
10921157
10931158 /* Clause 22 PHY */
10941159 int genphy_read_abilities(struct phy_device *phydev);
10951160 int genphy_setup_forced(struct phy_device *phydev);
10961161 int genphy_restart_aneg(struct phy_device *phydev);
1162+int genphy_check_and_restart_aneg(struct phy_device *phydev, bool restart);
10971163 int genphy_config_eee_advert(struct phy_device *phydev);
10981164 int __genphy_config_aneg(struct phy_device *phydev, bool changed);
10991165 int genphy_aneg_done(struct phy_device *phydev);
11001166 int genphy_update_link(struct phy_device *phydev);
11011167 int genphy_read_lpa(struct phy_device *phydev);
1168+int genphy_read_status_fixed(struct phy_device *phydev);
11021169 int genphy_read_status(struct phy_device *phydev);
11031170 int genphy_suspend(struct phy_device *phydev);
11041171 int genphy_resume(struct phy_device *phydev);
@@ -1175,6 +1242,8 @@ void phy_ethtool_ksettings_get(struct phy_device *phydev, · 70 unmodified lines
11751242 int phy_ethtool_ksettings_set(struct phy_device *phydev,
11761243 const struct ethtool_link_ksettings *cmd);
11771244 int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd);
1245+int phy_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
1246+int phy_do_ioctl_running(struct net_device *dev, struct ifreq *ifr, int cmd);
11781247 void phy_request_interrupt(struct phy_device *phydev);
11791248 void phy_free_interrupt(struct phy_device *phydev);
11801249 void phy_print_status(struct phy_device *phydev);
include/linux/phylink.h+2−0
@@ -63,10 +63,12 @@ enum phylink_op_type { · 62 unmodified lines
6363 * struct phylink_config - PHYLINK configuration structure
6464 * @dev: a pointer to a struct device associated with the MAC
6565 * @type: operation type of PHYLINK instance
66+ * @pcs_poll: MAC PCS cannot provide link change interrupt
6667 */
6768 struct phylink_config {
6869 struct device *dev;
6970 enum phylink_op_type type;
71+ bool pcs_poll;
7072 };
7173
7274 /**
include/linux/platform_data/eth_ixp4xx.h+19−0
@@ -0,0 +1,19 @@
1+/* SPDX-License-Identifier: GPL-2.0 */
2+#ifndef __PLATFORM_DATA_ETH_IXP4XX
3+#define __PLATFORM_DATA_ETH_IXP4XX
4+
5+#include <linux/types.h>
6+
7+#define IXP4XX_ETH_NPEA 0x00
8+#define IXP4XX_ETH_NPEB 0x10
9+#define IXP4XX_ETH_NPEC 0x20
10+
11+/* Information about built-in Ethernet MAC interfaces */
12+struct eth_plat_info {
13+ u8 phy; /* MII PHY ID, 0 - 31 */
14+ u8 rxq; /* configurable, currently 0 - 31 only */
15+ u8 txreadyq;
16+ u8 hwaddr[6];
17+};
18+
19+#endif
include/linux/platform_data/wan_ixp4xx_hss.h+17−0
@@ -0,0 +1,17 @@
1+/* SPDX-License-Identifier: GPL-2.0 */
2+#ifndef __PLATFORM_DATA_WAN_IXP4XX_HSS_H
3+#define __PLATFORM_DATA_WAN_IXP4XX_HSS_H
4+
5+#include <linux/types.h>
6+
7+/* Information about built-in HSS (synchronous serial) interfaces */
8+struct hss_plat_info {
9+ int (*set_clock)(int port, unsigned int clock_type);
10+ int (*open)(int port, void *pdev,
11+ void (*set_carrier_cb)(void *pdev, int carrier));
12+ void (*close)(int port, void *pdev);
13+ u8 txreadyq;
14+ u32 timer_freq;
15+};
16+
17+#endif
include/linux/ptp_clock_kernel.h+9−0
@@ -243,6 +243,13 @@ int ptp_find_pin(struct ptp_clock *ptp, · 242 unmodified lines
243243
244244 int ptp_schedule_worker(struct ptp_clock *ptp, unsigned long delay);
245245
246+/**
247+ * ptp_cancel_worker_sync() - cancel ptp auxiliary clock
248+ *
249+ * @ptp: The clock obtained from ptp_clock_register().
250+ */
251+void ptp_cancel_worker_sync(struct ptp_clock *ptp);
252+
246253 #else
247254 static inline struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
248255 struct device *parent)
@@ -260,6 +267,8 @@ static inline int ptp_find_pin(struct ptp_clock *ptp, · 11 unmodified lines
260267 static inline int ptp_schedule_worker(struct ptp_clock *ptp,
261268 unsigned long delay)
262269 { return -EOPNOTSUPP; }
270+static inline void ptp_cancel_worker_sync(struct ptp_clock *ptp)
271+{ }
263272
264273 #endif
265274
include/linux/ptr_ring.h+1−0
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 #include <linux/types.h>
2424 #include <linux/compiler.h>
2525 #include <linux/slab.h>
26+#include <linux/mm.h>
2627 #include <asm/errno.h>
2728 #endif
2829
include/linux/qed/common_hsi.h+29−15
@@ -76,7 +76,6 @@ · 75 unmodified lines
7676
7777 #define FW_ASSERT_GENERAL_ATTN_IDX 32
7878
79−#define MAX_PINNED_CCFC 32
8079
8180 /* Queue Zone sizes in bytes */
8281 #define TSTORM_QZONE_SIZE 8
@@ -105,12 +104,19 @@ · 22 unmodified lines
105104
106105 #define CORE_SPQE_PAGE_SIZE_BYTES 4096
107106
108−#define MAX_NUM_LL2_RX_QUEUES 48
109−#define MAX_NUM_LL2_TX_STATS_COUNTERS 48
107+/* Number of LL2 RAM based queues */
108+#define MAX_NUM_LL2_RX_RAM_QUEUES 32
109+
110+/* Number of LL2 context based queues */
111+#define MAX_NUM_LL2_RX_CTX_QUEUES 208
112+#define MAX_NUM_LL2_RX_QUEUES \
113+ (MAX_NUM_LL2_RX_RAM_QUEUES + MAX_NUM_LL2_RX_CTX_QUEUES)
114+
115+#define MAX_NUM_LL2_TX_STATS_COUNTERS 48
110116
111117 #define FW_MAJOR_VERSION 8
112−#define FW_MINOR_VERSION 37
113−#define FW_REVISION_VERSION 7
118+#define FW_MINOR_VERSION 42
119+#define FW_REVISION_VERSION 2
114120 #define FW_ENGINEERING_VERSION 0
115121
116122 /***********************/
@@ -132,10 +138,10 @@ · 15 unmodified lines
132138 #define MAX_NUM_VFS (MAX_NUM_VFS_K2)
133139
134140 #define MAX_NUM_FUNCTIONS_BB (MAX_NUM_PFS_BB + MAX_NUM_VFS_BB)
135−#define MAX_NUM_FUNCTIONS (MAX_NUM_PFS + MAX_NUM_VFS)
136141
137142 #define MAX_FUNCTION_NUMBER_BB (MAX_NUM_PFS + MAX_NUM_VFS_BB)
138−#define MAX_FUNCTION_NUMBER (MAX_NUM_PFS + MAX_NUM_VFS)
143+#define MAX_FUNCTION_NUMBER_K2 (MAX_NUM_PFS + MAX_NUM_VFS_K2)
144+#define MAX_NUM_FUNCTIONS (MAX_FUNCTION_NUMBER_K2)
139145
140146 #define MAX_NUM_VPORTS_K2 (208)
141147 #define MAX_NUM_VPORTS_BB (160)
@@ -222,6 +228,7 @@ · 80 unmodified lines
222228 #define DQ_XCM_TOE_TX_BD_PROD_CMD DQ_XCM_AGG_VAL_SEL_WORD4
223229 #define DQ_XCM_TOE_MORE_TO_SEND_SEQ_CMD DQ_XCM_AGG_VAL_SEL_REG3
224230 #define DQ_XCM_TOE_LOCAL_ADV_WND_SEQ_CMD DQ_XCM_AGG_VAL_SEL_REG4
231+#define DQ_XCM_ROCE_ACK_EDPM_DORQ_SEQ_CMD DQ_XCM_AGG_VAL_SEL_WORD5
225232
226233 /* UCM agg val selection (HW) */
227234 #define DQ_UCM_AGG_VAL_SEL_WORD0 0
@@ -340,6 +347,10 @@ · 112 unmodified lines
340347 #define DQ_PWM_OFFSET_TCM_ROCE_RQ_PROD (DQ_PWM_OFFSET_TCM16_BASE + 1)
341348 #define DQ_PWM_OFFSET_TCM_IWARP_RQ_PROD (DQ_PWM_OFFSET_TCM16_BASE + 3)
342349
350+/* DQ_DEMS_AGG_VAL_BASE */
351+#define DQ_PWM_OFFSET_TCM_LL2_PROD_UPDATE \
352+ (DQ_PWM_OFFSET_TCM32_BASE + DQ_TCM_AGG_VAL_SEL_REG9 - 4)
353+
343354 #define DQ_REGION_SHIFT (12)
344355
345356 /* DPM */
@@ -395,6 +406,7 @@ · 49 unmodified lines
395406
396407 /* Number of Protocol Indices per Status Block */
397408 #define PIS_PER_SB_E4 12
409+#define MAX_PIS_PER_SB PIS_PER_SB
398410
399411 #define CAU_HC_STOPPED_STATE 3
400412 #define CAU_HC_DISABLE_STATE 4
@@ -425,8 +437,6 @@ · 24 unmodified lines
425437 #define IGU_MEM_PBA_MSIX_RESERVED_UPPER 0x03ff
426438
427439 #define IGU_CMD_INT_ACK_BASE 0x0400
428−#define IGU_CMD_INT_ACK_UPPER (IGU_CMD_INT_ACK_BASE + \
429− MAX_TOT_SB_PER_PATH - 1)
430440 #define IGU_CMD_INT_ACK_RESERVED_UPPER 0x05ff
431441
432442 #define IGU_CMD_ATTN_BIT_UPD_UPPER 0x05f0
@@ -439,8 +449,6 @@ · 6 unmodified lines
439449 #define IGU_REG_SISR_MDPC_WOMASK_UPPER 0x05f6
440450
441451 #define IGU_CMD_PROD_UPD_BASE 0x0600
442−#define IGU_CMD_PROD_UPD_UPPER (IGU_CMD_PROD_UPD_BASE +\
443− MAX_TOT_SB_PER_PATH - 1)
444452 #define IGU_CMD_PROD_UPD_RESERVED_UPPER 0x07ff
445453
446454 /*****************/
@@ -652,8 +660,8 @@ · 205 unmodified lines
652660 #define PBF_MAX_CMD_LINES 3328
653661
654662 /* Number of BTB blocks. Each block is 256B. */
655−#define BTB_MAX_BLOCKS 1440
656−
663+#define BTB_MAX_BLOCKS_BB 1440
664+#define BTB_MAX_BLOCKS_K2 1840
657665 /*****************/
658666 /* PRS CONSTANTS */
659667 /*****************/
@@ -730,6 +738,8 @@ enum protocol_type { · 70 unmodified lines
730738 PROTOCOLID_PREROCE,
731739 PROTOCOLID_COMMON,
732740 PROTOCOLID_RESERVED1,
741+ PROTOCOLID_RDMA,
742+ PROTOCOLID_SCSI,
733743 MAX_PROTOCOL_TYPE
734744 };
735745
@@ -750,6 +760,10 @@ union rdma_eqe_data { · 14 unmodified lines
750760 struct rdma_eqe_destroy_qp rdma_destroy_qp_data;
751761 };
752762
763+struct tstorm_queue_zone {
764+ __le32 reserved[2];
765+};
766+
753767 /* Ustorm Queue Zone */
754768 struct ustorm_eth_queue_zone {
755769 struct coalescing_timeset int_coalescing_timeset;
@@ -872,8 +886,8 @@ struct db_l2_dpm_data { · 116 unmodified lines
872886 #define DB_L2_DPM_DATA_RESERVED0_SHIFT 27
873887 #define DB_L2_DPM_DATA_SGE_NUM_MASK 0x7
874888 #define DB_L2_DPM_DATA_SGE_NUM_SHIFT 28
875−#define DB_L2_DPM_DATA_GFS_SRC_EN_MASK 0x1
876−#define DB_L2_DPM_DATA_GFS_SRC_EN_SHIFT 31
889+#define DB_L2_DPM_DATA_TGFS_SRC_EN_MASK 0x1
890+#define DB_L2_DPM_DATA_TGFS_SRC_EN_SHIFT 31
877891 };
878892
879893 /* Structure for SGE in a DPM doorbell of type DPM_L2_BD */
include/linux/qed/eth_common.h+56−22
@@ -38,9 +38,11 @@ · 37 unmodified lines
3838 /********************/
3939
4040 #define ETH_HSI_VER_MAJOR 3
41−#define ETH_HSI_VER_MINOR 10
41+#define ETH_HSI_VER_MINOR 11
4242
43−#define ETH_HSI_VER_NO_PKT_LEN_TUNN 5
43+#define ETH_HSI_VER_NO_PKT_LEN_TUNN 5
44+/* Maximum number of pinned L2 connections (CIDs) */
45+#define ETH_PINNED_CONN_MAX_NUM 32
4446
4547 #define ETH_CACHE_LINE_SIZE 64
4648 #define ETH_RX_CQE_GAP 32
@@ -61,6 +63,7 @@ · 14 unmodified lines
6163 #define ETH_TX_MIN_BDS_PER_TUNN_IPV6_WITH_EXT_PKT 3
6264 #define ETH_TX_MIN_BDS_PER_IPV6_WITH_EXT_PKT 2
6365 #define ETH_TX_MIN_BDS_PER_PKT_W_LOOPBACK_MODE 2
66+#define ETH_TX_MIN_BDS_PER_PKT_W_VPORT_FORWARDING 4
6467 #define ETH_TX_MAX_NON_LSO_PKT_LEN (9700 - (4 + 4 + 12 + 8))
6568 #define ETH_TX_MAX_LSO_HDR_BYTES 510
6669 #define ETH_TX_LSO_WINDOW_BDS_NUM (18 - 1)
@@ -75,9 +78,8 @@ · 8 unmodified lines
7578 #define ETH_NUM_STATISTIC_COUNTERS_QUAD_VF_ZONE \
7679 (ETH_NUM_STATISTIC_COUNTERS - 3 * MAX_NUM_VFS / 4)
7780
78−/* Maximum number of buffers, used for RX packet placement */
7981 #define ETH_RX_MAX_BUFF_PER_PKT 5
80−#define ETH_RX_BD_THRESHOLD 12
82+#define ETH_RX_BD_THRESHOLD 16
8183
8284 /* Num of MAC/VLAN filters */
8385 #define ETH_NUM_MAC_FILTERS 512
@@ -96,24 +98,24 @@ · 12 unmodified lines
9698 #define ETH_RSS_ENGINE_NUM_BB 127
9799
98100 /* TPA constants */
99−#define ETH_TPA_MAX_AGGS_NUM 64
100−#define ETH_TPA_CQE_START_LEN_LIST_SIZE ETH_RX_MAX_BUFF_PER_PKT
101−#define ETH_TPA_CQE_CONT_LEN_LIST_SIZE 6
102−#define ETH_TPA_CQE_END_LEN_LIST_SIZE 4
101+#define ETH_TPA_MAX_AGGS_NUM 64
102+#define ETH_TPA_CQE_START_BW_LEN_LIST_SIZE 2
103+#define ETH_TPA_CQE_CONT_LEN_LIST_SIZE 6
104+#define ETH_TPA_CQE_END_LEN_LIST_SIZE 4
103105
104106 /* Control frame check constants */
105−#define ETH_CTL_FRAME_ETH_TYPE_NUM 4
107+#define ETH_CTL_FRAME_ETH_TYPE_NUM 4
106108
107109 /* GFS constants */
108110 #define ETH_GFT_TRASHCAN_VPORT 0x1FF /* GFT drop flow vport number */
109111
110112 /* Destination port mode */
111−enum dest_port_mode {
112− DEST_PORT_PHY,
113− DEST_PORT_LOOPBACK,
114− DEST_PORT_PHY_LOOPBACK,
115− DEST_PORT_DROP,
116− MAX_DEST_PORT_MODE
113+enum dst_port_mode {
114+ DST_PORT_PHY,
115+ DST_PORT_LOOPBACK,
116+ DST_PORT_PHY_LOOPBACK,
117+ DST_PORT_DROP,
118+ MAX_DST_PORT_MODE
117119 };
118120
119121 /* Ethernet address type */
@@ -167,8 +169,8 @@ struct eth_tx_data_2nd_bd { · 47 unmodified lines
167169 #define ETH_TX_DATA_2ND_BD_TUNN_INNER_L2_HDR_SIZE_W_SHIFT 0
168170 #define ETH_TX_DATA_2ND_BD_TUNN_INNER_ETH_TYPE_MASK 0x3
169171 #define ETH_TX_DATA_2ND_BD_TUNN_INNER_ETH_TYPE_SHIFT 4
170−#define ETH_TX_DATA_2ND_BD_DEST_PORT_MODE_MASK 0x3
171−#define ETH_TX_DATA_2ND_BD_DEST_PORT_MODE_SHIFT 6
172+#define ETH_TX_DATA_2ND_BD_DST_PORT_MODE_MASK 0x3
173+#define ETH_TX_DATA_2ND_BD_DST_PORT_MODE_SHIFT 6
172174 #define ETH_TX_DATA_2ND_BD_START_BD_MASK 0x1
173175 #define ETH_TX_DATA_2ND_BD_START_BD_SHIFT 8
174176 #define ETH_TX_DATA_2ND_BD_TUNN_TYPE_MASK 0x3
@@ -244,8 +246,9 @@ struct eth_fast_path_rx_reg_cqe { · 69 unmodified lines
244246 struct eth_tunnel_parsing_flags tunnel_pars_flags;
245247 u8 bd_num;
246248 u8 reserved;
247− __le16 flow_id;
248− u8 reserved1[11];
249+ __le16 reserved2;
250+ __le32 flow_id_or_resource_id;
251+ u8 reserved1[7];
249252 struct eth_pmd_flow_flags pmd_flags;
250253 };
251254
@@ -296,9 +299,10 @@ struct eth_fast_path_rx_tpa_start_cqe { · 44 unmodified lines
296299 struct eth_tunnel_parsing_flags tunnel_pars_flags;
297300 u8 tpa_agg_index;
298301 u8 header_len;
299− __le16 ext_bd_len_list[ETH_TPA_CQE_START_LEN_LIST_SIZE];
300− __le16 flow_id;
301− u8 reserved;
302+ __le16 bw_ext_bd_len_list[ETH_TPA_CQE_START_BW_LEN_LIST_SIZE];
303+ __le16 reserved2;
304+ __le32 flow_id_or_resource_id;
305+ u8 reserved[3];
302306 struct eth_pmd_flow_flags pmd_flags;
303307 };
304308
@@ -407,6 +411,29 @@ struct eth_tx_3rd_bd { · 102 unmodified lines
407411 struct eth_tx_data_3rd_bd data;
408412 };
409413
414+/* The parsing information data for the forth tx bd of a given packet. */
415+struct eth_tx_data_4th_bd {
416+ u8 dst_vport_id;
417+ u8 reserved4;
418+ __le16 bitfields;
419+#define ETH_TX_DATA_4TH_BD_DST_VPORT_ID_VALID_MASK 0x1
420+#define ETH_TX_DATA_4TH_BD_DST_VPORT_ID_VALID_SHIFT 0
421+#define ETH_TX_DATA_4TH_BD_RESERVED1_MASK 0x7F
422+#define ETH_TX_DATA_4TH_BD_RESERVED1_SHIFT 1
423+#define ETH_TX_DATA_4TH_BD_START_BD_MASK 0x1
424+#define ETH_TX_DATA_4TH_BD_START_BD_SHIFT 8
425+#define ETH_TX_DATA_4TH_BD_RESERVED2_MASK 0x7F
426+#define ETH_TX_DATA_4TH_BD_RESERVED2_SHIFT 9
427+ __le16 reserved3;
428+};
429+
430+/* The forth tx bd of a given packet */
431+struct eth_tx_4th_bd {
432+ struct regpair addr; /* Single continuous buffer */
433+ __le16 nbytes; /* Number of bytes in this BD */
434+ struct eth_tx_data_4th_bd data; /* Parsing information data */
435+};
436+
410437 /* Complementary information for the regular tx bd of a given packet */
411438 struct eth_tx_data_bd {
412439 __le16 reserved0;
@@ -431,6 +458,7 @@ union eth_tx_bd_types { · 18 unmodified lines
431458 struct eth_tx_1st_bd first_bd;
432459 struct eth_tx_2nd_bd second_bd;
433460 struct eth_tx_3rd_bd third_bd;
461+ struct eth_tx_4th_bd fourth_bd;
434462 struct eth_tx_bd reg_bd;
435463 };
436464
@@ -443,6 +471,12 @@ enum eth_tx_tunn_type { · 6 unmodified lines
443471 MAX_ETH_TX_TUNN_TYPE
444472 };
445473
474+/* Mstorm Queue Zone */
475+struct mstorm_eth_queue_zone {
476+ struct eth_rx_prod_data rx_producers;
477+ __le32 reserved[3];
478+};
479+
446480 /* Ystorm Queue Zone */
447481 struct xstorm_eth_queue_zone {
448482 struct coalescing_timeset int_coalescing_timeset;
include/linux/qed/iscsi_common.h+24−40
@@ -999,7 +999,6 @@ struct iscsi_conn_offload_params { · 998 unmodified lines
999999 struct regpair r2tq_pbl_addr;
10001000 struct regpair xhq_pbl_addr;
10011001 struct regpair uhq_pbl_addr;
1002− __le32 initial_ack;
10031002 __le16 physical_q0;
10041003 __le16 physical_q1;
10051004 u8 flags;
@@ -1011,10 +1010,10 @@ struct iscsi_conn_offload_params { · 5 unmodified lines
10111010 #define ISCSI_CONN_OFFLOAD_PARAMS_RESTRICTED_MODE_SHIFT 2
10121011 #define ISCSI_CONN_OFFLOAD_PARAMS_RESERVED1_MASK 0x1F
10131012 #define ISCSI_CONN_OFFLOAD_PARAMS_RESERVED1_SHIFT 3
1014− u8 pbl_page_size_log;
1015− u8 pbe_page_size_log;
10161013 u8 default_cq;
1014+ __le16 reserved0;
10171015 __le32 stat_sn;
1016+ __le32 initial_ack;
10181017 };
10191018
10201019 /* iSCSI connection statistics */
@@ -1029,25 +1028,14 @@ struct iscsi_conn_stats_params { · 8 unmodified lines
10291028 __le32 reserved;
10301029 };
10311030
1032−/* spe message header */
1033−struct iscsi_slow_path_hdr {
1034− u8 op_code;
1035− u8 flags;
1036−#define ISCSI_SLOW_PATH_HDR_RESERVED0_MASK 0xF
1037−#define ISCSI_SLOW_PATH_HDR_RESERVED0_SHIFT 0
1038−#define ISCSI_SLOW_PATH_HDR_LAYER_CODE_MASK 0x7
1039−#define ISCSI_SLOW_PATH_HDR_LAYER_CODE_SHIFT 4
1040−#define ISCSI_SLOW_PATH_HDR_RESERVED1_MASK 0x1
1041−#define ISCSI_SLOW_PATH_HDR_RESERVED1_SHIFT 7
1042−};
10431031
10441032 /* iSCSI connection update params passed by driver to FW in ISCSI update
10451033 *ramrod.
10461034 */
10471035 struct iscsi_conn_update_ramrod_params {
1048− struct iscsi_slow_path_hdr hdr;
1036+ __le16 reserved0;
10491037 __le16 conn_id;
1050− __le32 fw_cid;
1038+ __le32 reserved1;
10511039 u8 flags;
10521040 #define ISCSI_CONN_UPDATE_RAMROD_PARAMS_HD_EN_MASK 0x1
10531041 #define ISCSI_CONN_UPDATE_RAMROD_PARAMS_HD_EN_SHIFT 0
@@ -1065,7 +1053,7 @@ struct iscsi_conn_update_ramrod_params { · 11 unmodified lines
10651053 #define ISCSI_CONN_UPDATE_RAMROD_PARAMS_DIF_ON_IMM_EN_SHIFT 6
10661054 #define ISCSI_CONN_UPDATE_RAMROD_PARAMS_LUN_MAPPER_EN_MASK 0x1
10671055 #define ISCSI_CONN_UPDATE_RAMROD_PARAMS_LUN_MAPPER_EN_SHIFT 7
1068− u8 reserved0[3];
1056+ u8 reserved3[3];
10691057 __le32 max_seq_size;
10701058 __le32 max_send_pdu_length;
10711059 __le32 max_recv_pdu_length;
@@ -1251,22 +1239,22 @@ enum iscsi_ramrod_cmd_id { · 179 unmodified lines
12511239
12521240 /* iSCSI connection termination request */
12531241 struct iscsi_spe_conn_mac_update {
1254− struct iscsi_slow_path_hdr hdr;
1242+ __le16 reserved0;
12551243 __le16 conn_id;
1256− __le32 fw_cid;
1244+ __le32 reserved1;
12571245 __le16 remote_mac_addr_lo;
12581246 __le16 remote_mac_addr_mid;
12591247 __le16 remote_mac_addr_hi;
1260− u8 reserved0[2];
1248+ u8 reserved2[2];
12611249 };
12621250
12631251 /* iSCSI and TCP connection (Option 1) offload params passed by driver to FW in
12641252 * iSCSI offload ramrod.
12651253 */
12661254 struct iscsi_spe_conn_offload {
1267− struct iscsi_slow_path_hdr hdr;
1255+ __le16 reserved0;
12681256 __le16 conn_id;
1269− __le32 fw_cid;
1257+ __le32 reserved1;
12701258 struct iscsi_conn_offload_params iscsi;
12711259 struct tcp_offload_params tcp;
12721260 };
@@ -1275,44 +1263,36 @@ struct iscsi_spe_conn_offload { · 2 unmodified lines
12751263 * iSCSI offload ramrod.
12761264 */
12771265 struct iscsi_spe_conn_offload_option2 {
1278− struct iscsi_slow_path_hdr hdr;
1266+ __le16 reserved0;
12791267 __le16 conn_id;
1280− __le32 fw_cid;
1268+ __le32 reserved1;
12811269 struct iscsi_conn_offload_params iscsi;
12821270 struct tcp_offload_params_opt2 tcp;
12831271 };
12841272
12851273 /* iSCSI collect connection statistics request */
12861274 struct iscsi_spe_conn_statistics {
1287− struct iscsi_slow_path_hdr hdr;
1275+ __le16 reserved0;
12881276 __le16 conn_id;
1289− __le32 fw_cid;
1277+ __le32 reserved1;
12901278 u8 reset_stats;
1291− u8 reserved0[7];
1279+ u8 reserved2[7];
12921280 struct regpair stats_cnts_addr;
12931281 };
12941282
12951283 /* iSCSI connection termination request */
12961284 struct iscsi_spe_conn_termination {
1297− struct iscsi_slow_path_hdr hdr;
1285+ __le16 reserved0;
12981286 __le16 conn_id;
1299− __le32 fw_cid;
1287+ __le32 reserved1;
13001288 u8 abortive;
1301− u8 reserved0[7];
1289+ u8 reserved2[7];
13021290 struct regpair queue_cnts_addr;
13031291 struct regpair query_params_addr;
13041292 };
13051293
1306−/* iSCSI firmware function destroy parameters */
1307−struct iscsi_spe_func_dstry {
1308− struct iscsi_slow_path_hdr hdr;
1309− __le16 reserved0;
1310− __le32 reserved1;
1311−};
1312−
13131294 /* iSCSI firmware function init parameters */
13141295 struct iscsi_spe_func_init {
1315− struct iscsi_slow_path_hdr hdr;
13161296 __le16 half_way_close_timeout;
13171297 u8 num_sq_pages_in_ring;
13181298 u8 num_r2tq_pages_in_ring;
@@ -1324,8 +1304,12 @@ struct iscsi_spe_func_init { · 5 unmodified lines
13241304 #define ISCSI_SPE_FUNC_INIT_RESERVED0_MASK 0x7F
13251305 #define ISCSI_SPE_FUNC_INIT_RESERVED0_SHIFT 1
13261306 struct iscsi_debug_modes debug_mode;
1327− __le16 reserved1;
1328− __le32 reserved2;
1307+ u8 params;
1308+#define ISCSI_SPE_FUNC_INIT_MAX_SYN_RT_MASK 0xF
1309+#define ISCSI_SPE_FUNC_INIT_MAX_SYN_RT_SHIFT 0
1310+#define ISCSI_SPE_FUNC_INIT_RESERVED1_MASK 0xF
1311+#define ISCSI_SPE_FUNC_INIT_RESERVED1_SHIFT 4
1312+ u8 reserved2[7];
13291313 struct scsi_init_func_params func_params;
13301314 struct scsi_init_func_queues q_params;
13311315 };
include/linux/qed/qed_if.h+13−1
@@ -159,6 +159,7 @@ struct qed_dcbx_get { · 158 unmodified lines
159159 enum qed_nvm_images {
160160 QED_NVM_IMAGE_ISCSI_CFG,
161161 QED_NVM_IMAGE_FCOE_CFG,
162+ QED_NVM_IMAGE_MDUMP,
162163 QED_NVM_IMAGE_NVM_CFG1,
163164 QED_NVM_IMAGE_DEFAULT_CFG,
164165 QED_NVM_IMAGE_NVM_META,
@@ -463,7 +464,7 @@ enum qed_db_rec_space { · 298 unmodified lines
463464
464465 #define DIRECT_REG_RD(reg_addr) readl((void __iomem *)(reg_addr))
465466
466−#define DIRECT_REG_WR64(reg_addr, val) writeq((u32)val, \
467+#define DIRECT_REG_WR64(reg_addr, val) writeq((u64)val, \
467468 (void __iomem *)(reg_addr))
468469
469470 #define QED_COALESCE_MAX 0x1FF
@@ -1177,6 +1178,17 @@ struct qed_common_ops { · 707 unmodified lines
11771178 #define GET_FIELD(value, name) \
11781179 (((value) >> (name ## _SHIFT)) & name ## _MASK)
11791180
1181+#define GET_MFW_FIELD(name, field) \
1182+ (((name) & (field ## _MASK)) >> (field ## _OFFSET))
1183+
1184+#define SET_MFW_FIELD(name, field, value) \
1185+ do { \
1186+ (name) &= ~(field ## _MASK); \
1187+ (name) |= (((value) << (field ## _OFFSET)) & (field ## _MASK));\
1188+ } while (0)
1189+
1190+#define DB_ADDR_SHIFT(addr) ((addr) << DB_PWM_ADDR_OFFSET_SHIFT)
1191+
11801192 /* Debug print definitions */
11811193 #define DP_ERR(cdev, fmt, ...) \
11821194 do { \
include/linux/qed/qed_ll2_if.h+7−0
@@ -52,6 +52,12 @@ enum qed_ll2_conn_type { · 51 unmodified lines
5252 QED_LL2_TYPE_ROCE,
5353 QED_LL2_TYPE_IWARP,
5454 QED_LL2_TYPE_RESERVED3,
55+ MAX_QED_LL2_CONN_TYPE
56+};
57+
58+enum qed_ll2_rx_conn_type {
59+ QED_LL2_RX_TYPE_LEGACY,
60+ QED_LL2_RX_TYPE_CTX,
5561 MAX_QED_LL2_RX_CONN_TYPE
5662 };
5763
@@ -165,6 +171,7 @@ struct qed_ll2_cbs { · 107 unmodified lines
165171 };
166172
167173 struct qed_ll2_acquire_data_inputs {
174+ enum qed_ll2_rx_conn_type rx_conn_type;
168175 enum qed_ll2_conn_type conn_type;
169176 u16 mtu;
170177 u16 rx_num_desc;
include/linux/qed/storage_common.h+2−1
@@ -107,8 +107,9 @@ struct scsi_drv_cmdq { · 106 unmodified lines
107107 struct scsi_init_func_params {
108108 __le16 num_tasks;
109109 u8 log_page_size;
110+ u8 log_page_size_conn;
110111 u8 debug_mode;
111− u8 reserved2[12];
112+ u8 reserved2[11];
112113 };
113114
114115 /* SCSI RQ/CQ/CMDQ firmware function init parameters */
include/linux/sfp.h+66−29
@@ -275,6 +275,61 @@ struct sfp_diag { · 274 unmodified lines
275275 __be16 cal_v_offset;
276276 } __packed;
277277
278+/* SFF8024 defined constants */
279+enum {
280+ SFF8024_ID_UNK = 0x00,
281+ SFF8024_ID_SFF_8472 = 0x02,
282+ SFF8024_ID_SFP = 0x03,
283+ SFF8024_ID_DWDM_SFP = 0x0b,
284+ SFF8024_ID_QSFP_8438 = 0x0c,
285+ SFF8024_ID_QSFP_8436_8636 = 0x0d,
286+ SFF8024_ID_QSFP28_8636 = 0x11,
287+
288+ SFF8024_ENCODING_UNSPEC = 0x00,
289+ SFF8024_ENCODING_8B10B = 0x01,
290+ SFF8024_ENCODING_4B5B = 0x02,
291+ SFF8024_ENCODING_NRZ = 0x03,
292+ SFF8024_ENCODING_8472_MANCHESTER= 0x04,
293+ SFF8024_ENCODING_8472_SONET = 0x05,
294+ SFF8024_ENCODING_8472_64B66B = 0x06,
295+ SFF8024_ENCODING_8436_MANCHESTER= 0x06,
296+ SFF8024_ENCODING_8436_SONET = 0x04,
297+ SFF8024_ENCODING_8436_64B66B = 0x05,
298+ SFF8024_ENCODING_256B257B = 0x07,
299+ SFF8024_ENCODING_PAM4 = 0x08,
300+
301+ SFF8024_CONNECTOR_UNSPEC = 0x00,
302+ /* codes 01-05 not supportable on SFP, but some modules have single SC */
303+ SFF8024_CONNECTOR_SC = 0x01,
304+ SFF8024_CONNECTOR_FIBERJACK = 0x06,
305+ SFF8024_CONNECTOR_LC = 0x07,
306+ SFF8024_CONNECTOR_MT_RJ = 0x08,
307+ SFF8024_CONNECTOR_MU = 0x09,
308+ SFF8024_CONNECTOR_SG = 0x0a,
309+ SFF8024_CONNECTOR_OPTICAL_PIGTAIL= 0x0b,
310+ SFF8024_CONNECTOR_MPO_1X12 = 0x0c,
311+ SFF8024_CONNECTOR_MPO_2X16 = 0x0d,
312+ SFF8024_CONNECTOR_HSSDC_II = 0x20,
313+ SFF8024_CONNECTOR_COPPER_PIGTAIL= 0x21,
314+ SFF8024_CONNECTOR_RJ45 = 0x22,
315+ SFF8024_CONNECTOR_NOSEPARATE = 0x23,
316+ SFF8024_CONNECTOR_MXC_2X16 = 0x24,
317+
318+ SFF8024_ECC_UNSPEC = 0x00,
319+ SFF8024_ECC_100G_25GAUI_C2M_AOC = 0x01,
320+ SFF8024_ECC_100GBASE_SR4_25GBASE_SR = 0x02,
321+ SFF8024_ECC_100GBASE_LR4_25GBASE_LR = 0x03,
322+ SFF8024_ECC_100GBASE_ER4_25GBASE_ER = 0x04,
323+ SFF8024_ECC_100GBASE_SR10 = 0x05,
324+ SFF8024_ECC_100GBASE_CR4 = 0x0b,
325+ SFF8024_ECC_25GBASE_CR_S = 0x0c,
326+ SFF8024_ECC_25GBASE_CR_N = 0x0d,
327+ SFF8024_ECC_10GBASE_T_SFI = 0x16,
328+ SFF8024_ECC_10GBASE_T_SR = 0x1c,
329+ SFF8024_ECC_5GBASE_T = 0x1d,
330+ SFF8024_ECC_2_5GBASE_T = 0x1e,
331+};
332+
278333 /* SFP EEPROM registers */
279334 enum {
280335 SFP_PHYS_ID = 0x00,
@@ -309,34 +364,7 @@ enum { · 28 unmodified lines
309364 SFP_SFF8472_COMPLIANCE = 0x5e,
310365 SFP_CC_EXT = 0x5f,
311366
312− SFP_PHYS_ID_SFF = 0x02,
313− SFP_PHYS_ID_SFP = 0x03,
314367 SFP_PHYS_EXT_ID_SFP = 0x04,
315− SFP_CONNECTOR_UNSPEC = 0x00,
316− /* codes 01-05 not supportable on SFP, but some modules have single SC */
317− SFP_CONNECTOR_SC = 0x01,
318− SFP_CONNECTOR_FIBERJACK = 0x06,
319− SFP_CONNECTOR_LC = 0x07,
320− SFP_CONNECTOR_MT_RJ = 0x08,
321− SFP_CONNECTOR_MU = 0x09,
322− SFP_CONNECTOR_SG = 0x0a,
323− SFP_CONNECTOR_OPTICAL_PIGTAIL = 0x0b,
324− SFP_CONNECTOR_MPO_1X12 = 0x0c,
325− SFP_CONNECTOR_MPO_2X16 = 0x0d,
326− SFP_CONNECTOR_HSSDC_II = 0x20,
327− SFP_CONNECTOR_COPPER_PIGTAIL = 0x21,
328− SFP_CONNECTOR_RJ45 = 0x22,
329− SFP_CONNECTOR_NOSEPARATE = 0x23,
330− SFP_CONNECTOR_MXC_2X16 = 0x24,
331− SFP_ENCODING_UNSPEC = 0x00,
332− SFP_ENCODING_8B10B = 0x01,
333− SFP_ENCODING_4B5B = 0x02,
334− SFP_ENCODING_NRZ = 0x03,
335− SFP_ENCODING_8472_MANCHESTER = 0x04,
336− SFP_ENCODING_8472_SONET = 0x05,
337− SFP_ENCODING_8472_64B66B = 0x06,
338− SFP_ENCODING_256B257B = 0x07,
339− SFP_ENCODING_PAM4 = 0x08,
340368 SFP_OPTIONS_HIGH_POWER_LEVEL = BIT(13),
341369 SFP_OPTIONS_PAGING_A2 = BIT(12),
342370 SFP_OPTIONS_RETIMER = BIT(11),
@@ -479,6 +507,8 @@ struct sfp_bus; · 136 unmodified lines
479507 * @module_insert: called after a module has been detected to determine
480508 * whether the module is supported for the upstream device.
481509 * @module_remove: called after the module has been removed.
510+ * @module_start: called after the PHY probe step
511+ * @module_stop: called before the PHY is removed
482512 * @link_down: called when the link is non-operational for whatever
483513 * reason.
484514 * @link_up: called when the link is operational.
@@ -492,6 +522,8 @@ struct sfp_upstream_ops { · 7 unmodified lines
492522 void (*detach)(void *priv, struct sfp_bus *bus);
493523 int (*module_insert)(void *priv, const struct sfp_eeprom_id *id);
494524 void (*module_remove)(void *priv);
525+ int (*module_start)(void *priv);
526+ void (*module_stop)(void *priv);
495527 void (*link_down)(void *priv);
496528 void (*link_up)(void *priv);
497529 int (*connect_phy)(void *priv, struct phy_device *);
@@ -501,10 +533,10 @@ struct sfp_upstream_ops { · 3 unmodified lines
501533 #if IS_ENABLED(CONFIG_SFP)
502534 int sfp_parse_port(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
503535 unsigned long *support);
536+bool sfp_may_have_phy(struct sfp_bus *bus, const struct sfp_eeprom_id *id);
504537 void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
505538 unsigned long *support);
506539 phy_interface_t sfp_select_interface(struct sfp_bus *bus,
507− const struct sfp_eeprom_id *id,
508540 unsigned long *link_modes);
509541
510542 int sfp_get_module_info(struct sfp_bus *bus, struct ethtool_modinfo *modinfo);
@@ -525,6 +557,12 @@ static inline int sfp_parse_port(struct sfp_bus *bus, · 14 unmodified lines
525557 return PORT_OTHER;
526558 }
527559
560+static inline bool sfp_may_have_phy(struct sfp_bus *bus,
561+ const struct sfp_eeprom_id *id)
562+{
563+ return false;
564+}
565+
528566 static inline void sfp_parse_support(struct sfp_bus *bus,
529567 const struct sfp_eeprom_id *id,
530568 unsigned long *support)
@@ -532,7 +570,6 @@ static inline void sfp_parse_support(struct sfp_bus *bus, · 1 unmodified line
532570 }
533571
534572 static inline phy_interface_t sfp_select_interface(struct sfp_bus *bus,
535− const struct sfp_eeprom_id *id,
536573 unsigned long *link_modes)
537574 {
538575 return PHY_INTERFACE_MODE_NA;
include/linux/skbuff.h+23−3
@@ -592,6 +592,8 @@ enum { · 591 unmodified lines
592592 SKB_GSO_UDP = 1 << 16,
593593
594594 SKB_GSO_UDP_L4 = 1 << 17,
595+
596+ SKB_GSO_FRAGLIST = 1 << 18,
595597 };
596598
597599 #if BITS_PER_LONG > 32
@@ -1478,6 +1480,11 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb) · 880 unmodified lines
14781480 skb->next = NULL;
14791481 }
14801482
1483+/* Iterate through singly-linked GSO fragments of an skb. */
1484+#define skb_list_walk_safe(first, skb, next_skb) \
1485+ for ((skb) = (first), (next_skb) = (skb) ? (skb)->next : NULL; (skb); \
1486+ (skb) = (next_skb), (next_skb) = (skb) ? (skb)->next : NULL)
1487+
14811488 static inline void skb_list_del_init(struct sk_buff *skb)
14821489 {
14831490 __list_del_entry(&skb->list);
@@ -3459,7 +3466,8 @@ static inline void skb_frag_list_init(struct sk_buff *skb) · 1975 unmodified lines
34593466 for (iter = skb_shinfo(skb)->frag_list; iter; iter = iter->next)
34603467
34613468
3462−int __skb_wait_for_more_packets(struct sock *sk, int *err, long *timeo_p,
3469+int __skb_wait_for_more_packets(struct sock *sk, struct sk_buff_head *queue,
3470+ int *err, long *timeo_p,
34633471 const struct sk_buff *skb);
34643472 struct sk_buff *__skb_try_recv_from_queue(struct sock *sk,
34653473 struct sk_buff_head *queue,
@@ -3468,12 +3476,16 @@ struct sk_buff *__skb_try_recv_from_queue(struct sock *sk, · 2 unmodified lines
34683476 struct sk_buff *skb),
34693477 int *off, int *err,
34703478 struct sk_buff **last);
3471−struct sk_buff *__skb_try_recv_datagram(struct sock *sk, unsigned flags,
3479+struct sk_buff *__skb_try_recv_datagram(struct sock *sk,
3480+ struct sk_buff_head *queue,
3481+ unsigned int flags,
34723482 void (*destructor)(struct sock *sk,
34733483 struct sk_buff *skb),
34743484 int *off, int *err,
34753485 struct sk_buff **last);
3476−struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags,
3486+struct sk_buff *__skb_recv_datagram(struct sock *sk,
3487+ struct sk_buff_head *sk_queue,
3488+ unsigned int flags,
34773489 void (*destructor)(struct sock *sk,
34783490 struct sk_buff *skb),
34793491 int *off, int *err);
@@ -3523,6 +3535,8 @@ void skb_scrub_packet(struct sk_buff *skb, bool xnet); · 43 unmodified lines
35233535 bool skb_gso_validate_network_len(const struct sk_buff *skb, unsigned int mtu);
35243536 bool skb_gso_validate_mac_len(const struct sk_buff *skb, unsigned int len);
35253537 struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features);
3538+struct sk_buff *skb_segment_list(struct sk_buff *skb, netdev_features_t features,
3539+ unsigned int offset);
35263540 struct sk_buff *skb_vlan_untag(struct sk_buff *skb);
35273541 int skb_ensure_writable(struct sk_buff *skb, int write_len);
35283542 int __skb_vlan_pop(struct sk_buff *skb, u16 *vlan_tci);
@@ -4091,6 +4105,9 @@ enum skb_ext_id { · 562 unmodified lines
40914105 #endif
40924106 #if IS_ENABLED(CONFIG_NET_TC_SKB_EXT)
40934107 TC_SKB_EXT,
4108+#endif
4109+#if IS_ENABLED(CONFIG_MPTCP)
4110+ SKB_EXT_MPTCP,
40944111 #endif
40954112 SKB_EXT_NUM, /* must be last */
40964113 };
@@ -4112,6 +4129,9 @@ struct skb_ext { · 15 unmodified lines
41124129 char data[0] __aligned(8);
41134130 };
41144131
4132+struct skb_ext *__skb_ext_alloc(void);
4133+void *__skb_ext_set(struct sk_buff *skb, enum skb_ext_id id,
4134+ struct skb_ext *ext);
41154135 void *skb_ext_add(struct sk_buff *skb, enum skb_ext_id id);
41164136 void __skb_ext_del(struct sk_buff *skb, enum skb_ext_id id);
41174137 void __skb_ext_put(struct skb_ext *ext);
include/linux/stmmac.h+14−0
@@ -109,6 +109,18 @@ struct stmmac_axi { · 108 unmodified lines
109109 bool axi_rb;
110110 };
111111
112+#define EST_GCL 1024
113+struct stmmac_est {
114+ int enable;
115+ u32 btr_offset[2];
116+ u32 btr[2];
117+ u32 ctr[2];
118+ u32 ter;
119+ u32 gcl_unaligned[EST_GCL];
120+ u32 gcl[EST_GCL];
121+ u32 gcl_size;
122+};
123+
112124 struct stmmac_rxq_cfg {
113125 u8 mode_to_use;
114126 u32 chan;
@@ -127,6 +139,7 @@ struct stmmac_txq_cfg { · 12 unmodified lines
127139 u32 low_credit;
128140 bool use_prio;
129141 u32 prio;
142+ int tbs_en;
130143 };
131144
132145 struct plat_stmmacenet_data {
@@ -139,6 +152,7 @@ struct plat_stmmacenet_data { · 6 unmodified lines
139152 struct device_node *phylink_node;
140153 struct device_node *mdio_node;
141154 struct stmmac_dma_cfg *dma_cfg;
155+ struct stmmac_est *est;
142156 int clk_csr;
143157 int has_gmac;
144158 int enh_desc;
include/linux/tcp.h+37−0
@@ -78,6 +78,27 @@ struct tcp_sack_block { · 77 unmodified lines
7878 #define TCP_SACK_SEEN (1 << 0) /*1 = peer is SACK capable, */
7979 #define TCP_DSACK_SEEN (1 << 2) /*1 = DSACK was received from peer*/
8080
81+#if IS_ENABLED(CONFIG_MPTCP)
82+struct mptcp_options_received {
83+ u64 sndr_key;
84+ u64 rcvr_key;
85+ u64 data_ack;
86+ u64 data_seq;
87+ u32 subflow_seq;
88+ u16 data_len;
89+ u8 mp_capable : 1,
90+ mp_join : 1,
91+ dss : 1;
92+ u8 use_map:1,
93+ dsn64:1,
94+ data_fin:1,
95+ use_ack:1,
96+ ack64:1,
97+ mpc_map:1,
98+ __unused:2;
99+};
100+#endif
101+
81102 struct tcp_options_received {
82103 /* PAWS/RTTM data */
83104 int ts_recent_stamp;/* Time we stored ts_recent (for aging) */
@@ -95,6 +116,9 @@ struct tcp_options_received { · 11 unmodified lines
95116 u8 num_sacks; /* Number of SACK blocks */
96117 u16 user_mss; /* mss requested by user in ioctl */
97118 u16 mss_clamp; /* Maximal mss, negotiated at connection setup */
119+#if IS_ENABLED(CONFIG_MPTCP)
120+ struct mptcp_options_received mptcp;
121+#endif
98122 };
99123
100124 static inline void tcp_clear_options(struct tcp_options_received *rx_opt)
@@ -104,6 +128,11 @@ static inline void tcp_clear_options(struct tcp_options_received *rx_opt) · 3 unmodified lines
104128 #if IS_ENABLED(CONFIG_SMC)
105129 rx_opt->smc_ok = 0;
106130 #endif
131+#if IS_ENABLED(CONFIG_MPTCP)
132+ rx_opt->mptcp.mp_capable = 0;
133+ rx_opt->mptcp.mp_join = 0;
134+ rx_opt->mptcp.dss = 0;
135+#endif
107136 }
108137
109138 /* This is the max number of SACKS that we'll generate and process. It's safe
@@ -119,6 +148,9 @@ struct tcp_request_sock { · 9 unmodified lines
119148 const struct tcp_request_sock_ops *af_specific;
120149 u64 snt_synack; /* first SYNACK sent time */
121150 bool tfo_listener;
151+#if IS_ENABLED(CONFIG_MPTCP)
152+ bool is_mptcp;
153+#endif
122154 u32 txhash;
123155 u32 rcv_isn;
124156 u32 snt_isn;
@@ -354,6 +386,8 @@ struct tcp_sock { · 229 unmodified lines
354386 #define BPF_SOCK_OPS_TEST_FLAG(TP, ARG) 0
355387 #endif
356388
389+ u16 timeout_rehash; /* Timeout-triggered rehash attempts */
390+
357391 u32 rcv_ooopack; /* Received out-of-order packets, for tcpinfo */
358392
359393 /* Receiver side RTT estimation */
@@ -379,6 +413,9 @@ struct tcp_sock { · 19 unmodified lines
379413 u32 mtu_info; /* We received an ICMP_FRAG_NEEDED / ICMPV6_PKT_TOOBIG
380414 * while socket was owned by user.
381415 */
416+#if IS_ENABLED(CONFIG_MPTCP)
417+ bool is_mptcp;
418+#endif
382419
383420 #ifdef CONFIG_TCP_MD5SIG
384421 /* TCP AF-Specific parts; only used by MD5 Signature support so far */
include/linux/usb/usbnet.h+1−1
@@ -253,7 +253,7 @@ extern int usbnet_open(struct net_device *net); · 252 unmodified lines
253253 extern int usbnet_stop(struct net_device *net);
254254 extern netdev_tx_t usbnet_start_xmit(struct sk_buff *skb,
255255 struct net_device *net);
256−extern void usbnet_tx_timeout(struct net_device *net);
256+extern void usbnet_tx_timeout(struct net_device *net, unsigned int txqueue);
257257 extern int usbnet_change_mtu(struct net_device *net, int new_mtu);
258258
259259 extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *);