History

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

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

Linus Torvalds committed 6 years ago

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

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

Unified · Split

69 files
  1. include/linux/avf/virtchnl.h +5 −0
  2. include/linux/bpf-cgroup.h +5 −19
  3. include/linux/bpf-netns.h +64 −0
  4. include/linux/bpf.h +116 −6
  5. include/linux/bpf_types.h +11 −0
  6. include/linux/bpf_verifier.h +7 −0
  7. include/linux/brcmphy.h +58 −0
  8. include/linux/capability.h +5 −0
  9. include/linux/compaction.h +1 −1
  10. include/linux/coredump.h +4 −0
  11. include/linux/delay.h +11 −0
  12. include/linux/dsa/8021q.h +57 −0
  13. include/linux/dsa/sja1105.h +3 −0
  14. include/linux/etherdevice.h +12 −0
  15. include/linux/ethtool_netlink.h +54 −0
  16. include/linux/file.h +2 −0
  17. include/linux/filter.h +2 −6
  18. include/linux/fs.h +3 −3
  19. include/linux/fsl/ptp_qoriq.h +1 −1
  20. include/linux/ftrace.h +1 −2
  21. include/linux/hugetlb.h +7 −8
  22. include/linux/ieee80211.h +359 −8
  23. include/linux/if_bridge.h +2 −0
  24. include/linux/if_team.h +2 −5
  25. include/linux/igmp.h +1 −1
  26. include/linux/inet_diag.h +5 −1
  27. include/linux/iopoll.h +43 −19
  28. include/linux/kprobes.h +1 −1
  29. include/linux/latencytop.h +2 −2
  30. include/linux/mdio.h +31 −0
  31. include/linux/mlx4/qp.h +1 −1
  32. include/linux/mlx5/accel.h +13 −1
  33. include/linux/mlx5/cmd.h +0 −51
  34. include/linux/mlx5/cq.h +1 −1
  35. include/linux/mlx5/device.h +41 −3
  36. include/linux/mlx5/driver.h +20 −15
  37. include/linux/mlx5/fs.h +1 −0
  38. include/linux/mlx5/mlx5_ifc.h +166 −58
  39. include/linux/mlx5/qp.h +7 −50
  40. include/linux/mlx5/transobj.h +6 −13
  41. include/linux/mlx5/vport.h +1 −2
  42. include/linux/mm.h +8 −6
  43. include/linux/mmzone.h +13 −14
  44. include/linux/net.h +0 −4
  45. include/linux/netdev_features.h +1 −1
  46. include/linux/netdevice.h +82 −8
  47. include/linux/netpoll.h +1 −9
  48. include/linux/nmi.h +5 −10
  49. include/linux/of_mdio.h +10 −1
  50. include/linux/perf_event.h +5 −8
  51. include/linux/phy.h +182 −11
  52. include/linux/phylink.h +3 −3
  53. include/linux/pid.h +3 −0
  54. include/linux/printk.h +1 −1
  55. include/linux/proc_fs.h +3 −0
  56. include/linux/ptp_clock_kernel.h +5 −1
  57. include/linux/qed/qed_if.h +23 −3
  58. include/linux/qed/qed_rdma_if.h +22 −0
  59. include/linux/sched/sysctl.h +15 −29
  60. include/linux/security.h +1 −1
  61. include/linux/skbuff.h +9 −27
  62. include/linux/skmsg.h +8 −0
  63. include/linux/socket.h +15 −2
  64. include/linux/sysctl.h +30 −31
  65. include/linux/tcp.h +13 −0
  66. include/linux/timer.h +1 −2
  67. include/linux/vermagic.h +4 −0
  68. include/linux/vmstat.h +4 −4
  69. include/linux/writeback.h +11 −17
include/linux/avf/virtchnl.h+5−0
@@ -476,6 +476,7 @@ struct virtchnl_rss_key { · 475 unmodified lines
476 u16 vsi_id;476 u16 vsi_id;
477 u16 key_len;477 u16 key_len;
478 u8 key[1]; /* RSS hash key, packed bytes */478 u8 key[1]; /* RSS hash key, packed bytes */
479 u8 pad[1];
479};480};
480 481
481VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_key);482VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_key);
@@ -484,6 +485,7 @@ struct virtchnl_rss_lut { · 2 unmodified lines
484 u16 vsi_id;485 u16 vsi_id;
485 u16 lut_entries;486 u16 lut_entries;
486 u8 lut[1]; /* RSS lookup table */487 u8 lut[1]; /* RSS lookup table */
488 u8 pad[1];
487};489};
488 490
489VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut);491VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_rss_lut);
@@ -572,6 +574,7 @@ struct virtchnl_filter { · 82 unmodified lines
572 enum virtchnl_action action;574 enum virtchnl_action action;
573 u32 action_meta;575 u32 action_meta;
574 u8 field_flags;576 u8 field_flags;
577 u8 pad[3];
575};578};
576 579
577VIRTCHNL_CHECK_STRUCT_LEN(272, virtchnl_filter);580VIRTCHNL_CHECK_STRUCT_LEN(272, virtchnl_filter);
@@ -610,6 +613,7 @@ struct virtchnl_pf_event { · 32 unmodified lines
610 /* link_speed provided in Mbps */613 /* link_speed provided in Mbps */
611 u32 link_speed;614 u32 link_speed;
612 u8 link_status;615 u8 link_status;
616 u8 pad[3];
613 } link_event_adv;617 } link_event_adv;
614 } event_data;618 } event_data;
615 619
@@ -635,6 +639,7 @@ struct virtchnl_iwarp_qv_info { · 19 unmodified lines
635 u16 ceq_idx;639 u16 ceq_idx;
636 u16 aeq_idx;640 u16 aeq_idx;
637 u8 itr_idx;641 u8 itr_idx;
642 u8 pad[3];
638};643};
639 644
640VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_iwarp_qv_info);645VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_iwarp_qv_info);
include/linux/bpf-cgroup.h+5−19
@@ -57,8 +57,6 @@ struct bpf_cgroup_link { · 56 unmodified lines
57 enum bpf_attach_type type;57 enum bpf_attach_type type;
58};58};
59 59
60extern const struct bpf_link_ops bpf_cgroup_link_lops;
61
62struct bpf_prog_list {60struct bpf_prog_list {
63 struct list_head node;61 struct list_head node;
64 struct bpf_prog *prog;62 struct bpf_prog *prog;
@@ -100,8 +98,6 @@ int __cgroup_bpf_attach(struct cgroup *cgrp, · 35 unmodified lines
100int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,98int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
101 struct bpf_cgroup_link *link,99 struct bpf_cgroup_link *link,
102 enum bpf_attach_type type);100 enum bpf_attach_type type);
103int __cgroup_bpf_replace(struct cgroup *cgrp, struct bpf_cgroup_link *link,
104 struct bpf_prog *new_prog);
105int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,101int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
106 union bpf_attr __user *uattr);102 union bpf_attr __user *uattr);
107 103
@@ -112,8 +108,6 @@ int cgroup_bpf_attach(struct cgroup *cgrp, · 4 unmodified lines
112 u32 flags);108 u32 flags);
113int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,109int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
114 enum bpf_attach_type type);110 enum bpf_attach_type type);
115int cgroup_bpf_replace(struct bpf_link *link, struct bpf_prog *old_prog,
116 struct bpf_prog *new_prog);
117int cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,111int cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
118 union bpf_attr __user *uattr);112 union bpf_attr __user *uattr);
119 113
@@ -138,8 +132,7 @@ int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor, · 18 unmodified lines
138 132
139int __cgroup_bpf_run_filter_sysctl(struct ctl_table_header *head,133int __cgroup_bpf_run_filter_sysctl(struct ctl_table_header *head,
140 struct ctl_table *table, int write,134 struct ctl_table *table, int write,
141 void __user *buf, size_t *pcount,135 void **buf, size_t *pcount, loff_t *ppos,
142 loff_t *ppos, void **new_buf,
143 enum bpf_attach_type type);136 enum bpf_attach_type type);
144 137
145int __cgroup_bpf_run_filter_setsockopt(struct sock *sock, int *level,138int __cgroup_bpf_run_filter_setsockopt(struct sock *sock, int *level,
@@ -302,12 +295,12 @@ int bpf_percpu_cgroup_storage_update(struct bpf_map *map, void *key, · 156 unmodified lines
302})295})
303 296
304 297
305#define BPF_CGROUP_RUN_PROG_SYSCTL(head, table, write, buf, count, pos, nbuf) \298#define BPF_CGROUP_RUN_PROG_SYSCTL(head, table, write, buf, count, pos) \
306({ \299({ \
307 int __ret = 0; \300 int __ret = 0; \
308 if (cgroup_bpf_enabled) \301 if (cgroup_bpf_enabled) \
309 __ret = __cgroup_bpf_run_filter_sysctl(head, table, write, \302 __ret = __cgroup_bpf_run_filter_sysctl(head, table, write, \
310 buf, count, pos, nbuf, \303 buf, count, pos, \
311 BPF_CGROUP_SYSCTL); \304 BPF_CGROUP_SYSCTL); \
312 __ret; \305 __ret; \
313})306})
@@ -354,7 +347,6 @@ int cgroup_bpf_prog_query(const union bpf_attr *attr, · 40 unmodified lines
354#else347#else
355 348
356struct bpf_prog;349struct bpf_prog;
357struct bpf_link;
358struct cgroup_bpf {};350struct cgroup_bpf {};
359static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; }351static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; }
360static inline void cgroup_bpf_offline(struct cgroup *cgrp) {}352static inline void cgroup_bpf_offline(struct cgroup *cgrp) {}
@@ -378,13 +370,6 @@ static inline int cgroup_bpf_link_attach(const union bpf_attr *attr, · 17 unmodified lines
378 return -EINVAL;370 return -EINVAL;
379}371}
380 372
381static inline int cgroup_bpf_replace(struct bpf_link *link,
382 struct bpf_prog *old_prog,
383 struct bpf_prog *new_prog)
384{
385 return -EINVAL;
386}
387
388static inline int cgroup_bpf_prog_query(const union bpf_attr *attr,373static inline int cgroup_bpf_prog_query(const union bpf_attr *attr,
389 union bpf_attr __user *uattr)374 union bpf_attr __user *uattr)
390{375{
@@ -411,6 +396,7 @@ static inline int bpf_percpu_cgroup_storage_update(struct bpf_map *map, · 20 unmodified lines
411}396}
412 397
413#define cgroup_bpf_enabled (0)398#define cgroup_bpf_enabled (0)
399#define BPF_CGROUP_RUN_SA_PROG_LOCK(sk, uaddr, type, t_ctx) ({ 0; })
414#define BPF_CGROUP_PRE_CONNECT_ENABLED(sk) (0)400#define BPF_CGROUP_PRE_CONNECT_ENABLED(sk) (0)
415#define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; })401#define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; })
416#define BPF_CGROUP_RUN_PROG_INET_EGRESS(sk,skb) ({ 0; })402#define BPF_CGROUP_RUN_PROG_INET_EGRESS(sk,skb) ({ 0; })
@@ -429,7 +415,7 @@ static inline int bpf_percpu_cgroup_storage_update(struct bpf_map *map, · 12 unmodified lines
429#define BPF_CGROUP_RUN_PROG_UDP6_RECVMSG_LOCK(sk, uaddr) ({ 0; })415#define BPF_CGROUP_RUN_PROG_UDP6_RECVMSG_LOCK(sk, uaddr) ({ 0; })
430#define BPF_CGROUP_RUN_PROG_SOCK_OPS(sock_ops) ({ 0; })416#define BPF_CGROUP_RUN_PROG_SOCK_OPS(sock_ops) ({ 0; })
431#define BPF_CGROUP_RUN_PROG_DEVICE_CGROUP(type,major,minor,access) ({ 0; })417#define BPF_CGROUP_RUN_PROG_DEVICE_CGROUP(type,major,minor,access) ({ 0; })
432#define BPF_CGROUP_RUN_PROG_SYSCTL(head,table,write,buf,count,pos,nbuf) ({ 0; })418#define BPF_CGROUP_RUN_PROG_SYSCTL(head,table,write,buf,count,pos) ({ 0; })
433#define BPF_CGROUP_GETSOCKOPT_MAX_OPTLEN(optlen) ({ 0; })419#define BPF_CGROUP_GETSOCKOPT_MAX_OPTLEN(optlen) ({ 0; })
434#define BPF_CGROUP_RUN_PROG_GETSOCKOPT(sock, level, optname, optval, \420#define BPF_CGROUP_RUN_PROG_GETSOCKOPT(sock, level, optname, optval, \
435 optlen, max_optlen, retval) ({ retval; })421 optlen, max_optlen, retval) ({ retval; })
include/linux/bpf-netns.h+64−0
@@ -0,0 +1,64 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _BPF_NETNS_H
3#define _BPF_NETNS_H
4
5#include <linux/mutex.h>
6#include <uapi/linux/bpf.h>
7
8enum netns_bpf_attach_type {
9 NETNS_BPF_INVALID = -1,
10 NETNS_BPF_FLOW_DISSECTOR = 0,
11 MAX_NETNS_BPF_ATTACH_TYPE
12};
13
14static inline enum netns_bpf_attach_type
15to_netns_bpf_attach_type(enum bpf_attach_type attach_type)
16{
17 switch (attach_type) {
18 case BPF_FLOW_DISSECTOR:
19 return NETNS_BPF_FLOW_DISSECTOR;
20 default:
21 return NETNS_BPF_INVALID;
22 }
23}
24
25/* Protects updates to netns_bpf */
26extern struct mutex netns_bpf_mutex;
27
28union bpf_attr;
29struct bpf_prog;
30
31#ifdef CONFIG_NET
32int netns_bpf_prog_query(const union bpf_attr *attr,
33 union bpf_attr __user *uattr);
34int netns_bpf_prog_attach(const union bpf_attr *attr,
35 struct bpf_prog *prog);
36int netns_bpf_prog_detach(const union bpf_attr *attr);
37int netns_bpf_link_create(const union bpf_attr *attr,
38 struct bpf_prog *prog);
39#else
40static inline int netns_bpf_prog_query(const union bpf_attr *attr,
41 union bpf_attr __user *uattr)
42{
43 return -EOPNOTSUPP;
44}
45
46static inline int netns_bpf_prog_attach(const union bpf_attr *attr,
47 struct bpf_prog *prog)
48{
49 return -EOPNOTSUPP;
50}
51
52static inline int netns_bpf_prog_detach(const union bpf_attr *attr)
53{
54 return -EOPNOTSUPP;
55}
56
57static inline int netns_bpf_link_create(const union bpf_attr *attr,
58 struct bpf_prog *prog)
59{
60 return -EOPNOTSUPP;
61}
62#endif
63
64#endif /* _BPF_NETNS_H */
include/linux/bpf.h+116−6
@@ -19,6 +19,7 @@ · 18 unmodified lines
19#include <linux/mutex.h>19#include <linux/mutex.h>
20#include <linux/module.h>20#include <linux/module.h>
21#include <linux/kallsyms.h>21#include <linux/kallsyms.h>
22#include <linux/capability.h>
22 23
23struct bpf_verifier_env;24struct bpf_verifier_env;
24struct bpf_verifier_log;25struct bpf_verifier_log;
@@ -31,6 +32,7 @@ struct seq_file; · 6 unmodified lines
31struct btf;32struct btf;
32struct btf_type;33struct btf_type;
33struct exception_table_entry;34struct exception_table_entry;
35struct seq_operations;
34 36
35extern struct idr btf_idr;37extern struct idr btf_idr;
36extern spinlock_t btf_idr_lock;38extern spinlock_t btf_idr_lock;
@@ -88,6 +90,8 @@ struct bpf_map_ops { · 51 unmodified lines
88 int (*map_direct_value_meta)(const struct bpf_map *map,90 int (*map_direct_value_meta)(const struct bpf_map *map,
89 u64 imm, u32 *off);91 u64 imm, u32 *off);
90 int (*map_mmap)(struct bpf_map *map, struct vm_area_struct *vma);92 int (*map_mmap)(struct bpf_map *map, struct vm_area_struct *vma);
93 __poll_t (*map_poll)(struct bpf_map *map, struct file *filp,
94 struct poll_table_struct *pts);
91};95};
92 96
93struct bpf_map_memory {97struct bpf_map_memory {
@@ -118,7 +122,7 @@ struct bpf_map { · 24 unmodified lines
118 struct bpf_map_memory memory;122 struct bpf_map_memory memory;
119 char name[BPF_OBJ_NAME_LEN];123 char name[BPF_OBJ_NAME_LEN];
120 u32 btf_vmlinux_value_type_id;124 u32 btf_vmlinux_value_type_id;
121 bool unpriv_array;125 bool bypass_spec_v1;
122 bool frozen; /* write-once; write-protected by freeze_mutex */126 bool frozen; /* write-once; write-protected by freeze_mutex */
123 /* 22 bytes hole */127 /* 22 bytes hole */
124 128
@@ -242,6 +246,9 @@ enum bpf_arg_type { · 117 unmodified lines
242 ARG_PTR_TO_LONG, /* pointer to long */246 ARG_PTR_TO_LONG, /* pointer to long */
243 ARG_PTR_TO_SOCKET, /* pointer to bpf_sock (fullsock) */247 ARG_PTR_TO_SOCKET, /* pointer to bpf_sock (fullsock) */
244 ARG_PTR_TO_BTF_ID, /* pointer to in-kernel struct */248 ARG_PTR_TO_BTF_ID, /* pointer to in-kernel struct */
249 ARG_PTR_TO_ALLOC_MEM, /* pointer to dynamically allocated memory */
250 ARG_PTR_TO_ALLOC_MEM_OR_NULL, /* pointer to dynamically allocated memory or NULL */
251 ARG_CONST_ALLOC_SIZE_OR_ZERO, /* number of allocated bytes requested */
245};252};
246 253
247/* type of values returned from helper functions */254/* type of values returned from helper functions */
@@ -253,6 +260,7 @@ enum bpf_return_type { · 5 unmodified lines
253 RET_PTR_TO_SOCKET_OR_NULL, /* returns a pointer to a socket or NULL */260 RET_PTR_TO_SOCKET_OR_NULL, /* returns a pointer to a socket or NULL */
254 RET_PTR_TO_TCP_SOCK_OR_NULL, /* returns a pointer to a tcp_sock or NULL */261 RET_PTR_TO_TCP_SOCK_OR_NULL, /* returns a pointer to a tcp_sock or NULL */
255 RET_PTR_TO_SOCK_COMMON_OR_NULL, /* returns a pointer to a sock_common or NULL */262 RET_PTR_TO_SOCK_COMMON_OR_NULL, /* returns a pointer to a sock_common or NULL */
263 RET_PTR_TO_ALLOC_MEM_OR_NULL, /* returns a pointer to dynamically allocated memory or NULL */
256};264};
257 265
258/* eBPF function prototype used by verifier to allow BPF_CALLs from eBPF programs266/* eBPF function prototype used by verifier to allow BPF_CALLs from eBPF programs
@@ -319,6 +327,9 @@ enum bpf_reg_type { · 60 unmodified lines
319 PTR_TO_TP_BUFFER, /* reg points to a writable raw tp's buffer */327 PTR_TO_TP_BUFFER, /* reg points to a writable raw tp's buffer */
320 PTR_TO_XDP_SOCK, /* reg points to struct xdp_sock */328 PTR_TO_XDP_SOCK, /* reg points to struct xdp_sock */
321 PTR_TO_BTF_ID, /* reg points to kernel struct */329 PTR_TO_BTF_ID, /* reg points to kernel struct */
330 PTR_TO_BTF_ID_OR_NULL, /* reg points to kernel struct or NULL */
331 PTR_TO_MEM, /* reg points to valid memory region */
332 PTR_TO_MEM_OR_NULL, /* reg points to valid memory region or NULL */
322};333};
323 334
324/* The information passed from prog-specific *_is_valid_access335/* The information passed from prog-specific *_is_valid_access
@@ -641,6 +652,12 @@ struct bpf_jit_poke_descriptor { · 316 unmodified lines
641 u16 reason;652 u16 reason;
642};653};
643 654
655/* reg_type info for ctx arguments */
656struct bpf_ctx_arg_aux {
657 u32 offset;
658 enum bpf_reg_type reg_type;
659};
660
644struct bpf_prog_aux {661struct bpf_prog_aux {
645 atomic64_t refcnt;662 atomic64_t refcnt;
646 u32 used_map_cnt;663 u32 used_map_cnt;
@@ -652,6 +669,8 @@ struct bpf_prog_aux { · 5 unmodified lines
652 u32 func_cnt; /* used by non-func prog as the number of func progs */669 u32 func_cnt; /* used by non-func prog as the number of func progs */
653 u32 func_idx; /* 0 for non-func prog, the index in func array for func prog */670 u32 func_idx; /* 0 for non-func prog, the index in func array for func prog */
654 u32 attach_btf_id; /* in-kernel BTF type id to attach to */671 u32 attach_btf_id; /* in-kernel BTF type id to attach to */
672 u32 ctx_arg_info_size;
673 const struct bpf_ctx_arg_aux *ctx_arg_info;
655 struct bpf_prog *linked_prog;674 struct bpf_prog *linked_prog;
656 bool verifier_zext; /* Zero extensions has been inserted by verifier. */675 bool verifier_zext; /* Zero extensions has been inserted by verifier. */
657 bool offload_requested;676 bool offload_requested;
@@ -987,6 +1006,7 @@ _out: \ · 329 unmodified lines
987 1006
988#ifdef CONFIG_BPF_SYSCALL1007#ifdef CONFIG_BPF_SYSCALL
989DECLARE_PER_CPU(int, bpf_prog_active);1008DECLARE_PER_CPU(int, bpf_prog_active);
1009extern struct mutex bpf_stats_enabled_mutex;
990 1010
991/*1011/*
992 * Block execution of BPF programs attached to instrumentation (perf,1012 * Block execution of BPF programs attached to instrumentation (perf,
@@ -1020,15 +1040,18 @@ static inline void bpf_enable_instrumentation(void) · 27 unmodified lines
1020 1040
1021extern const struct file_operations bpf_map_fops;1041extern const struct file_operations bpf_map_fops;
1022extern const struct file_operations bpf_prog_fops;1042extern const struct file_operations bpf_prog_fops;
1043extern const struct file_operations bpf_iter_fops;
1023 1044
1024#define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \1045#define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \
1025 extern const struct bpf_prog_ops _name ## _prog_ops; \1046 extern const struct bpf_prog_ops _name ## _prog_ops; \
1026 extern const struct bpf_verifier_ops _name ## _verifier_ops;1047 extern const struct bpf_verifier_ops _name ## _verifier_ops;
1027#define BPF_MAP_TYPE(_id, _ops) \1048#define BPF_MAP_TYPE(_id, _ops) \
1028 extern const struct bpf_map_ops _ops;1049 extern const struct bpf_map_ops _ops;
1050#define BPF_LINK_TYPE(_id, _name)
1029#include <linux/bpf_types.h>1051#include <linux/bpf_types.h>
1030#undef BPF_PROG_TYPE1052#undef BPF_PROG_TYPE
1031#undef BPF_MAP_TYPE1053#undef BPF_MAP_TYPE
1054#undef BPF_LINK_TYPE
1032 1055
1033extern const struct bpf_prog_ops bpf_offload_prog_ops;1056extern const struct bpf_prog_ops bpf_offload_prog_ops;
1034extern const struct bpf_verifier_ops tc_cls_act_analyzer_ops;1057extern const struct bpf_verifier_ops tc_cls_act_analyzer_ops;
@@ -1077,29 +1100,59 @@ int generic_map_update_batch(struct bpf_map *map, · 42 unmodified lines
1077int generic_map_delete_batch(struct bpf_map *map,1100int generic_map_delete_batch(struct bpf_map *map,
1078 const union bpf_attr *attr,1101 const union bpf_attr *attr,
1079 union bpf_attr __user *uattr);1102 union bpf_attr __user *uattr);
1103struct bpf_map *bpf_map_get_curr_or_next(u32 *id);
1080 1104
1081extern int sysctl_unprivileged_bpf_disabled;1105extern int sysctl_unprivileged_bpf_disabled;
1082 1106
1107static inline bool bpf_allow_ptr_leaks(void)
1108{
1109 return perfmon_capable();
1110}
1111
1112static inline bool bpf_bypass_spec_v1(void)
1113{
1114 return perfmon_capable();
1115}
1116
1117static inline bool bpf_bypass_spec_v4(void)
1118{
1119 return perfmon_capable();
1120}
1121
1083int bpf_map_new_fd(struct bpf_map *map, int flags);1122int bpf_map_new_fd(struct bpf_map *map, int flags);
1084int bpf_prog_new_fd(struct bpf_prog *prog);1123int bpf_prog_new_fd(struct bpf_prog *prog);
1085 1124
1086struct bpf_link {1125struct bpf_link {
1087 atomic64_t refcnt;1126 atomic64_t refcnt;
1127 u32 id;
1128 enum bpf_link_type type;
1088 const struct bpf_link_ops *ops;1129 const struct bpf_link_ops *ops;
1089 struct bpf_prog *prog;1130 struct bpf_prog *prog;
1090 struct work_struct work;1131 struct work_struct work;
1091};1132};
1092 1133
1134struct bpf_link_primer {
1135 struct bpf_link *link;
1136 struct file *file;
1137 int fd;
1138 u32 id;
1139};
1140
1093struct bpf_link_ops {1141struct bpf_link_ops {
1094 void (*release)(struct bpf_link *link);1142 void (*release)(struct bpf_link *link);
1095 void (*dealloc)(struct bpf_link *link);1143 void (*dealloc)(struct bpf_link *link);
1096 1144 int (*update_prog)(struct bpf_link *link, struct bpf_prog *new_prog,
1145 struct bpf_prog *old_prog);
1146 void (*show_fdinfo)(const struct bpf_link *link, struct seq_file *seq);
1147 int (*fill_link_info)(const struct bpf_link *link,
1148 struct bpf_link_info *info);
1097};1149};
1098 1150
1099void bpf_link_init(struct bpf_link *link, const struct bpf_link_ops *ops,1151void bpf_link_init(struct bpf_link *link, enum bpf_link_type type,
1100 struct bpf_prog *prog);1152 const struct bpf_link_ops *ops, struct bpf_prog *prog);
1101void bpf_link_cleanup(struct bpf_link *link, struct file *link_file,1153int bpf_link_prime(struct bpf_link *link, struct bpf_link_primer *primer);
1102 int link_fd);1154int bpf_link_settle(struct bpf_link_primer *primer);
1155void bpf_link_cleanup(struct bpf_link_primer *primer);
1103void bpf_link_inc(struct bpf_link *link);1156void bpf_link_inc(struct bpf_link *link);
1104void bpf_link_put(struct bpf_link *link);1157void bpf_link_put(struct bpf_link *link);
1105int bpf_link_new_fd(struct bpf_link *link);1158int bpf_link_new_fd(struct bpf_link *link);
@@ -1109,6 +1162,40 @@ struct bpf_link *bpf_link_get_from_fd(u32 ufd); · 3 unmodified lines
1109int bpf_obj_pin_user(u32 ufd, const char __user *pathname);1162int bpf_obj_pin_user(u32 ufd, const char __user *pathname);
1110int bpf_obj_get_user(const char __user *pathname, int flags);1163int bpf_obj_get_user(const char __user *pathname, int flags);
1111 1164
1165#define BPF_ITER_FUNC_PREFIX "bpf_iter_"
1166#define DEFINE_BPF_ITER_FUNC(target, args...) \
1167 extern int bpf_iter_ ## target(args); \
1168 int __init bpf_iter_ ## target(args) { return 0; }
1169
1170typedef int (*bpf_iter_init_seq_priv_t)(void *private_data);
1171typedef void (*bpf_iter_fini_seq_priv_t)(void *private_data);
1172
1173#define BPF_ITER_CTX_ARG_MAX 2
1174struct bpf_iter_reg {
1175 const char *target;
1176 const struct seq_operations *seq_ops;
1177 bpf_iter_init_seq_priv_t init_seq_private;
1178 bpf_iter_fini_seq_priv_t fini_seq_private;
1179 u32 seq_priv_size;
1180 u32 ctx_arg_info_size;
1181 struct bpf_ctx_arg_aux ctx_arg_info[BPF_ITER_CTX_ARG_MAX];
1182};
1183
1184struct bpf_iter_meta {
1185 __bpf_md_ptr(struct seq_file *, seq);
1186 u64 session_id;
1187 u64 seq_num;
1188};
1189
1190int bpf_iter_reg_target(const struct bpf_iter_reg *reg_info);
1191void bpf_iter_unreg_target(const struct bpf_iter_reg *reg_info);
1192bool bpf_iter_prog_supported(struct bpf_prog *prog);
1193int bpf_iter_link_attach(const union bpf_attr *attr, struct bpf_prog *prog);
1194int bpf_iter_new_fd(struct bpf_link *link);
1195bool bpf_link_is_iter(struct bpf_link *link);
1196struct bpf_prog *bpf_iter_get_info(struct bpf_iter_meta *meta, bool in_stop);
1197int bpf_iter_run_prog(struct bpf_prog *prog, void *ctx);
1198
1112int bpf_percpu_hash_copy(struct bpf_map *map, void *key, void *value);1199int bpf_percpu_hash_copy(struct bpf_map *map, void *key, void *value);
1113int bpf_percpu_array_copy(struct bpf_map *map, void *key, void *value);1200int bpf_percpu_array_copy(struct bpf_map *map, void *key, void *value);
1114int bpf_percpu_hash_update(struct bpf_map *map, void *key, void *value,1201int bpf_percpu_hash_update(struct bpf_map *map, void *key, void *value,
@@ -1163,6 +1250,7 @@ int dev_map_enqueue(struct bpf_dtab_netdev *dst, struct xdp_buff *xdp, · 48 unmodified lines
1163 struct net_device *dev_rx);1250 struct net_device *dev_rx);
1164int dev_map_generic_redirect(struct bpf_dtab_netdev *dst, struct sk_buff *skb,1251int dev_map_generic_redirect(struct bpf_dtab_netdev *dst, struct sk_buff *skb,
1165 struct bpf_prog *xdp_prog);1252 struct bpf_prog *xdp_prog);
1253bool dev_map_can_have_prog(struct bpf_map *map);
1166 1254
1167struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key);1255struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key);
1168void __cpu_map_flush(void);1256void __cpu_map_flush(void);
@@ -1215,6 +1303,7 @@ int btf_check_type_match(struct bpf_verifier_env *env, struct bpf_prog *prog, · 46 unmodified lines
1215 1303
1216struct bpf_prog *bpf_prog_by_id(u32 id);1304struct bpf_prog *bpf_prog_by_id(u32 id);
1217 1305
1306const struct bpf_func_proto *bpf_base_func_proto(enum bpf_func_id func_id);
1218#else /* !CONFIG_BPF_SYSCALL */1307#else /* !CONFIG_BPF_SYSCALL */
1219static inline struct bpf_prog *bpf_prog_get(u32 ufd)1308static inline struct bpf_prog *bpf_prog_get(u32 ufd)
1220{1309{
@@ -1275,6 +1364,10 @@ static inline struct net_device *__dev_map_hash_lookup_elem(struct bpf_map *map · 54 unmodified lines
1275{1364{
1276 return NULL;1365 return NULL;
1277}1366}
1367static inline bool dev_map_can_have_prog(struct bpf_map *map)
1368{
1369 return false;
1370}
1278 1371
1279static inline void __dev_flush(void)1372static inline void __dev_flush(void)
1280{1373{
@@ -1365,6 +1458,12 @@ static inline struct bpf_prog *bpf_prog_by_id(u32 id) · 84 unmodified lines
1365{1458{
1366 return ERR_PTR(-ENOTSUPP);1459 return ERR_PTR(-ENOTSUPP);
1367}1460}
1461
1462static inline const struct bpf_func_proto *
1463bpf_base_func_proto(enum bpf_func_id func_id)
1464{
1465 return NULL;
1466}
1368#endif /* CONFIG_BPF_SYSCALL */1467#endif /* CONFIG_BPF_SYSCALL */
1369 1468
1370static inline struct bpf_prog *bpf_prog_get_type(u32 ufd,1469static inline struct bpf_prog *bpf_prog_get_type(u32 ufd,
@@ -1502,6 +1601,7 @@ extern const struct bpf_func_proto bpf_get_smp_processor_id_proto; · 131 unmodified lines
1502extern const struct bpf_func_proto bpf_get_numa_node_id_proto;1601extern const struct bpf_func_proto bpf_get_numa_node_id_proto;
1503extern const struct bpf_func_proto bpf_tail_call_proto;1602extern const struct bpf_func_proto bpf_tail_call_proto;
1504extern const struct bpf_func_proto bpf_ktime_get_ns_proto;1603extern const struct bpf_func_proto bpf_ktime_get_ns_proto;
1604extern const struct bpf_func_proto bpf_ktime_get_boot_ns_proto;
1505extern const struct bpf_func_proto bpf_get_current_pid_tgid_proto;1605extern const struct bpf_func_proto bpf_get_current_pid_tgid_proto;
1506extern const struct bpf_func_proto bpf_get_current_uid_gid_proto;1606extern const struct bpf_func_proto bpf_get_current_uid_gid_proto;
1507extern const struct bpf_func_proto bpf_get_current_comm_proto;1607extern const struct bpf_func_proto bpf_get_current_comm_proto;
@@ -1523,13 +1623,23 @@ extern const struct bpf_func_proto bpf_strtoul_proto; · 15 unmodified lines
1523extern const struct bpf_func_proto bpf_tcp_sock_proto;1623extern const struct bpf_func_proto bpf_tcp_sock_proto;
1524extern const struct bpf_func_proto bpf_jiffies64_proto;1624extern const struct bpf_func_proto bpf_jiffies64_proto;
1525extern const struct bpf_func_proto bpf_get_ns_current_pid_tgid_proto;1625extern const struct bpf_func_proto bpf_get_ns_current_pid_tgid_proto;
1626extern const struct bpf_func_proto bpf_event_output_data_proto;
1627extern const struct bpf_func_proto bpf_ringbuf_output_proto;
1628extern const struct bpf_func_proto bpf_ringbuf_reserve_proto;
1629extern const struct bpf_func_proto bpf_ringbuf_submit_proto;
1630extern const struct bpf_func_proto bpf_ringbuf_discard_proto;
1631extern const struct bpf_func_proto bpf_ringbuf_query_proto;
1526 1632
1527const struct bpf_func_proto *bpf_tracing_func_proto(1633const struct bpf_func_proto *bpf_tracing_func_proto(
1528 enum bpf_func_id func_id, const struct bpf_prog *prog);1634 enum bpf_func_id func_id, const struct bpf_prog *prog);
1529 1635
1636const struct bpf_func_proto *tracing_prog_func_proto(
1637 enum bpf_func_id func_id, const struct bpf_prog *prog);
1638
1530/* Shared helpers among cBPF and eBPF. */1639/* Shared helpers among cBPF and eBPF. */
1531void bpf_user_rnd_init_once(void);1640void bpf_user_rnd_init_once(void);
1532u64 bpf_user_rnd_u32(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5);1641u64 bpf_user_rnd_u32(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5);
1642u64 bpf_get_raw_cpu_id(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5);
1533 1643
1534#if defined(CONFIG_NET)1644#if defined(CONFIG_NET)
1535bool bpf_sock_common_is_valid_access(int off, int size,1645bool bpf_sock_common_is_valid_access(int off, int size,
include/linux/bpf_types.h+11−0
@@ -118,3 +118,14 @@ BPF_MAP_TYPE(BPF_MAP_TYPE_STACK, stack_map_ops) · 117 unmodified lines
118#if defined(CONFIG_BPF_JIT)118#if defined(CONFIG_BPF_JIT)
119BPF_MAP_TYPE(BPF_MAP_TYPE_STRUCT_OPS, bpf_struct_ops_map_ops)119BPF_MAP_TYPE(BPF_MAP_TYPE_STRUCT_OPS, bpf_struct_ops_map_ops)
120#endif120#endif
121BPF_MAP_TYPE(BPF_MAP_TYPE_RINGBUF, ringbuf_map_ops)
122
123BPF_LINK_TYPE(BPF_LINK_TYPE_RAW_TRACEPOINT, raw_tracepoint)
124BPF_LINK_TYPE(BPF_LINK_TYPE_TRACING, tracing)
125#ifdef CONFIG_CGROUP_BPF
126BPF_LINK_TYPE(BPF_LINK_TYPE_CGROUP, cgroup)
127#endif
128BPF_LINK_TYPE(BPF_LINK_TYPE_ITER, iter)
129#ifdef CONFIG_NET
130BPF_LINK_TYPE(BPF_LINK_TYPE_NETNS, netns)
131#endif
include/linux/bpf_verifier.h+7−0
@@ -54,6 +54,8 @@ struct bpf_reg_state { · 53 unmodified lines
54 54
55 u32 btf_id; /* for PTR_TO_BTF_ID */55 u32 btf_id; /* for PTR_TO_BTF_ID */
56 56
57 u32 mem_size; /* for PTR_TO_MEM | PTR_TO_MEM_OR_NULL */
58
57 /* Max size from any of the above. */59 /* Max size from any of the above. */
58 unsigned long raw;60 unsigned long raw;
59 };61 };
@@ -63,6 +65,8 @@ struct bpf_reg_state { · 3 unmodified lines
63 * offset, so they can share range knowledge.65 * offset, so they can share range knowledge.
64 * For PTR_TO_MAP_VALUE_OR_NULL this is used to share which map value we66 * For PTR_TO_MAP_VALUE_OR_NULL this is used to share which map value we
65 * came from, when one is tested for != NULL.67 * came from, when one is tested for != NULL.
68 * For PTR_TO_MEM_OR_NULL this is used to identify memory allocation
69 * for the purpose of tracking that it's freed.
66 * For PTR_TO_SOCKET this is used to share which pointers retain the70 * For PTR_TO_SOCKET this is used to share which pointers retain the
67 * same reference to the socket, to determine proper reference freeing.71 * same reference to the socket, to determine proper reference freeing.
68 */72 */
@@ -375,6 +379,9 @@ struct bpf_verifier_env { · 306 unmodified lines
375 u32 used_map_cnt; /* number of used maps */379 u32 used_map_cnt; /* number of used maps */
376 u32 id_gen; /* used to generate unique reg IDs */380 u32 id_gen; /* used to generate unique reg IDs */
377 bool allow_ptr_leaks;381 bool allow_ptr_leaks;
382 bool bpf_capable;
383 bool bypass_spec_v1;
384 bool bypass_spec_v4;
378 bool seen_direct_write;385 bool seen_direct_write;
379 struct bpf_insn_aux_data *insn_aux_data; /* array of per-insn state */386 struct bpf_insn_aux_data *insn_aux_data; /* array of per-insn state */
380 const struct bpf_line_info *prev_linfo;387 const struct bpf_line_info *prev_linfo;
include/linux/brcmphy.h+58−0
@@ -15,7 +15,9 @@ · 14 unmodified lines
15#define PHY_ID_BCMAC131 0x0143bc7015#define PHY_ID_BCMAC131 0x0143bc70
16#define PHY_ID_BCM5481 0x0143bca016#define PHY_ID_BCM5481 0x0143bca0
17#define PHY_ID_BCM5395 0x0143bcf017#define PHY_ID_BCM5395 0x0143bcf0
18#define PHY_ID_BCM53125 0x03625f20
18#define PHY_ID_BCM54810 0x03625d0019#define PHY_ID_BCM54810 0x03625d00
20#define PHY_ID_BCM54811 0x03625cc0
19#define PHY_ID_BCM5482 0x0143bcb021#define PHY_ID_BCM5482 0x0143bcb0
20#define PHY_ID_BCM5411 0x0020607022#define PHY_ID_BCM5411 0x00206070
21#define PHY_ID_BCM5421 0x002060e023#define PHY_ID_BCM5421 0x002060e0
@@ -24,6 +26,7 @@ · 2 unmodified lines
24#define PHY_ID_BCM5461 0x002060c026#define PHY_ID_BCM5461 0x002060c0
25#define PHY_ID_BCM54612E 0x03625e6027#define PHY_ID_BCM54612E 0x03625e60
26#define PHY_ID_BCM54616S 0x03625d1028#define PHY_ID_BCM54616S 0x03625d10
29#define PHY_ID_BCM54140 0xae025009
27#define PHY_ID_BCM57780 0x03625d9030#define PHY_ID_BCM57780 0x03625d90
28#define PHY_ID_BCM89610 0x03625cd031#define PHY_ID_BCM89610 0x03625cd0
29 32
@@ -114,6 +117,14 @@ · 84 unmodified lines
114#define MII_BCM54XX_SHD_VAL(x) ((x & 0x1f) << 10)117#define MII_BCM54XX_SHD_VAL(x) ((x & 0x1f) << 10)
115#define MII_BCM54XX_SHD_DATA(x) ((x & 0x3ff) << 0)118#define MII_BCM54XX_SHD_DATA(x) ((x & 0x3ff) << 0)
116 119
120#define MII_BCM54XX_RDB_ADDR 0x1e
121#define MII_BCM54XX_RDB_DATA 0x1f
122
123/* legacy access control via rdb/expansion register */
124#define BCM54XX_RDB_REG0087 0x0087
125#define BCM54XX_EXP_REG7E (MII_BCM54XX_EXP_SEL_ER + 0x7E)
126#define BCM54XX_ACCESS_MODE_LEGACY_EN BIT(15)
127
117/*128/*
118 * AUXILIARY CONTROL SHADOW ACCESS REGISTERS. (PHY REG 0x18)129 * AUXILIARY CONTROL SHADOW ACCESS REGISTERS. (PHY REG 0x18)
119 */130 */
@@ -290,4 +301,51 @@ · 170 unmodified lines
290#define MII_BRCM_CORE_EXPB0 0xB0301#define MII_BRCM_CORE_EXPB0 0xB0
291#define MII_BRCM_CORE_EXPB1 0xB1302#define MII_BRCM_CORE_EXPB1 0xB1
292 303
304/* Enhanced Cable Diagnostics */
305#define BCM54XX_RDB_ECD_CTRL 0x2a0
306#define BCM54XX_EXP_ECD_CTRL (MII_BCM54XX_EXP_SEL_ER + 0xc0)
307
308#define BCM54XX_ECD_CTRL_CABLE_TYPE_CAT3 1 /* CAT3 or worse */
309#define BCM54XX_ECD_CTRL_CABLE_TYPE_CAT5 0 /* CAT5 or better */
310#define BCM54XX_ECD_CTRL_CABLE_TYPE_MASK BIT(0) /* cable type */
311#define BCM54XX_ECD_CTRL_INVALID BIT(3) /* invalid result */
312#define BCM54XX_ECD_CTRL_UNIT_CM 0 /* centimeters */
313#define BCM54XX_ECD_CTRL_UNIT_M 1 /* meters */
314#define BCM54XX_ECD_CTRL_UNIT_MASK BIT(10) /* cable length unit */
315#define BCM54XX_ECD_CTRL_IN_PROGRESS BIT(11) /* test in progress */
316#define BCM54XX_ECD_CTRL_BREAK_LINK BIT(12) /* unconnect link
317 * during test
318 */
319#define BCM54XX_ECD_CTRL_CROSS_SHORT_DIS BIT(13) /* disable inter-pair
320 * short check
321 */
322#define BCM54XX_ECD_CTRL_RUN BIT(15) /* run immediate */
323
324#define BCM54XX_RDB_ECD_FAULT_TYPE 0x2a1
325#define BCM54XX_EXP_ECD_FAULT_TYPE (MII_BCM54XX_EXP_SEL_ER + 0xc1)
326#define BCM54XX_ECD_FAULT_TYPE_INVALID 0x0
327#define BCM54XX_ECD_FAULT_TYPE_OK 0x1
328#define BCM54XX_ECD_FAULT_TYPE_OPEN 0x2
329#define BCM54XX_ECD_FAULT_TYPE_SAME_SHORT 0x3 /* short same pair */
330#define BCM54XX_ECD_FAULT_TYPE_CROSS_SHORT 0x4 /* short different pairs */
331#define BCM54XX_ECD_FAULT_TYPE_BUSY 0x9
332#define BCM54XX_ECD_FAULT_TYPE_PAIR_D_MASK GENMASK(3, 0)
333#define BCM54XX_ECD_FAULT_TYPE_PAIR_C_MASK GENMASK(7, 4)
334#define BCM54XX_ECD_FAULT_TYPE_PAIR_B_MASK GENMASK(11, 8)
335#define BCM54XX_ECD_FAULT_TYPE_PAIR_A_MASK GENMASK(15, 12)
336#define BCM54XX_ECD_PAIR_A_LENGTH_RESULTS 0x2a2
337#define BCM54XX_ECD_PAIR_B_LENGTH_RESULTS 0x2a3
338#define BCM54XX_ECD_PAIR_C_LENGTH_RESULTS 0x2a4
339#define BCM54XX_ECD_PAIR_D_LENGTH_RESULTS 0x2a5
340
341#define BCM54XX_RDB_ECD_PAIR_A_LENGTH_RESULTS 0x2a2
342#define BCM54XX_EXP_ECD_PAIR_A_LENGTH_RESULTS (MII_BCM54XX_EXP_SEL_ER + 0xc2)
343#define BCM54XX_RDB_ECD_PAIR_B_LENGTH_RESULTS 0x2a3
344#define BCM54XX_EXP_ECD_PAIR_B_LENGTH_RESULTS (MII_BCM54XX_EXP_SEL_ER + 0xc3)
345#define BCM54XX_RDB_ECD_PAIR_C_LENGTH_RESULTS 0x2a4
346#define BCM54XX_EXP_ECD_PAIR_C_LENGTH_RESULTS (MII_BCM54XX_EXP_SEL_ER + 0xc4)
347#define BCM54XX_RDB_ECD_PAIR_D_LENGTH_RESULTS 0x2a5
348#define BCM54XX_EXP_ECD_PAIR_D_LENGTH_RESULTS (MII_BCM54XX_EXP_SEL_ER + 0xc5)
349#define BCM54XX_ECD_LENGTH_RESULTS_INVALID 0xffff
350
293#endif /* _LINUX_BRCMPHY_H */351#endif /* _LINUX_BRCMPHY_H */
include/linux/capability.h+5−0
@@ -256,6 +256,11 @@ static inline bool perfmon_capable(void) · 255 unmodified lines
256 return capable(CAP_PERFMON) || capable(CAP_SYS_ADMIN);256 return capable(CAP_PERFMON) || capable(CAP_SYS_ADMIN);
257}257}
258 258
259static inline bool bpf_capable(void)
260{
261 return capable(CAP_BPF) || capable(CAP_SYS_ADMIN);
262}
263
259/* audit system wants to get cap info from files as well */264/* audit system wants to get cap info from files as well */
260extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps);265extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps);
261 266
include/linux/compaction.h+1−1
@@ -86,7 +86,7 @@ static inline unsigned long compact_gap(unsigned int order) · 85 unmodified lines
86#ifdef CONFIG_COMPACTION86#ifdef CONFIG_COMPACTION
87extern int sysctl_compact_memory;87extern int sysctl_compact_memory;
88extern int sysctl_compaction_handler(struct ctl_table *table, int write,88extern int sysctl_compaction_handler(struct ctl_table *table, int write,
89 void __user *buffer, size_t *length, loff_t *ppos);89 void *buffer, size_t *length, loff_t *ppos);
90extern int sysctl_extfrag_threshold;90extern int sysctl_extfrag_threshold;
91extern int sysctl_compact_unevictable_allowed;91extern int sysctl_compact_unevictable_allowed;
92 92
include/linux/coredump.h+4−0
@@ -22,4 +22,8 @@ extern void do_coredump(const kernel_siginfo_t *siginfo); · 21 unmodified lines
22static inline void do_coredump(const kernel_siginfo_t *siginfo) {}22static inline void do_coredump(const kernel_siginfo_t *siginfo) {}
23#endif23#endif
24 24
25extern int core_uses_pid;
26extern char core_pattern[];
27extern unsigned int core_pipe_limit;
28
25#endif /* _LINUX_COREDUMP_H */29#endif /* _LINUX_COREDUMP_H */
include/linux/delay.h+11−0
@@ -65,4 +65,15 @@ static inline void ssleep(unsigned int seconds) · 64 unmodified lines
65 msleep(seconds * 1000);65 msleep(seconds * 1000);
66}66}
67 67
68/* see Documentation/timers/timers-howto.rst for the thresholds */
69static inline void fsleep(unsigned long usecs)
70{
71 if (usecs <= 10)
72 udelay(usecs);
73 else if (usecs <= 20000)
74 usleep_range(usecs, 2 * usecs);
75 else
76 msleep(DIV_ROUND_UP(usecs, 1000));
77}
78
68#endif /* defined(_LINUX_DELAY_H) */79#endif /* defined(_LINUX_DELAY_H) */
include/linux/dsa/8021q.h+57−0
@@ -12,11 +12,31 @@ struct sk_buff; · 11 unmodified lines
12struct net_device;12struct net_device;
13struct packet_type;13struct packet_type;
14 14
15struct dsa_8021q_crosschip_link {
16 struct list_head list;
17 int port;
18 struct dsa_switch *other_ds;
19 int other_port;
20 refcount_t refcount;
21};
22
23#define DSA_8021Q_N_SUBVLAN 8
24
15#if IS_ENABLED(CONFIG_NET_DSA_TAG_8021Q)25#if IS_ENABLED(CONFIG_NET_DSA_TAG_8021Q)
16 26
17int dsa_port_setup_8021q_tagging(struct dsa_switch *ds, int index,27int dsa_port_setup_8021q_tagging(struct dsa_switch *ds, int index,
18 bool enabled);28 bool enabled);
19 29
30int dsa_8021q_crosschip_bridge_join(struct dsa_switch *ds, int port,
31 struct dsa_switch *other_ds,
32 int other_port,
33 struct list_head *crosschip_links);
34
35int dsa_8021q_crosschip_bridge_leave(struct dsa_switch *ds, int port,
36 struct dsa_switch *other_ds,
37 int other_port,
38 struct list_head *crosschip_links);
39
20struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,40struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
21 u16 tpid, u16 tci);41 u16 tpid, u16 tci);
22 42
@@ -24,10 +44,16 @@ u16 dsa_8021q_tx_vid(struct dsa_switch *ds, int port); · 1 unmodified line
24 44
25u16 dsa_8021q_rx_vid(struct dsa_switch *ds, int port);45u16 dsa_8021q_rx_vid(struct dsa_switch *ds, int port);
26 46
47u16 dsa_8021q_rx_vid_subvlan(struct dsa_switch *ds, int port, u16 subvlan);
48
27int dsa_8021q_rx_switch_id(u16 vid);49int dsa_8021q_rx_switch_id(u16 vid);
28 50
29int dsa_8021q_rx_source_port(u16 vid);51int dsa_8021q_rx_source_port(u16 vid);
30 52
53u16 dsa_8021q_rx_subvlan(u16 vid);
54
55bool vid_is_dsa_8021q(u16 vid);
56
31#else57#else
32 58
33int dsa_port_setup_8021q_tagging(struct dsa_switch *ds, int index,59int dsa_port_setup_8021q_tagging(struct dsa_switch *ds, int index,
@@ -36,6 +62,22 @@ int dsa_port_setup_8021q_tagging(struct dsa_switch *ds, int index, · 2 unmodified lines
36 return 0;62 return 0;
37}63}
38 64
65int dsa_8021q_crosschip_bridge_join(struct dsa_switch *ds, int port,
66 struct dsa_switch *other_ds,
67 int other_port,
68 struct list_head *crosschip_links)
69{
70 return 0;
71}
72
73int dsa_8021q_crosschip_bridge_leave(struct dsa_switch *ds, int port,
74 struct dsa_switch *other_ds,
75 int other_port,
76 struct list_head *crosschip_links)
77{
78 return 0;
79}
80
39struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,81struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
40 u16 tpid, u16 tci)82 u16 tpid, u16 tci)
41{83{
@@ -52,6 +94,11 @@ u16 dsa_8021q_rx_vid(struct dsa_switch *ds, int port) · 10 unmodified lines
52 return 0;94 return 0;
53}95}
54 96
97u16 dsa_8021q_rx_vid_subvlan(struct dsa_switch *ds, int port, u16 subvlan)
98{
99 return 0;
100}
101
55int dsa_8021q_rx_switch_id(u16 vid)102int dsa_8021q_rx_switch_id(u16 vid)
56{103{
57 return 0;104 return 0;
@@ -62,6 +109,16 @@ int dsa_8021q_rx_source_port(u16 vid) · 4 unmodified lines
62 return 0;109 return 0;
63}110}
64 111
112u16 dsa_8021q_rx_subvlan(u16 vid)
113{
114 return 0;
115}
116
117bool vid_is_dsa_8021q(u16 vid)
118{
119 return false;
120}
121
65#endif /* IS_ENABLED(CONFIG_NET_DSA_TAG_8021Q) */122#endif /* IS_ENABLED(CONFIG_NET_DSA_TAG_8021Q) */
66 123
67#endif /* _NET_DSA_8021Q_H */124#endif /* _NET_DSA_8021Q_H */
include/linux/dsa/sja1105.h+3−0
@@ -9,6 +9,7 @@ · 8 unmodified lines
9 9
10#include <linux/skbuff.h>10#include <linux/skbuff.h>
11#include <linux/etherdevice.h>11#include <linux/etherdevice.h>
12#include <linux/dsa/8021q.h>
12#include <net/dsa.h>13#include <net/dsa.h>
13 14
14#define ETH_P_SJA1105 ETH_P_DSA_8021Q15#define ETH_P_SJA1105 ETH_P_DSA_8021Q
@@ -53,12 +54,14 @@ struct sja1105_skb_cb { · 38 unmodified lines
53 ((struct sja1105_skb_cb *)DSA_SKB_CB_PRIV(skb))54 ((struct sja1105_skb_cb *)DSA_SKB_CB_PRIV(skb))
54 55
55struct sja1105_port {56struct sja1105_port {
57 u16 subvlan_map[DSA_8021Q_N_SUBVLAN];
56 struct kthread_worker *xmit_worker;58 struct kthread_worker *xmit_worker;
57 struct kthread_work xmit_work;59 struct kthread_work xmit_work;
58 struct sk_buff_head xmit_queue;60 struct sk_buff_head xmit_queue;
59 struct sja1105_tagger_data *data;61 struct sja1105_tagger_data *data;
60 struct dsa_port *dp;62 struct dsa_port *dp;
61 bool hwts_tx_en;63 bool hwts_tx_en;
64 u16 xmit_tpid;
62};65};
63 66
64#endif /* _NET_DSA_SJA1105_H */67#endif /* _NET_DSA_SJA1105_H */
include/linux/etherdevice.h+12−0
@@ -20,6 +20,7 @@ · 19 unmodified lines
20#include <linux/if_ether.h>20#include <linux/if_ether.h>
21#include <linux/netdevice.h>21#include <linux/netdevice.h>
22#include <linux/random.h>22#include <linux/random.h>
23#include <linux/crc32.h>
23#include <asm/unaligned.h>24#include <asm/unaligned.h>
24#include <asm/bitsperlong.h>25#include <asm/bitsperlong.h>
25 26
@@ -265,6 +266,17 @@ static inline void eth_hw_addr_random(struct net_device *dev) · 239 unmodified lines
265 eth_random_addr(dev->dev_addr);266 eth_random_addr(dev->dev_addr);
266}267}
267 268
269/**
270 * eth_hw_addr_crc - Calculate CRC from netdev_hw_addr
271 * @ha: pointer to hardware address
272 *
273 * Calculate CRC from a hardware address as basis for filter hashes.
274 */
275static inline u32 eth_hw_addr_crc(struct netdev_hw_addr *ha)
276{
277 return ether_crc(ETH_ALEN, ha->addr);
278}
279
268/**280/**
269 * ether_addr_copy - Copy an Ethernet address281 * ether_addr_copy - Copy an Ethernet address
270 * @dst: Pointer to a six-byte array Ethernet address destination282 * @dst: Pointer to a six-byte array Ethernet address destination
include/linux/ethtool_netlink.h+54−0
@@ -14,4 +14,58 @@ enum ethtool_multicast_groups { · 13 unmodified lines
14 ETHNL_MCGRP_MONITOR,14 ETHNL_MCGRP_MONITOR,
15};15};
16 16
17struct phy_device;
18
19#if IS_ENABLED(CONFIG_ETHTOOL_NETLINK)
20int ethnl_cable_test_alloc(struct phy_device *phydev, u8 cmd);
21void ethnl_cable_test_free(struct phy_device *phydev);
22void ethnl_cable_test_finished(struct phy_device *phydev);
23int ethnl_cable_test_result(struct phy_device *phydev, u8 pair, u8 result);
24int ethnl_cable_test_fault_length(struct phy_device *phydev, u8 pair, u32 cm);
25int ethnl_cable_test_amplitude(struct phy_device *phydev, u8 pair, s16 mV);
26int ethnl_cable_test_pulse(struct phy_device *phydev, u16 mV);
27int ethnl_cable_test_step(struct phy_device *phydev, u32 first, u32 last,
28 u32 step);
29#else
30static inline int ethnl_cable_test_alloc(struct phy_device *phydev, u8 cmd)
31{
32 return -EOPNOTSUPP;
33}
34
35static inline void ethnl_cable_test_free(struct phy_device *phydev)
36{
37}
38
39static inline void ethnl_cable_test_finished(struct phy_device *phydev)
40{
41}
42static inline int ethnl_cable_test_result(struct phy_device *phydev, u8 pair,
43 u8 result)
44{
45 return -EOPNOTSUPP;
46}
47
48static inline int ethnl_cable_test_fault_length(struct phy_device *phydev,
49 u8 pair, u32 cm)
50{
51 return -EOPNOTSUPP;
52}
53
54static inline int ethnl_cable_test_amplitude(struct phy_device *phydev,
55 u8 pair, s16 mV)
56{
57 return -EOPNOTSUPP;
58}
59
60static inline int ethnl_cable_test_pulse(struct phy_device *phydev, u16 mV)
61{
62 return -EOPNOTSUPP;
63}
64
65static inline int ethnl_cable_test_step(struct phy_device *phydev, u32 first,
66 u32 last, u32 step)
67{
68 return -EOPNOTSUPP;
69}
70#endif /* IS_ENABLED(ETHTOOL_NETLINK) */
17#endif /* _LINUX_ETHTOOL_NETLINK_H_ */71#endif /* _LINUX_ETHTOOL_NETLINK_H_ */
include/linux/file.h+2−0
@@ -94,4 +94,6 @@ extern void fd_install(unsigned int fd, struct file *file); · 93 unmodified lines
94extern void flush_delayed_fput(void);94extern void flush_delayed_fput(void);
95extern void __fput_sync(struct file *);95extern void __fput_sync(struct file *);
96 96
97extern unsigned int sysctl_nr_open_min, sysctl_nr_open_max;
98
97#endif /* __LINUX_FILE_H */99#endif /* __LINUX_FILE_H */
include/linux/filter.h+2−6
@@ -545,10 +545,8 @@ struct bpf_prog { · 544 unmodified lines
545 unsigned int (*bpf_func)(const void *ctx,545 unsigned int (*bpf_func)(const void *ctx,
546 const struct bpf_insn *insn);546 const struct bpf_insn *insn);
547 /* Instructions for interpreter */547 /* Instructions for interpreter */
548 union {548 struct sock_filter insns[0];
549 struct sock_filter insns[0];549 struct bpf_insn insnsi[];
550 struct bpf_insn insnsi[0];
551 };
552};550};
553 551
554struct sk_filter {552struct sk_filter {
@@ -863,8 +861,6 @@ int bpf_prog_create(struct bpf_prog **pfp, struct sock_fprog_kern *fprog); · 308 unmodified lines
863int bpf_prog_create_from_user(struct bpf_prog **pfp, struct sock_fprog *fprog,861int bpf_prog_create_from_user(struct bpf_prog **pfp, struct sock_fprog *fprog,
864 bpf_aux_classic_check_t trans, bool save_orig);862 bpf_aux_classic_check_t trans, bool save_orig);
865void bpf_prog_destroy(struct bpf_prog *fp);863void bpf_prog_destroy(struct bpf_prog *fp);
866const struct bpf_func_proto *
867bpf_base_func_proto(enum bpf_func_id func_id);
868 864
869int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);865int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
870int sk_attach_bpf(u32 ufd, struct sock *sk);866int sk_attach_bpf(u32 ufd, struct sock *sk);
include/linux/fs.h+3−3
@@ -3555,11 +3555,11 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf, · 3554 unmodified lines
3555 3555
3556struct ctl_table;3556struct ctl_table;
3557int proc_nr_files(struct ctl_table *table, int write,3557int proc_nr_files(struct ctl_table *table, int write,
3558 void __user *buffer, size_t *lenp, loff_t *ppos);3558 void *buffer, size_t *lenp, loff_t *ppos);
3559int proc_nr_dentry(struct ctl_table *table, int write,3559int proc_nr_dentry(struct ctl_table *table, int write,
3560 void __user *buffer, size_t *lenp, loff_t *ppos);3560 void *buffer, size_t *lenp, loff_t *ppos);
3561int proc_nr_inodes(struct ctl_table *table, int write,3561int proc_nr_inodes(struct ctl_table *table, int write,
3562 void __user *buffer, size_t *lenp, loff_t *ppos);3562 void *buffer, size_t *lenp, loff_t *ppos);
3563int __init get_filesystem_list(char *buf);3563int __init get_filesystem_list(char *buf);
3564 3564
3565#define __FMODE_EXEC ((__force int) FMODE_EXEC)3565#define __FMODE_EXEC ((__force int) FMODE_EXEC)
include/linux/fsl/ptp_qoriq.h+1−1
@@ -135,7 +135,7 @@ struct ptp_qoriq_registers { · 134 unmodified lines
135#define DEFAULT_CKSEL 1135#define DEFAULT_CKSEL 1
136#define DEFAULT_TMR_PRSC 2136#define DEFAULT_TMR_PRSC 2
137#define DEFAULT_FIPER1_PERIOD 1000000000137#define DEFAULT_FIPER1_PERIOD 1000000000
138#define DEFAULT_FIPER2_PERIOD 100000138#define DEFAULT_FIPER2_PERIOD 1000000000
139 139
140struct ptp_qoriq {140struct ptp_qoriq {
141 void __iomem *base;141 void __iomem *base;
include/linux/ftrace.h+1−2
@@ -1028,8 +1028,7 @@ extern void disable_trace_on_warning(void); · 1027 unmodified lines
1028extern int __disable_trace_on_warning;1028extern int __disable_trace_on_warning;
1029 1029
1030int tracepoint_printk_sysctl(struct ctl_table *table, int write,1030int tracepoint_printk_sysctl(struct ctl_table *table, int write,
1031 void __user *buffer, size_t *lenp,1031 void *buffer, size_t *lenp, loff_t *ppos);
1032 loff_t *ppos);
1033 1032
1034#else /* CONFIG_TRACING */1033#else /* CONFIG_TRACING */
1035static inline void disable_trace_on_warning(void) { }1034static inline void disable_trace_on_warning(void) { }
include/linux/hugetlb.h+7−8
@@ -105,14 +105,13 @@ struct hugepage_subpool *hugepage_new_subpool(struct hstate *h, long max_hpages, · 104 unmodified lines
105void hugepage_put_subpool(struct hugepage_subpool *spool);105void hugepage_put_subpool(struct hugepage_subpool *spool);
106 106
107void reset_vma_resv_huge_pages(struct vm_area_struct *vma);107void reset_vma_resv_huge_pages(struct vm_area_struct *vma);
108int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);108int hugetlb_sysctl_handler(struct ctl_table *, int, void *, size_t *, loff_t *);
109int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);109int hugetlb_overcommit_handler(struct ctl_table *, int, void *, size_t *,
110int hugetlb_treat_movable_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);110 loff_t *);
111 111int hugetlb_treat_movable_handler(struct ctl_table *, int, void *, size_t *,
112#ifdef CONFIG_NUMA112 loff_t *);
113int hugetlb_mempolicy_sysctl_handler(struct ctl_table *, int,113int hugetlb_mempolicy_sysctl_handler(struct ctl_table *, int, void *, size_t *,
114 void __user *, size_t *, loff_t *);114 loff_t *);
115#endif
116 115
117int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *);116int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *);
118long follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *,117long follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *,
include/linux/ieee80211.h+359−8
@@ -9,7 +9,7 @@ · 8 unmodified lines
9 * Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>9 * Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>
10 * Copyright (c) 2013 - 2014 Intel Mobile Communications GmbH10 * Copyright (c) 2013 - 2014 Intel Mobile Communications GmbH
11 * Copyright (c) 2016 - 2017 Intel Deutschland GmbH11 * Copyright (c) 2016 - 2017 Intel Deutschland GmbH
12 * Copyright (c) 2018 - 2019 Intel Corporation12 * Copyright (c) 2018 - 2020 Intel Corporation
13 */13 */
14 14
15#ifndef LINUX_IEEE80211_H15#ifndef LINUX_IEEE80211_H
@@ -105,6 +105,51 @@ · 89 unmodified lines
105 105
106/* extension, added by 802.11ad */106/* extension, added by 802.11ad */
107#define IEEE80211_STYPE_DMG_BEACON 0x0000107#define IEEE80211_STYPE_DMG_BEACON 0x0000
108#define IEEE80211_STYPE_S1G_BEACON 0x0010
109
110/* bits unique to S1G beacon */
111#define IEEE80211_S1G_BCN_NEXT_TBTT 0x100
112
113/* see 802.11ah-2016 9.9 NDP CMAC frames */
114#define IEEE80211_S1G_1MHZ_NDP_BITS 25
115#define IEEE80211_S1G_1MHZ_NDP_BYTES 4
116#define IEEE80211_S1G_2MHZ_NDP_BITS 37
117#define IEEE80211_S1G_2MHZ_NDP_BYTES 5
118
119#define IEEE80211_NDP_FTYPE_CTS 0
120#define IEEE80211_NDP_FTYPE_CF_END 0
121#define IEEE80211_NDP_FTYPE_PS_POLL 1
122#define IEEE80211_NDP_FTYPE_ACK 2
123#define IEEE80211_NDP_FTYPE_PS_POLL_ACK 3
124#define IEEE80211_NDP_FTYPE_BA 4
125#define IEEE80211_NDP_FTYPE_BF_REPORT_POLL 5
126#define IEEE80211_NDP_FTYPE_PAGING 6
127#define IEEE80211_NDP_FTYPE_PREQ 7
128
129#define SM64(f, v) ((((u64)v) << f##_S) & f)
130
131/* NDP CMAC frame fields */
132#define IEEE80211_NDP_FTYPE 0x0000000000000007
133#define IEEE80211_NDP_FTYPE_S 0x0000000000000000
134
135/* 1M Probe Request 11ah 9.9.3.1.1 */
136#define IEEE80211_NDP_1M_PREQ_ANO 0x0000000000000008
137#define IEEE80211_NDP_1M_PREQ_ANO_S 3
138#define IEEE80211_NDP_1M_PREQ_CSSID 0x00000000000FFFF0
139#define IEEE80211_NDP_1M_PREQ_CSSID_S 4
140#define IEEE80211_NDP_1M_PREQ_RTYPE 0x0000000000100000
141#define IEEE80211_NDP_1M_PREQ_RTYPE_S 20
142#define IEEE80211_NDP_1M_PREQ_RSV 0x0000000001E00000
143#define IEEE80211_NDP_1M_PREQ_RSV 0x0000000001E00000
144/* 2M Probe Request 11ah 9.9.3.1.2 */
145#define IEEE80211_NDP_2M_PREQ_ANO 0x0000000000000008
146#define IEEE80211_NDP_2M_PREQ_ANO_S 3
147#define IEEE80211_NDP_2M_PREQ_CSSID 0x0000000FFFFFFFF0
148#define IEEE80211_NDP_2M_PREQ_CSSID_S 4
149#define IEEE80211_NDP_2M_PREQ_RTYPE 0x0000001000000000
150#define IEEE80211_NDP_2M_PREQ_RTYPE_S 36
151
152#define IEEE80211_ANO_NETTYPE_WILD 15
108 153
109/* control extension - for IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTL_EXT */154/* control extension - for IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTL_EXT */
110#define IEEE80211_CTL_EXT_POLL 0x2000155#define IEEE80211_CTL_EXT_POLL 0x2000
@@ -121,6 +166,21 @@ · 10 unmodified lines
121#define IEEE80211_MAX_SN IEEE80211_SN_MASK166#define IEEE80211_MAX_SN IEEE80211_SN_MASK
122#define IEEE80211_SN_MODULO (IEEE80211_MAX_SN + 1)167#define IEEE80211_SN_MODULO (IEEE80211_MAX_SN + 1)
123 168
169
170/* PV1 Layout 11ah 9.8.3.1 */
171#define IEEE80211_PV1_FCTL_VERS 0x0003
172#define IEEE80211_PV1_FCTL_FTYPE 0x001c
173#define IEEE80211_PV1_FCTL_STYPE 0x00e0
174#define IEEE80211_PV1_FCTL_TODS 0x0100
175#define IEEE80211_PV1_FCTL_MOREFRAGS 0x0200
176#define IEEE80211_PV1_FCTL_PM 0x0400
177#define IEEE80211_PV1_FCTL_MOREDATA 0x0800
178#define IEEE80211_PV1_FCTL_PROTECTED 0x1000
179#define IEEE80211_PV1_FCTL_END_SP 0x2000
180#define IEEE80211_PV1_FCTL_RELAYED 0x4000
181#define IEEE80211_PV1_FCTL_ACK_POLICY 0x8000
182#define IEEE80211_PV1_FCTL_CTL_EXT 0x0f00
183
124static inline bool ieee80211_sn_less(u16 sn1, u16 sn2)184static inline bool ieee80211_sn_less(u16 sn1, u16 sn2)
125{185{
126 return ((sn1 - sn2) & IEEE80211_SN_MASK) > (IEEE80211_SN_MODULO >> 1);186 return ((sn1 - sn2) & IEEE80211_SN_MASK) > (IEEE80211_SN_MODULO >> 1);
@@ -148,6 +208,7 @@ static inline u16 ieee80211_sn_sub(u16 sn1, u16 sn2) · 21 unmodified lines
148#define IEEE80211_MAX_FRAG_THRESHOLD 2352208#define IEEE80211_MAX_FRAG_THRESHOLD 2352
149#define IEEE80211_MAX_RTS_THRESHOLD 2353209#define IEEE80211_MAX_RTS_THRESHOLD 2353
150#define IEEE80211_MAX_AID 2007210#define IEEE80211_MAX_AID 2007
211#define IEEE80211_MAX_AID_S1G 8191
151#define IEEE80211_MAX_TIM_LEN 251212#define IEEE80211_MAX_TIM_LEN 251
152#define IEEE80211_MAX_MESH_PEERINGS 63213#define IEEE80211_MAX_MESH_PEERINGS 63
153/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section214/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
@@ -371,6 +432,17 @@ static inline bool ieee80211_is_data(__le16 fc) · 217 unmodified lines
371 cpu_to_le16(IEEE80211_FTYPE_DATA);432 cpu_to_le16(IEEE80211_FTYPE_DATA);
372}433}
373 434
435/**
436 * ieee80211_is_ext - check if type is IEEE80211_FTYPE_EXT
437 * @fc: frame control bytes in little-endian byteorder
438 */
439static inline bool ieee80211_is_ext(__le16 fc)
440{
441 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE)) ==
442 cpu_to_le16(IEEE80211_FTYPE_EXT);
443}
444
445
374/**446/**
375 * ieee80211_is_data_qos - check if type is IEEE80211_FTYPE_DATA and IEEE80211_STYPE_QOS_DATA is set447 * ieee80211_is_data_qos - check if type is IEEE80211_FTYPE_DATA and IEEE80211_STYPE_QOS_DATA is set
376 * @fc: frame control bytes in little-endian byteorder448 * @fc: frame control bytes in little-endian byteorder
@@ -469,6 +541,18 @@ static inline bool ieee80211_is_beacon(__le16 fc) · 92 unmodified lines
469 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON);541 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON);
470}542}
471 543
544/**
545 * ieee80211_is_s1g_beacon - check if IEEE80211_FTYPE_EXT &&
546 * IEEE80211_STYPE_S1G_BEACON
547 * @fc: frame control bytes in little-endian byteorder
548 */
549static inline bool ieee80211_is_s1g_beacon(__le16 fc)
550{
551 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE |
552 IEEE80211_FCTL_STYPE)) ==
553 cpu_to_le16(IEEE80211_FTYPE_EXT | IEEE80211_STYPE_S1G_BEACON);
554}
555
472/**556/**
473 * ieee80211_is_atim - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ATIM557 * ieee80211_is_atim - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ATIM
474 * @fc: frame control bytes in little-endian byteorder558 * @fc: frame control bytes in little-endian byteorder
@@ -716,7 +800,7 @@ struct ieee80211_msrment_ie { · 241 unmodified lines
716 u8 token;800 u8 token;
717 u8 mode;801 u8 mode;
718 u8 type;802 u8 type;
719 u8 request[0];803 u8 request[];
720} __packed;804} __packed;
721 805
722/**806/**
@@ -859,6 +943,7 @@ enum ieee80211_ht_chanwidth_values { · 136 unmodified lines
859 * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_40MHZ: 40 MHz channel width943 * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_40MHZ: 40 MHz channel width
860 * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_80MHZ: 80 MHz channel width944 * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_80MHZ: 80 MHz channel width
861 * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_160MHZ: 160 MHz or 80+80 MHz channel width945 * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_160MHZ: 160 MHz or 80+80 MHz channel width
946 * @IEEE80211_OPMODE_NOTIF_BW_160_80P80: 160 / 80+80 MHz indicator flag
862 * @IEEE80211_OPMODE_NOTIF_RX_NSS_MASK: number of spatial streams mask947 * @IEEE80211_OPMODE_NOTIF_RX_NSS_MASK: number of spatial streams mask
863 * (the NSS value is the value of this field + 1)948 * (the NSS value is the value of this field + 1)
864 * @IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT: number of spatial streams shift949 * @IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT: number of spatial streams shift
@@ -866,11 +951,12 @@ enum ieee80211_ht_chanwidth_values { · 1 unmodified line
866 * using a beamforming steering matrix951 * using a beamforming steering matrix
867 */952 */
868enum ieee80211_vht_opmode_bits {953enum ieee80211_vht_opmode_bits {
869 IEEE80211_OPMODE_NOTIF_CHANWIDTH_MASK = 3,954 IEEE80211_OPMODE_NOTIF_CHANWIDTH_MASK = 0x03,
870 IEEE80211_OPMODE_NOTIF_CHANWIDTH_20MHZ = 0,955 IEEE80211_OPMODE_NOTIF_CHANWIDTH_20MHZ = 0,
871 IEEE80211_OPMODE_NOTIF_CHANWIDTH_40MHZ = 1,956 IEEE80211_OPMODE_NOTIF_CHANWIDTH_40MHZ = 1,
872 IEEE80211_OPMODE_NOTIF_CHANWIDTH_80MHZ = 2,957 IEEE80211_OPMODE_NOTIF_CHANWIDTH_80MHZ = 2,
873 IEEE80211_OPMODE_NOTIF_CHANWIDTH_160MHZ = 3,958 IEEE80211_OPMODE_NOTIF_CHANWIDTH_160MHZ = 3,
959 IEEE80211_OPMODE_NOTIF_BW_160_80P80 = 0x04,
874 IEEE80211_OPMODE_NOTIF_RX_NSS_MASK = 0x70,960 IEEE80211_OPMODE_NOTIF_RX_NSS_MASK = 0x70,
875 IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT = 4,961 IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT = 4,
876 IEEE80211_OPMODE_NOTIF_RX_NSS_TYPE_BF = 0x80,962 IEEE80211_OPMODE_NOTIF_RX_NSS_TYPE_BF = 0x80,
@@ -898,6 +984,59 @@ struct ieee80211_addba_ext_ie { · 21 unmodified lines
898 u8 data;984 u8 data;
899} __packed;985} __packed;
900 986
987/**
988 * struct ieee80211_s1g_bcn_compat_ie
989 *
990 * S1G Beacon Compatibility element
991 */
992struct ieee80211_s1g_bcn_compat_ie {
993 __le16 compat_info;
994 __le16 beacon_int;
995 __le32 tsf_completion;
996} __packed;
997
998/**
999 * struct ieee80211_s1g_oper_ie
1000 *
1001 * S1G Operation element
1002 */
1003struct ieee80211_s1g_oper_ie {
1004 u8 ch_width;
1005 u8 oper_class;
1006 u8 primary_ch;
1007 u8 oper_ch;
1008 __le16 basic_mcs_nss;
1009} __packed;
1010
1011/**
1012 * struct ieee80211_aid_response_ie
1013 *
1014 * AID Response element
1015 */
1016struct ieee80211_aid_response_ie {
1017 __le16 aid;
1018 u8 switch_count;
1019 __le16 response_int;
1020} __packed;
1021
1022struct ieee80211_s1g_cap {
1023 u8 capab_info[10];
1024 u8 supp_mcs_nss[5];
1025} __packed;
1026
1027struct ieee80211_ext {
1028 __le16 frame_control;
1029 __le16 duration;
1030 union {
1031 struct {
1032 u8 sa[ETH_ALEN];
1033 __le32 timestamp;
1034 u8 change_seq;
1035 u8 variable[0];
1036 } __packed s1g_beacon;
1037 } u;
1038} __packed __aligned(2);
1039
901struct ieee80211_mgmt {1040struct ieee80211_mgmt {
902 __le16 frame_control;1041 __le16 frame_control;
903 __le16 duration;1042 __le16 duration;
@@ -1065,6 +1204,7 @@ struct ieee80211_mgmt { · 161 unmodified lines
1065/* Supported rates membership selectors */1204/* Supported rates membership selectors */
1066#define BSS_MEMBERSHIP_SELECTOR_HT_PHY 1271205#define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127
1067#define BSS_MEMBERSHIP_SELECTOR_VHT_PHY 1261206#define BSS_MEMBERSHIP_SELECTOR_VHT_PHY 126
1207#define BSS_MEMBERSHIP_SELECTOR_HE_PHY 122
1068 1208
1069/* mgmt header + 1 byte category code */1209/* mgmt header + 1 byte category code */
1070#define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u)1210#define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u)
@@ -1641,7 +1781,7 @@ struct ieee80211_he_operation { · 570 unmodified lines
1641 __le32 he_oper_params;1781 __le32 he_oper_params;
1642 __le16 he_mcs_nss_set;1782 __le16 he_mcs_nss_set;
1643 /* Optional 0,1,3,4,5,7 or 8 bytes: depends on @he_oper_params */1783 /* Optional 0,1,3,4,5,7 or 8 bytes: depends on @he_oper_params */
1644 u8 optional[0];1784 u8 optional[];
1645} __packed;1785} __packed;
1646 1786
1647/**1787/**
@@ -1653,7 +1793,7 @@ struct ieee80211_he_operation { · 5 unmodified lines
1653struct ieee80211_he_spr {1793struct ieee80211_he_spr {
1654 u8 he_sr_control;1794 u8 he_sr_control;
1655 /* Optional 0 to 19 bytes: depends on @he_sr_control */1795 /* Optional 0 to 19 bytes: depends on @he_sr_control */
1656 u8 optional[0];1796 u8 optional[];
1657} __packed;1797} __packed;
1658 1798
1659/**1799/**
@@ -1731,6 +1871,9 @@ struct ieee80211_mu_edca_param_set { · 71 unmodified lines
1731 * @ext_nss_bw_capable: indicates whether or not the local transmitter1871 * @ext_nss_bw_capable: indicates whether or not the local transmitter
1732 * (rate scaling algorithm) can deal with the new logic1872 * (rate scaling algorithm) can deal with the new logic
1733 * (dot11VHTExtendedNSSBWCapable)1873 * (dot11VHTExtendedNSSBWCapable)
1874 * @max_vht_nss: current maximum NSS as advertised by the STA in
1875 * operating mode notification, can be 0 in which case the
1876 * capability data will be used to derive this (from MCS support)
1734 *1877 *
1735 * Due to the VHT Extended NSS Bandwidth Support, the maximum NSS can1878 * Due to the VHT Extended NSS Bandwidth Support, the maximum NSS can
1736 * vary for a given BW/MCS. This function parses the data.1879 * vary for a given BW/MCS. This function parses the data.
@@ -1739,7 +1882,8 @@ struct ieee80211_mu_edca_param_set { · 2 unmodified lines
1739 */1882 */
1740int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap,1883int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap,
1741 enum ieee80211_vht_chanwidth bw,1884 enum ieee80211_vht_chanwidth bw,
1742 int mcs, bool ext_nss_bw_capable);1885 int mcs, bool ext_nss_bw_capable,
1886 unsigned int max_vht_nss);
1743 1887
1744/* 802.11ax HE MAC capabilities */1888/* 802.11ax HE MAC capabilities */
1745#define IEEE80211_HE_MAC_CAP0_HTC_HE 0x011889#define IEEE80211_HE_MAC_CAP0_HTC_HE 0x01
@@ -1814,6 +1958,8 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap, · 68 unmodified lines
1814#define IEEE80211_HE_MAC_CAP3_FLEX_TWT_SCHED 0x401958#define IEEE80211_HE_MAC_CAP3_FLEX_TWT_SCHED 0x40
1815#define IEEE80211_HE_MAC_CAP3_RX_CTRL_FRAME_TO_MULTIBSS 0x801959#define IEEE80211_HE_MAC_CAP3_RX_CTRL_FRAME_TO_MULTIBSS 0x80
1816 1960
1961#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT 3
1962
1817#define IEEE80211_HE_MAC_CAP4_BSRP_BQRP_A_MPDU_AGG 0x011963#define IEEE80211_HE_MAC_CAP4_BSRP_BQRP_A_MPDU_AGG 0x01
1818#define IEEE80211_HE_MAC_CAP4_QTP 0x021964#define IEEE80211_HE_MAC_CAP4_QTP 0x02
1819#define IEEE80211_HE_MAC_CAP4_BQR 0x041965#define IEEE80211_HE_MAC_CAP4_BQR 0x04
@@ -1835,6 +1981,9 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap, · 15 unmodified lines
1835#define IEEE80211_HE_MAC_CAP5_PUNCTURED_SOUNDING 0x401981#define IEEE80211_HE_MAC_CAP5_PUNCTURED_SOUNDING 0x40
1836#define IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX 0x801982#define IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX 0x80
1837 1983
1984#define IEEE80211_HE_VHT_MAX_AMPDU_FACTOR 20
1985#define IEEE80211_HE_HT_MAX_AMPDU_FACTOR 16
1986
1838/* 802.11ax HE PHY capabilities */1987/* 802.11ax HE PHY capabilities */
1839#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G 0x021988#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G 0x02
1840#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G 0x041989#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G 0x04
@@ -2060,6 +2209,28 @@ ieee80211_he_ppe_size(u8 ppe_thres_hdr, const u8 *phy_cap_info) · 219 unmodified lines
2060#define IEEE80211_HE_OPERATION_PARTIAL_BSS_COLOR 0x400000002209#define IEEE80211_HE_OPERATION_PARTIAL_BSS_COLOR 0x40000000
2061#define IEEE80211_HE_OPERATION_BSS_COLOR_DISABLED 0x800000002210#define IEEE80211_HE_OPERATION_BSS_COLOR_DISABLED 0x80000000
2062 2211
2212/**
2213 * ieee80211_he_6ghz_oper - HE 6 GHz operation Information field
2214 * @primary: primary channel
2215 * @control: control flags
2216 * @ccfs0: channel center frequency segment 0
2217 * @ccfs1: channel center frequency segment 1
2218 * @minrate: minimum rate (in 1 Mbps units)
2219 */
2220struct ieee80211_he_6ghz_oper {
2221 u8 primary;
2222#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH 0x3
2223#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_20MHZ 0
2224#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_40MHZ 1
2225#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_80MHZ 2
2226#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_160MHZ 3
2227#define IEEE80211_HE_6GHZ_OPER_CTRL_DUP_BEACON 0x4
2228 u8 control;
2229 u8 ccfs0;
2230 u8 ccfs1;
2231 u8 minrate;
2232} __packed;
2233
2063/*2234/*
2064 * ieee80211_he_oper_size - calculate 802.11ax HE Operations IE size2235 * ieee80211_he_oper_size - calculate 802.11ax HE Operations IE size
2065 * @he_oper_ie: byte data of the He Operations IE, stating from the byte2236 * @he_oper_ie: byte data of the He Operations IE, stating from the byte
@@ -2086,7 +2257,7 @@ ieee80211_he_oper_size(const u8 *he_oper_ie) · 20 unmodified lines
2086 if (he_oper_params & IEEE80211_HE_OPERATION_CO_HOSTED_BSS)2257 if (he_oper_params & IEEE80211_HE_OPERATION_CO_HOSTED_BSS)
2087 oper_len++;2258 oper_len++;
2088 if (he_oper_params & IEEE80211_HE_OPERATION_6GHZ_OP_INFO)2259 if (he_oper_params & IEEE80211_HE_OPERATION_6GHZ_OP_INFO)
2089 oper_len += 4;2260 oper_len += sizeof(struct ieee80211_he_6ghz_oper);
2090 2261
2091 /* Add the first byte (extension ID) to the total length */2262 /* Add the first byte (extension ID) to the total length */
2092 oper_len++;2263 oper_len++;
@@ -2094,6 +2265,34 @@ ieee80211_he_oper_size(const u8 *he_oper_ie) · 1 unmodified line
2094 return oper_len;2265 return oper_len;
2095}2266}
2096 2267
2268/**
2269 * ieee80211_he_6ghz_oper - obtain 6 GHz operation field
2270 * @he_oper: HE operation element (must be pre-validated for size)
2271 * but may be %NULL
2272 *
2273 * Return: a pointer to the 6 GHz operation field, or %NULL
2274 */
2275static inline const struct ieee80211_he_6ghz_oper *
2276ieee80211_he_6ghz_oper(const struct ieee80211_he_operation *he_oper)
2277{
2278 const u8 *ret = (void *)&he_oper->optional;
2279 u32 he_oper_params;
2280
2281 if (!he_oper)
2282 return NULL;
2283
2284 he_oper_params = le32_to_cpu(he_oper->he_oper_params);
2285
2286 if (!(he_oper_params & IEEE80211_HE_OPERATION_6GHZ_OP_INFO))
2287 return NULL;
2288 if (he_oper_params & IEEE80211_HE_OPERATION_VHT_OPER_INFO)
2289 ret += 3;
2290 if (he_oper_params & IEEE80211_HE_OPERATION_CO_HOSTED_BSS)
2291 ret++;
2292
2293 return (void *)ret;
2294}
2295
2097/* HE Spatial Reuse defines */2296/* HE Spatial Reuse defines */
2098#define IEEE80211_HE_SPR_NON_SRG_OFFSET_PRESENT 0x42297#define IEEE80211_HE_SPR_NON_SRG_OFFSET_PRESENT 0x4
2099#define IEEE80211_HE_SPR_SRG_INFORMATION_PRESENT 0x82298#define IEEE80211_HE_SPR_SRG_INFORMATION_PRESENT 0x8
@@ -2130,6 +2329,86 @@ ieee80211_he_spr_size(const u8 *he_spr_ie) · 30 unmodified lines
2130 return spr_len;2329 return spr_len;
2131}2330}
2132 2331
2332/* S1G Capabilities Information field */
2333#define S1G_CAPAB_B0_S1G_LONG BIT(0)
2334#define S1G_CAPAB_B0_SGI_1MHZ BIT(1)
2335#define S1G_CAPAB_B0_SGI_2MHZ BIT(2)
2336#define S1G_CAPAB_B0_SGI_4MHZ BIT(3)
2337#define S1G_CAPAB_B0_SGI_8MHZ BIT(4)
2338#define S1G_CAPAB_B0_SGI_16MHZ BIT(5)
2339#define S1G_CAPAB_B0_SUPP_CH_WIDTH_MASK (BIT(6) | BIT(7))
2340#define S1G_CAPAB_B0_SUPP_CH_WIDTH_SHIFT 6
2341
2342#define S1G_CAPAB_B1_RX_LDPC BIT(0)
2343#define S1G_CAPAB_B1_TX_STBC BIT(1)
2344#define S1G_CAPAB_B1_RX_STBC BIT(2)
2345#define S1G_CAPAB_B1_SU_BFER BIT(3)
2346#define S1G_CAPAB_B1_SU_BFEE BIT(4)
2347#define S1G_CAPAB_B1_BFEE_STS_MASK (BIT(5) | BIT(6) | BIT(7))
2348#define S1G_CAPAB_B1_BFEE_STS_SHIFT 5
2349
2350#define S1G_CAPAB_B2_SOUNDING_DIMENSIONS_MASK (BIT(0) | BIT(1) | BIT(2))
2351#define S1G_CAPAB_B2_SOUNDING_DIMENSIONS_SHIFT 0
2352#define S1G_CAPAB_B2_MU_BFER BIT(3)
2353#define S1G_CAPAB_B2_MU_BFEE BIT(4)
2354#define S1G_CAPAB_B2_PLUS_HTC_VHT BIT(5)
2355#define S1G_CAPAB_B2_TRAVELING_PILOT_MASK (BIT(6) | BIT(7))
2356#define S1G_CAPAB_B2_TRAVELING_PILOT_SHIFT 6
2357
2358#define S1G_CAPAB_B3_RD_RESPONDER BIT(0)
2359#define S1G_CAPAB_B3_HT_DELAYED_BA BIT(1)
2360#define S1G_CAPAB_B3_MAX_MPDU_LEN BIT(2)
2361#define S1G_CAPAB_B3_MAX_AMPDU_LEN_EXP_MASK (BIT(3) | BIT(4))
2362#define S1G_CAPAB_B3_MAX_AMPDU_LEN_EXP_SHIFT 3
2363#define S1G_CAPAB_B3_MIN_MPDU_START_MASK (BIT(5) | BIT(6) | BIT(7))
2364#define S1G_CAPAB_B3_MIN_MPDU_START_SHIFT 5
2365
2366#define S1G_CAPAB_B4_UPLINK_SYNC BIT(0)
2367#define S1G_CAPAB_B4_DYNAMIC_AID BIT(1)
2368#define S1G_CAPAB_B4_BAT BIT(2)
2369#define S1G_CAPAB_B4_TIME_ADE BIT(3)
2370#define S1G_CAPAB_B4_NON_TIM BIT(4)
2371#define S1G_CAPAB_B4_GROUP_AID BIT(5)
2372#define S1G_CAPAB_B4_STA_TYPE_MASK (BIT(6) | BIT(7))
2373#define S1G_CAPAB_B4_STA_TYPE_SHIFT 6
2374
2375#define S1G_CAPAB_B5_CENT_AUTH_CONTROL BIT(0)
2376#define S1G_CAPAB_B5_DIST_AUTH_CONTROL BIT(1)
2377#define S1G_CAPAB_B5_AMSDU BIT(2)
2378#define S1G_CAPAB_B5_AMPDU BIT(3)
2379#define S1G_CAPAB_B5_ASYMMETRIC_BA BIT(4)
2380#define S1G_CAPAB_B5_FLOW_CONTROL BIT(5)
2381#define S1G_CAPAB_B5_SECTORIZED_BEAM_MASK (BIT(6) | BIT(7))
2382#define S1G_CAPAB_B5_SECTORIZED_BEAM_SHIFT 6
2383
2384#define S1G_CAPAB_B6_OBSS_MITIGATION BIT(0)
2385#define S1G_CAPAB_B6_FRAGMENT_BA BIT(1)
2386#define S1G_CAPAB_B6_NDP_PS_POLL BIT(2)
2387#define S1G_CAPAB_B6_RAW_OPERATION BIT(3)
2388#define S1G_CAPAB_B6_PAGE_SLICING BIT(4)
2389#define S1G_CAPAB_B6_TXOP_SHARING_IMP_ACK BIT(5)
2390#define S1G_CAPAB_B6_VHT_LINK_ADAPT_MASK (BIT(6) | BIT(7))
2391#define S1G_CAPAB_B6_VHT_LINK_ADAPT_SHIFT 6
2392
2393#define S1G_CAPAB_B7_TACK_AS_PS_POLL BIT(0)
2394#define S1G_CAPAB_B7_DUP_1MHZ BIT(1)
2395#define S1G_CAPAB_B7_MCS_NEGOTIATION BIT(2)
2396#define S1G_CAPAB_B7_1MHZ_CTL_RESPONSE_PREAMBLE BIT(3)
2397#define S1G_CAPAB_B7_NDP_BFING_REPORT_POLL BIT(4)
2398#define S1G_CAPAB_B7_UNSOLICITED_DYN_AID BIT(5)
2399#define S1G_CAPAB_B7_SECTOR_TRAINING_OPERATION BIT(6)
2400#define S1G_CAPAB_B7_TEMP_PS_MODE_SWITCH BIT(7)
2401
2402#define S1G_CAPAB_B8_TWT_GROUPING BIT(0)
2403#define S1G_CAPAB_B8_BDT BIT(1)
2404#define S1G_CAPAB_B8_COLOR_MASK (BIT(2) | BIT(3) | BIT(4))
2405#define S1G_CAPAB_B8_COLOR_SHIFT 2
2406#define S1G_CAPAB_B8_TWT_REQUEST BIT(5)
2407#define S1G_CAPAB_B8_TWT_RESPOND BIT(6)
2408#define S1G_CAPAB_B8_PV1_FRAME BIT(7)
2409
2410#define S1G_CAPAB_B9_LINK_ADAPT_PER_CONTROL_RESPONSE BIT(0)
2411
2133/* Authentication algorithms */2412/* Authentication algorithms */
2134#define WLAN_AUTH_OPEN 02413#define WLAN_AUTH_OPEN 0
2135#define WLAN_AUTH_SHARED_KEY 12414#define WLAN_AUTH_SHARED_KEY 1
@@ -2525,8 +2804,14 @@ enum ieee80211_eid { · 389 unmodified lines
2525 WLAN_EID_QUIET_CHANNEL = 198,2804 WLAN_EID_QUIET_CHANNEL = 198,
2526 WLAN_EID_OPMODE_NOTIF = 199,2805 WLAN_EID_OPMODE_NOTIF = 199,
2527 2806
2807 WLAN_EID_REDUCED_NEIGHBOR_REPORT = 201,
2808
2809 WLAN_EID_S1G_BCN_COMPAT = 213,
2810 WLAN_EID_S1G_SHORT_BCN_INTERVAL = 214,
2811 WLAN_EID_S1G_CAPABILITIES = 217,
2528 WLAN_EID_VENDOR_SPECIFIC = 221,2812 WLAN_EID_VENDOR_SPECIFIC = 221,
2529 WLAN_EID_QOS_PARAMETER = 222,2813 WLAN_EID_QOS_PARAMETER = 222,
2814 WLAN_EID_S1G_OPERATION = 232,
2530 WLAN_EID_CAG_NUMBER = 237,2815 WLAN_EID_CAG_NUMBER = 237,
2531 WLAN_EID_AP_CSN = 239,2816 WLAN_EID_AP_CSN = 239,
2532 WLAN_EID_FILS_INDICATION = 240,2817 WLAN_EID_FILS_INDICATION = 240,
@@ -2554,9 +2839,19 @@ enum ieee80211_eid_ext { · 21 unmodified lines
2554 WLAN_EID_EXT_UORA = 37,2839 WLAN_EID_EXT_UORA = 37,
2555 WLAN_EID_EXT_HE_MU_EDCA = 38,2840 WLAN_EID_EXT_HE_MU_EDCA = 38,
2556 WLAN_EID_EXT_HE_SPR = 39,2841 WLAN_EID_EXT_HE_SPR = 39,
2842 WLAN_EID_EXT_NDP_FEEDBACK_REPORT_PARAMSET = 41,
2843 WLAN_EID_EXT_BSS_COLOR_CHG_ANN = 42,
2844 WLAN_EID_EXT_QUIET_TIME_PERIOD_SETUP = 43,
2845 WLAN_EID_EXT_ESS_REPORT = 45,
2846 WLAN_EID_EXT_OPS = 46,
2847 WLAN_EID_EXT_HE_BSS_LOAD = 47,
2557 WLAN_EID_EXT_MAX_CHANNEL_SWITCH_TIME = 52,2848 WLAN_EID_EXT_MAX_CHANNEL_SWITCH_TIME = 52,
2558 WLAN_EID_EXT_MULTIPLE_BSSID_CONFIGURATION = 55,2849 WLAN_EID_EXT_MULTIPLE_BSSID_CONFIGURATION = 55,
2559 WLAN_EID_EXT_NON_INHERITANCE = 56,2850 WLAN_EID_EXT_NON_INHERITANCE = 56,
2851 WLAN_EID_EXT_KNOWN_BSSID = 57,
2852 WLAN_EID_EXT_SHORT_SSID_LIST = 58,
2853 WLAN_EID_EXT_HE_6GHZ_CAPA = 59,
2854 WLAN_EID_EXT_UL_MU_POWER_CAPA = 60,
2560};2855};
2561 2856
2562/* Action category code */2857/* Action category code */
@@ -2787,7 +3082,7 @@ enum ieee80211_tdls_actioncode { · 224 unmodified lines
2787#define WLAN_EXT_CAPA10_OBSS_NARROW_BW_RU_TOLERANCE_SUPPORT BIT(7)3082#define WLAN_EXT_CAPA10_OBSS_NARROW_BW_RU_TOLERANCE_SUPPORT BIT(7)
2788 3083
2789/* Defines support for enhanced multi-bssid advertisement*/3084/* Defines support for enhanced multi-bssid advertisement*/
2790#define WLAN_EXT_CAPA11_EMA_SUPPORT BIT(1)3085#define WLAN_EXT_CAPA11_EMA_SUPPORT BIT(3)
2791 3086
2792/* TDLS specific payload type in the LLC/SNAP header */3087/* TDLS specific payload type in the LLC/SNAP header */
2793#define WLAN_TDLS_SNAP_RFTYPE 0x23088#define WLAN_TDLS_SNAP_RFTYPE 0x2
@@ -3099,6 +3394,24 @@ struct ieee80211_tspec_ie { · 305 unmodified lines
3099 __le16 medium_time;3394 __le16 medium_time;
3100} __packed;3395} __packed;
3101 3396
3397struct ieee80211_he_6ghz_capa {
3398 /* uses IEEE80211_HE_6GHZ_CAP_* below */
3399 __le16 capa;
3400} __packed;
3401
3402/* HE 6 GHz band capabilities */
3403/* uses enum ieee80211_min_mpdu_spacing values */
3404#define IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START 0x0007
3405/* uses enum ieee80211_vht_max_ampdu_length_exp values */
3406#define IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP 0x0038
3407/* uses IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_* values */
3408#define IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN 0x00c0
3409/* WLAN_HT_CAP_SM_PS_* values */
3410#define IEEE80211_HE_6GHZ_CAP_SM_PS 0x0600
3411#define IEEE80211_HE_6GHZ_CAP_RD_RESPONDER 0x0800
3412#define IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS 0x1000
3413#define IEEE80211_HE_6GHZ_CAP_TX_ANTPAT_CONS 0x2000
3414
3102/**3415/**
3103 * ieee80211_get_qos_ctl - get pointer to qos control bytes3416 * ieee80211_get_qos_ctl - get pointer to qos control bytes
3104 * @hdr: the frame3417 * @hdr: the frame
@@ -3323,6 +3636,18 @@ static inline int ieee80211_get_tdls_action(struct sk_buff *skb, u32 hdr_size) · 218 unmodified lines
3323#define TU_TO_JIFFIES(x) (usecs_to_jiffies((x) * 1024))3636#define TU_TO_JIFFIES(x) (usecs_to_jiffies((x) * 1024))
3324#define TU_TO_EXP_TIME(x) (jiffies + TU_TO_JIFFIES(x))3637#define TU_TO_EXP_TIME(x) (jiffies + TU_TO_JIFFIES(x))
3325 3638
3639/* convert frequencies */
3640#define MHZ_TO_KHZ(freq) ((freq) * 1000)
3641#define KHZ_TO_MHZ(freq) ((freq) / 1000)
3642#define PR_KHZ(f) KHZ_TO_MHZ(f), f % 1000
3643#define KHZ_F "%d.%03d"
3644
3645/* convert powers */
3646#define DBI_TO_MBI(gain) ((gain) * 100)
3647#define MBI_TO_DBI(gain) ((gain) / 100)
3648#define DBM_TO_MBM(gain) ((gain) * 100)
3649#define MBM_TO_DBM(gain) ((gain) / 100)
3650
3326/**3651/**
3327 * ieee80211_action_contains_tpc - checks if the frame contains TPC element3652 * ieee80211_action_contains_tpc - checks if the frame contains TPC element
3328 * @skb: the skb containing the frame, length will be checked3653 * @skb: the skb containing the frame, length will be checked
@@ -3430,4 +3755,30 @@ static inline bool for_each_element_completed(const struct element *element, · 101 unmodified lines
3430#define WLAN_RSNX_CAPA_PROTECTED_TWT BIT(4)3755#define WLAN_RSNX_CAPA_PROTECTED_TWT BIT(4)
3431#define WLAN_RSNX_CAPA_SAE_H2E BIT(5)3756#define WLAN_RSNX_CAPA_SAE_H2E BIT(5)
3432 3757
3758/*
3759 * reduced neighbor report, based on Draft P802.11ax_D5.0,
3760 * section 9.4.2.170
3761 */
3762#define IEEE80211_AP_INFO_TBTT_HDR_TYPE 0x03
3763#define IEEE80211_AP_INFO_TBTT_HDR_FILTERED 0x04
3764#define IEEE80211_AP_INFO_TBTT_HDR_COLOC 0x08
3765#define IEEE80211_AP_INFO_TBTT_HDR_COUNT 0xF0
3766#define IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM 8
3767#define IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM 12
3768
3769#define IEEE80211_RNR_TBTT_PARAMS_OCT_RECOMMENDED 0x01
3770#define IEEE80211_RNR_TBTT_PARAMS_SAME_SSID 0x02
3771#define IEEE80211_RNR_TBTT_PARAMS_MULTI_BSSID 0x04
3772#define IEEE80211_RNR_TBTT_PARAMS_TRANSMITTED_BSSID 0x08
3773#define IEEE80211_RNR_TBTT_PARAMS_COLOC_ESS 0x10
3774#define IEEE80211_RNR_TBTT_PARAMS_PROBE_ACTIVE 0x20
3775#define IEEE80211_RNR_TBTT_PARAMS_COLOC_AP 0x40
3776
3777struct ieee80211_neighbor_ap_info {
3778 u8 tbtt_info_hdr;
3779 u8 tbtt_info_len;
3780 u8 op_class;
3781 u8 channel;
3782} __packed;
3783
3433#endif /* LINUX_IEEE80211_H */3784#endif /* LINUX_IEEE80211_H */
include/linux/if_bridge.h+2−0
@@ -47,6 +47,8 @@ struct br_ip_list { · 46 unmodified lines
47#define BR_BCAST_FLOOD BIT(14)47#define BR_BCAST_FLOOD BIT(14)
48#define BR_NEIGH_SUPPRESS BIT(15)48#define BR_NEIGH_SUPPRESS BIT(15)
49#define BR_ISOLATED BIT(16)49#define BR_ISOLATED BIT(16)
50#define BR_MRP_AWARE BIT(17)
51#define BR_MRP_LOST_CONT BIT(18)
50 52
51#define BR_DEFAULT_AGEING_TIME (300 * HZ)53#define BR_DEFAULT_AGEING_TIME (300 * HZ)
52 54
include/linux/if_team.h+2−5
@@ -67,7 +67,7 @@ struct team_port { · 66 unmodified lines
67 u16 queue_id;67 u16 queue_id;
68 struct list_head qom_list; /* node in queue override mapping list */68 struct list_head qom_list; /* node in queue override mapping list */
69 struct rcu_head rcu;69 struct rcu_head rcu;
70 long mode_priv[0];70 long mode_priv[];
71};71};
72 72
73static inline struct team_port *team_port_get_rcu(const struct net_device *dev)73static inline struct team_port *team_port_get_rcu(const struct net_device *dev)
@@ -102,10 +102,7 @@ static inline bool team_port_dev_txable(const struct net_device *port_dev) · 28 unmodified lines
102static inline void team_netpoll_send_skb(struct team_port *port,102static inline void team_netpoll_send_skb(struct team_port *port,
103 struct sk_buff *skb)103 struct sk_buff *skb)
104{104{
105 struct netpoll *np = port->np;105 netpoll_send_skb(port->np, skb);
106
107 if (np)
108 netpoll_send_skb(np, skb);
109}106}
110#else107#else
111static inline void team_netpoll_send_skb(struct team_port *port,108static inline void team_netpoll_send_skb(struct team_port *port,
include/linux/igmp.h+1−1
@@ -123,7 +123,7 @@ extern int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf,int ifindex); · 122 unmodified lines
123extern int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf,123extern int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf,
124 struct ip_msfilter __user *optval, int __user *optlen);124 struct ip_msfilter __user *optval, int __user *optlen);
125extern int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf,125extern int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf,
126 struct group_filter __user *optval, int __user *optlen);126 struct sockaddr_storage __user *p);
127extern int ip_mc_sf_allow(struct sock *sk, __be32 local, __be32 rmt,127extern int ip_mc_sf_allow(struct sock *sk, __be32 local, __be32 rmt,
128 int dif, int sdif);128 int dif, int sdif);
129extern void ip_mc_init_dev(struct in_device *);129extern void ip_mc_init_dev(struct in_device *);
include/linux/inet_diag.h+5−1
@@ -71,7 +71,11 @@ static inline size_t inet_diag_msg_attrs_size(void) · 70 unmodified lines
71 + nla_total_size(1) /* INET_DIAG_SKV6ONLY */71 + nla_total_size(1) /* INET_DIAG_SKV6ONLY */
72#endif72#endif
73 + nla_total_size(4) /* INET_DIAG_MARK */73 + nla_total_size(4) /* INET_DIAG_MARK */
74 + nla_total_size(4); /* INET_DIAG_CLASS_ID */74 + nla_total_size(4) /* INET_DIAG_CLASS_ID */
75#ifdef CONFIG_SOCK_CGROUP_DATA
76 + nla_total_size_64bit(sizeof(u64)) /* INET_DIAG_CGROUP_ID */
77#endif
78 ;
75}79}
76int inet_diag_msg_attrs_fill(struct sock *sk, struct sk_buff *skb,80int inet_diag_msg_attrs_fill(struct sock *sk, struct sk_buff *skb,
77 struct inet_diag_msg *r, int ext,81 struct inet_diag_msg *r, int ext,
include/linux/iopoll.h+43−19
@@ -57,6 +57,48 @@ · 56 unmodified lines
57 (cond) ? 0 : -ETIMEDOUT; \57 (cond) ? 0 : -ETIMEDOUT; \
58})58})
59 59
60/**
61 * read_poll_timeout_atomic - Periodically poll an address until a condition is
62 * met or a timeout occurs
63 * @op: accessor function (takes @addr as its only argument)
64 * @addr: Address to poll
65 * @val: Variable to read the value into
66 * @cond: Break condition (usually involving @val)
67 * @delay_us: Time to udelay between reads in us (0 tight-loops). Should
68 * be less than ~10us since udelay is used (see
69 * Documentation/timers/timers-howto.rst).
70 * @timeout_us: Timeout in us, 0 means never timeout
71 * @delay_before_read: if it is true, delay @delay_us before read.
72 *
73 * Returns 0 on success and -ETIMEDOUT upon a timeout. In either
74 * case, the last read value at @args is stored in @val.
75 *
76 * When available, you'll probably want to use one of the specialized
77 * macros defined below rather than this macro directly.
78 */
79#define read_poll_timeout_atomic(op, val, cond, delay_us, timeout_us, \
80 delay_before_read, args...) \
81({ \
82 u64 __timeout_us = (timeout_us); \
83 unsigned long __delay_us = (delay_us); \
84 ktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \
85 if (delay_before_read && __delay_us) \
86 udelay(__delay_us); \
87 for (;;) { \
88 (val) = op(args); \
89 if (cond) \
90 break; \
91 if (__timeout_us && \
92 ktime_compare(ktime_get(), __timeout) > 0) { \
93 (val) = op(args); \
94 break; \
95 } \
96 if (__delay_us) \
97 udelay(__delay_us); \
98 } \
99 (cond) ? 0 : -ETIMEDOUT; \
100})
101
60/**102/**
61 * readx_poll_timeout - Periodically poll an address until a condition is met or a timeout occurs103 * readx_poll_timeout - Periodically poll an address until a condition is met or a timeout occurs
62 * @op: accessor function (takes @addr as its only argument)104 * @op: accessor function (takes @addr as its only argument)
@@ -96,25 +138,7 @@ · 33 unmodified lines
96 * macros defined below rather than this macro directly.138 * macros defined below rather than this macro directly.
97 */139 */
98#define readx_poll_timeout_atomic(op, addr, val, cond, delay_us, timeout_us) \140#define readx_poll_timeout_atomic(op, addr, val, cond, delay_us, timeout_us) \
99({ \141 read_poll_timeout_atomic(op, val, cond, delay_us, timeout_us, false, addr)
100 u64 __timeout_us = (timeout_us); \
101 unsigned long __delay_us = (delay_us); \
102 ktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \
103 for (;;) { \
104 (val) = op(addr); \
105 if (cond) \
106 break; \
107 if (__timeout_us && \
108 ktime_compare(ktime_get(), __timeout) > 0) { \
109 (val) = op(addr); \
110 break; \
111 } \
112 if (__delay_us) \
113 udelay(__delay_us); \
114 } \
115 (cond) ? 0 : -ETIMEDOUT; \
116})
117
118 142
119#define readb_poll_timeout(addr, val, cond, delay_us, timeout_us) \143#define readb_poll_timeout(addr, val, cond, delay_us, timeout_us) \
120 readx_poll_timeout(readb, addr, val, cond, delay_us, timeout_us)144 readx_poll_timeout(readb, addr, val, cond, delay_us, timeout_us)
include/linux/kprobes.h+1−1
@@ -312,7 +312,7 @@ DEFINE_INSN_CACHE_OPS(optinsn); · 311 unmodified lines
312#ifdef CONFIG_SYSCTL312#ifdef CONFIG_SYSCTL
313extern int sysctl_kprobes_optimization;313extern int sysctl_kprobes_optimization;
314extern int proc_kprobes_optimization_handler(struct ctl_table *table,314extern int proc_kprobes_optimization_handler(struct ctl_table *table,
315 int write, void __user *buffer,315 int write, void *buffer,
316 size_t *length, loff_t *ppos);316 size_t *length, loff_t *ppos);
317#endif317#endif
318extern void wait_for_kprobe_optimizer(void);318extern void wait_for_kprobe_optimizer(void);
include/linux/latencytop.h+2−2
@@ -38,8 +38,8 @@ account_scheduler_latency(struct task_struct *task, int usecs, int inter) · 37 unmodified lines
38 38
39void clear_tsk_latency_tracing(struct task_struct *p);39void clear_tsk_latency_tracing(struct task_struct *p);
40 40
41extern int sysctl_latencytop(struct ctl_table *table, int write,41int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
42 void __user *buffer, size_t *lenp, loff_t *ppos);42 size_t *lenp, loff_t *ppos);
43 43
44#else44#else
45 45
include/linux/mdio.h+31−0
@@ -9,6 +9,13 @@ · 8 unmodified lines
9#include <uapi/linux/mdio.h>9#include <uapi/linux/mdio.h>
10#include <linux/mod_devicetable.h>10#include <linux/mod_devicetable.h>
11 11
12/* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit
13 * IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips.
14 */
15#define MII_ADDR_C45 (1<<30)
16#define MII_DEVADDR_C45_SHIFT 16
17#define MII_REGADDR_C45_MASK GENMASK(15, 0)
18
12struct gpio_desc;19struct gpio_desc;
13struct mii_bus;20struct mii_bus;
14 21
@@ -326,6 +333,30 @@ int mdiobus_write_nested(struct mii_bus *bus, int addr, u32 regnum, u16 val); · 311 unmodified lines
326int mdiobus_modify(struct mii_bus *bus, int addr, u32 regnum, u16 mask,333int mdiobus_modify(struct mii_bus *bus, int addr, u32 regnum, u16 mask,
327 u16 set);334 u16 set);
328 335
336static inline u32 mdiobus_c45_addr(int devad, u16 regnum)
337{
338 return MII_ADDR_C45 | devad << MII_DEVADDR_C45_SHIFT | regnum;
339}
340
341static inline int __mdiobus_c45_read(struct mii_bus *bus, int prtad, int devad,
342 u16 regnum)
343{
344 return __mdiobus_read(bus, prtad, mdiobus_c45_addr(devad, regnum));
345}
346
347static inline int __mdiobus_c45_write(struct mii_bus *bus, int prtad, int devad,
348 u16 regnum, u16 val)
349{
350 return __mdiobus_write(bus, prtad, mdiobus_c45_addr(devad, regnum),
351 val);
352}
353
354static inline int mdiobus_c45_read(struct mii_bus *bus, int prtad, int devad,
355 u16 regnum)
356{
357 return mdiobus_read(bus, prtad, mdiobus_c45_addr(devad, regnum));
358}
359
329int mdiobus_register_device(struct mdio_device *mdiodev);360int mdiobus_register_device(struct mdio_device *mdiodev);
330int mdiobus_unregister_device(struct mdio_device *mdiodev);361int mdiobus_unregister_device(struct mdio_device *mdiodev);
331bool mdiobus_is_registered_device(struct mii_bus *bus, int addr);362bool mdiobus_is_registered_device(struct mii_bus *bus, int addr);
include/linux/mlx4/qp.h+1−1
@@ -362,7 +362,7 @@ struct mlx4_wqe_datagram_seg { · 361 unmodified lines
362 362
363struct mlx4_wqe_lso_seg {363struct mlx4_wqe_lso_seg {
364 __be32 mss_hdr_size;364 __be32 mss_hdr_size;
365 __be32 header[0];365 __be32 header[];
366};366};
367 367
368enum mlx4_wqe_bind_seg_flags2 {368enum mlx4_wqe_bind_seg_flags2 {
include/linux/mlx5/accel.h+13−1
@@ -76,7 +76,7 @@ struct aes_gcm_keymat { · 75 unmodified lines
76struct mlx5_accel_esp_xfrm_attrs {76struct mlx5_accel_esp_xfrm_attrs {
77 enum mlx5_accel_esp_action action;77 enum mlx5_accel_esp_action action;
78 u32 esn;78 u32 esn;
79 u32 spi;79 __be32 spi;
80 u32 seq;80 u32 seq;
81 u32 tfc_pad;81 u32 tfc_pad;
82 u32 flags;82 u32 flags;
@@ -92,6 +92,18 @@ struct mlx5_accel_esp_xfrm_attrs { · 9 unmodified lines
92 union {92 union {
93 struct aes_gcm_keymat aes_gcm;93 struct aes_gcm_keymat aes_gcm;
94 } keymat;94 } keymat;
95
96 union {
97 __be32 a4;
98 __be32 a6[4];
99 } saddr;
100
101 union {
102 __be32 a4;
103 __be32 a6[4];
104 } daddr;
105
106 u8 is_ipv6;
95};107};
96 108
97struct mlx5_accel_esp_xfrm {109struct mlx5_accel_esp_xfrm {
include/linux/mlx5/cmd.h+0−51
@@ -1,51 +0,0 @@
1/*
2 * Copyright (c) 2013-2015, Mellanox Technologies. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:
9 *
10 * Redistribution and use in source and binary forms, with or
11 * without modification, are permitted provided that the following
12 * conditions are met:
13 *
14 * - Redistributions of source code must retain the above
15 * copyright notice, this list of conditions and the following
16 * disclaimer.
17 *
18 * - Redistributions in binary form must reproduce the above
19 * copyright notice, this list of conditions and the following
20 * disclaimer in the documentation and/or other materials
21 * provided with the distribution.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * SOFTWARE.
31 */
32
33#ifndef MLX5_CMD_H
34#define MLX5_CMD_H
35
36#include <linux/types.h>
37
38struct manage_pages_layout {
39 u64 ptr;
40 u32 reserved;
41 u16 num_entries;
42 u16 func_id;
43};
44
45
46struct mlx5_cmd_alloc_uar_imm_out {
47 u32 rsvd[3];
48 u32 uarn;
49};
50
51#endif /* MLX5_CMD_H */
include/linux/mlx5/cq.h+1−1
@@ -188,7 +188,7 @@ int mlx5_core_create_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq, · 187 unmodified lines
188 u32 *in, int inlen, u32 *out, int outlen);188 u32 *in, int inlen, u32 *out, int outlen);
189int mlx5_core_destroy_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq);189int mlx5_core_destroy_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq);
190int mlx5_core_query_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq,190int mlx5_core_query_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq,
191 u32 *out, int outlen);191 u32 *out);
192int mlx5_core_modify_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq,192int mlx5_core_modify_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq,
193 u32 *in, int inlen);193 u32 *in, int inlen);
194int mlx5_core_modify_cq_moderation(struct mlx5_core_dev *dev,194int mlx5_core_modify_cq_moderation(struct mlx5_core_dev *dev,
include/linux/mlx5/device.h+41−3
@@ -364,6 +364,7 @@ enum { · 363 unmodified lines
364enum {364enum {
365 MLX5_GENERAL_SUBTYPE_DELAY_DROP_TIMEOUT = 0x1,365 MLX5_GENERAL_SUBTYPE_DELAY_DROP_TIMEOUT = 0x1,
366 MLX5_GENERAL_SUBTYPE_PCI_POWER_CHANGE_EVENT = 0x5,366 MLX5_GENERAL_SUBTYPE_PCI_POWER_CHANGE_EVENT = 0x5,
367 MLX5_GENERAL_SUBTYPE_PCI_SYNC_FOR_FW_UPDATE_EVENT = 0x8,
367};368};
368 369
369enum {370enum {
@@ -449,10 +450,12 @@ enum { · 79 unmodified lines
449 450
450enum {451enum {
451 MLX5_OPC_MOD_TLS_TIS_STATIC_PARAMS = 0x1,452 MLX5_OPC_MOD_TLS_TIS_STATIC_PARAMS = 0x1,
453 MLX5_OPC_MOD_TLS_TIR_STATIC_PARAMS = 0x2,
452};454};
453 455
454enum {456enum {
455 MLX5_OPC_MOD_TLS_TIS_PROGRESS_PARAMS = 0x1,457 MLX5_OPC_MOD_TLS_TIS_PROGRESS_PARAMS = 0x1,
458 MLX5_OPC_MOD_TLS_TIR_PROGRESS_PARAMS = 0x2,
456};459};
457 460
458enum {461enum {
@@ -689,6 +692,19 @@ struct mlx5_eqe_temp_warning { · 230 unmodified lines
689 __be64 sensor_warning_lsb;692 __be64 sensor_warning_lsb;
690} __packed;693} __packed;
691 694
695#define SYNC_RST_STATE_MASK 0xf
696
697enum sync_rst_state_type {
698 MLX5_SYNC_RST_STATE_RESET_REQUEST = 0x0,
699 MLX5_SYNC_RST_STATE_RESET_NOW = 0x1,
700 MLX5_SYNC_RST_STATE_RESET_ABORT = 0x2,
701};
702
703struct mlx5_eqe_sync_fw_update {
704 u8 reserved_at_0[3];
705 u8 sync_rst_state;
706};
707
692union ev_data {708union ev_data {
693 __be32 raw[7];709 __be32 raw[7];
694 struct mlx5_eqe_cmd cmd;710 struct mlx5_eqe_cmd cmd;
@@ -707,6 +723,7 @@ union ev_data { · 12 unmodified lines
707 struct mlx5_eqe_dct dct;723 struct mlx5_eqe_dct dct;
708 struct mlx5_eqe_temp_warning temp_warning;724 struct mlx5_eqe_temp_warning temp_warning;
709 struct mlx5_eqe_xrq_err xrq_err;725 struct mlx5_eqe_xrq_err xrq_err;
726 struct mlx5_eqe_sync_fw_update sync_fw_update;
710} __packed;727} __packed;
711 728
712struct mlx5_eqe {729struct mlx5_eqe {
@@ -749,7 +766,7 @@ struct mlx5_err_cqe { · 36 unmodified lines
749};766};
750 767
751struct mlx5_cqe64 {768struct mlx5_cqe64 {
752 u8 outer_l3_tunneled;769 u8 tls_outer_l3_tunneled;
753 u8 rsvd0;770 u8 rsvd0;
754 __be16 wqe_id;771 __be16 wqe_id;
755 u8 lro_tcppsh_abort_dupack;772 u8 lro_tcppsh_abort_dupack;
@@ -767,7 +784,12 @@ struct mlx5_cqe64 { · 11 unmodified lines
767 u8 l4_l3_hdr_type;784 u8 l4_l3_hdr_type;
768 __be16 vlan_info;785 __be16 vlan_info;
769 __be32 srqn; /* [31:24]: lro_num_seg, [23:0]: srqn */786 __be32 srqn; /* [31:24]: lro_num_seg, [23:0]: srqn */
770 __be32 imm_inval_pkey;787 union {
788 __be32 immediate;
789 __be32 inval_rkey;
790 __be32 pkey;
791 __be32 ft_metadata;
792 };
771 u8 rsvd40[4];793 u8 rsvd40[4];
772 __be32 byte_cnt;794 __be32 byte_cnt;
773 __be32 timestamp_h;795 __be32 timestamp_h;
@@ -834,7 +856,12 @@ static inline u8 get_cqe_l3_hdr_type(struct mlx5_cqe64 *cqe) · 60 unmodified lines
834 856
835static inline bool cqe_is_tunneled(struct mlx5_cqe64 *cqe)857static inline bool cqe_is_tunneled(struct mlx5_cqe64 *cqe)
836{858{
837 return cqe->outer_l3_tunneled & 0x1;859 return cqe->tls_outer_l3_tunneled & 0x1;
860}
861
862static inline u8 get_cqe_tls_offload(struct mlx5_cqe64 *cqe)
863{
864 return (cqe->tls_outer_l3_tunneled >> 3) & 0x3;
838}865}
839 866
840static inline bool cqe_has_vlan(struct mlx5_cqe64 *cqe)867static inline bool cqe_has_vlan(struct mlx5_cqe64 *cqe)
@@ -922,6 +949,13 @@ enum { · 81 unmodified lines
922 CQE_L4_OK = 1 << 2,949 CQE_L4_OK = 1 << 2,
923};950};
924 951
952enum {
953 CQE_TLS_OFFLOAD_NOT_DECRYPTED = 0x0,
954 CQE_TLS_OFFLOAD_DECRYPTED = 0x1,
955 CQE_TLS_OFFLOAD_RESYNC = 0x2,
956 CQE_TLS_OFFLOAD_ERROR = 0x3,
957};
958
925struct mlx5_sig_err_cqe {959struct mlx5_sig_err_cqe {
926 u8 rsvd0[16];960 u8 rsvd0[16];
927 __be32 expected_trans_sig;961 __be32 expected_trans_sig;
@@ -1107,6 +1141,7 @@ enum mlx5_cap_type { · 179 unmodified lines
1107 MLX5_CAP_TLS,1141 MLX5_CAP_TLS,
1108 MLX5_CAP_VDPA_EMULATION = 0x13,1142 MLX5_CAP_VDPA_EMULATION = 0x13,
1109 MLX5_CAP_DEV_EVENT = 0x14,1143 MLX5_CAP_DEV_EVENT = 0x14,
1144 MLX5_CAP_IPSEC,
1110 /* NUM OF CAP Types */1145 /* NUM OF CAP Types */
1111 MLX5_CAP_NUM1146 MLX5_CAP_NUM
1112};1147};
@@ -1324,6 +1359,9 @@ enum mlx5_qcam_feature_groups { · 211 unmodified lines
1324 MLX5_GET64(device_virtio_emulation_cap, \1359 MLX5_GET64(device_virtio_emulation_cap, \
1325 (mdev)->caps.hca_cur[MLX5_CAP_VDPA_EMULATION], cap)1360 (mdev)->caps.hca_cur[MLX5_CAP_VDPA_EMULATION], cap)
1326 1361
1362#define MLX5_CAP_IPSEC(mdev, cap)\
1363 MLX5_GET(ipsec_cap, (mdev)->caps.hca_cur[MLX5_CAP_IPSEC], cap)
1364
1327enum {1365enum {
1328 MLX5_CMD_STAT_OK = 0x0,1366 MLX5_CMD_STAT_OK = 0x0,
1329 MLX5_CMD_STAT_INT_ERR = 0x1,1367 MLX5_CMD_STAT_INT_ERR = 0x1,
include/linux/mlx5/driver.h+20−15
@@ -130,6 +130,7 @@ enum { · 129 unmodified lines
130 MLX5_REG_NODE_DESC = 0x6001,130 MLX5_REG_NODE_DESC = 0x6001,
131 MLX5_REG_HOST_ENDIANNESS = 0x7004,131 MLX5_REG_HOST_ENDIANNESS = 0x7004,
132 MLX5_REG_MCIA = 0x9014,132 MLX5_REG_MCIA = 0x9014,
133 MLX5_REG_MFRL = 0x9028,
133 MLX5_REG_MLCR = 0x902b,134 MLX5_REG_MLCR = 0x902b,
134 MLX5_REG_MTRC_CAP = 0x9040,135 MLX5_REG_MTRC_CAP = 0x9040,
135 MLX5_REG_MTRC_CONF = 0x9041,136 MLX5_REG_MTRC_CONF = 0x9041,
@@ -200,7 +201,7 @@ struct mlx5_rsc_debug { · 64 unmodified lines
200 void *object;201 void *object;
201 enum dbg_rsc_type type;202 enum dbg_rsc_type type;
202 struct dentry *root;203 struct dentry *root;
203 struct mlx5_field_desc fields[0];204 struct mlx5_field_desc fields[];
204};205};
205 206
206enum mlx5_dev_event {207enum mlx5_dev_event {
@@ -297,7 +298,7 @@ struct mlx5_cmd { · 90 unmodified lines
297 struct mlx5_cmd_debug dbg;298 struct mlx5_cmd_debug dbg;
298 struct cmd_msg_cache cache[MLX5_NUM_COMMAND_CACHES];299 struct cmd_msg_cache cache[MLX5_NUM_COMMAND_CACHES];
299 int checksum_disabled;300 int checksum_disabled;
300 struct mlx5_cmd_stats stats[MLX5_CMD_OP_MAX];301 struct mlx5_cmd_stats *stats;
301};302};
302 303
303struct mlx5_port_caps {304struct mlx5_port_caps {
@@ -549,7 +550,6 @@ struct mlx5_priv { · 245 unmodified lines
549 struct mlx5_core_health health;550 struct mlx5_core_health health;
550 551
551 /* start: qp staff */552 /* start: qp staff */
552 struct mlx5_qp_table qp_table;
553 struct dentry *qp_debugfs;553 struct dentry *qp_debugfs;
554 struct dentry *eq_debugfs;554 struct dentry *eq_debugfs;
555 struct dentry *cq_debugfs;555 struct dentry *cq_debugfs;
@@ -695,7 +695,6 @@ struct mlx5_core_dev { · 139 unmodified lines
695 unsigned long intf_state;695 unsigned long intf_state;
696 struct mlx5_priv priv;696 struct mlx5_priv priv;
697 struct mlx5_profile *profile;697 struct mlx5_profile *profile;
698 atomic_t num_qps;
699 u32 issi;698 u32 issi;
700 struct mlx5e_resources mlx5e_res;699 struct mlx5e_resources mlx5e_res;
701 struct mlx5_dm *dm;700 struct mlx5_dm *dm;
@@ -833,11 +832,6 @@ static inline u16 fw_rev_sub(struct mlx5_core_dev *dev) · 131 unmodified lines
833 return ioread32be(&dev->iseg->cmdif_rev_fw_sub) & 0xffff;832 return ioread32be(&dev->iseg->cmdif_rev_fw_sub) & 0xffff;
834}833}
835 834
836static inline u16 cmdif_rev(struct mlx5_core_dev *dev)
837{
838 return ioread32be(&dev->iseg->cmdif_rev_fw_sub) >> 16;
839}
840
841static inline u32 mlx5_base_mkey(const u32 key)835static inline u32 mlx5_base_mkey(const u32 key)
842{836{
843 return key & 0xffffff00u;837 return key & 0xffffff00u;
@@ -919,6 +913,19 @@ int mlx5_cmd_exec_cb(struct mlx5_async_ctx *ctx, void *in, int in_size, · 75 unmodified lines
919 913
920int mlx5_cmd_exec(struct mlx5_core_dev *dev, void *in, int in_size, void *out,914int mlx5_cmd_exec(struct mlx5_core_dev *dev, void *in, int in_size, void *out,
921 int out_size);915 int out_size);
916
917#define mlx5_cmd_exec_inout(dev, ifc_cmd, in, out) \
918 ({ \
919 mlx5_cmd_exec(dev, in, MLX5_ST_SZ_BYTES(ifc_cmd##_in), out, \
920 MLX5_ST_SZ_BYTES(ifc_cmd##_out)); \
921 })
922
923#define mlx5_cmd_exec_in(dev, ifc_cmd, in) \
924 ({ \
925 u32 _out[MLX5_ST_SZ_DW(ifc_cmd##_out)] = {}; \
926 mlx5_cmd_exec_inout(dev, ifc_cmd, in, _out); \
927 })
928
922int mlx5_cmd_exec_polling(struct mlx5_core_dev *dev, void *in, int in_size,929int mlx5_cmd_exec_polling(struct mlx5_core_dev *dev, void *in, int in_size,
923 void *out, int out_size);930 void *out, int out_size);
924void mlx5_cmd_mbox_status(void *out, u8 *status, u32 *syndrome);931void mlx5_cmd_mbox_status(void *out, u8 *status, u32 *syndrome);
@@ -1016,11 +1023,6 @@ int mlx5_core_roce_gid_set(struct mlx5_core_dev *dev, unsigned int index, · 91 unmodified lines
1016 u8 roce_version, u8 roce_l3_type, const u8 *gid,1023 u8 roce_version, u8 roce_l3_type, const u8 *gid,
1017 const u8 *mac, bool vlan, u16 vlan_id, u8 port_num);1024 const u8 *mac, bool vlan, u16 vlan_id, u8 port_num);
1018 1025
1019static inline int fw_initializing(struct mlx5_core_dev *dev)
1020{
1021 return ioread32be(&dev->iseg->initializing) >> 31;
1022}
1023
1024static inline u32 mlx5_mkey_to_idx(u32 mkey)1026static inline u32 mlx5_mkey_to_idx(u32 mkey)
1025{1027{
1026 return mkey >> 8;1028 return mkey >> 8;
@@ -1078,6 +1080,8 @@ bool mlx5_lag_is_sriov(struct mlx5_core_dev *dev); · 51 unmodified lines
1078bool mlx5_lag_is_multipath(struct mlx5_core_dev *dev);1080bool mlx5_lag_is_multipath(struct mlx5_core_dev *dev);
1079bool mlx5_lag_is_active(struct mlx5_core_dev *dev);1081bool mlx5_lag_is_active(struct mlx5_core_dev *dev);
1080struct net_device *mlx5_lag_get_roce_netdev(struct mlx5_core_dev *dev);1082struct net_device *mlx5_lag_get_roce_netdev(struct mlx5_core_dev *dev);
1083u8 mlx5_lag_get_slave_port(struct mlx5_core_dev *dev,
1084 struct net_device *slave);
1081int mlx5_lag_query_cong_counters(struct mlx5_core_dev *dev,1085int mlx5_lag_query_cong_counters(struct mlx5_core_dev *dev,
1082 u64 *values,1086 u64 *values,
1083 int num_counters,1087 int num_counters,
@@ -1085,7 +1089,8 @@ int mlx5_lag_query_cong_counters(struct mlx5_core_dev *dev, · 1 unmodified line
1085struct mlx5_uars_page *mlx5_get_uars_page(struct mlx5_core_dev *mdev);1089struct mlx5_uars_page *mlx5_get_uars_page(struct mlx5_core_dev *mdev);
1086void mlx5_put_uars_page(struct mlx5_core_dev *mdev, struct mlx5_uars_page *up);1090void mlx5_put_uars_page(struct mlx5_core_dev *mdev, struct mlx5_uars_page *up);
1087int mlx5_dm_sw_icm_alloc(struct mlx5_core_dev *dev, enum mlx5_sw_icm_type type,1091int mlx5_dm_sw_icm_alloc(struct mlx5_core_dev *dev, enum mlx5_sw_icm_type type,
1088 u64 length, u16 uid, phys_addr_t *addr, u32 *obj_id);1092 u64 length, u32 log_alignment, u16 uid,
1093 phys_addr_t *addr, u32 *obj_id);
1089int mlx5_dm_sw_icm_dealloc(struct mlx5_core_dev *dev, enum mlx5_sw_icm_type type,1094int mlx5_dm_sw_icm_dealloc(struct mlx5_core_dev *dev, enum mlx5_sw_icm_type type,
1090 u64 length, u16 uid, phys_addr_t addr, u32 obj_id);1095 u64 length, u16 uid, phys_addr_t addr, u32 obj_id);
1091 1096
include/linux/mlx5/fs.h+1−0
@@ -42,6 +42,7 @@ enum { · 41 unmodified lines
42 MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO = 1 << 16,42 MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO = 1 << 16,
43 MLX5_FLOW_CONTEXT_ACTION_ENCRYPT = 1 << 17,43 MLX5_FLOW_CONTEXT_ACTION_ENCRYPT = 1 << 17,
44 MLX5_FLOW_CONTEXT_ACTION_DECRYPT = 1 << 18,44 MLX5_FLOW_CONTEXT_ACTION_DECRYPT = 1 << 18,
45 MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_NS = 1 << 19,
45};46};
46 47
47enum {48enum {
include/linux/mlx5/mlx5_ifc.h+166−58
@@ -74,6 +74,7 @@ enum { · 73 unmodified lines
74 MLX5_SET_HCA_CAP_OP_MOD_GENERAL_DEVICE = 0x0,74 MLX5_SET_HCA_CAP_OP_MOD_GENERAL_DEVICE = 0x0,
75 MLX5_SET_HCA_CAP_OP_MOD_ODP = 0x2,75 MLX5_SET_HCA_CAP_OP_MOD_ODP = 0x2,
76 MLX5_SET_HCA_CAP_OP_MOD_ATOMIC = 0x3,76 MLX5_SET_HCA_CAP_OP_MOD_ATOMIC = 0x3,
77 MLX5_SET_HCA_CAP_OP_MOD_ROCE = 0x4,
77};78};
78 79
79enum {80enum {
@@ -583,9 +584,7 @@ struct mlx5_ifc_fte_match_set_misc2_bits { · 503 unmodified lines
583 584
584 u8 metadata_reg_a[0x20];585 u8 metadata_reg_a[0x20];
585 586
586 u8 metadata_reg_b[0x20];587 u8 reserved_at_1a0[0x60];
587
588 u8 reserved_at_1c0[0x40];
589};588};
590 589
591struct mlx5_ifc_fte_match_set_misc3_bits {590struct mlx5_ifc_fte_match_set_misc3_bits {
@@ -885,7 +884,8 @@ struct mlx5_ifc_per_protocol_networking_offload_caps_bits { · 293 unmodified lines
885 u8 tunnel_stateless_vxlan_gpe[0x1];884 u8 tunnel_stateless_vxlan_gpe[0x1];
886 u8 tunnel_stateless_ipv4_over_vxlan[0x1];885 u8 tunnel_stateless_ipv4_over_vxlan[0x1];
887 u8 tunnel_stateless_ip_over_ip[0x1];886 u8 tunnel_stateless_ip_over_ip[0x1];
888 u8 reserved_at_2a[0x6];887 u8 insert_trailer[0x1];
888 u8 reserved_at_2b[0x5];
889 u8 max_vxlan_udp_ports[0x8];889 u8 max_vxlan_udp_ports[0x8];
890 u8 reserved_at_38[0x6];890 u8 reserved_at_38[0x6];
891 u8 max_geneve_opt_len[0x1];891 u8 max_geneve_opt_len[0x1];
@@ -903,7 +903,9 @@ struct mlx5_ifc_per_protocol_networking_offload_caps_bits { · 11 unmodified lines
903 903
904struct mlx5_ifc_roce_cap_bits {904struct mlx5_ifc_roce_cap_bits {
905 u8 roce_apm[0x1];905 u8 roce_apm[0x1];
906 u8 reserved_at_1[0x1f];906 u8 reserved_at_1[0x3];
907 u8 sw_r_roce_src_udp_port[0x1];
908 u8 reserved_at_5[0x1b];
907 909
908 u8 reserved_at_20[0x60];910 u8 reserved_at_20[0x60];
909 911
@@ -1097,6 +1099,23 @@ struct mlx5_ifc_tls_cap_bits { · 187 unmodified lines
1097 u8 reserved_at_20[0x7e0];1099 u8 reserved_at_20[0x7e0];
1098};1100};
1099 1101
1102struct mlx5_ifc_ipsec_cap_bits {
1103 u8 ipsec_full_offload[0x1];
1104 u8 ipsec_crypto_offload[0x1];
1105 u8 ipsec_esn[0x1];
1106 u8 ipsec_crypto_esp_aes_gcm_256_encrypt[0x1];
1107 u8 ipsec_crypto_esp_aes_gcm_128_encrypt[0x1];
1108 u8 ipsec_crypto_esp_aes_gcm_256_decrypt[0x1];
1109 u8 ipsec_crypto_esp_aes_gcm_128_decrypt[0x1];
1110 u8 reserved_at_7[0x4];
1111 u8 log_max_ipsec_offload[0x5];
1112 u8 reserved_at_10[0x10];
1113
1114 u8 min_log_ipsec_full_replay_window[0x8];
1115 u8 max_log_ipsec_full_replay_window[0x8];
1116 u8 reserved_at_30[0x7d0];
1117};
1118
1100enum {1119enum {
1101 MLX5_WQ_TYPE_LINKED_LIST = 0x0,1120 MLX5_WQ_TYPE_LINKED_LIST = 0x0,
1102 MLX5_WQ_TYPE_CYCLIC = 0x1,1121 MLX5_WQ_TYPE_CYCLIC = 0x1,
@@ -1189,7 +1208,9 @@ struct mlx5_ifc_cmd_hca_cap_bits { · 86 unmodified lines
1189 u8 reserved_at_99[0x2];1208 u8 reserved_at_99[0x2];
1190 u8 log_max_qp[0x5];1209 u8 log_max_qp[0x5];
1191 1210
1192 u8 reserved_at_a0[0xb];1211 u8 reserved_at_a0[0x3];
1212 u8 ece_support[0x1];
1213 u8 reserved_at_a4[0x7];
1193 u8 log_max_srq[0x5];1214 u8 log_max_srq[0x5];
1194 u8 reserved_at_b0[0x10];1215 u8 reserved_at_b0[0x10];
1195 1216
@@ -1223,7 +1244,9 @@ struct mlx5_ifc_cmd_hca_cap_bits { · 27 unmodified lines
1223 u8 reserved_at_130[0xa];1244 u8 reserved_at_130[0xa];
1224 u8 log_max_ra_res_dc[0x6];1245 u8 log_max_ra_res_dc[0x6];
1225 1246
1226 u8 reserved_at_140[0x9];1247 u8 reserved_at_140[0x6];
1248 u8 release_all_pages[0x1];
1249 u8 reserved_at_147[0x2];
1227 u8 roce_accl[0x1];1250 u8 roce_accl[0x1];
1228 u8 log_max_ra_req_qp[0x6];1251 u8 log_max_ra_req_qp[0x6];
1229 u8 reserved_at_150[0xa];1252 u8 reserved_at_150[0xa];
@@ -1296,7 +1319,9 @@ struct mlx5_ifc_cmd_hca_cap_bits { · 66 unmodified lines
1296 u8 wol_p[0x1];1319 u8 wol_p[0x1];
1297 1320
1298 u8 stat_rate_support[0x10];1321 u8 stat_rate_support[0x10];
1299 u8 reserved_at_1f0[0xc];1322 u8 reserved_at_1f0[0x1];
1323 u8 pci_sync_for_fw_update_event[0x1];
1324 u8 reserved_at_1f2[0xa];
1300 u8 cqe_version[0x4];1325 u8 cqe_version[0x4];
1301 1326
1302 u8 compact_address_vector[0x1];1327 u8 compact_address_vector[0x1];
@@ -1461,13 +1486,14 @@ struct mlx5_ifc_cmd_hca_cap_bits { · 158 unmodified lines
1461 1486
1462 u8 reserved_at_460[0x3];1487 u8 reserved_at_460[0x3];
1463 u8 log_max_uctx[0x5];1488 u8 log_max_uctx[0x5];
1464 u8 reserved_at_468[0x3];1489 u8 reserved_at_468[0x2];
1490 u8 ipsec_offload[0x1];
1465 u8 log_max_umem[0x5];1491 u8 log_max_umem[0x5];
1466 u8 max_num_eqs[0x10];1492 u8 max_num_eqs[0x10];
1467 1493
1468 u8 reserved_at_480[0x1];1494 u8 reserved_at_480[0x1];
1469 u8 tls_tx[0x1];1495 u8 tls_tx[0x1];
1470 u8 reserved_at_482[0x1];1496 u8 tls_rx[0x1];
1471 u8 log_max_l2_table[0x5];1497 u8 log_max_l2_table[0x5];
1472 u8 reserved_at_488[0x8];1498 u8 reserved_at_488[0x8];
1473 u8 log_uar_page_sz[0x10];1499 u8 log_uar_page_sz[0x10];
@@ -1677,7 +1703,7 @@ struct mlx5_ifc_wq_bits { · 203 unmodified lines
1677 1703
1678 u8 reserved_at_140[0x4c0];1704 u8 reserved_at_140[0x4c0];
1679 1705
1680 struct mlx5_ifc_cmd_pas_bits pas[0];1706 struct mlx5_ifc_cmd_pas_bits pas[];
1681};1707};
1682 1708
1683struct mlx5_ifc_rq_num_bits {1709struct mlx5_ifc_rq_num_bits {
@@ -1895,7 +1921,7 @@ struct mlx5_ifc_resource_dump_menu_segment_bits { · 211 unmodified lines
1895 u8 reserved_at_20[0x10];1921 u8 reserved_at_20[0x10];
1896 u8 num_of_records[0x10];1922 u8 num_of_records[0x10];
1897 1923
1898 struct mlx5_ifc_resource_dump_menu_record_bits record[0];1924 struct mlx5_ifc_resource_dump_menu_record_bits record[];
1899};1925};
1900 1926
1901struct mlx5_ifc_resource_dump_resource_segment_bits {1927struct mlx5_ifc_resource_dump_resource_segment_bits {
@@ -1907,7 +1933,7 @@ struct mlx5_ifc_resource_dump_resource_segment_bits { · 5 unmodified lines
1907 1933
1908 u8 index2[0x20];1934 u8 index2[0x20];
1909 1935
1910 u8 payload[0][0x20];1936 u8 payload[][0x20];
1911};1937};
1912 1938
1913struct mlx5_ifc_resource_dump_terminate_segment_bits {1939struct mlx5_ifc_resource_dump_terminate_segment_bits {
@@ -2984,7 +3010,7 @@ struct mlx5_ifc_flow_context_bits { · 1070 unmodified lines
2984 3010
2985 u8 reserved_at_1200[0x600];3011 u8 reserved_at_1200[0x600];
2986 3012
2987 union mlx5_ifc_dest_format_struct_flow_counter_list_auto_bits destination[0];3013 union mlx5_ifc_dest_format_struct_flow_counter_list_auto_bits destination[];
2988};3014};
2989 3015
2990enum {3016enum {
@@ -3112,7 +3138,8 @@ struct mlx5_ifc_tirc_bits { · 121 unmodified lines
3112 u8 reserved_at_0[0x20];3138 u8 reserved_at_0[0x20];
3113 3139
3114 u8 disp_type[0x4];3140 u8 disp_type[0x4];
3115 u8 reserved_at_24[0x1c];3141 u8 tls_en[0x1];
3142 u8 reserved_at_25[0x1b];
3116 3143
3117 u8 reserved_at_40[0x40];3144 u8 reserved_at_40[0x40];
3118 3145
@@ -3276,7 +3303,7 @@ struct mlx5_ifc_rqtc_bits { · 157 unmodified lines
3276 3303
3277 u8 reserved_at_e0[0x6a0];3304 u8 reserved_at_e0[0x6a0];
3278 3305
3279 struct mlx5_ifc_rq_num_bits rq_num[0];3306 struct mlx5_ifc_rq_num_bits rq_num[];
3280};3307};
3281 3308
3282enum {3309enum {
@@ -3388,7 +3415,7 @@ struct mlx5_ifc_nic_vport_context_bits { · 105 unmodified lines
3388 3415
3389 u8 reserved_at_7e0[0x20];3416 u8 reserved_at_7e0[0x20];
3390 3417
3391 u8 current_uc_mac_address[0][0x40];3418 u8 current_uc_mac_address[][0x40];
3392};3419};
3393 3420
3394enum {3421enum {
@@ -4140,7 +4167,8 @@ enum { · 745 unmodified lines
4140 MLX5_SET_FTE_MODIFY_ENABLE_MASK_ACTION = 0x0,4167 MLX5_SET_FTE_MODIFY_ENABLE_MASK_ACTION = 0x0,
4141 MLX5_SET_FTE_MODIFY_ENABLE_MASK_FLOW_TAG = 0x1,4168 MLX5_SET_FTE_MODIFY_ENABLE_MASK_FLOW_TAG = 0x1,
4142 MLX5_SET_FTE_MODIFY_ENABLE_MASK_DESTINATION_LIST = 0x2,4169 MLX5_SET_FTE_MODIFY_ENABLE_MASK_DESTINATION_LIST = 0x2,
4143 MLX5_SET_FTE_MODIFY_ENABLE_MASK_FLOW_COUNTERS = 0x34170 MLX5_SET_FTE_MODIFY_ENABLE_MASK_FLOW_COUNTERS = 0x3,
4171 MLX5_SET_FTE_MODIFY_ENABLE_MASK_IPSEC_OBJ_ID = 0x4
4144};4172};
4145 4173
4146struct mlx5_ifc_set_fte_out_bits {4174struct mlx5_ifc_set_fte_out_bits {
@@ -4190,7 +4218,8 @@ struct mlx5_ifc_rts2rts_qp_out_bits { · 43 unmodified lines
4190 4218
4191 u8 syndrome[0x20];4219 u8 syndrome[0x20];
4192 4220
4193 u8 reserved_at_40[0x40];4221 u8 reserved_at_40[0x20];
4222 u8 ece[0x20];
4194};4223};
4195 4224
4196struct mlx5_ifc_rts2rts_qp_in_bits {4225struct mlx5_ifc_rts2rts_qp_in_bits {
@@ -4207,7 +4236,7 @@ struct mlx5_ifc_rts2rts_qp_in_bits { · 10 unmodified lines
4207 4236
4208 u8 opt_param_mask[0x20];4237 u8 opt_param_mask[0x20];
4209 4238
4210 u8 reserved_at_a0[0x20];4239 u8 ece[0x20];
4211 4240
4212 struct mlx5_ifc_qpc_bits qpc;4241 struct mlx5_ifc_qpc_bits qpc;
4213 4242
@@ -4220,7 +4249,8 @@ struct mlx5_ifc_rtr2rts_qp_out_bits { · 6 unmodified lines
4220 4249
4221 u8 syndrome[0x20];4250 u8 syndrome[0x20];
4222 4251
4223 u8 reserved_at_40[0x40];4252 u8 reserved_at_40[0x20];
4253 u8 ece[0x20];
4224};4254};
4225 4255
4226struct mlx5_ifc_rtr2rts_qp_in_bits {4256struct mlx5_ifc_rtr2rts_qp_in_bits {
@@ -4237,7 +4267,7 @@ struct mlx5_ifc_rtr2rts_qp_in_bits { · 10 unmodified lines
4237 4267
4238 u8 opt_param_mask[0x20];4268 u8 opt_param_mask[0x20];
4239 4269
4240 u8 reserved_at_a0[0x20];4270 u8 ece[0x20];
4241 4271
4242 struct mlx5_ifc_qpc_bits qpc;4272 struct mlx5_ifc_qpc_bits qpc;
4243 4273
@@ -4310,7 +4340,7 @@ struct mlx5_ifc_query_xrc_srq_out_bits { · 66 unmodified lines
4310 4340
4311 u8 reserved_at_280[0x600];4341 u8 reserved_at_280[0x600];
4312 4342
4313 u8 pas[0][0x40];4343 u8 pas[][0x40];
4314};4344};
4315 4345
4316struct mlx5_ifc_query_xrc_srq_in_bits {4346struct mlx5_ifc_query_xrc_srq_in_bits {
@@ -4588,7 +4618,7 @@ struct mlx5_ifc_query_srq_out_bits { · 271 unmodified lines
4588 4618
4589 u8 reserved_at_280[0x600];4619 u8 reserved_at_280[0x600];
4590 4620
4591 u8 pas[0][0x40];4621 u8 pas[][0x40];
4592};4622};
4593 4623
4594struct mlx5_ifc_query_srq_in_bits {4624struct mlx5_ifc_query_srq_in_bits {
@@ -4789,7 +4819,8 @@ struct mlx5_ifc_query_qp_out_bits { · 194 unmodified lines
4789 4819
4790 u8 syndrome[0x20];4820 u8 syndrome[0x20];
4791 4821
4792 u8 reserved_at_40[0x40];4822 u8 reserved_at_40[0x20];
4823 u8 ece[0x20];
4793 4824
4794 u8 opt_param_mask[0x20];4825 u8 opt_param_mask[0x20];
4795 4826
@@ -4799,7 +4830,7 @@ struct mlx5_ifc_query_qp_out_bits { · 3 unmodified lines
4799 4830
4800 u8 reserved_at_800[0x80];4831 u8 reserved_at_800[0x80];
4801 4832
4802 u8 pas[0][0x40];4833 u8 pas[][0x40];
4803};4834};
4804 4835
4805struct mlx5_ifc_query_qp_in_bits {4836struct mlx5_ifc_query_qp_in_bits {
@@ -5132,7 +5163,7 @@ struct mlx5_ifc_query_hca_vport_pkey_out_bits { · 326 unmodified lines
5132 5163
5133 u8 reserved_at_40[0x40];5164 u8 reserved_at_40[0x40];
5134 5165
5135 struct mlx5_ifc_pkey_bits pkey[0];5166 struct mlx5_ifc_pkey_bits pkey[];
5136};5167};
5137 5168
5138struct mlx5_ifc_query_hca_vport_pkey_in_bits {5169struct mlx5_ifc_query_hca_vport_pkey_in_bits {
@@ -5168,7 +5199,7 @@ struct mlx5_ifc_query_hca_vport_gid_out_bits { · 29 unmodified lines
5168 u8 gids_num[0x10];5199 u8 gids_num[0x10];
5169 u8 reserved_at_70[0x10];5200 u8 reserved_at_70[0x10];
5170 5201
5171 struct mlx5_ifc_array128_auto_bits gid[0];5202 struct mlx5_ifc_array128_auto_bits gid[];
5172};5203};
5173 5204
5174struct mlx5_ifc_query_hca_vport_gid_in_bits {5205struct mlx5_ifc_query_hca_vport_gid_in_bits {
@@ -5436,7 +5467,7 @@ struct mlx5_ifc_query_flow_counter_out_bits { · 261 unmodified lines
5436 5467
5437 u8 reserved_at_40[0x40];5468 u8 reserved_at_40[0x40];
5438 5469
5439 struct mlx5_ifc_traffic_counter_bits flow_statistics[0];5470 struct mlx5_ifc_traffic_counter_bits flow_statistics[];
5440};5471};
5441 5472
5442struct mlx5_ifc_query_flow_counter_in_bits {5473struct mlx5_ifc_query_flow_counter_in_bits {
@@ -5530,7 +5561,7 @@ struct mlx5_ifc_query_eq_out_bits { · 87 unmodified lines
5530 5561
5531 u8 reserved_at_300[0x580];5562 u8 reserved_at_300[0x580];
5532 5563
5533 u8 pas[0][0x40];5564 u8 pas[][0x40];
5534};5565};
5535 5566
5536struct mlx5_ifc_query_eq_in_bits {5567struct mlx5_ifc_query_eq_in_bits {
@@ -5555,7 +5586,7 @@ struct mlx5_ifc_packet_reformat_context_in_bits { · 18 unmodified lines
5555 u8 reserved_at_20[0x10];5586 u8 reserved_at_20[0x10];
5556 u8 reformat_data[2][0x8];5587 u8 reformat_data[2][0x8];
5557 5588
5558 u8 more_reformat_data[0][0x8];5589 u8 more_reformat_data[][0x8];
5559};5590};
5560 5591
5561struct mlx5_ifc_query_packet_reformat_context_out_bits {5592struct mlx5_ifc_query_packet_reformat_context_out_bits {
@@ -5566,7 +5597,7 @@ struct mlx5_ifc_query_packet_reformat_context_out_bits { · 4 unmodified lines
5566 5597
5567 u8 reserved_at_40[0xa0];5598 u8 reserved_at_40[0xa0];
5568 5599
5569 struct mlx5_ifc_packet_reformat_context_in_bits packet_reformat_context[0];5600 struct mlx5_ifc_packet_reformat_context_in_bits packet_reformat_context[];
5570};5601};
5571 5602
5572struct mlx5_ifc_query_packet_reformat_context_in_bits {5603struct mlx5_ifc_query_packet_reformat_context_in_bits {
@@ -5667,9 +5698,9 @@ struct mlx5_ifc_copy_action_in_bits { · 94 unmodified lines
5667 u8 reserved_at_38[0x8];5698 u8 reserved_at_38[0x8];
5668};5699};
5669 5700
5670union mlx5_ifc_set_action_in_add_action_in_auto_bits {5701union mlx5_ifc_set_add_copy_action_in_auto_bits {
5671 struct mlx5_ifc_set_action_in_bits set_action_in;5702 struct mlx5_ifc_set_action_in_bits set_action_in;
5672 struct mlx5_ifc_add_action_in_bits add_action_in;5703 struct mlx5_ifc_add_action_in_bits add_action_in;
5673 struct mlx5_ifc_copy_action_in_bits copy_action_in;5704 struct mlx5_ifc_copy_action_in_bits copy_action_in;
5674 u8 reserved_at_0[0x40];5705 u8 reserved_at_0[0x40];
5675};5706};
@@ -5743,7 +5774,7 @@ struct mlx5_ifc_alloc_modify_header_context_in_bits { · 67 unmodified lines
5743 u8 reserved_at_68[0x10];5774 u8 reserved_at_68[0x10];
5744 u8 num_of_actions[0x8];5775 u8 num_of_actions[0x8];
5745 5776
5746 union mlx5_ifc_set_action_in_add_action_in_auto_bits actions[0];5777 union mlx5_ifc_set_add_copy_action_in_auto_bits actions[0];
5747};5778};
5748 5779
5749struct mlx5_ifc_dealloc_modify_header_context_out_bits {5780struct mlx5_ifc_dealloc_modify_header_context_out_bits {
@@ -5805,7 +5836,7 @@ struct mlx5_ifc_query_cq_out_bits { · 55 unmodified lines
5805 5836
5806 u8 reserved_at_280[0x600];5837 u8 reserved_at_280[0x600];
5807 5838
5808 u8 pas[0][0x40];5839 u8 pas[][0x40];
5809};5840};
5810 5841
5811struct mlx5_ifc_query_cq_in_bits {5842struct mlx5_ifc_query_cq_in_bits {
@@ -6412,7 +6443,7 @@ struct mlx5_ifc_modify_cq_in_bits { · 600 unmodified lines
6412 6443
6413 u8 reserved_at_300[0x580];6444 u8 reserved_at_300[0x580];
6414 6445
6415 u8 pas[0][0x40];6446 u8 pas[][0x40];
6416};6447};
6417 6448
6418struct mlx5_ifc_modify_cong_status_out_bits {6449struct mlx5_ifc_modify_cong_status_out_bits {
@@ -6476,7 +6507,7 @@ struct mlx5_ifc_manage_pages_out_bits { · 57 unmodified lines
6476 6507
6477 u8 reserved_at_60[0x20];6508 u8 reserved_at_60[0x20];
6478 6509
6479 u8 pas[0][0x40];6510 u8 pas[][0x40];
6480};6511};
6481 6512
6482enum {6513enum {
@@ -6498,7 +6529,7 @@ struct mlx5_ifc_manage_pages_in_bits { · 15 unmodified lines
6498 6529
6499 u8 input_num_entries[0x20];6530 u8 input_num_entries[0x20];
6500 6531
6501 u8 pas[0][0x40];6532 u8 pas[][0x40];
6502};6533};
6503 6534
6504struct mlx5_ifc_mad_ifc_out_bits {6535struct mlx5_ifc_mad_ifc_out_bits {
@@ -6554,7 +6585,8 @@ struct mlx5_ifc_init2rtr_qp_out_bits { · 49 unmodified lines
6554 6585
6555 u8 syndrome[0x20];6586 u8 syndrome[0x20];
6556 6587
6557 u8 reserved_at_40[0x40];6588 u8 reserved_at_40[0x20];
6589 u8 ece[0x20];
6558};6590};
6559 6591
6560struct mlx5_ifc_init2rtr_qp_in_bits {6592struct mlx5_ifc_init2rtr_qp_in_bits {
@@ -6571,7 +6603,7 @@ struct mlx5_ifc_init2rtr_qp_in_bits { · 10 unmodified lines
6571 6603
6572 u8 opt_param_mask[0x20];6604 u8 opt_param_mask[0x20];
6573 6605
6574 u8 reserved_at_a0[0x20];6606 u8 ece[0x20];
6575 6607
6576 struct mlx5_ifc_qpc_bits qpc;6608 struct mlx5_ifc_qpc_bits qpc;
6577 6609
@@ -7453,7 +7485,7 @@ struct mlx5_ifc_create_xrc_srq_in_bits { · 875 unmodified lines
7453 7485
7454 u8 reserved_at_300[0x580];7486 u8 reserved_at_300[0x580];
7455 7487
7456 u8 pas[0][0x40];7488 u8 pas[][0x40];
7457};7489};
7458 7490
7459struct mlx5_ifc_create_tis_out_bits {7491struct mlx5_ifc_create_tis_out_bits {
@@ -7529,7 +7561,7 @@ struct mlx5_ifc_create_srq_in_bits { · 69 unmodified lines
7529 7561
7530 u8 reserved_at_280[0x600];7562 u8 reserved_at_280[0x600];
7531 7563
7532 u8 pas[0][0x40];7564 u8 pas[][0x40];
7533};7565};
7534 7566
7535struct mlx5_ifc_create_sq_out_bits {7567struct mlx5_ifc_create_sq_out_bits {
@@ -7667,7 +7699,7 @@ struct mlx5_ifc_create_qp_out_bits { · 131 unmodified lines
7667 u8 reserved_at_40[0x8];7699 u8 reserved_at_40[0x8];
7668 u8 qpn[0x18];7700 u8 qpn[0x18];
7669 7701
7670 u8 reserved_at_60[0x20];7702 u8 ece[0x20];
7671};7703};
7672 7704
7673struct mlx5_ifc_create_qp_in_bits {7705struct mlx5_ifc_create_qp_in_bits {
@@ -7681,7 +7713,7 @@ struct mlx5_ifc_create_qp_in_bits { · 7 unmodified lines
7681 7713
7682 u8 opt_param_mask[0x20];7714 u8 opt_param_mask[0x20];
7683 7715
7684 u8 reserved_at_a0[0x20];7716 u8 ece[0x20];
7685 7717
7686 struct mlx5_ifc_qpc_bits qpc;7718 struct mlx5_ifc_qpc_bits qpc;
7687 7719
@@ -7690,7 +7722,7 @@ struct mlx5_ifc_create_qp_in_bits { · 2 unmodified lines
7690 u8 wq_umem_valid[0x1];7722 u8 wq_umem_valid[0x1];
7691 u8 reserved_at_861[0x1f];7723 u8 reserved_at_861[0x1f];
7692 7724
7693 u8 pas[0][0x40];7725 u8 pas[][0x40];
7694};7726};
7695 7727
7696struct mlx5_ifc_create_psv_out_bits {7728struct mlx5_ifc_create_psv_out_bits {
@@ -7761,7 +7793,7 @@ struct mlx5_ifc_create_mkey_in_bits { · 64 unmodified lines
7761 7793
7762 u8 reserved_at_320[0x560];7794 u8 reserved_at_320[0x560];
7763 7795
7764 u8 klm_pas_mtt[0][0x20];7796 u8 klm_pas_mtt[][0x20];
7765};7797};
7766 7798
7767enum {7799enum {
@@ -7894,7 +7926,7 @@ struct mlx5_ifc_create_eq_in_bits { · 126 unmodified lines
7894 7926
7895 u8 reserved_at_3c0[0x4c0];7927 u8 reserved_at_3c0[0x4c0];
7896 7928
7897 u8 pas[0][0x40];7929 u8 pas[][0x40];
7898};7930};
7899 7931
7900struct mlx5_ifc_create_dct_out_bits {7932struct mlx5_ifc_create_dct_out_bits {
@@ -7951,7 +7983,7 @@ struct mlx5_ifc_create_cq_in_bits { · 50 unmodified lines
7951 u8 cq_umem_valid[0x1];7983 u8 cq_umem_valid[0x1];
7952 u8 reserved_at_2e1[0x59f];7984 u8 reserved_at_2e1[0x59f];
7953 7985
7954 u8 pas[0][0x40];7986 u8 pas[][0x40];
7955};7987};
7956 7988
7957struct mlx5_ifc_config_int_moderation_out_bits {7989struct mlx5_ifc_config_int_moderation_out_bits {
@@ -8307,7 +8339,7 @@ struct mlx5_ifc_access_register_out_bits { · 349 unmodified lines
8307 8339
8308 u8 reserved_at_40[0x40];8340 u8 reserved_at_40[0x40];
8309 8341
8310 u8 register_data[0][0x20];8342 u8 register_data[][0x20];
8311};8343};
8312 8344
8313enum {8345enum {
@@ -8327,7 +8359,7 @@ struct mlx5_ifc_access_register_in_bits { · 13 unmodified lines
8327 8359
8328 u8 argument[0x20];8360 u8 argument[0x20];
8329 8361
8330 u8 register_data[0][0x20];8362 u8 register_data[][0x20];
8331};8363};
8332 8364
8333struct mlx5_ifc_sltp_reg_bits {8365struct mlx5_ifc_sltp_reg_bits {
@@ -9344,7 +9376,7 @@ struct mlx5_ifc_cmd_in_bits { · 1010 unmodified lines
9344 u8 reserved_at_20[0x10];9376 u8 reserved_at_20[0x10];
9345 u8 op_mod[0x10];9377 u8 op_mod[0x10];
9346 9378
9347 u8 command[0][0x20];9379 u8 command[][0x20];
9348};9380};
9349 9381
9350struct mlx5_ifc_cmd_if_box_bits {9382struct mlx5_ifc_cmd_if_box_bits {
@@ -9638,7 +9670,7 @@ struct mlx5_ifc_mcqi_reg_bits { · 287 unmodified lines
9638 u8 reserved_at_a0[0x10];9670 u8 reserved_at_a0[0x10];
9639 u8 data_size[0x10];9671 u8 data_size[0x10];
9640 9672
9641 union mlx5_ifc_mcqi_reg_data_bits data[0];9673 union mlx5_ifc_mcqi_reg_data_bits data[];
9642};9674};
9643 9675
9644struct mlx5_ifc_mcc_reg_bits {9676struct mlx5_ifc_mcc_reg_bits {
@@ -9680,6 +9712,29 @@ struct mlx5_ifc_mcda_reg_bits { · 35 unmodified lines
9680 u8 data[0][0x20];9712 u8 data[0][0x20];
9681};9713};
9682 9714
9715enum {
9716 MLX5_MFRL_REG_RESET_TYPE_FULL_CHIP = BIT(0),
9717 MLX5_MFRL_REG_RESET_TYPE_NET_PORT_ALIVE = BIT(1),
9718};
9719
9720enum {
9721 MLX5_MFRL_REG_RESET_LEVEL0 = BIT(0),
9722 MLX5_MFRL_REG_RESET_LEVEL3 = BIT(3),
9723 MLX5_MFRL_REG_RESET_LEVEL6 = BIT(6),
9724};
9725
9726struct mlx5_ifc_mfrl_reg_bits {
9727 u8 reserved_at_0[0x20];
9728
9729 u8 reserved_at_20[0x2];
9730 u8 pci_sync_for_fw_update_start[0x1];
9731 u8 pci_sync_for_fw_update_resp[0x2];
9732 u8 rst_type_sel[0x3];
9733 u8 reserved_at_28[0x8];
9734 u8 reset_type[0x8];
9735 u8 reset_level[0x8];
9736};
9737
9683struct mlx5_ifc_mirc_reg_bits {9738struct mlx5_ifc_mirc_reg_bits {
9684 u8 reserved_at_0[0x18];9739 u8 reserved_at_0[0x18];
9685 u8 status_code[0x8];9740 u8 status_code[0x8];
@@ -9743,6 +9798,7 @@ union mlx5_ifc_ports_control_registers_document_bits { · 57 unmodified lines
9743 struct mlx5_ifc_mcc_reg_bits mcc_reg;9798 struct mlx5_ifc_mcc_reg_bits mcc_reg;
9744 struct mlx5_ifc_mcda_reg_bits mcda_reg;9799 struct mlx5_ifc_mcda_reg_bits mcda_reg;
9745 struct mlx5_ifc_mirc_reg_bits mirc_reg;9800 struct mlx5_ifc_mirc_reg_bits mirc_reg;
9801 struct mlx5_ifc_mfrl_reg_bits mfrl_reg;
9746 u8 reserved_at_0[0x60e0];9802 u8 reserved_at_0[0x60e0];
9747};9803};
9748 9804
@@ -10200,7 +10256,7 @@ struct mlx5_ifc_umem_bits { · 451 unmodified lines
10200 10256
10201 u8 num_of_mtt[0x40];10257 u8 num_of_mtt[0x40];
10202 10258
10203 struct mlx5_ifc_mtt_bits mtt[0];10259 struct mlx5_ifc_mtt_bits mtt[];
10204};10260};
10205 10261
10206struct mlx5_ifc_uctx_bits {10262struct mlx5_ifc_uctx_bits {
@@ -10325,7 +10381,7 @@ struct mlx5_ifc_mtrc_stdb_bits { · 118 unmodified lines
10325 u8 reserved_at_4[0x4];10381 u8 reserved_at_4[0x4];
10326 u8 read_size[0x18];10382 u8 read_size[0x18];
10327 u8 start_offset[0x20];10383 u8 start_offset[0x20];
10328 u8 string_db_data[0];10384 u8 string_db_data[];
10329};10385};
10330 10386
10331struct mlx5_ifc_mtrc_ctrl_bits {10387struct mlx5_ifc_mtrc_ctrl_bits {
@@ -10379,7 +10435,7 @@ struct mlx5_ifc_query_esw_functions_out_bits { · 47 unmodified lines
10379 struct mlx5_ifc_host_params_context_bits host_params_context;10435 struct mlx5_ifc_host_params_context_bits host_params_context;
10380 10436
10381 u8 reserved_at_280[0x180];10437 u8 reserved_at_280[0x180];
10382 u8 host_sf_enable[0][0x40];10438 u8 host_sf_enable[][0x40];
10383};10439};
10384 10440
10385struct mlx5_ifc_sf_partition_bits {10441struct mlx5_ifc_sf_partition_bits {
@@ -10399,7 +10455,7 @@ struct mlx5_ifc_query_sf_partitions_out_bits { · 13 unmodified lines
10399 10455
10400 u8 reserved_at_60[0x20];10456 u8 reserved_at_60[0x20];
10401 10457
10402 struct mlx5_ifc_sf_partition_bits sf_partition[0];10458 struct mlx5_ifc_sf_partition_bits sf_partition[];
10403};10459};
10404 10460
10405struct mlx5_ifc_query_sf_partitions_in_bits {10461struct mlx5_ifc_query_sf_partitions_in_bits {
@@ -10465,10 +10521,62 @@ struct mlx5_ifc_affiliated_event_header_bits { · 59 unmodified lines
10465 10521
10466enum {10522enum {
10467 MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_ENCRYPTION_KEY = BIT(0xc),10523 MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_ENCRYPTION_KEY = BIT(0xc),
10524 MLX5_HCA_CAP_GENERAL_OBJECT_TYPES_IPSEC = BIT(0x13),
10468};10525};
10469 10526
10470enum {10527enum {
10471 MLX5_GENERAL_OBJECT_TYPES_ENCRYPTION_KEY = 0xc,10528 MLX5_GENERAL_OBJECT_TYPES_ENCRYPTION_KEY = 0xc,
10529 MLX5_GENERAL_OBJECT_TYPES_IPSEC = 0x13,
10530};
10531
10532enum {
10533 MLX5_IPSEC_OBJECT_ICV_LEN_16B,
10534 MLX5_IPSEC_OBJECT_ICV_LEN_12B,
10535 MLX5_IPSEC_OBJECT_ICV_LEN_8B,
10536};
10537
10538struct mlx5_ifc_ipsec_obj_bits {
10539 u8 modify_field_select[0x40];
10540 u8 full_offload[0x1];
10541 u8 reserved_at_41[0x1];
10542 u8 esn_en[0x1];
10543 u8 esn_overlap[0x1];
10544 u8 reserved_at_44[0x2];
10545 u8 icv_length[0x2];
10546 u8 reserved_at_48[0x4];
10547 u8 aso_return_reg[0x4];
10548 u8 reserved_at_50[0x10];
10549
10550 u8 esn_msb[0x20];
10551
10552 u8 reserved_at_80[0x8];
10553 u8 dekn[0x18];
10554
10555 u8 salt[0x20];
10556
10557 u8 implicit_iv[0x40];
10558
10559 u8 reserved_at_100[0x700];
10560};
10561
10562struct mlx5_ifc_create_ipsec_obj_in_bits {
10563 struct mlx5_ifc_general_obj_in_cmd_hdr_bits general_obj_in_cmd_hdr;
10564 struct mlx5_ifc_ipsec_obj_bits ipsec_object;
10565};
10566
10567enum {
10568 MLX5_MODIFY_IPSEC_BITMASK_ESN_OVERLAP = BIT(0),
10569 MLX5_MODIFY_IPSEC_BITMASK_ESN_MSB = BIT(1),
10570};
10571
10572struct mlx5_ifc_query_ipsec_obj_out_bits {
10573 struct mlx5_ifc_general_obj_out_cmd_hdr_bits general_obj_out_cmd_hdr;
10574 struct mlx5_ifc_ipsec_obj_bits ipsec_object;
10575};
10576
10577struct mlx5_ifc_modify_ipsec_obj_in_bits {
10578 struct mlx5_ifc_general_obj_in_cmd_hdr_bits general_obj_in_cmd_hdr;
10579 struct mlx5_ifc_ipsec_obj_bits ipsec_object;
10472};10580};
10473 10581
10474struct mlx5_ifc_encryption_key_obj_bits {10582struct mlx5_ifc_encryption_key_obj_bits {
include/linux/mlx5/qp.h+7−50
@@ -229,6 +229,11 @@ enum { · 228 unmodified lines
229 229
230enum {230enum {
231 MLX5_ETH_WQE_SVLAN = 1 << 0,231 MLX5_ETH_WQE_SVLAN = 1 << 0,
232 MLX5_ETH_WQE_TRAILER_HDR_OUTER_IP_ASSOC = 1 << 26,
233 MLX5_ETH_WQE_TRAILER_HDR_OUTER_L4_ASSOC = 1 << 27,
234 MLX5_ETH_WQE_TRAILER_HDR_INNER_IP_ASSOC = 3 << 26,
235 MLX5_ETH_WQE_TRAILER_HDR_INNER_L4_ASSOC = 1 << 28,
236 MLX5_ETH_WQE_INSERT_TRAILER = 1 << 30,
232 MLX5_ETH_WQE_INSERT_VLAN = 1 << 15,237 MLX5_ETH_WQE_INSERT_VLAN = 1 << 15,
233};238};
234 239
@@ -257,6 +262,7 @@ struct mlx5_wqe_eth_seg { · 22 unmodified lines
257 __be16 type;262 __be16 type;
258 __be16 vlan_tci;263 __be16 vlan_tci;
259 } insert;264 } insert;
265 __be32 trailer;
260 };266 };
261};267};
262 268
@@ -402,7 +408,7 @@ struct mlx5_wqe_signature_seg { · 139 unmodified lines
402 408
403struct mlx5_wqe_inline_seg {409struct mlx5_wqe_inline_seg {
404 __be32 byte_count;410 __be32 byte_count;
405 __be32 data[0];411 __be32 data[];
406};412};
407 413
408enum mlx5_sig_type {414enum mlx5_sig_type {
@@ -553,57 +559,8 @@ struct mlx5_qp_context { · 144 unmodified lines
553 u8 rsvd1[24];559 u8 rsvd1[24];
554};560};
555 561
556static inline struct mlx5_core_qp *__mlx5_qp_lookup(struct mlx5_core_dev *dev, u32 qpn)
557{
558 return radix_tree_lookup(&dev->priv.qp_table.tree, qpn);
559}
560
561int mlx5_core_create_dct(struct mlx5_core_dev *dev,
562 struct mlx5_core_dct *qp,
563 u32 *in, int inlen,
564 u32 *out, int outlen);
565int mlx5_core_create_qp(struct mlx5_core_dev *dev,
566 struct mlx5_core_qp *qp,
567 u32 *in,
568 int inlen);
569int mlx5_core_qp_modify(struct mlx5_core_dev *dev, u16 opcode,
570 u32 opt_param_mask, void *qpc,
571 struct mlx5_core_qp *qp);
572int mlx5_core_destroy_qp(struct mlx5_core_dev *dev,
573 struct mlx5_core_qp *qp);
574int mlx5_core_destroy_dct(struct mlx5_core_dev *dev,
575 struct mlx5_core_dct *dct);
576int mlx5_core_qp_query(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp,
577 u32 *out, int outlen);
578int mlx5_core_dct_query(struct mlx5_core_dev *dev, struct mlx5_core_dct *dct,
579 u32 *out, int outlen);
580
581int mlx5_core_set_delay_drop(struct mlx5_core_dev *dev,
582 u32 timeout_usec);
583
584int mlx5_core_xrcd_alloc(struct mlx5_core_dev *dev, u32 *xrcdn);
585int mlx5_core_xrcd_dealloc(struct mlx5_core_dev *dev, u32 xrcdn);
586void mlx5_init_qp_table(struct mlx5_core_dev *dev);
587void mlx5_cleanup_qp_table(struct mlx5_core_dev *dev);
588int mlx5_debug_qp_add(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp);562int mlx5_debug_qp_add(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp);
589void mlx5_debug_qp_remove(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp);563void mlx5_debug_qp_remove(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp);
590int mlx5_core_create_rq_tracked(struct mlx5_core_dev *dev, u32 *in, int inlen,
591 struct mlx5_core_qp *rq);
592void mlx5_core_destroy_rq_tracked(struct mlx5_core_dev *dev,
593 struct mlx5_core_qp *rq);
594int mlx5_core_create_sq_tracked(struct mlx5_core_dev *dev, u32 *in, int inlen,
595 struct mlx5_core_qp *sq);
596void mlx5_core_destroy_sq_tracked(struct mlx5_core_dev *dev,
597 struct mlx5_core_qp *sq);
598int mlx5_core_alloc_q_counter(struct mlx5_core_dev *dev, u16 *counter_id);
599int mlx5_core_dealloc_q_counter(struct mlx5_core_dev *dev, u16 counter_id);
600int mlx5_core_query_q_counter(struct mlx5_core_dev *dev, u16 counter_id,
601 int reset, void *out, int out_size);
602
603struct mlx5_core_rsc_common *mlx5_core_res_hold(struct mlx5_core_dev *dev,
604 int res_num,
605 enum mlx5_res_type res_type);
606void mlx5_core_res_put(struct mlx5_core_rsc_common *res);
607 564
608static inline const char *mlx5_qp_type_str(int type)565static inline const char *mlx5_qp_type_str(int type)
609{566{
include/linux/mlx5/transobj.h+6−13
@@ -39,27 +39,20 @@ int mlx5_core_alloc_transport_domain(struct mlx5_core_dev *dev, u32 *tdn); · 38 unmodified lines
39void mlx5_core_dealloc_transport_domain(struct mlx5_core_dev *dev, u32 tdn);39void mlx5_core_dealloc_transport_domain(struct mlx5_core_dev *dev, u32 tdn);
40int mlx5_core_create_rq(struct mlx5_core_dev *dev, u32 *in, int inlen,40int mlx5_core_create_rq(struct mlx5_core_dev *dev, u32 *in, int inlen,
41 u32 *rqn);41 u32 *rqn);
42int mlx5_core_modify_rq(struct mlx5_core_dev *dev, u32 rqn, u32 *in, int inlen);42int mlx5_core_modify_rq(struct mlx5_core_dev *dev, u32 rqn, u32 *in);
43void mlx5_core_destroy_rq(struct mlx5_core_dev *dev, u32 rqn);43void mlx5_core_destroy_rq(struct mlx5_core_dev *dev, u32 rqn);
44int mlx5_core_query_rq(struct mlx5_core_dev *dev, u32 rqn, u32 *out);44int mlx5_core_query_rq(struct mlx5_core_dev *dev, u32 rqn, u32 *out);
45int mlx5_core_create_sq(struct mlx5_core_dev *dev, u32 *in, int inlen,45int mlx5_core_create_sq(struct mlx5_core_dev *dev, u32 *in, int inlen,
46 u32 *sqn);46 u32 *sqn);
47int mlx5_core_modify_sq(struct mlx5_core_dev *dev, u32 sqn, u32 *in, int inlen);47int mlx5_core_modify_sq(struct mlx5_core_dev *dev, u32 sqn, u32 *in);
48void mlx5_core_destroy_sq(struct mlx5_core_dev *dev, u32 sqn);48void mlx5_core_destroy_sq(struct mlx5_core_dev *dev, u32 sqn);
49int mlx5_core_query_sq(struct mlx5_core_dev *dev, u32 sqn, u32 *out);49int mlx5_core_query_sq(struct mlx5_core_dev *dev, u32 sqn, u32 *out);
50int mlx5_core_query_sq_state(struct mlx5_core_dev *dev, u32 sqn, u8 *state);50int mlx5_core_query_sq_state(struct mlx5_core_dev *dev, u32 sqn, u8 *state);
51int mlx5_core_create_tir(struct mlx5_core_dev *dev, u32 *in, int inlen,51int mlx5_core_create_tir(struct mlx5_core_dev *dev, u32 *in, u32 *tirn);
52 u32 *tirn);52int mlx5_core_modify_tir(struct mlx5_core_dev *dev, u32 tirn, u32 *in);
53int mlx5_core_create_tir_out(struct mlx5_core_dev *dev,
54 u32 *in, int inlen,
55 u32 *out, int outlen);
56int mlx5_core_modify_tir(struct mlx5_core_dev *dev, u32 tirn, u32 *in,
57 int inlen);
58void mlx5_core_destroy_tir(struct mlx5_core_dev *dev, u32 tirn);53void mlx5_core_destroy_tir(struct mlx5_core_dev *dev, u32 tirn);
59int mlx5_core_create_tis(struct mlx5_core_dev *dev, u32 *in, int inlen,54int mlx5_core_create_tis(struct mlx5_core_dev *dev, u32 *in, u32 *tisn);
60 u32 *tisn);55int mlx5_core_modify_tis(struct mlx5_core_dev *dev, u32 tisn, u32 *in);
61int mlx5_core_modify_tis(struct mlx5_core_dev *dev, u32 tisn, u32 *in,
62 int inlen);
63void mlx5_core_destroy_tis(struct mlx5_core_dev *dev, u32 tisn);56void mlx5_core_destroy_tis(struct mlx5_core_dev *dev, u32 tisn);
64int mlx5_core_create_rqt(struct mlx5_core_dev *dev, u32 *in, int inlen,57int mlx5_core_create_rqt(struct mlx5_core_dev *dev, u32 *in, int inlen,
65 u32 *rqtn);58 u32 *rqtn);
include/linux/mlx5/vport.h+1−2
@@ -127,8 +127,7 @@ int mlx5_query_vport_down_stats(struct mlx5_core_dev *mdev, u16 vport, · 126 unmodified lines
127 u8 other_vport, u64 *rx_discard_vport_down,127 u8 other_vport, u64 *rx_discard_vport_down,
128 u64 *tx_discard_vport_down);128 u64 *tx_discard_vport_down);
129int mlx5_core_query_vport_counter(struct mlx5_core_dev *dev, u8 other_vport,129int mlx5_core_query_vport_counter(struct mlx5_core_dev *dev, u8 other_vport,
130 int vf, u8 port_num, void *out,130 int vf, u8 port_num, void *out);
131 size_t out_sz);
132int mlx5_core_modify_hca_vport_context(struct mlx5_core_dev *dev,131int mlx5_core_modify_hca_vport_context(struct mlx5_core_dev *dev,
133 u8 other_vport, u8 port_num,132 u8 other_vport, u8 port_num,
134 int vf,133 int vf,
include/linux/mm.h+8−6
@@ -201,10 +201,10 @@ extern int sysctl_overcommit_memory; · 200 unmodified lines
201extern int sysctl_overcommit_ratio;201extern int sysctl_overcommit_ratio;
202extern unsigned long sysctl_overcommit_kbytes;202extern unsigned long sysctl_overcommit_kbytes;
203 203
204extern int overcommit_ratio_handler(struct ctl_table *, int, void __user *,204int overcommit_ratio_handler(struct ctl_table *, int, void *, size_t *,
205 size_t *, loff_t *);205 loff_t *);
206extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *,206int overcommit_kbytes_handler(struct ctl_table *, int, void *, size_t *,
207 size_t *, loff_t *);207 loff_t *);
208 208
209#define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))209#define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
210 210
@@ -2993,8 +2993,8 @@ extern bool process_shares_mm(struct task_struct *p, struct mm_struct *mm); · 2782 unmodified lines
2993 2993
2994#ifdef CONFIG_SYSCTL2994#ifdef CONFIG_SYSCTL
2995extern int sysctl_drop_caches;2995extern int sysctl_drop_caches;
2996int drop_caches_sysctl_handler(struct ctl_table *, int,2996int drop_caches_sysctl_handler(struct ctl_table *, int, void *, size_t *,
2997 void __user *, size_t *, loff_t *);2997 loff_t *);
2998#endif2998#endif
2999 2999
3000void drop_slab(void);3000void drop_slab(void);
@@ -3177,5 +3177,7 @@ unsigned long wp_shared_mapping_range(struct address_space *mapping, · 176 unmodified lines
3177 pgoff_t first_index, pgoff_t nr);3177 pgoff_t first_index, pgoff_t nr);
3178#endif3178#endif
3179 3179
3180extern int sysctl_nr_trim_pages;
3181
3180#endif /* __KERNEL__ */3182#endif /* __KERNEL__ */
3181#endif /* _LINUX_MM_H */3183#endif /* _LINUX_MM_H */
include/linux/mmzone.h+13−14
@@ -911,24 +911,23 @@ static inline int is_highmem(struct zone *zone) · 910 unmodified lines
911 911
912/* These two functions are used to setup the per zone pages min values */912/* These two functions are used to setup the per zone pages min values */
913struct ctl_table;913struct ctl_table;
914int min_free_kbytes_sysctl_handler(struct ctl_table *, int,914
915 void __user *, size_t *, loff_t *);915int min_free_kbytes_sysctl_handler(struct ctl_table *, int, void *, size_t *,
916int watermark_boost_factor_sysctl_handler(struct ctl_table *, int,916 loff_t *);
917 void __user *, size_t *, loff_t *);917int watermark_scale_factor_sysctl_handler(struct ctl_table *, int, void *,
918int watermark_scale_factor_sysctl_handler(struct ctl_table *, int,918 size_t *, loff_t *);
919 void __user *, size_t *, loff_t *);
920extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES];919extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES];
921int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int,920int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, void *,
922 void __user *, size_t *, loff_t *);921 size_t *, loff_t *);
923int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int,922int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int,
924 void __user *, size_t *, loff_t *);923 void *, size_t *, loff_t *);
925int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,924int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,
926 void __user *, size_t *, loff_t *);925 void *, size_t *, loff_t *);
927int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,926int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int,
928 void __user *, size_t *, loff_t *);927 void *, size_t *, loff_t *);
929 928int numa_zonelist_order_handler(struct ctl_table *, int,
930extern int numa_zonelist_order_handler(struct ctl_table *, int,929 void *, size_t *, loff_t *);
931 void __user *, size_t *, loff_t *);930extern int percpu_pagelist_fraction;
932extern char numa_zonelist_order[];931extern char numa_zonelist_order[];
933#define NUMA_ZONELIST_ORDER_LEN 16932#define NUMA_ZONELIST_ORDER_LEN 16
934 933
include/linux/net.h+0−4
@@ -303,10 +303,6 @@ int kernel_connect(struct socket *sock, struct sockaddr *addr, int addrlen, · 302 unmodified lines
303 int flags);303 int flags);
304int kernel_getsockname(struct socket *sock, struct sockaddr *addr);304int kernel_getsockname(struct socket *sock, struct sockaddr *addr);
305int kernel_getpeername(struct socket *sock, struct sockaddr *addr);305int kernel_getpeername(struct socket *sock, struct sockaddr *addr);
306int kernel_getsockopt(struct socket *sock, int level, int optname, char *optval,
307 int *optlen);
308int kernel_setsockopt(struct socket *sock, int level, int optname, char *optval,
309 unsigned int optlen);
310int kernel_sendpage(struct socket *sock, struct page *page, int offset,306int kernel_sendpage(struct socket *sock, struct page *page, int offset,
311 size_t size, int flags);307 size_t size, int flags);
312int kernel_sendpage_locked(struct sock *sk, struct page *page, int offset,308int kernel_sendpage_locked(struct sock *sk, struct page *page, int offset,
include/linux/netdev_features.h+1−1
@@ -89,7 +89,7 @@ enum { · 88 unmodified lines
89 * Add your fresh new feature above and remember to update89 * Add your fresh new feature above and remember to update
90 * netdev_features_strings[] in net/core/ethtool.c and maybe90 * netdev_features_strings[] in net/core/ethtool.c and maybe
91 * some feature mask #defines below. Please also describe it91 * some feature mask #defines below. Please also describe it
92 * in Documentation/networking/netdev-features.txt.92 * in Documentation/networking/netdev-features.rst.
93 */93 */
94 94
95 /**/NETDEV_FEATURE_COUNT95 /**/NETDEV_FEATURE_COUNT
include/linux/netdevice.h+82−8
@@ -53,6 +53,7 @@ struct netpoll_info; · 52 unmodified lines
53struct device;53struct device;
54struct phy_device;54struct phy_device;
55struct dsa_port;55struct dsa_port;
56struct ip_tunnel_parm;
56struct macsec_context;57struct macsec_context;
57struct macsec_ops;58struct macsec_ops;
58 59
@@ -288,6 +289,7 @@ enum netdev_state_t { · 229 unmodified lines
288 __LINK_STATE_NOCARRIER,289 __LINK_STATE_NOCARRIER,
289 __LINK_STATE_LINKWATCH_PENDING,290 __LINK_STATE_LINKWATCH_PENDING,
290 __LINK_STATE_DORMANT,291 __LINK_STATE_DORMANT,
292 __LINK_STATE_TESTING,
291};293};
292 294
293 295
@@ -328,6 +330,7 @@ struct napi_struct { · 34 unmodified lines
328 330
329 unsigned long state;331 unsigned long state;
330 int weight;332 int weight;
333 int defer_hard_irqs_count;
331 unsigned long gro_bitmask;334 unsigned long gro_bitmask;
332 int (*poll)(struct napi_struct *, int);335 int (*poll)(struct napi_struct *, int);
333#ifdef CONFIG_NETPOLL336#ifdef CONFIG_NETPOLL
@@ -1146,6 +1149,12 @@ struct netdev_net_notifier { · 812 unmodified lines
1146 * int (*ndo_del_slave)(struct net_device *dev, struct net_device *slave_dev);1149 * int (*ndo_del_slave)(struct net_device *dev, struct net_device *slave_dev);
1147 * Called to release previously enslaved netdev.1150 * Called to release previously enslaved netdev.
1148 *1151 *
1152 * struct net_device *(*ndo_get_xmit_slave)(struct net_device *dev,
1153 * struct sk_buff *skb,
1154 * bool all_slaves);
1155 * Get the xmit slave of master device. If all_slaves is true, function
1156 * assume all the slaves can transmit.
1157 *
1149 * Feature/offload setting functions.1158 * Feature/offload setting functions.
1150 * netdev_features_t (*ndo_fix_features)(struct net_device *dev,1159 * netdev_features_t (*ndo_fix_features)(struct net_device *dev,
1151 * netdev_features_t features);1160 * netdev_features_t features);
@@ -1266,6 +1275,9 @@ struct netdev_net_notifier { · 114 unmodified lines
1266 * Get devlink port instance associated with a given netdev.1275 * Get devlink port instance associated with a given netdev.
1267 * Called with a reference on the netdevice and devlink locks only,1276 * Called with a reference on the netdevice and devlink locks only,
1268 * rtnl_lock is not held.1277 * rtnl_lock is not held.
1278 * int (*ndo_tunnel_ctl)(struct net_device *dev, struct ip_tunnel_parm *p,
1279 * int cmd);
1280 * Add, change, delete or get information on an IPv4 tunnel.
1269 */1281 */
1270struct net_device_ops {1282struct net_device_ops {
1271 int (*ndo_init)(struct net_device *dev);1283 int (*ndo_init)(struct net_device *dev);
@@ -1389,6 +1401,9 @@ struct net_device_ops { · 117 unmodified lines
1389 struct netlink_ext_ack *extack);1401 struct netlink_ext_ack *extack);
1390 int (*ndo_del_slave)(struct net_device *dev,1402 int (*ndo_del_slave)(struct net_device *dev,
1391 struct net_device *slave_dev);1403 struct net_device *slave_dev);
1404 struct net_device* (*ndo_get_xmit_slave)(struct net_device *dev,
1405 struct sk_buff *skb,
1406 bool all_slaves);
1392 netdev_features_t (*ndo_fix_features)(struct net_device *dev,1407 netdev_features_t (*ndo_fix_features)(struct net_device *dev,
1393 netdev_features_t features);1408 netdev_features_t features);
1394 int (*ndo_set_features)(struct net_device *dev,1409 int (*ndo_set_features)(struct net_device *dev,
@@ -1468,6 +1483,8 @@ struct net_device_ops { · 73 unmodified lines
1468 int (*ndo_xsk_wakeup)(struct net_device *dev,1483 int (*ndo_xsk_wakeup)(struct net_device *dev,
1469 u32 queue_id, u32 flags);1484 u32 queue_id, u32 flags);
1470 struct devlink_port * (*ndo_get_devlink_port)(struct net_device *dev);1485 struct devlink_port * (*ndo_get_devlink_port)(struct net_device *dev);
1486 int (*ndo_tunnel_ctl)(struct net_device *dev,
1487 struct ip_tunnel_parm *p, int cmd);
1471};1488};
1472 1489
1473/**1490/**
@@ -1803,13 +1820,11 @@ enum netdev_priv_flags { · 329 unmodified lines
1803 * @phydev: Physical device may attach itself1820 * @phydev: Physical device may attach itself
1804 * for hardware timestamping1821 * for hardware timestamping
1805 * @sfp_bus: attached &struct sfp_bus structure.1822 * @sfp_bus: attached &struct sfp_bus structure.
1806 * @qdisc_tx_busylock_key: lockdep class annotating Qdisc->busylock1823 *
1807 * spinlock
1808 * @qdisc_running_key: lockdep class annotating Qdisc->running seqcount
1809 * @qdisc_xmit_lock_key: lockdep class annotating
1810 * netdev_queue->_xmit_lock spinlock
1811 * @addr_list_lock_key: lockdep class annotating1824 * @addr_list_lock_key: lockdep class annotating
1812 * net_device->addr_list_lock spinlock1825 * net_device->addr_list_lock spinlock
1826 * @qdisc_tx_busylock: lockdep class annotating Qdisc->busylock spinlock
1827 * @qdisc_running_key: lockdep class annotating Qdisc->running seqcount
1813 *1828 *
1814 * @proto_down: protocol port state information can be sent to the1829 * @proto_down: protocol port state information can be sent to the
1815 * switch driver and used to set the phys state of the1830 * switch driver and used to set the phys state of the
@@ -1994,6 +2009,7 @@ struct net_device { · 178 unmodified lines
1994 2009
1995 struct bpf_prog __rcu *xdp_prog;2010 struct bpf_prog __rcu *xdp_prog;
1996 unsigned long gro_flush_timeout;2011 unsigned long gro_flush_timeout;
2012 int napi_defer_hard_irqs;
1997 rx_handler_func_t __rcu *rx_handler;2013 rx_handler_func_t __rcu *rx_handler;
1998 void __rcu *rx_handler_data;2014 void __rcu *rx_handler_data;
1999 2015
@@ -2109,10 +2125,9 @@ struct net_device { · 109 unmodified lines
2109#endif2125#endif
2110 struct phy_device *phydev;2126 struct phy_device *phydev;
2111 struct sfp_bus *sfp_bus;2127 struct sfp_bus *sfp_bus;
2112 struct lock_class_key qdisc_tx_busylock_key;
2113 struct lock_class_key qdisc_running_key;
2114 struct lock_class_key qdisc_xmit_lock_key;
2115 struct lock_class_key addr_list_lock_key;2128 struct lock_class_key addr_list_lock_key;
2129 struct lock_class_key *qdisc_tx_busylock;
2130 struct lock_class_key *qdisc_running_key;
2116 bool proto_down;2131 bool proto_down;
2117 unsigned wol_enabled:1;2132 unsigned wol_enabled:1;
2118 2133
@@ -2197,6 +2212,20 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev, · 78 unmodified lines
2197 f(dev, &dev->_tx[i], arg);2212 f(dev, &dev->_tx[i], arg);
2198}2213}
2199 2214
2215#define netdev_lockdep_set_classes(dev) \
2216{ \
2217 static struct lock_class_key qdisc_tx_busylock_key; \
2218 static struct lock_class_key qdisc_running_key; \
2219 static struct lock_class_key qdisc_xmit_lock_key; \
2220 unsigned int i; \
2221 \
2222 (dev)->qdisc_tx_busylock = &qdisc_tx_busylock_key; \
2223 (dev)->qdisc_running_key = &qdisc_running_key; \
2224 for (i = 0; i < (dev)->num_tx_queues; i++) \
2225 lockdep_set_class(&(dev)->_tx[i]._xmit_lock, \
2226 &qdisc_xmit_lock_key); \
2227}
2228
2200u16 netdev_pick_tx(struct net_device *dev, struct sk_buff *skb,2229u16 netdev_pick_tx(struct net_device *dev, struct sk_buff *skb,
2201 struct net_device *sb_dev);2230 struct net_device *sb_dev);
2202struct netdev_queue *netdev_core_pick_tx(struct net_device *dev,2231struct netdev_queue *netdev_core_pick_tx(struct net_device *dev,
@@ -2731,6 +2760,9 @@ void netdev_freemem(struct net_device *dev); · 528 unmodified lines
2731void synchronize_net(void);2760void synchronize_net(void);
2732int init_dummy_netdev(struct net_device *dev);2761int init_dummy_netdev(struct net_device *dev);
2733 2762
2763struct net_device *netdev_get_xmit_slave(struct net_device *dev,
2764 struct sk_buff *skb,
2765 bool all_slaves);
2734struct net_device *dev_get_by_index(struct net *net, int ifindex);2766struct net_device *dev_get_by_index(struct net *net, int ifindex);
2735struct net_device *__dev_get_by_index(struct net *net, int ifindex);2767struct net_device *__dev_get_by_index(struct net *net, int ifindex);
2736struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);2768struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
@@ -3907,6 +3939,46 @@ static inline bool netif_dormant(const struct net_device *dev) · 1170 unmodified lines
3907}3939}
3908 3940
3909 3941
3942/**
3943 * netif_testing_on - mark device as under test.
3944 * @dev: network device
3945 *
3946 * Mark device as under test (as per RFC2863).
3947 *
3948 * The testing state indicates that some test(s) must be performed on
3949 * the interface. After completion, of the test, the interface state
3950 * will change to up, dormant, or down, as appropriate.
3951 */
3952static inline void netif_testing_on(struct net_device *dev)
3953{
3954 if (!test_and_set_bit(__LINK_STATE_TESTING, &dev->state))
3955 linkwatch_fire_event(dev);
3956}
3957
3958/**
3959 * netif_testing_off - set device as not under test.
3960 * @dev: network device
3961 *
3962 * Device is not in testing state.
3963 */
3964static inline void netif_testing_off(struct net_device *dev)
3965{
3966 if (test_and_clear_bit(__LINK_STATE_TESTING, &dev->state))
3967 linkwatch_fire_event(dev);
3968}
3969
3970/**
3971 * netif_testing - test if device is under test
3972 * @dev: network device
3973 *
3974 * Check if device is under test
3975 */
3976static inline bool netif_testing(const struct net_device *dev)
3977{
3978 return test_bit(__LINK_STATE_TESTING, &dev->state);
3979}
3980
3981
3910/**3982/**
3911 * netif_oper_up - test if device is operational3983 * netif_oper_up - test if device is operational
3912 * @dev: network device3984 * @dev: network device
@@ -4208,6 +4280,8 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, · 295 unmodified lines
4208int register_netdev(struct net_device *dev);4280int register_netdev(struct net_device *dev);
4209void unregister_netdev(struct net_device *dev);4281void unregister_netdev(struct net_device *dev);
4210 4282
4283int devm_register_netdev(struct device *dev, struct net_device *ndev);
4284
4211/* General hardware address lists handling functions */4285/* General hardware address lists handling functions */
4212int __hw_addr_sync(struct netdev_hw_addr_list *to_list,4286int __hw_addr_sync(struct netdev_hw_addr_list *to_list,
4213 struct netdev_hw_addr_list *from_list, int addr_len);4287 struct netdev_hw_addr_list *from_list, int addr_len);
include/linux/netpoll.h+1−9
@@ -63,15 +63,7 @@ int netpoll_setup(struct netpoll *np); · 62 unmodified lines
63void __netpoll_cleanup(struct netpoll *np);63void __netpoll_cleanup(struct netpoll *np);
64void __netpoll_free(struct netpoll *np);64void __netpoll_free(struct netpoll *np);
65void netpoll_cleanup(struct netpoll *np);65void netpoll_cleanup(struct netpoll *np);
66void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,66netdev_tx_t netpoll_send_skb(struct netpoll *np, struct sk_buff *skb);
67 struct net_device *dev);
68static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
69{
70 unsigned long flags;
71 local_irq_save(flags);
72 netpoll_send_skb_on_dev(np, skb, np->dev);
73 local_irq_restore(flags);
74}
75 67
76#ifdef CONFIG_NETPOLL68#ifdef CONFIG_NETPOLL
77static inline void *netpoll_poll_lock(struct napi_struct *napi)69static inline void *netpoll_poll_lock(struct napi_struct *napi)
include/linux/nmi.h+5−10
@@ -202,16 +202,11 @@ static inline void watchdog_update_hrtimer_threshold(u64 period) { } · 201 unmodified lines
202#endif202#endif
203 203
204struct ctl_table;204struct ctl_table;
205extern int proc_watchdog(struct ctl_table *, int ,205int proc_watchdog(struct ctl_table *, int, void *, size_t *, loff_t *);
206 void __user *, size_t *, loff_t *);206int proc_nmi_watchdog(struct ctl_table *, int , void *, size_t *, loff_t *);
207extern int proc_nmi_watchdog(struct ctl_table *, int ,207int proc_soft_watchdog(struct ctl_table *, int , void *, size_t *, loff_t *);
208 void __user *, size_t *, loff_t *);208int proc_watchdog_thresh(struct ctl_table *, int , void *, size_t *, loff_t *);
209extern int proc_soft_watchdog(struct ctl_table *, int ,209int proc_watchdog_cpumask(struct ctl_table *, int, void *, size_t *, loff_t *);
210 void __user *, size_t *, loff_t *);
211extern int proc_watchdog_thresh(struct ctl_table *, int ,
212 void __user *, size_t *, loff_t *);
213extern int proc_watchdog_cpumask(struct ctl_table *, int,
214 void __user *, size_t *, loff_t *);
215 210
216#ifdef CONFIG_HAVE_ACPI_APEI_NMI211#ifdef CONFIG_HAVE_ACPI_APEI_NMI
217#include <asm/nmi.h>212#include <asm/nmi.h>
include/linux/of_mdio.h+10−1
@@ -30,7 +30,9 @@ extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np); · 29 unmodified lines
30extern int of_phy_register_fixed_link(struct device_node *np);30extern int of_phy_register_fixed_link(struct device_node *np);
31extern void of_phy_deregister_fixed_link(struct device_node *np);31extern void of_phy_deregister_fixed_link(struct device_node *np);
32extern bool of_phy_is_fixed_link(struct device_node *np);32extern bool of_phy_is_fixed_link(struct device_node *np);
33 33extern int of_mdiobus_phy_device_register(struct mii_bus *mdio,
34 struct phy_device *phy,
35 struct device_node *child, u32 addr);
34 36
35static inline int of_mdio_parse_addr(struct device *dev,37static inline int of_mdio_parse_addr(struct device *dev,
36 const struct device_node *np)38 const struct device_node *np)
@@ -118,6 +120,13 @@ static inline bool of_phy_is_fixed_link(struct device_node *np) · 81 unmodified lines
118{120{
119 return false;121 return false;
120}122}
123
124static inline int of_mdiobus_phy_device_register(struct mii_bus *mdio,
125 struct phy_device *phy,
126 struct device_node *child, u32 addr)
127{
128 return -ENOSYS;
129}
121#endif130#endif
122 131
123 132
include/linux/perf_event.h+5−8
@@ -1280,15 +1280,12 @@ extern int sysctl_perf_cpu_time_max_percent; · 1279 unmodified lines
1280 1280
1281extern void perf_sample_event_took(u64 sample_len_ns);1281extern void perf_sample_event_took(u64 sample_len_ns);
1282 1282
1283extern int perf_proc_update_handler(struct ctl_table *table, int write,1283int perf_proc_update_handler(struct ctl_table *table, int write,
1284 void __user *buffer, size_t *lenp,1284 void *buffer, size_t *lenp, loff_t *ppos);
1285 loff_t *ppos);1285int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
1286extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,1286 void *buffer, size_t *lenp, loff_t *ppos);
1287 void __user *buffer, size_t *lenp,
1288 loff_t *ppos);
1289
1290int perf_event_max_stack_handler(struct ctl_table *table, int write,1287int perf_event_max_stack_handler(struct ctl_table *table, int write,
1291 void __user *buffer, size_t *lenp, loff_t *ppos);1288 void *buffer, size_t *lenp, loff_t *ppos);
1292 1289
1293/* Access to perf_event_open(2) syscall. */1290/* Access to perf_event_open(2) syscall. */
1294#define PERF_SECURITY_OPEN 01291#define PERF_SECURITY_OPEN 0
include/linux/phy.h+182−11
@@ -15,6 +15,7 @@ · 14 unmodified lines
15#include <linux/spinlock.h>15#include <linux/spinlock.h>
16#include <linux/ethtool.h>16#include <linux/ethtool.h>
17#include <linux/linkmode.h>17#include <linux/linkmode.h>
18#include <linux/netlink.h>
18#include <linux/mdio.h>19#include <linux/mdio.h>
19#include <linux/mii.h>20#include <linux/mii.h>
20#include <linux/mii_timestamper.h>21#include <linux/mii_timestamper.h>
@@ -25,6 +26,7 @@ · 4 unmodified lines
25#include <linux/u64_stats_sync.h>26#include <linux/u64_stats_sync.h>
26#include <linux/irqreturn.h>27#include <linux/irqreturn.h>
27#include <linux/iopoll.h>28#include <linux/iopoll.h>
29#include <linux/refcount.h>
28 30
29#include <linux/atomic.h>31#include <linux/atomic.h>
30 32
@@ -77,6 +79,7 @@ extern const int phy_10gbit_features_array[1]; · 46 unmodified lines
77 79
78#define PHY_IS_INTERNAL 0x0000000180#define PHY_IS_INTERNAL 0x00000001
79#define PHY_RST_AFTER_CLK_EN 0x0000000281#define PHY_RST_AFTER_CLK_EN 0x00000002
82#define PHY_POLL_CABLE_TEST 0x00000004
80#define MDIO_DEVICE_IS_PHY 0x8000000083#define MDIO_DEVICE_IS_PHY 0x80000000
81 84
82/* Interface Mode definitions */85/* Interface Mode definitions */
@@ -206,12 +209,6 @@ static inline const char *phy_modes(phy_interface_t interface) · 123 unmodified lines
206 209
207#define MII_BUS_ID_SIZE 61210#define MII_BUS_ID_SIZE 61
208 211
209/* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit
210 IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips. */
211#define MII_ADDR_C45 (1<<30)
212#define MII_DEVADDR_C45_SHIFT 16
213#define MII_REGADDR_C45_MASK GENMASK(15, 0)
214
215struct device;212struct device;
216struct phylink;213struct phylink;
217struct sfp_bus;214struct sfp_bus;
@@ -227,6 +224,28 @@ struct mdio_bus_stats { · 9 unmodified lines
227 struct u64_stats_sync syncp;224 struct u64_stats_sync syncp;
228};225};
229 226
227/* Represents a shared structure between different phydev's in the same
228 * package, for example a quad PHY. See phy_package_join() and
229 * phy_package_leave().
230 */
231struct phy_package_shared {
232 int addr;
233 refcount_t refcnt;
234 unsigned long flags;
235 size_t priv_size;
236
237 /* private data pointer */
238 /* note that this pointer is shared between different phydevs and
239 * the user has to take care of appropriate locking. It is allocated
240 * and freed automatically by phy_package_join() and
241 * phy_package_leave().
242 */
243 void *priv;
244};
245
246/* used as bit number in atomic bitops */
247#define PHY_SHARED_F_INIT_DONE 0
248
230/*249/*
231 * The Bus class for PHYs. Devices which provide access to250 * The Bus class for PHYs. Devices which provide access to
232 * PHYs should register using this structure251 * PHYs should register using this structure
@@ -241,6 +260,9 @@ struct mii_bus { · 8 unmodified lines
241 int (*reset)(struct mii_bus *bus);260 int (*reset)(struct mii_bus *bus);
242 struct mdio_bus_stats stats[PHY_MAX_ADDR];261 struct mdio_bus_stats stats[PHY_MAX_ADDR];
243 262
263 unsigned int is_managed:1; /* is device-managed */
264 unsigned int is_managed_registered:1;
265
244 /*266 /*
245 * A lock to ensure that only one thing can read/write267 * A lock to ensure that only one thing can read/write
246 * the MDIO bus at a time268 * the MDIO bus at a time
@@ -275,6 +297,12 @@ struct mii_bus { · 28 unmodified lines
275 int reset_delay_us;297 int reset_delay_us;
276 /* RESET GPIO descriptor pointer */298 /* RESET GPIO descriptor pointer */
277 struct gpio_desc *reset_gpiod;299 struct gpio_desc *reset_gpiod;
300
301 /* protect access to the shared element */
302 struct mutex shared_lock;
303
304 /* shared state across different PHYs */
305 struct phy_package_shared *shared[PHY_MAX_ADDR];
278};306};
279#define to_mii_bus(d) container_of(d, struct mii_bus, dev)307#define to_mii_bus(d) container_of(d, struct mii_bus, dev)
280 308
@@ -286,6 +314,20 @@ static inline struct mii_bus *mdiobus_alloc(void) · 5 unmodified lines
286 314
287int __mdiobus_register(struct mii_bus *bus, struct module *owner);315int __mdiobus_register(struct mii_bus *bus, struct module *owner);
288#define mdiobus_register(bus) __mdiobus_register(bus, THIS_MODULE)316#define mdiobus_register(bus) __mdiobus_register(bus, THIS_MODULE)
317static inline int devm_mdiobus_register(struct mii_bus *bus)
318{
319 int ret;
320
321 if (!bus->is_managed)
322 return -EPERM;
323
324 ret = mdiobus_register(bus);
325 if (!ret)
326 bus->is_managed_registered = 1;
327
328 return ret;
329}
330
289void mdiobus_unregister(struct mii_bus *bus);331void mdiobus_unregister(struct mii_bus *bus);
290void mdiobus_free(struct mii_bus *bus);332void mdiobus_free(struct mii_bus *bus);
291struct mii_bus *devm_mdiobus_alloc_size(struct device *dev, int sizeof_priv);333struct mii_bus *devm_mdiobus_alloc_size(struct device *dev, int sizeof_priv);
@@ -326,6 +368,12 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr); · 34 unmodified lines
326 * - irq or timer will set NOLINK if link goes down368 * - irq or timer will set NOLINK if link goes down
327 * - phy_stop moves to HALTED369 * - phy_stop moves to HALTED
328 *370 *
371 * CABLETEST: PHY is performing a cable test. Packet reception/sending
372 * is not expected to work, carrier will be indicated as down. PHY will be
373 * poll once per second, or on interrupt for it current state.
374 * Once complete, move to UP to restart the PHY.
375 * - phy_stop aborts the running test and moves to HALTED
376 *
329 * HALTED: PHY is up, but no polling or interrupts are done. Or377 * HALTED: PHY is up, but no polling or interrupts are done. Or
330 * PHY is in an error state.378 * PHY is in an error state.
331 * - phy_start moves to UP379 * - phy_start moves to UP
@@ -337,6 +385,7 @@ enum phy_state { · 5 unmodified lines
337 PHY_UP,385 PHY_UP,
338 PHY_RUNNING,386 PHY_RUNNING,
339 PHY_NOLINK,387 PHY_NOLINK,
388 PHY_CABLETEST,
340};389};
341 390
342/**391/**
@@ -431,6 +480,9 @@ struct phy_device { · 88 unmodified lines
431 int duplex;480 int duplex;
432 int pause;481 int pause;
433 int asym_pause;482 int asym_pause;
483 u8 master_slave_get;
484 u8 master_slave_set;
485 u8 master_slave_state;
434 486
435 /* Union of PHY and Attached devices' supported link modes */487 /* Union of PHY and Attached devices' supported link modes */
436 /* See ethtool.h for more info */488 /* See ethtool.h for more info */
@@ -461,6 +513,15 @@ struct phy_device { · 24 unmodified lines
461 /* For use by PHYs to maintain extra state */513 /* For use by PHYs to maintain extra state */
462 void *priv;514 void *priv;
463 515
516 /* shared data pointer */
517 /* For use by PHYs inside the same package that need a shared state. */
518 struct phy_package_shared *shared;
519
520 /* Reporting cable test results */
521 struct sk_buff *skb;
522 void *ehdr;
523 struct nlattr *nest;
524
464 /* Interrupt and Polling infrastructure */525 /* Interrupt and Polling infrastructure */
465 struct delayed_work state_queue;526 struct delayed_work state_queue;
466 527
@@ -476,7 +537,7 @@ struct phy_device { · 9 unmodified lines
476 u8 mdix;537 u8 mdix;
477 u8 mdix_ctrl;538 u8 mdix_ctrl;
478 539
479 void (*phy_link_change)(struct phy_device *, bool up, bool do_carrier);540 void (*phy_link_change)(struct phy_device *phydev, bool up);
480 void (*adjust_link)(struct net_device *dev);541 void (*adjust_link)(struct net_device *dev);
481 542
482#if IS_ENABLED(CONFIG_MACSEC)543#if IS_ENABLED(CONFIG_MACSEC)
@@ -487,6 +548,18 @@ struct phy_device { · 4 unmodified lines
487#define to_phy_device(d) container_of(to_mdio_device(d), \548#define to_phy_device(d) container_of(to_mdio_device(d), \
488 struct phy_device, mdio)549 struct phy_device, mdio)
489 550
551/* A structure containing possible configuration parameters
552 * for a TDR cable test. The driver does not need to implement
553 * all the parameters, but should report what is actually used.
554 */
555struct phy_tdr_config {
556 u32 first;
557 u32 last;
558 u32 step;
559 s8 pair;
560};
561#define PHY_PAIR_ALL -1
562
490/* struct phy_driver: Driver structure for a particular PHY type563/* struct phy_driver: Driver structure for a particular PHY type
491 *564 *
492 * driver_data: static driver data565 * driver_data: static driver data
@@ -636,6 +709,18 @@ struct phy_driver { · 143 unmodified lines
636 int (*module_eeprom)(struct phy_device *dev,709 int (*module_eeprom)(struct phy_device *dev,
637 struct ethtool_eeprom *ee, u8 *data);710 struct ethtool_eeprom *ee, u8 *data);
638 711
712 /* Start a cable test */
713 int (*cable_test_start)(struct phy_device *dev);
714
715 /* Start a raw TDR cable test */
716 int (*cable_test_tdr_start)(struct phy_device *dev,
717 const struct phy_tdr_config *config);
718
719 /* Once per second, or on interrupt, request the status of the
720 * test.
721 */
722 int (*cable_test_get_status)(struct phy_device *dev, bool *finished);
723
639 /* Get statistics from the phy using ethtool */724 /* Get statistics from the phy using ethtool */
640 int (*get_sset_count)(struct phy_device *dev);725 int (*get_sset_count)(struct phy_device *dev);
641 void (*get_strings)(struct phy_device *dev, u8 *data);726 void (*get_strings)(struct phy_device *dev, u8 *data);
@@ -649,6 +734,8 @@ struct phy_driver { · 7 unmodified lines
649 struct ethtool_tunable *tuna,734 struct ethtool_tunable *tuna,
650 const void *data);735 const void *data);
651 int (*set_loopback)(struct phy_device *dev, bool enable);736 int (*set_loopback)(struct phy_device *dev, bool enable);
737 int (*get_sqi)(struct phy_device *dev);
738 int (*get_sqi_max)(struct phy_device *dev);
652};739};
653#define to_phy_driver(d) container_of(to_mdio_common_driver(d), \740#define to_phy_driver(d) container_of(to_mdio_common_driver(d), \
654 struct phy_driver, mdiodrv)741 struct phy_driver, mdiodrv)
@@ -993,6 +1080,10 @@ static inline bool phy_interrupt_is_valid(struct phy_device *phydev) · 338 unmodified lines
993 */1080 */
994static inline bool phy_polling_mode(struct phy_device *phydev)1081static inline bool phy_polling_mode(struct phy_device *phydev)
995{1082{
1083 if (phydev->state == PHY_CABLETEST)
1084 if (phydev->drv->flags & PHY_POLL_CABLE_TEST)
1085 return true;
1086
996 return phydev->irq == PHY_POLL;1087 return phydev->irq == PHY_POLL;
997}1088}
998 1089
@@ -1174,6 +1265,34 @@ int phy_speed_up(struct phy_device *phydev); · 175 unmodified lines
1174int phy_restart_aneg(struct phy_device *phydev);1265int phy_restart_aneg(struct phy_device *phydev);
1175int phy_reset_after_clk_enable(struct phy_device *phydev);1266int phy_reset_after_clk_enable(struct phy_device *phydev);
1176 1267
1268#if IS_ENABLED(CONFIG_PHYLIB)
1269int phy_start_cable_test(struct phy_device *phydev,
1270 struct netlink_ext_ack *extack);
1271int phy_start_cable_test_tdr(struct phy_device *phydev,
1272 struct netlink_ext_ack *extack,
1273 const struct phy_tdr_config *config);
1274#else
1275static inline
1276int phy_start_cable_test(struct phy_device *phydev,
1277 struct netlink_ext_ack *extack)
1278{
1279 NL_SET_ERR_MSG(extack, "Kernel not compiled with PHYLIB support");
1280 return -EOPNOTSUPP;
1281}
1282static inline
1283int phy_start_cable_test_tdr(struct phy_device *phydev,
1284 struct netlink_ext_ack *extack,
1285 const struct phy_tdr_config *config)
1286{
1287 NL_SET_ERR_MSG(extack, "Kernel not compiled with PHYLIB support");
1288 return -EOPNOTSUPP;
1289}
1290#endif
1291
1292int phy_cable_test_result(struct phy_device *phydev, u8 pair, u16 result);
1293int phy_cable_test_fault_length(struct phy_device *phydev, u8 pair,
1294 u16 cm);
1295
1177static inline void phy_device_reset(struct phy_device *phydev, int value)1296static inline void phy_device_reset(struct phy_device *phydev, int value)
1178{1297{
1179 mdio_device_reset(&phydev->mdio, value);1298 mdio_device_reset(&phydev->mdio, value);
@@ -1234,10 +1353,6 @@ static inline int genphy_config_aneg(struct phy_device *phydev) · 54 unmodified lines
1234 return __genphy_config_aneg(phydev, false);1353 return __genphy_config_aneg(phydev, false);
1235}1354}
1236 1355
1237static inline int genphy_no_soft_reset(struct phy_device *phydev)
1238{
1239 return 0;
1240}
1241static inline int genphy_no_ack_interrupt(struct phy_device *phydev)1356static inline int genphy_no_ack_interrupt(struct phy_device *phydev)
1242{1357{
1243 return 0;1358 return 0;
@@ -1341,6 +1456,10 @@ int phy_ethtool_get_link_ksettings(struct net_device *ndev, · 97 unmodified lines
1341int phy_ethtool_set_link_ksettings(struct net_device *ndev,1456int phy_ethtool_set_link_ksettings(struct net_device *ndev,
1342 const struct ethtool_link_ksettings *cmd);1457 const struct ethtool_link_ksettings *cmd);
1343int phy_ethtool_nway_reset(struct net_device *ndev);1458int phy_ethtool_nway_reset(struct net_device *ndev);
1459int phy_package_join(struct phy_device *phydev, int addr, size_t priv_size);
1460void phy_package_leave(struct phy_device *phydev);
1461int devm_phy_package_join(struct device *dev, struct phy_device *phydev,
1462 int addr, size_t priv_size);
1344 1463
1345#if IS_ENABLED(CONFIG_PHYLIB)1464#if IS_ENABLED(CONFIG_PHYLIB)
1346int __init mdio_bus_init(void);1465int __init mdio_bus_init(void);
@@ -1393,6 +1512,58 @@ static inline int phy_ethtool_get_stats(struct phy_device *phydev, · 46 unmodified lines
1393 return 0;1512 return 0;
1394}1513}
1395 1514
1515static inline int phy_package_read(struct phy_device *phydev, u32 regnum)
1516{
1517 struct phy_package_shared *shared = phydev->shared;
1518
1519 if (!shared)
1520 return -EIO;
1521
1522 return mdiobus_read(phydev->mdio.bus, shared->addr, regnum);
1523}
1524
1525static inline int __phy_package_read(struct phy_device *phydev, u32 regnum)
1526{
1527 struct phy_package_shared *shared = phydev->shared;
1528
1529 if (!shared)
1530 return -EIO;
1531
1532 return __mdiobus_read(phydev->mdio.bus, shared->addr, regnum);
1533}
1534
1535static inline int phy_package_write(struct phy_device *phydev,
1536 u32 regnum, u16 val)
1537{
1538 struct phy_package_shared *shared = phydev->shared;
1539
1540 if (!shared)
1541 return -EIO;
1542
1543 return mdiobus_write(phydev->mdio.bus, shared->addr, regnum, val);
1544}
1545
1546static inline int __phy_package_write(struct phy_device *phydev,
1547 u32 regnum, u16 val)
1548{
1549 struct phy_package_shared *shared = phydev->shared;
1550
1551 if (!shared)
1552 return -EIO;
1553
1554 return __mdiobus_write(phydev->mdio.bus, shared->addr, regnum, val);
1555}
1556
1557static inline bool phy_package_init_once(struct phy_device *phydev)
1558{
1559 struct phy_package_shared *shared = phydev->shared;
1560
1561 if (!shared)
1562 return false;
1563
1564 return !test_and_set_bit(PHY_SHARED_F_INIT_DONE, &shared->flags);
1565}
1566
1396extern struct bus_type mdio_bus_type;1567extern struct bus_type mdio_bus_type;
1397 1568
1398struct mdio_board_info {1569struct mdio_board_info {
include/linux/phylink.h+3−3
@@ -67,6 +67,9 @@ struct phylink_config { · 66 unmodified lines
67 struct device *dev;67 struct device *dev;
68 enum phylink_op_type type;68 enum phylink_op_type type;
69 bool pcs_poll;69 bool pcs_poll;
70 bool poll_fixed_state;
71 void (*get_fixed_state)(struct phylink_config *config,
72 struct phylink_link_state *state);
70};73};
71 74
72/**75/**
@@ -366,9 +369,6 @@ void phylink_destroy(struct phylink *); · 293 unmodified lines
366int phylink_connect_phy(struct phylink *, struct phy_device *);369int phylink_connect_phy(struct phylink *, struct phy_device *);
367int phylink_of_phy_connect(struct phylink *, struct device_node *, u32 flags);370int phylink_of_phy_connect(struct phylink *, struct device_node *, u32 flags);
368void phylink_disconnect_phy(struct phylink *);371void phylink_disconnect_phy(struct phylink *);
369int phylink_fixed_state_cb(struct phylink *,
370 void (*cb)(struct net_device *dev,
371 struct phylink_link_state *));
372 372
373void phylink_mac_change(struct phylink *, bool up);373void phylink_mac_change(struct phylink *, bool up);
374 374
include/linux/pid.h+3−0
@@ -108,6 +108,9 @@ extern void transfer_pid(struct task_struct *old, struct task_struct *new, · 107 unmodified lines
108struct pid_namespace;108struct pid_namespace;
109extern struct pid_namespace init_pid_ns;109extern struct pid_namespace init_pid_ns;
110 110
111extern int pid_max;
112extern int pid_max_min, pid_max_max;
113
111/*114/*
112 * look up a PID in the hash table. Must be called with the tasklist_lock115 * look up a PID in the hash table. Must be called with the tasklist_lock
113 * or rcu_read_lock() held.116 * or rcu_read_lock() held.
include/linux/printk.h+1−1
@@ -189,7 +189,7 @@ extern int printk_delay_msec; · 188 unmodified lines
189extern int dmesg_restrict;189extern int dmesg_restrict;
190 190
191extern int191extern int
192devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void __user *buf,192devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, void *buf,
193 size_t *lenp, loff_t *ppos);193 size_t *lenp, loff_t *ppos);
194 194
195extern void wake_up_klogd(void);195extern void wake_up_klogd(void);
include/linux/proc_fs.h+3−0
@@ -105,6 +105,9 @@ struct proc_dir_entry *proc_create_net_single_write(const char *name, umode_t mo · 104 unmodified lines
105 void *data);105 void *data);
106extern struct pid *tgid_pidfd_to_pid(const struct file *file);106extern struct pid *tgid_pidfd_to_pid(const struct file *file);
107 107
108extern int bpf_iter_init_seq_net(void *priv_data);
109extern void bpf_iter_fini_seq_net(void *priv_data);
110
108#ifdef CONFIG_PROC_PID_ARCH_STATUS111#ifdef CONFIG_PROC_PID_ARCH_STATUS
109/*112/*
110 * The architecture which selects CONFIG_PROC_PID_ARCH_STATUS must113 * The architecture which selects CONFIG_PROC_PID_ARCH_STATUS must
include/linux/ptp_clock_kernel.h+5−1
@@ -36,7 +36,7 @@ struct ptp_system_timestamp { · 35 unmodified lines
36};36};
37 37
38/**38/**
39 * struct ptp_clock_info - decribes a PTP hardware clock39 * struct ptp_clock_info - describes a PTP hardware clock
40 *40 *
41 * @owner: The clock driver should set to THIS_MODULE.41 * @owner: The clock driver should set to THIS_MODULE.
42 * @name: A short "friendly name" to identify the clock and to42 * @name: A short "friendly name" to identify the clock and to
@@ -65,6 +65,9 @@ struct ptp_system_timestamp { · 22 unmodified lines
65 * parameter delta: Desired frequency offset from nominal frequency65 * parameter delta: Desired frequency offset from nominal frequency
66 * in parts per billion66 * in parts per billion
67 *67 *
68 * @adjphase: Adjusts the phase offset of the hardware clock.
69 * parameter delta: Desired change in nanoseconds.
70 *
68 * @adjtime: Shifts the time of the hardware clock.71 * @adjtime: Shifts the time of the hardware clock.
69 * parameter delta: Desired change in nanoseconds.72 * parameter delta: Desired change in nanoseconds.
70 *73 *
@@ -128,6 +131,7 @@ struct ptp_clock_info { · 57 unmodified lines
128 struct ptp_pin_desc *pin_config;131 struct ptp_pin_desc *pin_config;
129 int (*adjfine)(struct ptp_clock_info *ptp, long scaled_ppm);132 int (*adjfine)(struct ptp_clock_info *ptp, long scaled_ppm);
130 int (*adjfreq)(struct ptp_clock_info *ptp, s32 delta);133 int (*adjfreq)(struct ptp_clock_info *ptp, s32 delta);
134 int (*adjphase)(struct ptp_clock_info *ptp, s32 phase);
131 int (*adjtime)(struct ptp_clock_info *ptp, s64 delta);135 int (*adjtime)(struct ptp_clock_info *ptp, s64 delta);
132 int (*gettime64)(struct ptp_clock_info *ptp, struct timespec64 *ts);136 int (*gettime64)(struct ptp_clock_info *ptp, struct timespec64 *ts);
133 int (*gettimex64)(struct ptp_clock_info *ptp, struct timespec64 *ts,137 int (*gettimex64)(struct ptp_clock_info *ptp, struct timespec64 *ts,
include/linux/qed/qed_if.h+23−3
@@ -607,6 +607,16 @@ struct qed_sb_info { · 606 unmodified lines
607 struct qed_dev *cdev;607 struct qed_dev *cdev;
608};608};
609 609
610enum qed_hw_err_type {
611 QED_HW_ERR_FAN_FAIL,
612 QED_HW_ERR_MFW_RESP_FAIL,
613 QED_HW_ERR_HW_ATTN,
614 QED_HW_ERR_DMAE_FAIL,
615 QED_HW_ERR_RAMROD_FAIL,
616 QED_HW_ERR_FW_ASSERT,
617 QED_HW_ERR_LAST,
618};
619
610enum qed_dev_type {620enum qed_dev_type {
611 QED_DEV_TYPE_BB,621 QED_DEV_TYPE_BB,
612 QED_DEV_TYPE_AH,622 QED_DEV_TYPE_AH,
@@ -811,10 +821,11 @@ enum qed_nvm_flash_cmd { · 198 unmodified lines
811 821
812struct qed_common_cb_ops {822struct qed_common_cb_ops {
813 void (*arfs_filter_op)(void *dev, void *fltr, u8 fw_rc);823 void (*arfs_filter_op)(void *dev, void *fltr, u8 fw_rc);
814 void (*link_update)(void *dev,824 void (*link_update)(void *dev, struct qed_link_output *link);
815 struct qed_link_output *link);
816 void (*schedule_recovery_handler)(void *dev);825 void (*schedule_recovery_handler)(void *dev);
817 void (*dcbx_aen)(void *dev, struct qed_dcbx_get *get, u32 mib_type);826 void (*schedule_hw_err_handler)(void *dev,
827 enum qed_hw_err_type err_type);
828 void (*dcbx_aen)(void *dev, struct qed_dcbx_get *get, u32 mib_type);
818 void (*get_generic_tlv_data)(void *dev, struct qed_generic_tlvs *data);829 void (*get_generic_tlv_data)(void *dev, struct qed_generic_tlvs *data);
819 void (*get_protocol_tlv_data)(void *dev, void *data);830 void (*get_protocol_tlv_data)(void *dev, void *data);
820};831};
@@ -1034,6 +1045,15 @@ struct qed_common_ops { · 213 unmodified lines
1034 */1045 */
1035 int (*set_led)(struct qed_dev *cdev,1046 int (*set_led)(struct qed_dev *cdev,
1036 enum qed_led_mode mode);1047 enum qed_led_mode mode);
1048
1049/**
1050 * @brief attn_clr_enable - Prevent attentions from being reasserted
1051 *
1052 * @param cdev
1053 * @param clr_enable
1054 */
1055 void (*attn_clr_enable)(struct qed_dev *cdev, bool clr_enable);
1056
1037/**1057/**
1038 * @brief db_recovery_add - add doorbell information to the doorbell1058 * @brief db_recovery_add - add doorbell information to the doorbell
1039 * recovery mechanism.1059 * recovery mechanism.
include/linux/qed/qed_rdma_if.h+22−0
@@ -53,6 +53,13 @@ enum qed_roce_qp_state { · 52 unmodified lines
53 QED_ROCE_QP_STATE_SQE53 QED_ROCE_QP_STATE_SQE
54};54};
55 55
56enum qed_rdma_qp_type {
57 QED_RDMA_QP_TYPE_RC,
58 QED_RDMA_QP_TYPE_XRC_INI,
59 QED_RDMA_QP_TYPE_XRC_TGT,
60 QED_RDMA_QP_TYPE_INVAL = 0xffff,
61};
62
56enum qed_rdma_tid_type {63enum qed_rdma_tid_type {
57 QED_RDMA_TID_REGISTERED_MR,64 QED_RDMA_TID_REGISTERED_MR,
58 QED_RDMA_TID_FMR,65 QED_RDMA_TID_FMR,
@@ -291,6 +298,12 @@ struct qed_rdma_create_srq_in_params { · 232 unmodified lines
291 u16 num_pages;298 u16 num_pages;
292 u16 pd_id;299 u16 pd_id;
293 u16 page_size;300 u16 page_size;
301
302 /* XRC related only */
303 bool reserved_key_en;
304 bool is_xrc;
305 u32 cq_cid;
306 u16 xrcd_id;
294};307};
295 308
296struct qed_rdma_destroy_cq_in_params {309struct qed_rdma_destroy_cq_in_params {
@@ -319,7 +332,12 @@ struct qed_rdma_create_qp_in_params { · 22 unmodified lines
319 u16 rq_num_pages;332 u16 rq_num_pages;
320 u64 rq_pbl_ptr;333 u64 rq_pbl_ptr;
321 u16 srq_id;334 u16 srq_id;
335 u16 xrcd_id;
322 u8 stats_queue;336 u8 stats_queue;
337 enum qed_rdma_qp_type qp_type;
338 u8 flags;
339#define QED_ROCE_EDPM_MODE_MASK 0x1
340#define QED_ROCE_EDPM_MODE_SHIFT 0
323};341};
324 342
325struct qed_rdma_create_qp_out_params {343struct qed_rdma_create_qp_out_params {
@@ -429,11 +447,13 @@ struct qed_rdma_create_srq_out_params { · 103 unmodified lines
429 447
430struct qed_rdma_destroy_srq_in_params {448struct qed_rdma_destroy_srq_in_params {
431 u16 srq_id;449 u16 srq_id;
450 bool is_xrc;
432};451};
433 452
434struct qed_rdma_modify_srq_in_params {453struct qed_rdma_modify_srq_in_params {
435 u32 wqe_limit;454 u32 wqe_limit;
436 u16 srq_id;455 u16 srq_id;
456 bool is_xrc;
437};457};
438 458
439struct qed_rdma_stats_out_params {459struct qed_rdma_stats_out_params {
@@ -611,6 +631,8 @@ struct qed_rdma_ops { · 171 unmodified lines
611 int (*rdma_set_rdma_int)(struct qed_dev *cdev, u16 cnt);631 int (*rdma_set_rdma_int)(struct qed_dev *cdev, u16 cnt);
612 int (*rdma_alloc_pd)(void *rdma_cxt, u16 *pd);632 int (*rdma_alloc_pd)(void *rdma_cxt, u16 *pd);
613 void (*rdma_dealloc_pd)(void *rdma_cxt, u16 pd);633 void (*rdma_dealloc_pd)(void *rdma_cxt, u16 pd);
634 int (*rdma_alloc_xrcd)(void *rdma_cxt, u16 *xrcd);
635 void (*rdma_dealloc_xrcd)(void *rdma_cxt, u16 xrcd);
614 int (*rdma_create_cq)(void *rdma_cxt,636 int (*rdma_create_cq)(void *rdma_cxt,
615 struct qed_rdma_create_cq_in_params *params,637 struct qed_rdma_create_cq_in_params *params,
616 u16 *icid);638 u16 *icid);
include/linux/sched/sysctl.h+15−29
@@ -12,9 +12,8 @@ extern unsigned int sysctl_hung_task_panic; · 11 unmodified lines
12extern unsigned long sysctl_hung_task_timeout_secs;12extern unsigned long sysctl_hung_task_timeout_secs;
13extern unsigned long sysctl_hung_task_check_interval_secs;13extern unsigned long sysctl_hung_task_check_interval_secs;
14extern int sysctl_hung_task_warnings;14extern int sysctl_hung_task_warnings;
15extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,15int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
16 void __user *buffer,16 void *buffer, size_t *lenp, loff_t *ppos);
17 size_t *lenp, loff_t *ppos);
18#else17#else
19/* Avoid need for ifdefs elsewhere in the code */18/* Avoid need for ifdefs elsewhere in the code */
20enum { sysctl_hung_task_timeout_secs = 0 };19enum { sysctl_hung_task_timeout_secs = 0 };
@@ -43,8 +42,7 @@ extern __read_mostly unsigned int sysctl_sched_migration_cost; · 22 unmodified lines
43extern __read_mostly unsigned int sysctl_sched_nr_migrate;42extern __read_mostly unsigned int sysctl_sched_nr_migrate;
44 43
45int sched_proc_update_handler(struct ctl_table *table, int write,44int sched_proc_update_handler(struct ctl_table *table, int write,
46 void __user *buffer, size_t *length,45 void *buffer, size_t *length, loff_t *ppos);
47 loff_t *ppos);
48#endif46#endif
49 47
50/*48/*
@@ -72,33 +70,21 @@ extern unsigned int sysctl_sched_autogroup_enabled; · 21 unmodified lines
72extern int sysctl_sched_rr_timeslice;70extern int sysctl_sched_rr_timeslice;
73extern int sched_rr_timeslice;71extern int sched_rr_timeslice;
74 72
75extern int sched_rr_handler(struct ctl_table *table, int write,73int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
76 void __user *buffer, size_t *lenp,74 size_t *lenp, loff_t *ppos);
77 loff_t *ppos);75int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
78 76 size_t *lenp, loff_t *ppos);
79extern int sched_rt_handler(struct ctl_table *table, int write,77int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
80 void __user *buffer, size_t *lenp,78 void *buffer, size_t *lenp, loff_t *ppos);
81 loff_t *ppos);79int sysctl_numa_balancing(struct ctl_table *table, int write, void *buffer,
82 80 size_t *lenp, loff_t *ppos);
83#ifdef CONFIG_UCLAMP_TASK81int sysctl_schedstats(struct ctl_table *table, int write, void *buffer,
84extern int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,82 size_t *lenp, loff_t *ppos);
85 void __user *buffer, size_t *lenp,
86 loff_t *ppos);
87#endif
88
89extern int sysctl_numa_balancing(struct ctl_table *table, int write,
90 void __user *buffer, size_t *lenp,
91 loff_t *ppos);
92
93extern int sysctl_schedstats(struct ctl_table *table, int write,
94 void __user *buffer, size_t *lenp,
95 loff_t *ppos);
96 83
97#if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)84#if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
98extern unsigned int sysctl_sched_energy_aware;85extern unsigned int sysctl_sched_energy_aware;
99extern int sched_energy_aware_handler(struct ctl_table *table, int write,86int sched_energy_aware_handler(struct ctl_table *table, int write,
100 void __user *buffer, size_t *lenp,87 void *buffer, size_t *lenp, loff_t *ppos);
101 loff_t *ppos);
102#endif88#endif
103 89
104#endif /* _LINUX_SCHED_SYSCTL_H */90#endif /* _LINUX_SCHED_SYSCTL_H */
include/linux/security.h+1−1
@@ -211,7 +211,7 @@ struct request_sock; · 210 unmodified lines
211 211
212#ifdef CONFIG_MMU212#ifdef CONFIG_MMU
213extern int mmap_min_addr_handler(struct ctl_table *table, int write,213extern int mmap_min_addr_handler(struct ctl_table *table, int write,
214 void __user *buffer, size_t *lenp, loff_t *ppos);214 void *buffer, size_t *lenp, loff_t *ppos);
215#endif215#endif
216 216
217/* security_inode_init_security callback function to write xattrs */217/* security_inode_init_security callback function to write xattrs */
include/linux/skbuff.h+9−27
@@ -1283,32 +1283,6 @@ void skb_flow_dissector_init(struct flow_dissector *flow_dissector, · 1282 unmodified lines
1283 const struct flow_dissector_key *key,1283 const struct flow_dissector_key *key,
1284 unsigned int key_count);1284 unsigned int key_count);
1285 1285
1286#ifdef CONFIG_NET
1287int skb_flow_dissector_prog_query(const union bpf_attr *attr,
1288 union bpf_attr __user *uattr);
1289int skb_flow_dissector_bpf_prog_attach(const union bpf_attr *attr,
1290 struct bpf_prog *prog);
1291
1292int skb_flow_dissector_bpf_prog_detach(const union bpf_attr *attr);
1293#else
1294static inline int skb_flow_dissector_prog_query(const union bpf_attr *attr,
1295 union bpf_attr __user *uattr)
1296{
1297 return -EOPNOTSUPP;
1298}
1299
1300static inline int skb_flow_dissector_bpf_prog_attach(const union bpf_attr *attr,
1301 struct bpf_prog *prog)
1302{
1303 return -EOPNOTSUPP;
1304}
1305
1306static inline int skb_flow_dissector_bpf_prog_detach(const union bpf_attr *attr)
1307{
1308 return -EOPNOTSUPP;
1309}
1310#endif
1311
1312struct bpf_flow_dissector;1286struct bpf_flow_dissector;
1313bool bpf_flow_dissect(struct bpf_prog *prog, struct bpf_flow_dissector *ctx,1287bool bpf_flow_dissect(struct bpf_prog *prog, struct bpf_flow_dissector *ctx,
1314 __be16 proto, int nhoff, int hlen, unsigned int flags);1288 __be16 proto, int nhoff, int hlen, unsigned int flags);
@@ -3945,6 +3919,14 @@ static inline void __skb_incr_checksum_unnecessary(struct sk_buff *skb) · 2630 unmodified lines
3945 }3919 }
3946}3920}
3947 3921
3922static inline void __skb_reset_checksum_unnecessary(struct sk_buff *skb)
3923{
3924 if (skb->ip_summed == CHECKSUM_UNNECESSARY) {
3925 skb->ip_summed = CHECKSUM_NONE;
3926 skb->csum_level = 0;
3927 }
3928}
3929
3948/* Check if we need to perform checksum complete validation.3930/* Check if we need to perform checksum complete validation.
3949 *3931 *
3950 * Returns true if checksum complete is needed, false otherwise3932 * Returns true if checksum complete is needed, false otherwise
@@ -4165,7 +4147,7 @@ struct skb_ext { · 214 unmodified lines
4165 char data[] __aligned(8);4147 char data[] __aligned(8);
4166};4148};
4167 4149
4168struct skb_ext *__skb_ext_alloc(void);4150struct skb_ext *__skb_ext_alloc(gfp_t flags);
4169void *__skb_ext_set(struct sk_buff *skb, enum skb_ext_id id,4151void *__skb_ext_set(struct sk_buff *skb, enum skb_ext_id id,
4170 struct skb_ext *ext);4152 struct skb_ext *ext);
4171void *skb_ext_add(struct sk_buff *skb, enum skb_ext_id id);4153void *skb_ext_add(struct sk_buff *skb, enum skb_ext_id id);
include/linux/skmsg.h+8−0
@@ -437,4 +437,12 @@ static inline void psock_progs_drop(struct sk_psock_progs *progs) · 436 unmodified lines
437 psock_set_prog(&progs->skb_verdict, NULL);437 psock_set_prog(&progs->skb_verdict, NULL);
438}438}
439 439
440int sk_psock_tls_strp_read(struct sk_psock *psock, struct sk_buff *skb);
441
442static inline bool sk_psock_strp_enabled(struct sk_psock *psock)
443{
444 if (!psock)
445 return false;
446 return psock->parser.enabled;
447}
440#endif /* _LINUX_SKMSG_H */448#endif /* _LINUX_SKMSG_H */
include/linux/socket.h+15−2
@@ -50,7 +50,17 @@ struct msghdr { · 49 unmodified lines
50 void *msg_name; /* ptr to socket address structure */50 void *msg_name; /* ptr to socket address structure */
51 int msg_namelen; /* size of socket address structure */51 int msg_namelen; /* size of socket address structure */
52 struct iov_iter msg_iter; /* data */52 struct iov_iter msg_iter; /* data */
53 void *msg_control; /* ancillary data */53
54 /*
55 * Ancillary data. msg_control_user is the user buffer used for the
56 * recv* side when msg_control_is_user is set, msg_control is the kernel
57 * buffer used for all other cases.
58 */
59 union {
60 void *msg_control;
61 void __user *msg_control_user;
62 };
63 bool msg_control_is_user : 1;
54 __kernel_size_t msg_controllen; /* ancillary data buffer length */64 __kernel_size_t msg_controllen; /* ancillary data buffer length */
55 unsigned int msg_flags; /* flags on received message */65 unsigned int msg_flags; /* flags on received message */
56 struct kiocb *msg_iocb; /* ptr to iocb for async requests */66 struct kiocb *msg_iocb; /* ptr to iocb for async requests */
@@ -94,7 +104,10 @@ struct cmsghdr { · 37 unmodified lines
94 104
95#define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )105#define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )
96 106
97#define CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + sizeof(struct cmsghdr)))107#define CMSG_DATA(cmsg) \
108 ((void *)(cmsg) + sizeof(struct cmsghdr))
109#define CMSG_USER_DATA(cmsg) \
110 ((void __user *)(cmsg) + sizeof(struct cmsghdr))
98#define CMSG_SPACE(len) (sizeof(struct cmsghdr) + CMSG_ALIGN(len))111#define CMSG_SPACE(len) (sizeof(struct cmsghdr) + CMSG_ALIGN(len))
99#define CMSG_LEN(len) (sizeof(struct cmsghdr) + (len))112#define CMSG_LEN(len) (sizeof(struct cmsghdr) + (len))
100 113
include/linux/sysctl.h+30−31
@@ -44,35 +44,26 @@ struct ctl_dir; · 43 unmodified lines
44 44
45extern const int sysctl_vals[];45extern const int sysctl_vals[];
46 46
47typedef int proc_handler (struct ctl_table *ctl, int write,47typedef int proc_handler(struct ctl_table *ctl, int write, void *buffer,
48 void __user *buffer, size_t *lenp, loff_t *ppos);48 size_t *lenp, loff_t *ppos);
49 49
50extern int proc_dostring(struct ctl_table *, int,50int proc_dostring(struct ctl_table *, int, void *, size_t *, loff_t *);
51 void __user *, size_t *, loff_t *);51int proc_dointvec(struct ctl_table *, int, void *, size_t *, loff_t *);
52extern int proc_dointvec(struct ctl_table *, int,52int proc_douintvec(struct ctl_table *, int, void *, size_t *, loff_t *);
53 void __user *, size_t *, loff_t *);53int proc_dointvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *);
54extern int proc_douintvec(struct ctl_table *, int,54int proc_douintvec_minmax(struct ctl_table *table, int write, void *buffer,
55 void __user *, size_t *, loff_t *);55 size_t *lenp, loff_t *ppos);
56extern int proc_dointvec_minmax(struct ctl_table *, int,56int proc_dointvec_jiffies(struct ctl_table *, int, void *, size_t *, loff_t *);
57 void __user *, size_t *, loff_t *);57int proc_dointvec_userhz_jiffies(struct ctl_table *, int, void *, size_t *,
58extern int proc_douintvec_minmax(struct ctl_table *table, int write,58 loff_t *);
59 void __user *buffer, size_t *lenp,59int proc_dointvec_ms_jiffies(struct ctl_table *, int, void *, size_t *,
60 loff_t *ppos);60 loff_t *);
61extern int proc_dointvec_jiffies(struct ctl_table *, int,61int proc_doulongvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *);
62 void __user *, size_t *, loff_t *);62int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, void *,
63extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int,63 size_t *, loff_t *);
64 void __user *, size_t *, loff_t *);64int proc_do_large_bitmap(struct ctl_table *, int, void *, size_t *, loff_t *);
65extern int proc_dointvec_ms_jiffies(struct ctl_table *, int,65int proc_do_static_key(struct ctl_table *table, int write, void *buffer,
66 void __user *, size_t *, loff_t *);66 size_t *lenp, loff_t *ppos);
67extern int proc_doulongvec_minmax(struct ctl_table *, int,
68 void __user *, size_t *, loff_t *);
69extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
70 void __user *, size_t *, loff_t *);
71extern int proc_do_large_bitmap(struct ctl_table *, int,
72 void __user *, size_t *, loff_t *);
73extern int proc_do_static_key(struct ctl_table *table, int write,
74 void __user *buffer, size_t *lenp,
75 loff_t *ppos);
76 67
77/*68/*
78 * Register a set of sysctl names by calling register_sysctl_table69 * Register a set of sysctl names by calling register_sysctl_table
@@ -207,7 +198,15 @@ void unregister_sysctl_table(struct ctl_table_header * table); · 128 unmodified lines
207 198
208extern int sysctl_init(void);199extern int sysctl_init(void);
209 200
201extern int pwrsw_enabled;
202extern int unaligned_enabled;
203extern int unaligned_dump_stack;
204extern int no_unaligned_warning;
205
210extern struct ctl_table sysctl_mount_point[];206extern struct ctl_table sysctl_mount_point[];
207extern struct ctl_table random_table[];
208extern struct ctl_table firmware_config_table[];
209extern struct ctl_table epoll_table[];
211 210
212#else /* CONFIG_SYSCTL */211#else /* CONFIG_SYSCTL */
213static inline struct ctl_table_header *register_sysctl_table(struct ctl_table * table)212static inline struct ctl_table_header *register_sysctl_table(struct ctl_table * table)
@@ -238,7 +237,7 @@ static inline void setup_sysctl_set(struct ctl_table_set *p, · 24 unmodified lines
238 237
239#endif /* CONFIG_SYSCTL */238#endif /* CONFIG_SYSCTL */
240 239
241int sysctl_max_threads(struct ctl_table *table, int write,240int sysctl_max_threads(struct ctl_table *table, int write, void *buffer,
242 void __user *buffer, size_t *lenp, loff_t *ppos);241 size_t *lenp, loff_t *ppos);
243 242
244#endif /* _LINUX_SYSCTL_H */243#endif /* _LINUX_SYSCTL_H */
include/linux/tcp.h+13−0
@@ -120,6 +120,9 @@ struct tcp_request_sock { · 119 unmodified lines
120 u64 snt_synack; /* first SYNACK sent time */120 u64 snt_synack; /* first SYNACK sent time */
121 bool tfo_listener;121 bool tfo_listener;
122 bool is_mptcp;122 bool is_mptcp;
123#if IS_ENABLED(CONFIG_MPTCP)
124 bool drop_req;
125#endif
123 u32 txhash;126 u32 txhash;
124 u32 rcv_isn;127 u32 rcv_isn;
125 u32 snt_isn;128 u32 snt_isn;
@@ -217,6 +220,7 @@ struct tcp_sock { · 91 unmodified lines
217 } rack;220 } rack;
218 u16 advmss; /* Advertised MSS */221 u16 advmss; /* Advertised MSS */
219 u8 compressed_ack;222 u8 compressed_ack;
223 u8 dup_ack_counter;
220 u32 chrono_start; /* Start time in jiffies of a TCP chrono */224 u32 chrono_start; /* Start time in jiffies of a TCP chrono */
221 u32 chrono_stat[3]; /* Time in jiffies for chrono_stat stats */225 u32 chrono_stat[3]; /* Time in jiffies for chrono_stat stats */
222 u8 chrono_type:2, /* current chronograph type */226 u8 chrono_type:2, /* current chronograph type */
@@ -493,4 +497,13 @@ static inline u16 tcp_mss_clamp(const struct tcp_sock *tp, u16 mss) · 270 unmodified lines
493int tcp_skb_shift(struct sk_buff *to, struct sk_buff *from, int pcount,497int tcp_skb_shift(struct sk_buff *to, struct sk_buff *from, int pcount,
494 int shiftlen);498 int shiftlen);
495 499
500void tcp_sock_set_cork(struct sock *sk, bool on);
501int tcp_sock_set_keepcnt(struct sock *sk, int val);
502int tcp_sock_set_keepidle(struct sock *sk, int val);
503int tcp_sock_set_keepintvl(struct sock *sk, int val);
504void tcp_sock_set_nodelay(struct sock *sk);
505void tcp_sock_set_quickack(struct sock *sk, int val);
506int tcp_sock_set_syncnt(struct sock *sk, int val);
507void tcp_sock_set_user_timeout(struct sock *sk, u32 val);
508
496#endif /* _LINUX_TCP_H */509#endif /* _LINUX_TCP_H */
include/linux/timer.h+1−2
@@ -201,8 +201,7 @@ struct ctl_table; · 200 unmodified lines
201 201
202extern unsigned int sysctl_timer_migration;202extern unsigned int sysctl_timer_migration;
203int timer_migration_handler(struct ctl_table *table, int write,203int timer_migration_handler(struct ctl_table *table, int write,
204 void __user *buffer, size_t *lenp,204 void *buffer, size_t *lenp, loff_t *ppos);
205 loff_t *ppos);
206#endif205#endif
207 206
208unsigned long __round_jiffies(unsigned long j, int cpu);207unsigned long __round_jiffies(unsigned long j, int cpu);
include/linux/vermagic.h+4−0
@@ -2,6 +2,10 @@ · 1 unmodified line
2#ifndef _LINUX_VERMAGIC_H2#ifndef _LINUX_VERMAGIC_H
3#define _LINUX_VERMAGIC_H3#define _LINUX_VERMAGIC_H
4 4
5#ifndef INCLUDE_VERMAGIC
6#error "This header can be included from kernel/module.c or *.mod.c only"
7#endif
8
5#include <generated/utsrelease.h>9#include <generated/utsrelease.h>
6#include <asm/vermagic.h>10#include <asm/vermagic.h>
7 11
include/linux/vmstat.h+4−4
@@ -16,8 +16,8 @@ extern int sysctl_stat_interval; · 15 unmodified lines
16#define DISABLE_NUMA_STAT 016#define DISABLE_NUMA_STAT 0
17extern int sysctl_vm_numa_stat;17extern int sysctl_vm_numa_stat;
18DECLARE_STATIC_KEY_TRUE(vm_numa_stat_key);18DECLARE_STATIC_KEY_TRUE(vm_numa_stat_key);
19extern int sysctl_vm_numa_stat_handler(struct ctl_table *table,19int sysctl_vm_numa_stat_handler(struct ctl_table *table, int write,
20 int write, void __user *buffer, size_t *length, loff_t *ppos);20 void *buffer, size_t *length, loff_t *ppos);
21#endif21#endif
22 22
23struct reclaim_stat {23struct reclaim_stat {
@@ -274,8 +274,8 @@ void cpu_vm_stats_fold(int cpu); · 250 unmodified lines
274void refresh_zone_stat_thresholds(void);274void refresh_zone_stat_thresholds(void);
275 275
276struct ctl_table;276struct ctl_table;
277int vmstat_refresh(struct ctl_table *, int write,277int vmstat_refresh(struct ctl_table *, int write, void *buffer, size_t *lenp,
278 void __user *buffer, size_t *lenp, loff_t *ppos);278 loff_t *ppos);
279 279
280void drain_zonestat(struct zone *zone, struct per_cpu_pageset *);280void drain_zonestat(struct zone *zone, struct per_cpu_pageset *);
281 281
include/linux/writeback.h+11−17
@@ -362,24 +362,18 @@ extern int vm_highmem_is_dirtyable; · 361 unmodified lines
362extern int block_dump;362extern int block_dump;
363extern int laptop_mode;363extern int laptop_mode;
364 364
365extern int dirty_background_ratio_handler(struct ctl_table *table, int write,365int dirty_background_ratio_handler(struct ctl_table *table, int write,
366 void __user *buffer, size_t *lenp,366 void *buffer, size_t *lenp, loff_t *ppos);
367 loff_t *ppos);367int dirty_background_bytes_handler(struct ctl_table *table, int write,
368extern int dirty_background_bytes_handler(struct ctl_table *table, int write,368 void *buffer, size_t *lenp, loff_t *ppos);
369 void __user *buffer, size_t *lenp,369int dirty_ratio_handler(struct ctl_table *table, int write,
370 loff_t *ppos);370 void *buffer, size_t *lenp, loff_t *ppos);
371extern int dirty_ratio_handler(struct ctl_table *table, int write,371int dirty_bytes_handler(struct ctl_table *table, int write,
372 void __user *buffer, size_t *lenp,372 void *buffer, size_t *lenp, loff_t *ppos);
373 loff_t *ppos);
374extern int dirty_bytes_handler(struct ctl_table *table, int write,
375 void __user *buffer, size_t *lenp,
376 loff_t *ppos);
377int dirtytime_interval_handler(struct ctl_table *table, int write,373int dirtytime_interval_handler(struct ctl_table *table, int write,
378 void __user *buffer, size_t *lenp, loff_t *ppos);374 void *buffer, size_t *lenp, loff_t *ppos);
379 375int dirty_writeback_centisecs_handler(struct ctl_table *table, int write,
380struct ctl_table;376 void *buffer, size_t *lenp, loff_t *ppos);
381int dirty_writeback_centisecs_handler(struct ctl_table *, int,
382 void __user *, size_t *, loff_t *);
383 377
384void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty);378void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty);
385unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh);379unsigned long wb_calc_thresh(struct bdi_writeback *wb, unsigned long thresh);