History

Merge tag 'net-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Jakub Kicinski: "Including fixes from can, wireless and netfilter. Current release - regressions: - af_unix: fix task hung while purging oob_skb in GC - pds_core: do not try to run health-thread in VF path Current release - new code bugs: - sched: act_mirred: don't zero blockid when net device is being deleted Previous releases - regressions: - netfilter: - nat: restore default DNAT behavior - nf_tables: fix bidirectional offload, broken when unidirectional offload support was added - openvswitch: limit the number of recursions from action sets - eth: i40e: do not allow untrusted VF to remove administratively set MAC address Previous releases - always broken: - tls: fix races and bugs in use of async crypto - mptcp: prevent data races on some of the main socket fields, fix races in fastopen handling - dpll: fix possible deadlock during netlink dump operation - dsa: lan966x: fix crash when adding interface under a lag when some of the ports are disabled - can: j1939: prevent deadlock by changing j1939_socks_lock to rwlock Misc: - a handful of fixes and reliability improvements for selftests - fix sysfs documentation missing net/ in paths - finish the work of squashing the missing MODULE_DESCRIPTION() warnings in networking" * tag 'net-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (92 commits) net: fill in MODULE_DESCRIPTION()s for missing arcnet net: fill in MODULE_DESCRIPTION()s for mdio_devres net: fill in MODULE_DESCRIPTION()s for ppp net: fill in MODULE_DESCRIPTION()s for fddik/skfp net: fill in MODULE_DESCRIPTION()s for plip net: fill in MODULE_DESCRIPTION()s for ieee802154/fakelb net: fill in MODULE_DESCRIPTION()s for xen-netback net: ravb: Count packets instead of descriptors in GbEth RX path pppoe: Fix memory leak in pppoe_sendmsg() net: sctp: fix skb leak in sctp_inq_free() net: bcmasp: Handle RX buffer allocation failure net-timestamp: make sk_tskey more predictable in error path selftests: tls: increase the wait in poll_partial_rec_async ice: Add check for lport extraction to LAG init netfilter: nf_tables: fix bidirectional offload regression netfilter: nat: restore default DNAT behavior netfilter: nft_set_pipapo: fix missing : in kdoc igc: Remove temporary workaround igb: Fix string truncation warnings in igb_set_fw_version can: netlink: Fix TDCO calculation using the old data bittiming ...

Linus Torvalds committed 2 years ago

Commit 4f5e5092 parents cc9c4f0 c40c0d3129 files · +817 −489Browse files

Unified · Split

129 files
  1. .mailmap +5 −4
  2. Documentation/ABI/testing/sysfs-class-net-statistics +24 −24
  3. Documentation/netlink/specs/dpll.yaml +0 −4
  4. Documentation/networking/devlink/devlink-port.rst +1 −1
  5. Documentation/networking/net_cachelines/net_device.rst +2 −2
  6. Documentation/networking/net_cachelines/tcp_sock.rst +2 −2
  7. MAINTAINERS +1 −1
  8. drivers/connector/cn_proc.c +2 −3
  9. drivers/dpll/dpll_netlink.c +6 −14
  10. drivers/dpll/dpll_nl.c +0 −4
  11. drivers/dpll/dpll_nl.h +0 −2
  12. drivers/net/arcnet/arc-rawmode.c +1 −0
  13. drivers/net/arcnet/arc-rimi.c +1 −0
  14. drivers/net/arcnet/capmode.c +1 −0
  15. drivers/net/arcnet/com20020-pci.c +1 −0
  16. drivers/net/arcnet/com20020.c +1 −0
  17. drivers/net/arcnet/com20020_cs.c +1 −0
  18. drivers/net/arcnet/com90io.c +1 −0
  19. drivers/net/arcnet/com90xx.c +1 −0
  20. drivers/net/arcnet/rfc1051.c +1 −0
  21. drivers/net/arcnet/rfc1201.c +1 −0
  22. drivers/net/bonding/bond_main.c +2 −3
  23. drivers/net/can/dev/netlink.c +1 −1
  24. drivers/net/dsa/dsa_loop_bdinfo.c +1 −0
  25. drivers/net/ethernet/amd/pds_core/main.c +6 −0
  26. drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c +3 −0
  27. drivers/net/ethernet/brocade/bna/bnad.c +5 −7
  28. drivers/net/ethernet/intel/i40e/i40e_dcb.c +1 −1
  29. drivers/net/ethernet/intel/i40e/i40e_main.c +10 −14
  30. drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +33 −5
  31. drivers/net/ethernet/intel/ice/ice_lag.c +23 −2
  32. drivers/net/ethernet/intel/ice/ice_lag.h +3 −0
  33. drivers/net/ethernet/intel/igb/igb.h +1 −1
  34. drivers/net/ethernet/intel/igb/igb_main.c +18 −17
  35. drivers/net/ethernet/intel/igc/igc_phy.c +1 −5
  36. drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c +0 −32
  37. drivers/net/ethernet/mellanox/mlx5/core/dpll.c +1 −1
  38. drivers/net/ethernet/microchip/lan966x/lan966x_lag.c +7 −2
  39. drivers/net/ethernet/pensando/ionic/ionic_txrx.c +9 −0
  40. drivers/net/ethernet/renesas/ravb_main.c +9 −13
  41. drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c +35 −34
  42. drivers/net/ethernet/ti/Kconfig +1 −0
  43. drivers/net/ethernet/ti/cpts.c +12 −5
  44. drivers/net/fddi/skfp/skfddi.c +1 −0
  45. drivers/net/ieee802154/fakelb.c +1 −0
  46. drivers/net/ipvlan/ipvtap.c +1 −0
  47. drivers/net/phy/mdio_devres.c +1 −0
  48. drivers/net/plip/plip.c +1 −0
  49. drivers/net/ppp/bsd_comp.c +1 −0
  50. drivers/net/ppp/ppp_async.c +1 −0
  51. drivers/net/ppp/ppp_deflate.c +1 −0
  52. drivers/net/ppp/ppp_generic.c +1 −0
  53. drivers/net/ppp/ppp_synctty.c +1 −0
  54. drivers/net/ppp/pppoe.c +9 −14
  55. drivers/net/wireless/intel/iwlwifi/fw/acpi.c +9 −6
  56. drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +3 −0
  57. drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +4 −0
  58. drivers/net/wireless/intel/iwlwifi/mvm/time-event.c +2 −1
  59. drivers/net/wireless/intel/iwlwifi/mvm/tx.c +59 −10
  60. drivers/net/xen-netback/netback.c +1 −0
  61. include/linux/netdevice.h +5 −5
  62. include/linux/tcp.h +3 −3
  63. include/net/tls.h +0 −5
  64. net/6lowpan/core.c +1 −0
  65. net/atm/mpc.c +1 −0
  66. net/can/j1939/j1939-priv.h +2 −1
  67. net/can/j1939/main.c +1 −1
  68. net/can/j1939/socket.c +30 −16
  69. net/core/dev.c +3 −2
  70. net/core/rtnetlink.c +9 −6
  71. net/handshake/handshake-test.c +4 −1
  72. net/ipv4/ah4.c +1 −0
  73. net/ipv4/esp4.c +1 −0
  74. net/ipv4/ip_gre.c +1 −0
  75. net/ipv4/ip_output.c +8 −5
  76. net/ipv4/ip_tunnel.c +1 −0
  77. net/ipv4/ip_vti.c +1 −0
  78. net/ipv4/ipip.c +1 −0
  79. net/ipv4/tcp.c +2 −1
  80. net/ipv4/tunnel4.c +1 −0
  81. net/ipv4/udp_tunnel_core.c +1 −0
  82. net/ipv4/xfrm4_tunnel.c +1 −0
  83. net/ipv6/ah6.c +1 −0
  84. net/ipv6/esp6.c +1 −0
  85. net/ipv6/ip6_output.c +8 −5
  86. net/ipv6/ip6_udp_tunnel.c +1 −0
  87. net/ipv6/mip6.c +1 −0
  88. net/ipv6/sit.c +1 −0
  89. net/ipv6/tunnel6.c +1 −0
  90. net/ipv6/xfrm6_tunnel.c +1 −0
  91. net/key/af_key.c +1 −0
  92. net/mac80211/tx.c +3 −2
  93. net/mptcp/fastopen.c +2 −4
  94. net/mptcp/options.c +5 −4
  95. net/mptcp/pm_userspace.c +12 −1
  96. net/mptcp/protocol.c +17 −14
  97. net/mptcp/protocol.h +9 −7
  98. net/mptcp/subflow.c +44 −27
  99. net/netfilter/nf_nat_core.c +4 −1
  100. net/netfilter/nft_flow_offload.c +1 −0
  101. net/netfilter/nft_set_pipapo.h +2 −2
  102. net/openvswitch/flow_netlink.c +33 −16
  103. net/rds/recv.c +11 −2
  104. net/sched/act_mirred.c +0 −2
  105. net/sched/em_canid.c +1 −0
  106. net/sched/em_cmp.c +1 −0
  107. net/sched/em_meta.c +1 −0
  108. net/sched/em_nbyte.c +1 −0
  109. net/sched/em_text.c +1 −0
  110. net/sched/em_u32.c +1 −0
  111. net/sctp/inqueue.c +10 −4
  112. net/smc/af_smc.c +1 −0
  113. net/tls/tls_sw.c +62 −73
  114. net/unix/garbage.c +4 −3
  115. net/xfrm/xfrm_algo.c +1 −0
  116. net/xfrm/xfrm_user.c +1 −0
  117. tools/testing/selftests/net/config +5 −1
  118. tools/testing/selftests/net/forwarding/bridge_locked_port.sh +2 −2
  119. tools/testing/selftests/net/forwarding/bridge_mdb.sh +9 −5
  120. tools/testing/selftests/net/forwarding/tc_flower_l2_miss.sh +6 −2
  121. tools/testing/selftests/net/gro.sh +5 −0
  122. tools/testing/selftests/net/ip_local_port_range.c +4 −0
  123. tools/testing/selftests/net/net_helper.sh +7 −4
  124. tools/testing/selftests/net/openvswitch/openvswitch.sh +13 −0
  125. tools/testing/selftests/net/openvswitch/ovs-dpctl.py +56 −15
  126. tools/testing/selftests/net/pmtu.sh +2 −2
  127. tools/testing/selftests/net/so_txtime.sh +25 −4
  128. tools/testing/selftests/net/test_bridge_backup_port.sh +23 −0
  129. tools/testing/selftests/net/tls.c +6 −6
.mailmap+5−4
@@ -191,10 +191,11 @@ Gao Xiang <xiang@kernel.org> <gaoxiang25@huawei.com> · 190 unmodified lines
191Gao Xiang <xiang@kernel.org> <hsiangkao@aol.com>191Gao Xiang <xiang@kernel.org> <hsiangkao@aol.com>
192Gao Xiang <xiang@kernel.org> <hsiangkao@linux.alibaba.com>192Gao Xiang <xiang@kernel.org> <hsiangkao@linux.alibaba.com>
193Gao Xiang <xiang@kernel.org> <hsiangkao@redhat.com>193Gao Xiang <xiang@kernel.org> <hsiangkao@redhat.com>
194Geliang Tang <geliang.tang@linux.dev> <geliang.tang@suse.com>194Geliang Tang <geliang@kernel.org> <geliang.tang@linux.dev>
195Geliang Tang <geliang.tang@linux.dev> <geliangtang@xiaomi.com>195Geliang Tang <geliang@kernel.org> <geliang.tang@suse.com>
196Geliang Tang <geliang.tang@linux.dev> <geliangtang@gmail.com>196Geliang Tang <geliang@kernel.org> <geliangtang@xiaomi.com>
197Geliang Tang <geliang.tang@linux.dev> <geliangtang@163.com>197Geliang Tang <geliang@kernel.org> <geliangtang@gmail.com>
198Geliang Tang <geliang@kernel.org> <geliangtang@163.com>
198Georgi Djakov <djakov@kernel.org> <georgi.djakov@linaro.org>199Georgi Djakov <djakov@kernel.org> <georgi.djakov@linaro.org>
199Gerald Schaefer <gerald.schaefer@linux.ibm.com> <geraldsc@de.ibm.com>200Gerald Schaefer <gerald.schaefer@linux.ibm.com> <geraldsc@de.ibm.com>
200Gerald Schaefer <gerald.schaefer@linux.ibm.com> <gerald.schaefer@de.ibm.com>201Gerald Schaefer <gerald.schaefer@linux.ibm.com> <gerald.schaefer@de.ibm.com>
Documentation/ABI/testing/sysfs-class-net-statistics+24−24
@@ -1,4 +1,4 @@
1What: /sys/class/<iface>/statistics/collisions1What: /sys/class/net/<iface>/statistics/collisions
2Date: April 20052Date: April 2005
3KernelVersion: 2.6.123KernelVersion: 2.6.12
4Contact: netdev@vger.kernel.org4Contact: netdev@vger.kernel.org
@@ -6,7 +6,7 @@ Description: · 1 unmodified line
6 Indicates the number of collisions seen by this network device.6 Indicates the number of collisions seen by this network device.
7 This value might not be relevant with all MAC layers.7 This value might not be relevant with all MAC layers.
8 8
9What: /sys/class/<iface>/statistics/multicast9What: /sys/class/net/<iface>/statistics/multicast
10Date: April 200510Date: April 2005
11KernelVersion: 2.6.1211KernelVersion: 2.6.12
12Contact: netdev@vger.kernel.org12Contact: netdev@vger.kernel.org
@@ -14,7 +14,7 @@ Description: · 1 unmodified line
14 Indicates the number of multicast packets received by this14 Indicates the number of multicast packets received by this
15 network device.15 network device.
16 16
17What: /sys/class/<iface>/statistics/rx_bytes17What: /sys/class/net/<iface>/statistics/rx_bytes
18Date: April 200518Date: April 2005
19KernelVersion: 2.6.1219KernelVersion: 2.6.12
20Contact: netdev@vger.kernel.org20Contact: netdev@vger.kernel.org
@@ -23,7 +23,7 @@ Description: · 2 unmodified lines
23 See the network driver for the exact meaning of when this23 See the network driver for the exact meaning of when this
24 value is incremented.24 value is incremented.
25 25
26What: /sys/class/<iface>/statistics/rx_compressed26What: /sys/class/net/<iface>/statistics/rx_compressed
27Date: April 200527Date: April 2005
28KernelVersion: 2.6.1228KernelVersion: 2.6.12
29Contact: netdev@vger.kernel.org29Contact: netdev@vger.kernel.org
@@ -32,7 +32,7 @@ Description: · 2 unmodified lines
32 network device. This value might only be relevant for interfaces32 network device. This value might only be relevant for interfaces
33 that support packet compression (e.g: PPP).33 that support packet compression (e.g: PPP).
34 34
35What: /sys/class/<iface>/statistics/rx_crc_errors35What: /sys/class/net/<iface>/statistics/rx_crc_errors
36Date: April 200536Date: April 2005
37KernelVersion: 2.6.1237KernelVersion: 2.6.12
38Contact: netdev@vger.kernel.org38Contact: netdev@vger.kernel.org
@@ -41,7 +41,7 @@ Description: · 2 unmodified lines
41 by this network device. Note that the specific meaning might41 by this network device. Note that the specific meaning might
42 depend on the MAC layer used by the interface.42 depend on the MAC layer used by the interface.
43 43
44What: /sys/class/<iface>/statistics/rx_dropped44What: /sys/class/net/<iface>/statistics/rx_dropped
45Date: April 200545Date: April 2005
46KernelVersion: 2.6.1246KernelVersion: 2.6.12
47Contact: netdev@vger.kernel.org47Contact: netdev@vger.kernel.org
@@ -51,7 +51,7 @@ Description: · 3 unmodified lines
51 packet processing. See the network driver for the exact51 packet processing. See the network driver for the exact
52 meaning of this value.52 meaning of this value.
53 53
54What: /sys/class/<iface>/statistics/rx_errors54What: /sys/class/net/<iface>/statistics/rx_errors
55Date: April 200555Date: April 2005
56KernelVersion: 2.6.1256KernelVersion: 2.6.12
57Contact: netdev@vger.kernel.org57Contact: netdev@vger.kernel.org
@@ -59,7 +59,7 @@ Description: · 1 unmodified line
59 Indicates the number of receive errors on this network device.59 Indicates the number of receive errors on this network device.
60 See the network driver for the exact meaning of this value.60 See the network driver for the exact meaning of this value.
61 61
62What: /sys/class/<iface>/statistics/rx_fifo_errors62What: /sys/class/net/<iface>/statistics/rx_fifo_errors
63Date: April 200563Date: April 2005
64KernelVersion: 2.6.1264KernelVersion: 2.6.12
65Contact: netdev@vger.kernel.org65Contact: netdev@vger.kernel.org
@@ -68,7 +68,7 @@ Description: · 2 unmodified lines
68 network device. See the network driver for the exact68 network device. See the network driver for the exact
69 meaning of this value.69 meaning of this value.
70 70
71What: /sys/class/<iface>/statistics/rx_frame_errors71What: /sys/class/net/<iface>/statistics/rx_frame_errors
72Date: April 200572Date: April 2005
73KernelVersion: 2.6.1273KernelVersion: 2.6.12
74Contact: netdev@vger.kernel.org74Contact: netdev@vger.kernel.org
@@ -78,7 +78,7 @@ Description: · 3 unmodified lines
78 on the MAC layer protocol used. See the network driver for78 on the MAC layer protocol used. See the network driver for
79 the exact meaning of this value.79 the exact meaning of this value.
80 80
81What: /sys/class/<iface>/statistics/rx_length_errors81What: /sys/class/net/<iface>/statistics/rx_length_errors
82Date: April 200582Date: April 2005
83KernelVersion: 2.6.1283KernelVersion: 2.6.12
84Contact: netdev@vger.kernel.org84Contact: netdev@vger.kernel.org
@@ -87,7 +87,7 @@ Description: · 2 unmodified lines
87 error, oversized or undersized. See the network driver for the87 error, oversized or undersized. See the network driver for the
88 exact meaning of this value.88 exact meaning of this value.
89 89
90What: /sys/class/<iface>/statistics/rx_missed_errors90What: /sys/class/net/<iface>/statistics/rx_missed_errors
91Date: April 200591Date: April 2005
92KernelVersion: 2.6.1292KernelVersion: 2.6.12
93Contact: netdev@vger.kernel.org93Contact: netdev@vger.kernel.org
@@ -96,7 +96,7 @@ Description: · 2 unmodified lines
96 due to lack of capacity in the receive side. See the network96 due to lack of capacity in the receive side. See the network
97 driver for the exact meaning of this value.97 driver for the exact meaning of this value.
98 98
99What: /sys/class/<iface>/statistics/rx_nohandler99What: /sys/class/net/<iface>/statistics/rx_nohandler
100Date: February 2016100Date: February 2016
101KernelVersion: 4.6101KernelVersion: 4.6
102Contact: netdev@vger.kernel.org102Contact: netdev@vger.kernel.org
@@ -104,7 +104,7 @@ Description: · 1 unmodified line
104 Indicates the number of received packets that were dropped on104 Indicates the number of received packets that were dropped on
105 an inactive device by the network core.105 an inactive device by the network core.
106 106
107What: /sys/class/<iface>/statistics/rx_over_errors107What: /sys/class/net/<iface>/statistics/rx_over_errors
108Date: April 2005108Date: April 2005
109KernelVersion: 2.6.12109KernelVersion: 2.6.12
110Contact: netdev@vger.kernel.org110Contact: netdev@vger.kernel.org
@@ -114,7 +114,7 @@ Description: · 3 unmodified lines
114 (e.g: larger than MTU). See the network driver for the exact114 (e.g: larger than MTU). See the network driver for the exact
115 meaning of this value.115 meaning of this value.
116 116
117What: /sys/class/<iface>/statistics/rx_packets117What: /sys/class/net/<iface>/statistics/rx_packets
118Date: April 2005118Date: April 2005
119KernelVersion: 2.6.12119KernelVersion: 2.6.12
120Contact: netdev@vger.kernel.org120Contact: netdev@vger.kernel.org
@@ -122,7 +122,7 @@ Description: · 1 unmodified line
122 Indicates the total number of good packets received by this122 Indicates the total number of good packets received by this
123 network device.123 network device.
124 124
125What: /sys/class/<iface>/statistics/tx_aborted_errors125What: /sys/class/net/<iface>/statistics/tx_aborted_errors
126Date: April 2005126Date: April 2005
127KernelVersion: 2.6.12127KernelVersion: 2.6.12
128Contact: netdev@vger.kernel.org128Contact: netdev@vger.kernel.org
@@ -132,7 +132,7 @@ Description: · 3 unmodified lines
132 a medium collision). See the network driver for the exact132 a medium collision). See the network driver for the exact
133 meaning of this value.133 meaning of this value.
134 134
135What: /sys/class/<iface>/statistics/tx_bytes135What: /sys/class/net/<iface>/statistics/tx_bytes
136Date: April 2005136Date: April 2005
137KernelVersion: 2.6.12137KernelVersion: 2.6.12
138Contact: netdev@vger.kernel.org138Contact: netdev@vger.kernel.org
@@ -143,7 +143,7 @@ Description: · 4 unmodified lines
143 transmitted packets or all packets that have been queued for143 transmitted packets or all packets that have been queued for
144 transmission.144 transmission.
145 145
146What: /sys/class/<iface>/statistics/tx_carrier_errors146What: /sys/class/net/<iface>/statistics/tx_carrier_errors
147Date: April 2005147Date: April 2005
148KernelVersion: 2.6.12148KernelVersion: 2.6.12
149Contact: netdev@vger.kernel.org149Contact: netdev@vger.kernel.org
@@ -152,7 +152,7 @@ Description: · 2 unmodified lines
152 because of carrier errors (e.g: physical link down). See the152 because of carrier errors (e.g: physical link down). See the
153 network driver for the exact meaning of this value.153 network driver for the exact meaning of this value.
154 154
155What: /sys/class/<iface>/statistics/tx_compressed155What: /sys/class/net/<iface>/statistics/tx_compressed
156Date: April 2005156Date: April 2005
157KernelVersion: 2.6.12157KernelVersion: 2.6.12
158Contact: netdev@vger.kernel.org158Contact: netdev@vger.kernel.org
@@ -161,7 +161,7 @@ Description: · 2 unmodified lines
161 this might only be relevant for devices that support161 this might only be relevant for devices that support
162 compression (e.g: PPP).162 compression (e.g: PPP).
163 163
164What: /sys/class/<iface>/statistics/tx_dropped164What: /sys/class/net/<iface>/statistics/tx_dropped
165Date: April 2005165Date: April 2005
166KernelVersion: 2.6.12166KernelVersion: 2.6.12
167Contact: netdev@vger.kernel.org167Contact: netdev@vger.kernel.org
@@ -170,7 +170,7 @@ Description: · 2 unmodified lines
170 See the driver for the exact reasons as to why the packets were170 See the driver for the exact reasons as to why the packets were
171 dropped.171 dropped.
172 172
173What: /sys/class/<iface>/statistics/tx_errors173What: /sys/class/net/<iface>/statistics/tx_errors
174Date: April 2005174Date: April 2005
175KernelVersion: 2.6.12175KernelVersion: 2.6.12
176Contact: netdev@vger.kernel.org176Contact: netdev@vger.kernel.org
@@ -179,7 +179,7 @@ Description: · 2 unmodified lines
179 a network device. See the driver for the exact reasons as to179 a network device. See the driver for the exact reasons as to
180 why the packets were dropped.180 why the packets were dropped.
181 181
182What: /sys/class/<iface>/statistics/tx_fifo_errors182What: /sys/class/net/<iface>/statistics/tx_fifo_errors
183Date: April 2005183Date: April 2005
184KernelVersion: 2.6.12184KernelVersion: 2.6.12
185Contact: netdev@vger.kernel.org185Contact: netdev@vger.kernel.org
@@ -188,7 +188,7 @@ Description: · 2 unmodified lines
188 FIFO error. See the driver for the exact reasons as to why the188 FIFO error. See the driver for the exact reasons as to why the
189 packets were dropped.189 packets were dropped.
190 190
191What: /sys/class/<iface>/statistics/tx_heartbeat_errors191What: /sys/class/net/<iface>/statistics/tx_heartbeat_errors
192Date: April 2005192Date: April 2005
193KernelVersion: 2.6.12193KernelVersion: 2.6.12
194Contact: netdev@vger.kernel.org194Contact: netdev@vger.kernel.org
@@ -197,7 +197,7 @@ Description: · 2 unmodified lines
197 reported as heartbeat errors. See the driver for the exact197 reported as heartbeat errors. See the driver for the exact
198 reasons as to why the packets were dropped.198 reasons as to why the packets were dropped.
199 199
200What: /sys/class/<iface>/statistics/tx_packets200What: /sys/class/net/<iface>/statistics/tx_packets
201Date: April 2005201Date: April 2005
202KernelVersion: 2.6.12202KernelVersion: 2.6.12
203Contact: netdev@vger.kernel.org203Contact: netdev@vger.kernel.org
@@ -206,7 +206,7 @@ Description: · 2 unmodified lines
206 device. See the driver for whether this reports the number of all206 device. See the driver for whether this reports the number of all
207 attempted or successful transmissions.207 attempted or successful transmissions.
208 208
209What: /sys/class/<iface>/statistics/tx_window_errors209What: /sys/class/net/<iface>/statistics/tx_window_errors
210Date: April 2005210Date: April 2005
211KernelVersion: 2.6.12211KernelVersion: 2.6.12
212Contact: netdev@vger.kernel.org212Contact: netdev@vger.kernel.org
Documentation/netlink/specs/dpll.yaml+0−4
@@ -384,8 +384,6 @@ operations: · 383 unmodified lines
384 - type384 - type
385 385
386 dump:386 dump:
387 pre: dpll-lock-dumpit
388 post: dpll-unlock-dumpit
389 reply: *dev-attrs387 reply: *dev-attrs
390 388
391 -389 -
@@ -473,8 +471,6 @@ operations: · 81 unmodified lines
473 - fractional-frequency-offset471 - fractional-frequency-offset
474 472
475 dump:473 dump:
476 pre: dpll-lock-dumpit
477 post: dpll-unlock-dumpit
478 request:474 request:
479 attributes:475 attributes:
480 - id476 - id
Documentation/networking/devlink/devlink-port.rst+1−1
@@ -126,7 +126,7 @@ Users may also set the RoCE capability of the function using · 125 unmodified lines
126`devlink port function set roce` command.126`devlink port function set roce` command.
127 127
128Users may also set the function as migratable using128Users may also set the function as migratable using
129'devlink port function set migratable' command.129`devlink port function set migratable` command.
130 130
131Users may also set the IPsec crypto capability of the function using131Users may also set the IPsec crypto capability of the function using
132`devlink port function set ipsec_crypto` command.132`devlink port function set ipsec_crypto` command.
Documentation/networking/net_cachelines/net_device.rst+2−2
@@ -136,8 +136,8 @@ struct_netpoll_info* npinfo - · 135 unmodified lines
136possible_net_t nd_net - read_mostly (dev_net)napi_busy_loop,tcp_v(4/6)_rcv,ip(v6)_rcv,ip(6)_input,ip(6)_input_finish136possible_net_t nd_net - read_mostly (dev_net)napi_busy_loop,tcp_v(4/6)_rcv,ip(v6)_rcv,ip(6)_input,ip(6)_input_finish
137void* ml_priv 137void* ml_priv
138enum_netdev_ml_priv_type ml_priv_type 138enum_netdev_ml_priv_type ml_priv_type
139struct_pcpu_lstats__percpu* lstats 139struct_pcpu_lstats__percpu* lstats read_mostly dev_lstats_add()
140struct_pcpu_sw_netstats__percpu* tstats 140struct_pcpu_sw_netstats__percpu* tstats read_mostly dev_sw_netstats_tx_add()
141struct_pcpu_dstats__percpu* dstats 141struct_pcpu_dstats__percpu* dstats
142struct_garp_port* garp_port 142struct_garp_port* garp_port
143struct_mrp_port* mrp_port 143struct_mrp_port* mrp_port
Documentation/networking/net_cachelines/tcp_sock.rst+2−2
@@ -38,13 +38,13 @@ u32 max_window read_mostly - · 37 unmodified lines
38u32 mss_cache read_mostly read_mostly tcp_rate_check_app_limited,tcp_current_mss,tcp_sync_mss,tcp_sndbuf_expand,tcp_tso_should_defer(tx);tcp_update_pacing_rate,tcp_clean_rtx_queue(rx)38u32 mss_cache read_mostly read_mostly tcp_rate_check_app_limited,tcp_current_mss,tcp_sync_mss,tcp_sndbuf_expand,tcp_tso_should_defer(tx);tcp_update_pacing_rate,tcp_clean_rtx_queue(rx)
39u32 window_clamp read_mostly read_write tcp_rcv_space_adjust,__tcp_select_window39u32 window_clamp read_mostly read_write tcp_rcv_space_adjust,__tcp_select_window
40u32 rcv_ssthresh read_mostly - __tcp_select_window40u32 rcv_ssthresh read_mostly - __tcp_select_window
41u82 scaling_ratio 41u8 scaling_ratio read_mostly read_mostly tcp_win_from_space
42struct tcp_rack 42struct tcp_rack
43u16 advmss - read_mostly tcp_rcv_space_adjust43u16 advmss - read_mostly tcp_rcv_space_adjust
44u8 compressed_ack 44u8 compressed_ack
45u8:2 dup_ack_counter 45u8:2 dup_ack_counter
46u8:1 tlp_retrans 46u8:1 tlp_retrans
47u8:1 tcp_usec_ts 47u8:1 tcp_usec_ts read_mostly read_mostly
48u32 chrono_start read_write - tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)48u32 chrono_start read_write - tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
49u32[3] chrono_stat read_write - tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)49u32[3] chrono_stat read_write - tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
50u8:2 chrono_type read_write - tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)50u8:2 chrono_type read_write - tcp_chrono_start/stop(tcp_write_xmit,tcp_cwnd_validate,tcp_send_syn_data)
MAINTAINERS+1−1
@@ -15324,7 +15324,7 @@ K: \bmdo_ · 15323 unmodified lines
15324NETWORKING [MPTCP]15324NETWORKING [MPTCP]
15325M: Matthieu Baerts <matttbe@kernel.org>15325M: Matthieu Baerts <matttbe@kernel.org>
15326M: Mat Martineau <martineau@kernel.org>15326M: Mat Martineau <martineau@kernel.org>
15327R: Geliang Tang <geliang.tang@linux.dev>15327R: Geliang Tang <geliang@kernel.org>
15328L: netdev@vger.kernel.org15328L: netdev@vger.kernel.org
15329L: mptcp@lists.linux.dev15329L: mptcp@lists.linux.dev
15330S: Maintained15330S: Maintained
drivers/connector/cn_proc.c+2−3
@@ -108,9 +108,8 @@ static inline void send_msg(struct cn_msg *msg) · 107 unmodified lines
108 filter_data[1] = 0;108 filter_data[1] = 0;
109 }109 }
110 110
111 if (cn_netlink_send_mult(msg, msg->len, 0, CN_IDX_PROC, GFP_NOWAIT,111 cn_netlink_send_mult(msg, msg->len, 0, CN_IDX_PROC, GFP_NOWAIT,
112 cn_filter, (void *)filter_data) == -ESRCH)112 cn_filter, (void *)filter_data);
113 atomic_set(&proc_event_num_listeners, 0);
114 113
115 local_unlock(&local_event.lock);114 local_unlock(&local_event.lock);
116}115}
drivers/dpll/dpll_netlink.c+6−14
@@ -1199,6 +1199,7 @@ int dpll_nl_pin_get_dumpit(struct sk_buff *skb, struct netlink_callback *cb) · 1198 unmodified lines
1199 unsigned long i;1199 unsigned long i;
1200 int ret = 0;1200 int ret = 0;
1201 1201
1202 mutex_lock(&dpll_lock);
1202 xa_for_each_marked_start(&dpll_pin_xa, i, pin, DPLL_REGISTERED,1203 xa_for_each_marked_start(&dpll_pin_xa, i, pin, DPLL_REGISTERED,
1203 ctx->idx) {1204 ctx->idx) {
1204 if (!dpll_pin_available(pin))1205 if (!dpll_pin_available(pin))
@@ -1218,6 +1219,8 @@ int dpll_nl_pin_get_dumpit(struct sk_buff *skb, struct netlink_callback *cb) · 13 unmodified lines
1218 }1219 }
1219 genlmsg_end(skb, hdr);1220 genlmsg_end(skb, hdr);
1220 }1221 }
1222 mutex_unlock(&dpll_lock);
1223
1221 if (ret == -EMSGSIZE) {1224 if (ret == -EMSGSIZE) {
1222 ctx->idx = i;1225 ctx->idx = i;
1223 return skb->len;1226 return skb->len;
@@ -1373,6 +1376,7 @@ int dpll_nl_device_get_dumpit(struct sk_buff *skb, struct netlink_callback *cb) · 149 unmodified lines
1373 unsigned long i;1376 unsigned long i;
1374 int ret = 0;1377 int ret = 0;
1375 1378
1379 mutex_lock(&dpll_lock);
1376 xa_for_each_marked_start(&dpll_device_xa, i, dpll, DPLL_REGISTERED,1380 xa_for_each_marked_start(&dpll_device_xa, i, dpll, DPLL_REGISTERED,
1377 ctx->idx) {1381 ctx->idx) {
1378 hdr = genlmsg_put(skb, NETLINK_CB(cb->skb).portid,1382 hdr = genlmsg_put(skb, NETLINK_CB(cb->skb).portid,
@@ -1389,6 +1393,8 @@ int dpll_nl_device_get_dumpit(struct sk_buff *skb, struct netlink_callback *cb) · 10 unmodified lines
1389 }1393 }
1390 genlmsg_end(skb, hdr);1394 genlmsg_end(skb, hdr);
1391 }1395 }
1396 mutex_unlock(&dpll_lock);
1397
1392 if (ret == -EMSGSIZE) {1398 if (ret == -EMSGSIZE) {
1393 ctx->idx = i;1399 ctx->idx = i;
1394 return skb->len;1400 return skb->len;
@@ -1439,20 +1445,6 @@ dpll_unlock_doit(const struct genl_split_ops *ops, struct sk_buff *skb, · 44 unmodified lines
1439 mutex_unlock(&dpll_lock);1445 mutex_unlock(&dpll_lock);
1440}1446}
1441 1447
1442int dpll_lock_dumpit(struct netlink_callback *cb)
1443{
1444 mutex_lock(&dpll_lock);
1445
1446 return 0;
1447}
1448
1449int dpll_unlock_dumpit(struct netlink_callback *cb)
1450{
1451 mutex_unlock(&dpll_lock);
1452
1453 return 0;
1454}
1455
1456int dpll_pin_pre_doit(const struct genl_split_ops *ops, struct sk_buff *skb,1448int dpll_pin_pre_doit(const struct genl_split_ops *ops, struct sk_buff *skb,
1457 struct genl_info *info)1449 struct genl_info *info)
1458{1450{
drivers/dpll/dpll_nl.c+0−4
@@ -95,9 +95,7 @@ static const struct genl_split_ops dpll_nl_ops[] = { · 94 unmodified lines
95 },95 },
96 {96 {
97 .cmd = DPLL_CMD_DEVICE_GET,97 .cmd = DPLL_CMD_DEVICE_GET,
98 .start = dpll_lock_dumpit,
99 .dumpit = dpll_nl_device_get_dumpit,98 .dumpit = dpll_nl_device_get_dumpit,
100 .done = dpll_unlock_dumpit,
101 .flags = GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,99 .flags = GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
102 },100 },
103 {101 {
@@ -129,9 +127,7 @@ static const struct genl_split_ops dpll_nl_ops[] = { · 25 unmodified lines
129 },127 },
130 {128 {
131 .cmd = DPLL_CMD_PIN_GET,129 .cmd = DPLL_CMD_PIN_GET,
132 .start = dpll_lock_dumpit,
133 .dumpit = dpll_nl_pin_get_dumpit,130 .dumpit = dpll_nl_pin_get_dumpit,
134 .done = dpll_unlock_dumpit,
135 .policy = dpll_pin_get_dump_nl_policy,131 .policy = dpll_pin_get_dump_nl_policy,
136 .maxattr = DPLL_A_PIN_ID,132 .maxattr = DPLL_A_PIN_ID,
137 .flags = GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,133 .flags = GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
drivers/dpll/dpll_nl.h+0−2
@@ -30,8 +30,6 @@ dpll_post_doit(const struct genl_split_ops *ops, struct sk_buff *skb, · 29 unmodified lines
30void30void
31dpll_pin_post_doit(const struct genl_split_ops *ops, struct sk_buff *skb,31dpll_pin_post_doit(const struct genl_split_ops *ops, struct sk_buff *skb,
32 struct genl_info *info);32 struct genl_info *info);
33int dpll_lock_dumpit(struct netlink_callback *cb);
34int dpll_unlock_dumpit(struct netlink_callback *cb);
35 33
36int dpll_nl_device_id_get_doit(struct sk_buff *skb, struct genl_info *info);34int dpll_nl_device_id_get_doit(struct sk_buff *skb, struct genl_info *info);
37int dpll_nl_device_get_doit(struct sk_buff *skb, struct genl_info *info);35int dpll_nl_device_get_doit(struct sk_buff *skb, struct genl_info *info);
drivers/net/arcnet/arc-rawmode.c+1−0
@@ -186,4 +186,5 @@ static void __exit arcnet_raw_exit(void) · 185 unmodified lines
186module_init(arcnet_raw_init);186module_init(arcnet_raw_init);
187module_exit(arcnet_raw_exit);187module_exit(arcnet_raw_exit);
188 188
189MODULE_DESCRIPTION("ARCnet raw mode packet interface module");
189MODULE_LICENSE("GPL");190MODULE_LICENSE("GPL");
drivers/net/arcnet/arc-rimi.c+1−0
@@ -312,6 +312,7 @@ module_param(node, int, 0); · 311 unmodified lines
312module_param(io, int, 0);312module_param(io, int, 0);
313module_param(irq, int, 0);313module_param(irq, int, 0);
314module_param_string(device, device, sizeof(device), 0);314module_param_string(device, device, sizeof(device), 0);
315MODULE_DESCRIPTION("ARCnet COM90xx RIM I chipset driver");
315MODULE_LICENSE("GPL");316MODULE_LICENSE("GPL");
316 317
317static struct net_device *my_dev;318static struct net_device *my_dev;
drivers/net/arcnet/capmode.c+1−0
@@ -265,4 +265,5 @@ static void __exit capmode_module_exit(void) · 264 unmodified lines
265module_init(capmode_module_init);265module_init(capmode_module_init);
266module_exit(capmode_module_exit);266module_exit(capmode_module_exit);
267 267
268MODULE_DESCRIPTION("ARCnet CAP mode packet interface module");
268MODULE_LICENSE("GPL");269MODULE_LICENSE("GPL");
drivers/net/arcnet/com20020-pci.c+1−0
@@ -61,6 +61,7 @@ module_param(timeout, int, 0); · 60 unmodified lines
61module_param(backplane, int, 0);61module_param(backplane, int, 0);
62module_param(clockp, int, 0);62module_param(clockp, int, 0);
63module_param(clockm, int, 0);63module_param(clockm, int, 0);
64MODULE_DESCRIPTION("ARCnet COM20020 chipset PCI driver");
64MODULE_LICENSE("GPL");65MODULE_LICENSE("GPL");
65 66
66static void led_tx_set(struct led_classdev *led_cdev,67static void led_tx_set(struct led_classdev *led_cdev,
drivers/net/arcnet/com20020.c+1−0
@@ -399,6 +399,7 @@ EXPORT_SYMBOL(com20020_found); · 398 unmodified lines
399EXPORT_SYMBOL(com20020_netdev_ops);399EXPORT_SYMBOL(com20020_netdev_ops);
400#endif400#endif
401 401
402MODULE_DESCRIPTION("ARCnet COM20020 chipset core driver");
402MODULE_LICENSE("GPL");403MODULE_LICENSE("GPL");
403 404
404#ifdef MODULE405#ifdef MODULE
drivers/net/arcnet/com20020_cs.c+1−0
@@ -97,6 +97,7 @@ module_param(backplane, int, 0); · 96 unmodified lines
97module_param(clockp, int, 0);97module_param(clockp, int, 0);
98module_param(clockm, int, 0);98module_param(clockm, int, 0);
99 99
100MODULE_DESCRIPTION("ARCnet COM20020 chipset PCMCIA driver");
100MODULE_LICENSE("GPL");101MODULE_LICENSE("GPL");
101 102
102/*====================================================================*/103/*====================================================================*/
drivers/net/arcnet/com90io.c+1−0
@@ -350,6 +350,7 @@ static char device[9]; /* use eg. device=arc1 to change name */ · 349 unmodified lines
350module_param_hw(io, int, ioport, 0);350module_param_hw(io, int, ioport, 0);
351module_param_hw(irq, int, irq, 0);351module_param_hw(irq, int, irq, 0);
352module_param_string(device, device, sizeof(device), 0);352module_param_string(device, device, sizeof(device), 0);
353MODULE_DESCRIPTION("ARCnet COM90xx IO mapped chipset driver");
353MODULE_LICENSE("GPL");354MODULE_LICENSE("GPL");
354 355
355#ifndef MODULE356#ifndef MODULE
drivers/net/arcnet/com90xx.c+1−0
@@ -645,6 +645,7 @@ static void com90xx_copy_from_card(struct net_device *dev, int bufnum, · 644 unmodified lines
645 TIME(dev, "memcpy_fromio", count, memcpy_fromio(buf, memaddr, count));645 TIME(dev, "memcpy_fromio", count, memcpy_fromio(buf, memaddr, count));
646}646}
647 647
648MODULE_DESCRIPTION("ARCnet COM90xx normal chipset driver");
648MODULE_LICENSE("GPL");649MODULE_LICENSE("GPL");
649 650
650static int __init com90xx_init(void)651static int __init com90xx_init(void)
drivers/net/arcnet/rfc1051.c+1−0
@@ -78,6 +78,7 @@ static void __exit arcnet_rfc1051_exit(void) · 77 unmodified lines
78module_init(arcnet_rfc1051_init);78module_init(arcnet_rfc1051_init);
79module_exit(arcnet_rfc1051_exit);79module_exit(arcnet_rfc1051_exit);
80 80
81MODULE_DESCRIPTION("ARCNet packet format (RFC 1051) module");
81MODULE_LICENSE("GPL");82MODULE_LICENSE("GPL");
82 83
83/* Determine a packet's protocol ID.84/* Determine a packet's protocol ID.
drivers/net/arcnet/rfc1201.c+1−0
@@ -35,6 +35,7 @@ · 34 unmodified lines
35 35
36#include "arcdevice.h"36#include "arcdevice.h"
37 37
38MODULE_DESCRIPTION("ARCNet packet format (RFC 1201) module");
38MODULE_LICENSE("GPL");39MODULE_LICENSE("GPL");
39 40
40static __be16 type_trans(struct sk_buff *skb, struct net_device *dev);41static __be16 type_trans(struct sk_buff *skb, struct net_device *dev);
drivers/net/bonding/bond_main.c+2−3
@@ -1819,6 +1819,8 @@ void bond_xdp_set_features(struct net_device *bond_dev) · 1818 unmodified lines
1819 bond_for_each_slave(bond, slave, iter)1819 bond_for_each_slave(bond, slave, iter)
1820 val &= slave->dev->xdp_features;1820 val &= slave->dev->xdp_features;
1821 1821
1822 val &= ~NETDEV_XDP_ACT_XSK_ZEROCOPY;
1823
1822 xdp_set_features_flag(bond_dev, val);1824 xdp_set_features_flag(bond_dev, val);
1823}1825}
1824 1826
@@ -5909,9 +5911,6 @@ void bond_setup(struct net_device *bond_dev) · 4084 unmodified lines
5909 if (BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP)5911 if (BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP)
5910 bond_dev->features |= BOND_XFRM_FEATURES;5912 bond_dev->features |= BOND_XFRM_FEATURES;
5911#endif /* CONFIG_XFRM_OFFLOAD */5913#endif /* CONFIG_XFRM_OFFLOAD */
5912
5913 if (bond_xdp_check(bond))
5914 bond_dev->xdp_features = NETDEV_XDP_ACT_MASK;
5915}5914}
5916 5915
5917/* Destroy a bonding device.5916/* Destroy a bonding device.
drivers/net/can/dev/netlink.c+1−1
@@ -346,7 +346,7 @@ static int can_changelink(struct net_device *dev, struct nlattr *tb[], · 345 unmodified lines
346 /* Neither of TDC parameters nor TDC flags are346 /* Neither of TDC parameters nor TDC flags are
347 * provided: do calculation347 * provided: do calculation
348 */348 */
349 can_calc_tdco(&priv->tdc, priv->tdc_const, &priv->data_bittiming,349 can_calc_tdco(&priv->tdc, priv->tdc_const, &dbt,
350 &priv->ctrlmode, priv->ctrlmode_supported);350 &priv->ctrlmode, priv->ctrlmode_supported);
351 } /* else: both CAN_CTRLMODE_TDC_{AUTO,MANUAL} are explicitly351 } /* else: both CAN_CTRLMODE_TDC_{AUTO,MANUAL} are explicitly
352 * turned off. TDC is disabled: do nothing352 * turned off. TDC is disabled: do nothing
drivers/net/dsa/dsa_loop_bdinfo.c+1−0
@@ -32,4 +32,5 @@ static int __init dsa_loop_bdinfo_init(void) · 31 unmodified lines
32}32}
33arch_initcall(dsa_loop_bdinfo_init)33arch_initcall(dsa_loop_bdinfo_init)
34 34
35MODULE_DESCRIPTION("DSA mock-up switch driver");
35MODULE_LICENSE("GPL");36MODULE_LICENSE("GPL");
drivers/net/ethernet/amd/pds_core/main.c+6−0
@@ -451,6 +451,9 @@ static void pdsc_remove(struct pci_dev *pdev) · 450 unmodified lines
451 451
452static void pdsc_stop_health_thread(struct pdsc *pdsc)452static void pdsc_stop_health_thread(struct pdsc *pdsc)
453{453{
454 if (pdsc->pdev->is_virtfn)
455 return;
456
454 timer_shutdown_sync(&pdsc->wdtimer);457 timer_shutdown_sync(&pdsc->wdtimer);
455 if (pdsc->health_work.func)458 if (pdsc->health_work.func)
456 cancel_work_sync(&pdsc->health_work);459 cancel_work_sync(&pdsc->health_work);
@@ -458,6 +461,9 @@ static void pdsc_stop_health_thread(struct pdsc *pdsc) · 1 unmodified line
458 461
459static void pdsc_restart_health_thread(struct pdsc *pdsc)462static void pdsc_restart_health_thread(struct pdsc *pdsc)
460{463{
464 if (pdsc->pdev->is_virtfn)
465 return;
466
461 timer_setup(&pdsc->wdtimer, pdsc_wdtimer_cb, 0);467 timer_setup(&pdsc->wdtimer, pdsc_wdtimer_cb, 0);
462 mod_timer(&pdsc->wdtimer, jiffies + 1);468 mod_timer(&pdsc->wdtimer, jiffies + 1);
463}469}
drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c+3−0
@@ -684,6 +684,8 @@ static int bcmasp_init_rx(struct bcmasp_intf *intf) · 683 unmodified lines
684 684
685 intf->rx_buf_order = get_order(RING_BUFFER_SIZE);685 intf->rx_buf_order = get_order(RING_BUFFER_SIZE);
686 buffer_pg = alloc_pages(GFP_KERNEL, intf->rx_buf_order);686 buffer_pg = alloc_pages(GFP_KERNEL, intf->rx_buf_order);
687 if (!buffer_pg)
688 return -ENOMEM;
687 689
688 dma = dma_map_page(kdev, buffer_pg, 0, RING_BUFFER_SIZE,690 dma = dma_map_page(kdev, buffer_pg, 0, RING_BUFFER_SIZE,
689 DMA_FROM_DEVICE);691 DMA_FROM_DEVICE);
@@ -1092,6 +1094,7 @@ static int bcmasp_netif_init(struct net_device *dev, bool phy_connect) · 402 unmodified lines
1092 return 0;1094 return 0;
1093 1095
1094err_reclaim_tx:1096err_reclaim_tx:
1097 netif_napi_del(&intf->tx_napi);
1095 bcmasp_reclaim_free_all_tx(intf);1098 bcmasp_reclaim_free_all_tx(intf);
1096err_phy_disconnect:1099err_phy_disconnect:
1097 if (phydev)1100 if (phydev)
drivers/net/ethernet/brocade/bna/bnad.c+5−7
@@ -1091,10 +1091,10 @@ bnad_cb_tx_resume(struct bnad *bnad, struct bna_tx *tx) · 1090 unmodified lines
1091 * Free all TxQs buffers and then notify TX_E_CLEANUP_DONE to Tx fsm.1091 * Free all TxQs buffers and then notify TX_E_CLEANUP_DONE to Tx fsm.
1092 */1092 */
1093static void1093static void
1094bnad_tx_cleanup(struct delayed_work *work)1094bnad_tx_cleanup(struct work_struct *work)
1095{1095{
1096 struct bnad_tx_info *tx_info =1096 struct bnad_tx_info *tx_info =
1097 container_of(work, struct bnad_tx_info, tx_cleanup_work);1097 container_of(work, struct bnad_tx_info, tx_cleanup_work.work);
1098 struct bnad *bnad = NULL;1098 struct bnad *bnad = NULL;
1099 struct bna_tcb *tcb;1099 struct bna_tcb *tcb;
1100 unsigned long flags;1100 unsigned long flags;
@@ -1170,7 +1170,7 @@ bnad_cb_rx_stall(struct bnad *bnad, struct bna_rx *rx) · 69 unmodified lines
1170 * Free all RxQs buffers and then notify RX_E_CLEANUP_DONE to Rx fsm.1170 * Free all RxQs buffers and then notify RX_E_CLEANUP_DONE to Rx fsm.
1171 */1171 */
1172static void1172static void
1173bnad_rx_cleanup(void *work)1173bnad_rx_cleanup(struct work_struct *work)
1174{1174{
1175 struct bnad_rx_info *rx_info =1175 struct bnad_rx_info *rx_info =
1176 container_of(work, struct bnad_rx_info, rx_cleanup_work);1176 container_of(work, struct bnad_rx_info, rx_cleanup_work);
@@ -1991,8 +1991,7 @@ bnad_setup_tx(struct bnad *bnad, u32 tx_id) · 814 unmodified lines
1991 }1991 }
1992 tx_info->tx = tx;1992 tx_info->tx = tx;
1993 1993
1994 INIT_DELAYED_WORK(&tx_info->tx_cleanup_work,1994 INIT_DELAYED_WORK(&tx_info->tx_cleanup_work, bnad_tx_cleanup);
1995 (work_func_t)bnad_tx_cleanup);
1996 1995
1997 /* Register ISR for the Tx object */1996 /* Register ISR for the Tx object */
1998 if (intr_info->intr_type == BNA_INTR_T_MSIX) {1997 if (intr_info->intr_type == BNA_INTR_T_MSIX) {
@@ -2248,8 +2247,7 @@ bnad_setup_rx(struct bnad *bnad, u32 rx_id) · 249 unmodified lines
2248 rx_info->rx = rx;2247 rx_info->rx = rx;
2249 spin_unlock_irqrestore(&bnad->bna_lock, flags);2248 spin_unlock_irqrestore(&bnad->bna_lock, flags);
2250 2249
2251 INIT_WORK(&rx_info->rx_cleanup_work,2250 INIT_WORK(&rx_info->rx_cleanup_work, bnad_rx_cleanup);
2252 (work_func_t)(bnad_rx_cleanup));
2253 2251
2254 /*2252 /*
2255 * Init NAPI, so that state is set to NAPI_STATE_SCHED,2253 * Init NAPI, so that state is set to NAPI_STATE_SCHED,
drivers/net/ethernet/intel/i40e/i40e_dcb.c+1−1
@@ -1523,7 +1523,7 @@ void i40e_dcb_hw_rx_ets_bw_config(struct i40e_hw *hw, u8 *bw_share, · 1522 unmodified lines
1523 reg = rd32(hw, I40E_PRTDCB_RETSTCC(i));1523 reg = rd32(hw, I40E_PRTDCB_RETSTCC(i));
1524 reg &= ~(I40E_PRTDCB_RETSTCC_BWSHARE_MASK |1524 reg &= ~(I40E_PRTDCB_RETSTCC_BWSHARE_MASK |
1525 I40E_PRTDCB_RETSTCC_UPINTC_MODE_MASK |1525 I40E_PRTDCB_RETSTCC_UPINTC_MODE_MASK |
1526 I40E_PRTDCB_RETSTCC_ETSTC_SHIFT);1526 I40E_PRTDCB_RETSTCC_ETSTC_MASK);
1527 reg |= FIELD_PREP(I40E_PRTDCB_RETSTCC_BWSHARE_MASK,1527 reg |= FIELD_PREP(I40E_PRTDCB_RETSTCC_BWSHARE_MASK,
1528 bw_share[i]);1528 bw_share[i]);
1529 reg |= FIELD_PREP(I40E_PRTDCB_RETSTCC_UPINTC_MODE_MASK,1529 reg |= FIELD_PREP(I40E_PRTDCB_RETSTCC_UPINTC_MODE_MASK,
drivers/net/ethernet/intel/i40e/i40e_main.c+10−14
@@ -4926,27 +4926,23 @@ int i40e_vsi_start_rings(struct i40e_vsi *vsi) · 4925 unmodified lines
4926void i40e_vsi_stop_rings(struct i40e_vsi *vsi)4926void i40e_vsi_stop_rings(struct i40e_vsi *vsi)
4927{4927{
4928 struct i40e_pf *pf = vsi->back;4928 struct i40e_pf *pf = vsi->back;
4929 int pf_q, err, q_end;4929 u32 pf_q, tx_q_end, rx_q_end;
4930 4930
4931 /* When port TX is suspended, don't wait */4931 /* When port TX is suspended, don't wait */
4932 if (test_bit(__I40E_PORT_SUSPENDED, vsi->back->state))4932 if (test_bit(__I40E_PORT_SUSPENDED, vsi->back->state))
4933 return i40e_vsi_stop_rings_no_wait(vsi);4933 return i40e_vsi_stop_rings_no_wait(vsi);
4934 4934
4935 q_end = vsi->base_queue + vsi->num_queue_pairs;4935 tx_q_end = vsi->base_queue +
4936 for (pf_q = vsi->base_queue; pf_q < q_end; pf_q++)4936 vsi->alloc_queue_pairs * (i40e_enabled_xdp_vsi(vsi) ? 2 : 1);
4937 i40e_pre_tx_queue_cfg(&pf->hw, (u32)pf_q, false);4937 for (pf_q = vsi->base_queue; pf_q < tx_q_end; pf_q++)
4938 i40e_pre_tx_queue_cfg(&pf->hw, pf_q, false);
4938 4939
4939 for (pf_q = vsi->base_queue; pf_q < q_end; pf_q++) {4940 rx_q_end = vsi->base_queue + vsi->num_queue_pairs;
4940 err = i40e_control_wait_rx_q(pf, pf_q, false);4941 for (pf_q = vsi->base_queue; pf_q < rx_q_end; pf_q++)
4941 if (err)4942 i40e_control_rx_q(pf, pf_q, false);
4942 dev_info(&pf->pdev->dev,
4943 "VSI seid %d Rx ring %d disable timeout\n",
4944 vsi->seid, pf_q);
4945 }
4946 4943
4947 msleep(I40E_DISABLE_TX_GAP_MSEC);4944 msleep(I40E_DISABLE_TX_GAP_MSEC);
4948 pf_q = vsi->base_queue;4945 for (pf_q = vsi->base_queue; pf_q < tx_q_end; pf_q++)
4949 for (pf_q = vsi->base_queue; pf_q < q_end; pf_q++)
4950 wr32(&pf->hw, I40E_QTX_ENA(pf_q), 0);4946 wr32(&pf->hw, I40E_QTX_ENA(pf_q), 0);
4951 4947
4952 i40e_vsi_wait_queues_disabled(vsi);4948 i40e_vsi_wait_queues_disabled(vsi);
@@ -5360,7 +5356,7 @@ static int i40e_pf_wait_queues_disabled(struct i40e_pf *pf) · 407 unmodified lines
5360{5356{
5361 int v, ret = 0;5357 int v, ret = 0;
5362 5358
5363 for (v = 0; v < pf->hw.func_caps.num_vsis; v++) {5359 for (v = 0; v < pf->num_alloc_vsi; v++) {
5364 if (pf->vsi[v]) {5360 if (pf->vsi[v]) {
5365 ret = i40e_vsi_wait_queues_disabled(pf->vsi[v]);5361 ret = i40e_vsi_wait_queues_disabled(pf->vsi[v]);
5366 if (ret)5362 if (ret)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c+33−5
@@ -2848,6 +2848,24 @@ error_param: · 2847 unmodified lines
2848 (u8 *)&stats, sizeof(stats));2848 (u8 *)&stats, sizeof(stats));
2849}2849}
2850 2850
2851/**
2852 * i40e_can_vf_change_mac
2853 * @vf: pointer to the VF info
2854 *
2855 * Return true if the VF is allowed to change its MAC filters, false otherwise
2856 */
2857static bool i40e_can_vf_change_mac(struct i40e_vf *vf)
2858{
2859 /* If the VF MAC address has been set administratively (via the
2860 * ndo_set_vf_mac command), then deny permission to the VF to
2861 * add/delete unicast MAC addresses, unless the VF is trusted
2862 */
2863 if (vf->pf_set_mac && !vf->trusted)
2864 return false;
2865
2866 return true;
2867}
2868
2851#define I40E_MAX_MACVLAN_PER_HW 30722869#define I40E_MAX_MACVLAN_PER_HW 3072
2852#define I40E_MAX_MACVLAN_PER_PF(num_ports) (I40E_MAX_MACVLAN_PER_HW / \2870#define I40E_MAX_MACVLAN_PER_PF(num_ports) (I40E_MAX_MACVLAN_PER_HW / \
2853 (num_ports))2871 (num_ports))
@@ -2907,8 +2925,8 @@ static inline int i40e_check_vf_permission(struct i40e_vf *vf, · 53 unmodified lines
2907 * The VF may request to set the MAC address filter already2925 * The VF may request to set the MAC address filter already
2908 * assigned to it so do not return an error in that case.2926 * assigned to it so do not return an error in that case.
2909 */2927 */
2910 if (!test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps) &&2928 if (!i40e_can_vf_change_mac(vf) &&
2911 !is_multicast_ether_addr(addr) && vf->pf_set_mac &&2929 !is_multicast_ether_addr(addr) &&
2912 !ether_addr_equal(addr, vf->default_lan_addr.addr)) {2930 !ether_addr_equal(addr, vf->default_lan_addr.addr)) {
2913 dev_err(&pf->pdev->dev,2931 dev_err(&pf->pdev->dev,
2914 "VF attempting to override administratively set MAC address, bring down and up the VF interface to resume normal operation\n");2932 "VF attempting to override administratively set MAC address, bring down and up the VF interface to resume normal operation\n");
@@ -3114,19 +3132,29 @@ static int i40e_vc_del_mac_addr_msg(struct i40e_vf *vf, u8 *msg) · 199 unmodified lines
3114 ret = -EINVAL;3132 ret = -EINVAL;
3115 goto error_param;3133 goto error_param;
3116 }3134 }
3117 if (ether_addr_equal(al->list[i].addr, vf->default_lan_addr.addr))
3118 was_unimac_deleted = true;
3119 }3135 }
3120 vsi = pf->vsi[vf->lan_vsi_idx];3136 vsi = pf->vsi[vf->lan_vsi_idx];
3121 3137
3122 spin_lock_bh(&vsi->mac_filter_hash_lock);3138 spin_lock_bh(&vsi->mac_filter_hash_lock);
3123 /* delete addresses from the list */3139 /* delete addresses from the list */
3124 for (i = 0; i < al->num_elements; i++)3140 for (i = 0; i < al->num_elements; i++) {
3141 const u8 *addr = al->list[i].addr;
3142
3143 /* Allow to delete VF primary MAC only if it was not set
3144 * administratively by PF or if VF is trusted.
3145 */
3146 if (ether_addr_equal(addr, vf->default_lan_addr.addr) &&
3147 i40e_can_vf_change_mac(vf))
3148 was_unimac_deleted = true;
3149 else
3150 continue;
3151
3125 if (i40e_del_mac_filter(vsi, al->list[i].addr)) {3152 if (i40e_del_mac_filter(vsi, al->list[i].addr)) {
3126 ret = -EINVAL;3153 ret = -EINVAL;
3127 spin_unlock_bh(&vsi->mac_filter_hash_lock);3154 spin_unlock_bh(&vsi->mac_filter_hash_lock);
3128 goto error_param;3155 goto error_param;
3129 }3156 }
3157 }
3130 3158
3131 spin_unlock_bh(&vsi->mac_filter_hash_lock);3159 spin_unlock_bh(&vsi->mac_filter_hash_lock);
3132 3160
drivers/net/ethernet/intel/ice/ice_lag.c+23−2
@@ -151,6 +151,27 @@ ice_lag_find_hw_by_lport(struct ice_lag *lag, u8 lport) · 150 unmodified lines
151 return NULL;151 return NULL;
152}152}
153 153
154/**
155 * ice_pkg_has_lport_extract - check if lport extraction supported
156 * @hw: HW struct
157 */
158static bool ice_pkg_has_lport_extract(struct ice_hw *hw)
159{
160 int i;
161
162 for (i = 0; i < hw->blk[ICE_BLK_SW].es.count; i++) {
163 u16 offset;
164 u8 fv_prot;
165
166 ice_find_prot_off(hw, ICE_BLK_SW, ICE_SW_DEFAULT_PROFILE, i,
167 &fv_prot, &offset);
168 if (fv_prot == ICE_FV_PROT_MDID &&
169 offset == ICE_LP_EXT_BUF_OFFSET)
170 return true;
171 }
172 return false;
173}
174
154/**175/**
155 * ice_lag_find_primary - returns pointer to primary interfaces lag struct176 * ice_lag_find_primary - returns pointer to primary interfaces lag struct
156 * @lag: local interfaces lag struct177 * @lag: local interfaces lag struct
@@ -1206,7 +1227,7 @@ static void ice_lag_del_prune_list(struct ice_lag *lag, struct ice_pf *event_pf) · 1049 unmodified lines
1206}1227}
1207 1228
1208/**1229/**
1209 * ice_lag_init_feature_support_flag - Check for NVM support for LAG1230 * ice_lag_init_feature_support_flag - Check for package and NVM support for LAG
1210 * @pf: PF struct1231 * @pf: PF struct
1211 */1232 */
1212static void ice_lag_init_feature_support_flag(struct ice_pf *pf)1233static void ice_lag_init_feature_support_flag(struct ice_pf *pf)
@@ -1219,7 +1240,7 @@ static void ice_lag_init_feature_support_flag(struct ice_pf *pf) · 6 unmodified lines
1219 else1240 else
1220 ice_clear_feature_support(pf, ICE_F_ROCE_LAG);1241 ice_clear_feature_support(pf, ICE_F_ROCE_LAG);
1221 1242
1222 if (caps->sriov_lag)1243 if (caps->sriov_lag && ice_pkg_has_lport_extract(&pf->hw))
1223 ice_set_feature_support(pf, ICE_F_SRIOV_LAG);1244 ice_set_feature_support(pf, ICE_F_SRIOV_LAG);
1224 else1245 else
1225 ice_clear_feature_support(pf, ICE_F_SRIOV_LAG);1246 ice_clear_feature_support(pf, ICE_F_SRIOV_LAG);
drivers/net/ethernet/intel/ice/ice_lag.h+3−0
@@ -17,6 +17,9 @@ enum ice_lag_role { · 16 unmodified lines
17#define ICE_LAG_INVALID_PORT 0xFF17#define ICE_LAG_INVALID_PORT 0xFF
18 18
19#define ICE_LAG_RESET_RETRIES 519#define ICE_LAG_RESET_RETRIES 5
20#define ICE_SW_DEFAULT_PROFILE 0
21#define ICE_FV_PROT_MDID 255
22#define ICE_LP_EXT_BUF_OFFSET 32
20 23
21struct ice_pf;24struct ice_pf;
22struct ice_vf;25struct ice_vf;
drivers/net/ethernet/intel/igb/igb.h+1−1
@@ -637,7 +637,7 @@ struct igb_adapter { · 636 unmodified lines
637 struct timespec64 period;637 struct timespec64 period;
638 } perout[IGB_N_PEROUT];638 } perout[IGB_N_PEROUT];
639 639
640 char fw_version[32];640 char fw_version[48];
641#ifdef CONFIG_IGB_HWMON641#ifdef CONFIG_IGB_HWMON
642 struct hwmon_buff *igb_hwmon_buff;642 struct hwmon_buff *igb_hwmon_buff;
643 bool ets;643 bool ets;
drivers/net/ethernet/intel/igb/igb_main.c+18−17
@@ -3069,7 +3069,6 @@ void igb_set_fw_version(struct igb_adapter *adapter) · 3068 unmodified lines
3069{3069{
3070 struct e1000_hw *hw = &adapter->hw;3070 struct e1000_hw *hw = &adapter->hw;
3071 struct e1000_fw_version fw;3071 struct e1000_fw_version fw;
3072 char *lbuf;
3073 3072
3074 igb_get_fw_version(hw, &fw);3073 igb_get_fw_version(hw, &fw);
3075 3074
@@ -3077,34 +3076,36 @@ void igb_set_fw_version(struct igb_adapter *adapter) · 1 unmodified line
3077 case e1000_i210:3076 case e1000_i210:
3078 case e1000_i211:3077 case e1000_i211:
3079 if (!(igb_get_flash_presence_i210(hw))) {3078 if (!(igb_get_flash_presence_i210(hw))) {
3080 lbuf = kasprintf(GFP_KERNEL, "%2d.%2d-%d",3079 snprintf(adapter->fw_version,
3081 fw.invm_major, fw.invm_minor,3080 sizeof(adapter->fw_version),
3082 fw.invm_img_type);3081 "%2d.%2d-%d",
3082 fw.invm_major, fw.invm_minor,
3083 fw.invm_img_type);
3083 break;3084 break;
3084 }3085 }
3085 fallthrough;3086 fallthrough;
3086 default:3087 default:
3087 /* if option rom is valid, display its version too */3088 /* if option rom is valid, display its version too */
3088 if (fw.or_valid) {3089 if (fw.or_valid) {
3089 lbuf = kasprintf(GFP_KERNEL, "%d.%d, 0x%08x, %d.%d.%d",3090 snprintf(adapter->fw_version,
3090 fw.eep_major, fw.eep_minor,3091 sizeof(adapter->fw_version),
3091 fw.etrack_id, fw.or_major, fw.or_build,3092 "%d.%d, 0x%08x, %d.%d.%d",
3092 fw.or_patch);3093 fw.eep_major, fw.eep_minor, fw.etrack_id,
3094 fw.or_major, fw.or_build, fw.or_patch);
3093 /* no option rom */3095 /* no option rom */
3094 } else if (fw.etrack_id != 0X0000) {3096 } else if (fw.etrack_id != 0X0000) {
3095 lbuf = kasprintf(GFP_KERNEL, "%d.%d, 0x%08x",3097 snprintf(adapter->fw_version,
3096 fw.eep_major, fw.eep_minor,3098 sizeof(adapter->fw_version),
3097 fw.etrack_id);3099 "%d.%d, 0x%08x",
3100 fw.eep_major, fw.eep_minor, fw.etrack_id);
3098 } else {3101 } else {
3099 lbuf = kasprintf(GFP_KERNEL, "%d.%d.%d", fw.eep_major,3102 snprintf(adapter->fw_version,
3100 fw.eep_minor, fw.eep_build);3103 sizeof(adapter->fw_version),
3104 "%d.%d.%d",
3105 fw.eep_major, fw.eep_minor, fw.eep_build);
3101 }3106 }
3102 break;3107 break;
3103 }3108 }
3104
3105 /* the truncate happens here if it doesn't fit */
3106 strscpy(adapter->fw_version, lbuf, sizeof(adapter->fw_version));
3107 kfree(lbuf);
3108}3109}
3109 3110
3110/**3111/**
drivers/net/ethernet/intel/igc/igc_phy.c+1−5
@@ -130,11 +130,7 @@ void igc_power_down_phy_copper(struct igc_hw *hw) · 129 unmodified lines
130 /* The PHY will retain its settings across a power down/up cycle */130 /* The PHY will retain its settings across a power down/up cycle */
131 hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg);131 hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg);
132 mii_reg |= MII_CR_POWER_DOWN;132 mii_reg |= MII_CR_POWER_DOWN;
133 133 hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg);
134 /* Temporary workaround - should be removed when PHY will implement
135 * IEEE registers as properly
136 */
137 /* hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg);*/
138 usleep_range(1000, 2000);134 usleep_range(1000, 2000);
139}135}
140 136
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c+0−32
@@ -61,28 +61,6 @@ int rvu_npc_get_tx_nibble_cfg(struct rvu *rvu, u64 nibble_ena) · 60 unmodified lines
61 return 0;61 return 0;
62}62}
63 63
64static int npc_mcam_verify_pf_func(struct rvu *rvu,
65 struct mcam_entry *entry_data, u8 intf,
66 u16 pcifunc)
67{
68 u16 pf_func, pf_func_mask;
69
70 if (is_npc_intf_rx(intf))
71 return 0;
72
73 pf_func_mask = (entry_data->kw_mask[0] >> 32) &
74 NPC_KEX_PF_FUNC_MASK;
75 pf_func = (entry_data->kw[0] >> 32) & NPC_KEX_PF_FUNC_MASK;
76
77 pf_func = be16_to_cpu((__force __be16)pf_func);
78 if (pf_func_mask != NPC_KEX_PF_FUNC_MASK ||
79 ((pf_func & ~RVU_PFVF_FUNC_MASK) !=
80 (pcifunc & ~RVU_PFVF_FUNC_MASK)))
81 return -EINVAL;
82
83 return 0;
84}
85
86void rvu_npc_set_pkind(struct rvu *rvu, int pkind, struct rvu_pfvf *pfvf)64void rvu_npc_set_pkind(struct rvu *rvu, int pkind, struct rvu_pfvf *pfvf)
87{65{
88 int blkaddr;66 int blkaddr;
@@ -2851,12 +2829,6 @@ int rvu_mbox_handler_npc_mcam_write_entry(struct rvu *rvu, · 2762 unmodified lines
2851 else2829 else
2852 nix_intf = pfvf->nix_rx_intf;2830 nix_intf = pfvf->nix_rx_intf;
2853 2831
2854 if (!is_pffunc_af(pcifunc) &&
2855 npc_mcam_verify_pf_func(rvu, &req->entry_data, req->intf, pcifunc)) {
2856 rc = NPC_MCAM_INVALID_REQ;
2857 goto exit;
2858 }
2859
2860 /* For AF installed rules, the nix_intf should be set to target NIX */2832 /* For AF installed rules, the nix_intf should be set to target NIX */
2861 if (is_pffunc_af(req->hdr.pcifunc))2833 if (is_pffunc_af(req->hdr.pcifunc))
2862 nix_intf = req->intf;2834 nix_intf = req->intf;
@@ -3208,10 +3180,6 @@ int rvu_mbox_handler_npc_mcam_alloc_and_write_entry(struct rvu *rvu, · 345 unmodified lines
3208 if (!is_npc_interface_valid(rvu, req->intf))3180 if (!is_npc_interface_valid(rvu, req->intf))
3209 return NPC_MCAM_INVALID_REQ;3181 return NPC_MCAM_INVALID_REQ;
3210 3182
3211 if (npc_mcam_verify_pf_func(rvu, &req->entry_data, req->intf,
3212 req->hdr.pcifunc))
3213 return NPC_MCAM_INVALID_REQ;
3214
3215 /* Try to allocate a MCAM entry */3183 /* Try to allocate a MCAM entry */
3216 entry_req.hdr.pcifunc = req->hdr.pcifunc;3184 entry_req.hdr.pcifunc = req->hdr.pcifunc;
3217 entry_req.contig = true;3185 entry_req.contig = true;
drivers/net/ethernet/mellanox/mlx5/core/dpll.c+1−1
@@ -389,7 +389,7 @@ static void mlx5_dpll_remove(struct auxiliary_device *adev) · 388 unmodified lines
389 struct mlx5_dpll *mdpll = auxiliary_get_drvdata(adev);389 struct mlx5_dpll *mdpll = auxiliary_get_drvdata(adev);
390 struct mlx5_core_dev *mdev = mdpll->mdev;390 struct mlx5_core_dev *mdev = mdpll->mdev;
391 391
392 cancel_delayed_work(&mdpll->work);392 cancel_delayed_work_sync(&mdpll->work);
393 mlx5_dpll_mdev_netdev_untrack(mdpll, mdev);393 mlx5_dpll_mdev_netdev_untrack(mdpll, mdev);
394 destroy_workqueue(mdpll->wq);394 destroy_workqueue(mdpll->wq);
395 dpll_pin_unregister(mdpll->dpll, mdpll->dpll_pin,395 dpll_pin_unregister(mdpll->dpll, mdpll->dpll_pin,
drivers/net/ethernet/microchip/lan966x/lan966x_lag.c+7−2
@@ -37,19 +37,24 @@ static void lan966x_lag_set_aggr_pgids(struct lan966x *lan966x) · 36 unmodified lines
37 37
38 /* Now, set PGIDs for each active LAG */38 /* Now, set PGIDs for each active LAG */
39 for (lag = 0; lag < lan966x->num_phys_ports; ++lag) {39 for (lag = 0; lag < lan966x->num_phys_ports; ++lag) {
40 struct net_device *bond = lan966x->ports[lag]->bond;40 struct lan966x_port *port = lan966x->ports[lag];
41 int num_active_ports = 0;41 int num_active_ports = 0;
42 struct net_device *bond;
42 unsigned long bond_mask;43 unsigned long bond_mask;
43 u8 aggr_idx[16];44 u8 aggr_idx[16];
44 45
45 if (!bond || (visited & BIT(lag)))46 if (!port || !port->bond || (visited & BIT(lag)))
46 continue;47 continue;
47 48
49 bond = port->bond;
48 bond_mask = lan966x_lag_get_mask(lan966x, bond);50 bond_mask = lan966x_lag_get_mask(lan966x, bond);
49 51
50 for_each_set_bit(p, &bond_mask, lan966x->num_phys_ports) {52 for_each_set_bit(p, &bond_mask, lan966x->num_phys_ports) {
51 struct lan966x_port *port = lan966x->ports[p];53 struct lan966x_port *port = lan966x->ports[p];
52 54
55 if (!port)
56 continue;
57
53 lan_wr(ANA_PGID_PGID_SET(bond_mask),58 lan_wr(ANA_PGID_PGID_SET(bond_mask),
54 lan966x, ANA_PGID(p));59 lan966x, ANA_PGID(p));
55 if (port->lag_tx_active)60 if (port->lag_tx_active)
drivers/net/ethernet/pensando/ionic/ionic_txrx.c+9−0
@@ -579,6 +579,9 @@ int ionic_tx_napi(struct napi_struct *napi, int budget) · 578 unmodified lines
579 work_done = ionic_cq_service(cq, budget,579 work_done = ionic_cq_service(cq, budget,
580 ionic_tx_service, NULL, NULL);580 ionic_tx_service, NULL, NULL);
581 581
582 if (unlikely(!budget))
583 return budget;
584
582 if (work_done < budget && napi_complete_done(napi, work_done)) {585 if (work_done < budget && napi_complete_done(napi, work_done)) {
583 ionic_dim_update(qcq, IONIC_LIF_F_TX_DIM_INTR);586 ionic_dim_update(qcq, IONIC_LIF_F_TX_DIM_INTR);
584 flags |= IONIC_INTR_CRED_UNMASK;587 flags |= IONIC_INTR_CRED_UNMASK;
@@ -607,6 +610,9 @@ int ionic_rx_napi(struct napi_struct *napi, int budget) · 22 unmodified lines
607 u32 work_done = 0;610 u32 work_done = 0;
608 u32 flags = 0;611 u32 flags = 0;
609 612
613 if (unlikely(!budget))
614 return budget;
615
610 lif = cq->bound_q->lif;616 lif = cq->bound_q->lif;
611 idev = &lif->ionic->idev;617 idev = &lif->ionic->idev;
612 618
@@ -656,6 +662,9 @@ int ionic_txrx_napi(struct napi_struct *napi, int budget) · 43 unmodified lines
656 tx_work_done = ionic_cq_service(txcq, IONIC_TX_BUDGET_DEFAULT,662 tx_work_done = ionic_cq_service(txcq, IONIC_TX_BUDGET_DEFAULT,
657 ionic_tx_service, NULL, NULL);663 ionic_tx_service, NULL, NULL);
658 664
665 if (unlikely(!budget))
666 return budget;
667
659 rx_work_done = ionic_cq_service(rxcq, budget,668 rx_work_done = ionic_cq_service(rxcq, budget,
660 ionic_rx_service, NULL, NULL);669 ionic_rx_service, NULL, NULL);
661 670
drivers/net/ethernet/renesas/ravb_main.c+9−13
@@ -772,29 +772,25 @@ static bool ravb_rx_gbeth(struct net_device *ndev, int *quota, int q) · 771 unmodified lines
772 struct ravb_rx_desc *desc;772 struct ravb_rx_desc *desc;
773 struct sk_buff *skb;773 struct sk_buff *skb;
774 dma_addr_t dma_addr;774 dma_addr_t dma_addr;
775 int rx_packets = 0;
775 u8 desc_status;776 u8 desc_status;
776 int boguscnt;
777 u16 pkt_len;777 u16 pkt_len;
778 u8 die_dt;778 u8 die_dt;
779 int entry;779 int entry;
780 int limit;780 int limit;
781 int i;
781 782
782 entry = priv->cur_rx[q] % priv->num_rx_ring[q];783 entry = priv->cur_rx[q] % priv->num_rx_ring[q];
783 boguscnt = priv->dirty_rx[q] + priv->num_rx_ring[q] - priv->cur_rx[q];784 limit = priv->dirty_rx[q] + priv->num_rx_ring[q] - priv->cur_rx[q];
784 stats = &priv->stats[q];785 stats = &priv->stats[q];
785 786
786 boguscnt = min(boguscnt, *quota);
787 limit = boguscnt;
788 desc = &priv->gbeth_rx_ring[entry];787 desc = &priv->gbeth_rx_ring[entry];
789 while (desc->die_dt != DT_FEMPTY) {788 for (i = 0; i < limit && rx_packets < *quota && desc->die_dt != DT_FEMPTY; i++) {
790 /* Descriptor type must be checked before all other reads */789 /* Descriptor type must be checked before all other reads */
791 dma_rmb();790 dma_rmb();
792 desc_status = desc->msc;791 desc_status = desc->msc;
793 pkt_len = le16_to_cpu(desc->ds_cc) & RX_DS;792 pkt_len = le16_to_cpu(desc->ds_cc) & RX_DS;
794 793
795 if (--boguscnt < 0)
796 break;
797
798 /* We use 0-byte descriptors to mark the DMA mapping errors */794 /* We use 0-byte descriptors to mark the DMA mapping errors */
799 if (!pkt_len)795 if (!pkt_len)
800 continue;796 continue;
@@ -820,7 +816,7 @@ static bool ravb_rx_gbeth(struct net_device *ndev, int *quota, int q) · 19 unmodified lines
820 skb_put(skb, pkt_len);816 skb_put(skb, pkt_len);
821 skb->protocol = eth_type_trans(skb, ndev);817 skb->protocol = eth_type_trans(skb, ndev);
822 napi_gro_receive(&priv->napi[q], skb);818 napi_gro_receive(&priv->napi[q], skb);
823 stats->rx_packets++;819 rx_packets++;
824 stats->rx_bytes += pkt_len;820 stats->rx_bytes += pkt_len;
825 break;821 break;
826 case DT_FSTART:822 case DT_FSTART:
@@ -848,7 +844,7 @@ static bool ravb_rx_gbeth(struct net_device *ndev, int *quota, int q) · 21 unmodified lines
848 eth_type_trans(priv->rx_1st_skb, ndev);844 eth_type_trans(priv->rx_1st_skb, ndev);
849 napi_gro_receive(&priv->napi[q],845 napi_gro_receive(&priv->napi[q],
850 priv->rx_1st_skb);846 priv->rx_1st_skb);
851 stats->rx_packets++;847 rx_packets++;
852 stats->rx_bytes += pkt_len;848 stats->rx_bytes += pkt_len;
853 break;849 break;
854 }850 }
@@ -887,9 +883,9 @@ static bool ravb_rx_gbeth(struct net_device *ndev, int *quota, int q) · 32 unmodified lines
887 desc->die_dt = DT_FEMPTY;883 desc->die_dt = DT_FEMPTY;
888 }884 }
889 885
890 *quota -= limit - (++boguscnt);886 stats->rx_packets += rx_packets;
891 887 *quota -= rx_packets;
892 return boguscnt <= 0;888 return *quota == 0;
893}889}
894 890
895/* Packet receive function for Ethernet AVB */891/* Packet receive function for Ethernet AVB */
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c+35−34
@@ -830,41 +830,42 @@ static const struct dwxgmac3_error_desc dwxgmac3_dma_errors[32]= { · 829 unmodified lines
830 { false, "UNKNOWN", "Unknown Error" }, /* 31 */830 { false, "UNKNOWN", "Unknown Error" }, /* 31 */
831};831};
832 832
833static const char * const dpp_rx_err = "Read Rx Descriptor Parity checker Error";833#define DPP_RX_ERR "Read Rx Descriptor Parity checker Error"
834static const char * const dpp_tx_err = "Read Tx Descriptor Parity checker Error";834#define DPP_TX_ERR "Read Tx Descriptor Parity checker Error"
835
835static const struct dwxgmac3_error_desc dwxgmac3_dma_dpp_errors[32] = {836static const struct dwxgmac3_error_desc dwxgmac3_dma_dpp_errors[32] = {
836 { true, "TDPES0", dpp_tx_err },837 { true, "TDPES0", DPP_TX_ERR },
837 { true, "TDPES1", dpp_tx_err },838 { true, "TDPES1", DPP_TX_ERR },
838 { true, "TDPES2", dpp_tx_err },839 { true, "TDPES2", DPP_TX_ERR },
839 { true, "TDPES3", dpp_tx_err },840 { true, "TDPES3", DPP_TX_ERR },
840 { true, "TDPES4", dpp_tx_err },841 { true, "TDPES4", DPP_TX_ERR },
841 { true, "TDPES5", dpp_tx_err },842 { true, "TDPES5", DPP_TX_ERR },
842 { true, "TDPES6", dpp_tx_err },843 { true, "TDPES6", DPP_TX_ERR },
843 { true, "TDPES7", dpp_tx_err },844 { true, "TDPES7", DPP_TX_ERR },
844 { true, "TDPES8", dpp_tx_err },845 { true, "TDPES8", DPP_TX_ERR },
845 { true, "TDPES9", dpp_tx_err },846 { true, "TDPES9", DPP_TX_ERR },
846 { true, "TDPES10", dpp_tx_err },847 { true, "TDPES10", DPP_TX_ERR },
847 { true, "TDPES11", dpp_tx_err },848 { true, "TDPES11", DPP_TX_ERR },
848 { true, "TDPES12", dpp_tx_err },849 { true, "TDPES12", DPP_TX_ERR },
849 { true, "TDPES13", dpp_tx_err },850 { true, "TDPES13", DPP_TX_ERR },
850 { true, "TDPES14", dpp_tx_err },851 { true, "TDPES14", DPP_TX_ERR },
851 { true, "TDPES15", dpp_tx_err },852 { true, "TDPES15", DPP_TX_ERR },
852 { true, "RDPES0", dpp_rx_err },853 { true, "RDPES0", DPP_RX_ERR },
853 { true, "RDPES1", dpp_rx_err },854 { true, "RDPES1", DPP_RX_ERR },
854 { true, "RDPES2", dpp_rx_err },855 { true, "RDPES2", DPP_RX_ERR },
855 { true, "RDPES3", dpp_rx_err },856 { true, "RDPES3", DPP_RX_ERR },
856 { true, "RDPES4", dpp_rx_err },857 { true, "RDPES4", DPP_RX_ERR },
857 { true, "RDPES5", dpp_rx_err },858 { true, "RDPES5", DPP_RX_ERR },
858 { true, "RDPES6", dpp_rx_err },859 { true, "RDPES6", DPP_RX_ERR },
859 { true, "RDPES7", dpp_rx_err },860 { true, "RDPES7", DPP_RX_ERR },
860 { true, "RDPES8", dpp_rx_err },861 { true, "RDPES8", DPP_RX_ERR },
861 { true, "RDPES9", dpp_rx_err },862 { true, "RDPES9", DPP_RX_ERR },
862 { true, "RDPES10", dpp_rx_err },863 { true, "RDPES10", DPP_RX_ERR },
863 { true, "RDPES11", dpp_rx_err },864 { true, "RDPES11", DPP_RX_ERR },
864 { true, "RDPES12", dpp_rx_err },865 { true, "RDPES12", DPP_RX_ERR },
865 { true, "RDPES13", dpp_rx_err },866 { true, "RDPES13", DPP_RX_ERR },
866 { true, "RDPES14", dpp_rx_err },867 { true, "RDPES14", DPP_RX_ERR },
867 { true, "RDPES15", dpp_rx_err },868 { true, "RDPES15", DPP_RX_ERR },
868};869};
869 870
870static void dwxgmac3_handle_dma_err(struct net_device *ndev,871static void dwxgmac3_handle_dma_err(struct net_device *ndev,
drivers/net/ethernet/ti/Kconfig+1−0
@@ -189,6 +189,7 @@ config TI_ICSSG_PRUETH · 188 unmodified lines
189 select TI_K3_CPPI_DESC_POOL189 select TI_K3_CPPI_DESC_POOL
190 depends on PRU_REMOTEPROC190 depends on PRU_REMOTEPROC
191 depends on ARCH_K3 && OF && TI_K3_UDMA_GLUE_LAYER191 depends on ARCH_K3 && OF && TI_K3_UDMA_GLUE_LAYER
192 depends on PTP_1588_CLOCK_OPTIONAL
192 help193 help
193 Support dual Gigabit Ethernet ports over the ICSSG PRU Subsystem.194 Support dual Gigabit Ethernet ports over the ICSSG PRU Subsystem.
194 This subsystem is available starting with the AM65 platform.195 This subsystem is available starting with the AM65 platform.
drivers/net/ethernet/ti/cpts.c+12−5
@@ -638,6 +638,16 @@ static void cpts_calc_mult_shift(struct cpts *cpts) · 637 unmodified lines
638 freq, cpts->cc.mult, cpts->cc.shift, (ns - NSEC_PER_SEC));638 freq, cpts->cc.mult, cpts->cc.shift, (ns - NSEC_PER_SEC));
639}639}
640 640
641static void cpts_clk_unregister(void *clk)
642{
643 clk_hw_unregister_mux(clk);
644}
645
646static void cpts_clk_del_provider(void *np)
647{
648 of_clk_del_provider(np);
649}
650
641static int cpts_of_mux_clk_setup(struct cpts *cpts, struct device_node *node)651static int cpts_of_mux_clk_setup(struct cpts *cpts, struct device_node *node)
642{652{
643 struct device_node *refclk_np;653 struct device_node *refclk_np;
@@ -687,9 +697,7 @@ static int cpts_of_mux_clk_setup(struct cpts *cpts, struct device_node *node) · 43 unmodified lines
687 goto mux_fail;697 goto mux_fail;
688 }698 }
689 699
690 ret = devm_add_action_or_reset(cpts->dev,700 ret = devm_add_action_or_reset(cpts->dev, cpts_clk_unregister, clk_hw);
691 (void(*)(void *))clk_hw_unregister_mux,
692 clk_hw);
693 if (ret) {701 if (ret) {
694 dev_err(cpts->dev, "add clkmux unreg action %d", ret);702 dev_err(cpts->dev, "add clkmux unreg action %d", ret);
695 goto mux_fail;703 goto mux_fail;
@@ -699,8 +707,7 @@ static int cpts_of_mux_clk_setup(struct cpts *cpts, struct device_node *node) · 3 unmodified lines
699 if (ret)707 if (ret)
700 goto mux_fail;708 goto mux_fail;
701 709
702 ret = devm_add_action_or_reset(cpts->dev,710 ret = devm_add_action_or_reset(cpts->dev, cpts_clk_del_provider,
703 (void(*)(void *))of_clk_del_provider,
704 refclk_np);711 refclk_np);
705 if (ret) {712 if (ret) {
706 dev_err(cpts->dev, "add clkmux provider unreg action %d", ret);713 dev_err(cpts->dev, "add clkmux provider unreg action %d", ret);
drivers/net/fddi/skfp/skfddi.c+1−0
@@ -153,6 +153,7 @@ static const struct pci_device_id skfddi_pci_tbl[] = { · 152 unmodified lines
153 { } /* Terminating entry */153 { } /* Terminating entry */
154};154};
155MODULE_DEVICE_TABLE(pci, skfddi_pci_tbl);155MODULE_DEVICE_TABLE(pci, skfddi_pci_tbl);
156MODULE_DESCRIPTION("SysKonnect FDDI PCI driver");
156MODULE_LICENSE("GPL");157MODULE_LICENSE("GPL");
157MODULE_AUTHOR("Mirko Lindner <mlindner@syskonnect.de>");158MODULE_AUTHOR("Mirko Lindner <mlindner@syskonnect.de>");
158 159
drivers/net/ieee802154/fakelb.c+1−0
@@ -259,4 +259,5 @@ static __exit void fake_remove_module(void) · 258 unmodified lines
259 259
260module_init(fakelb_init_module);260module_init(fakelb_init_module);
261module_exit(fake_remove_module);261module_exit(fake_remove_module);
262MODULE_DESCRIPTION("IEEE 802.15.4 loopback driver");
262MODULE_LICENSE("GPL");263MODULE_LICENSE("GPL");
drivers/net/ipvlan/ipvtap.c+1−0
@@ -237,4 +237,5 @@ static void __exit ipvtap_exit(void) · 236 unmodified lines
237module_exit(ipvtap_exit);237module_exit(ipvtap_exit);
238MODULE_ALIAS_RTNL_LINK("ipvtap");238MODULE_ALIAS_RTNL_LINK("ipvtap");
239MODULE_AUTHOR("Sainath Grandhi <sainath.grandhi@intel.com>");239MODULE_AUTHOR("Sainath Grandhi <sainath.grandhi@intel.com>");
240MODULE_DESCRIPTION("IP-VLAN based tap driver");
240MODULE_LICENSE("GPL");241MODULE_LICENSE("GPL");
drivers/net/phy/mdio_devres.c+1−0
@@ -131,4 +131,5 @@ int __devm_of_mdiobus_register(struct device *dev, struct mii_bus *mdio, · 130 unmodified lines
131EXPORT_SYMBOL(__devm_of_mdiobus_register);131EXPORT_SYMBOL(__devm_of_mdiobus_register);
132#endif /* CONFIG_OF_MDIO */132#endif /* CONFIG_OF_MDIO */
133 133
134MODULE_DESCRIPTION("Network MDIO bus devres helpers");
134MODULE_LICENSE("GPL");135MODULE_LICENSE("GPL");
drivers/net/plip/plip.c+1−0
@@ -1437,4 +1437,5 @@ static int __init plip_init (void) · 1436 unmodified lines
1437 1437
1438module_init(plip_init);1438module_init(plip_init);
1439module_exit(plip_cleanup_module);1439module_exit(plip_cleanup_module);
1440MODULE_DESCRIPTION("PLIP (parallel port) network module");
1440MODULE_LICENSE("GPL");1441MODULE_LICENSE("GPL");
drivers/net/ppp/bsd_comp.c+1−0
@@ -1166,5 +1166,6 @@ static void __exit bsdcomp_cleanup(void) · 1165 unmodified lines
1166 1166
1167module_init(bsdcomp_init);1167module_init(bsdcomp_init);
1168module_exit(bsdcomp_cleanup);1168module_exit(bsdcomp_cleanup);
1169MODULE_DESCRIPTION("PPP BSD-Compress compression module");
1169MODULE_LICENSE("Dual BSD/GPL");1170MODULE_LICENSE("Dual BSD/GPL");
1170MODULE_ALIAS("ppp-compress-" __stringify(CI_BSD_COMPRESS));1171MODULE_ALIAS("ppp-compress-" __stringify(CI_BSD_COMPRESS));
drivers/net/ppp/ppp_async.c+1−0
@@ -87,6 +87,7 @@ struct asyncppp { · 86 unmodified lines
87static int flag_time = HZ;87static int flag_time = HZ;
88module_param(flag_time, int, 0);88module_param(flag_time, int, 0);
89MODULE_PARM_DESC(flag_time, "ppp_async: interval between flagged packets (in clock ticks)");89MODULE_PARM_DESC(flag_time, "ppp_async: interval between flagged packets (in clock ticks)");
90MODULE_DESCRIPTION("PPP async serial channel module");
90MODULE_LICENSE("GPL");91MODULE_LICENSE("GPL");
91MODULE_ALIAS_LDISC(N_PPP);92MODULE_ALIAS_LDISC(N_PPP);
92 93
drivers/net/ppp/ppp_deflate.c+1−0
@@ -630,6 +630,7 @@ static void __exit deflate_cleanup(void) · 629 unmodified lines
630 630
631module_init(deflate_init);631module_init(deflate_init);
632module_exit(deflate_cleanup);632module_exit(deflate_cleanup);
633MODULE_DESCRIPTION("PPP Deflate compression module");
633MODULE_LICENSE("Dual BSD/GPL");634MODULE_LICENSE("Dual BSD/GPL");
634MODULE_ALIAS("ppp-compress-" __stringify(CI_DEFLATE));635MODULE_ALIAS("ppp-compress-" __stringify(CI_DEFLATE));
635MODULE_ALIAS("ppp-compress-" __stringify(CI_DEFLATE_DRAFT));636MODULE_ALIAS("ppp-compress-" __stringify(CI_DEFLATE_DRAFT));
drivers/net/ppp/ppp_generic.c+1−0
@@ -3604,6 +3604,7 @@ EXPORT_SYMBOL(ppp_input_error); · 3603 unmodified lines
3604EXPORT_SYMBOL(ppp_output_wakeup);3604EXPORT_SYMBOL(ppp_output_wakeup);
3605EXPORT_SYMBOL(ppp_register_compressor);3605EXPORT_SYMBOL(ppp_register_compressor);
3606EXPORT_SYMBOL(ppp_unregister_compressor);3606EXPORT_SYMBOL(ppp_unregister_compressor);
3607MODULE_DESCRIPTION("Generic PPP layer driver");
3607MODULE_LICENSE("GPL");3608MODULE_LICENSE("GPL");
3608MODULE_ALIAS_CHARDEV(PPP_MAJOR, 0);3609MODULE_ALIAS_CHARDEV(PPP_MAJOR, 0);
3609MODULE_ALIAS_RTNL_LINK("ppp");3610MODULE_ALIAS_RTNL_LINK("ppp");
drivers/net/ppp/ppp_synctty.c+1−0
@@ -724,5 +724,6 @@ ppp_sync_cleanup(void) · 723 unmodified lines
724 724
725module_init(ppp_sync_init);725module_init(ppp_sync_init);
726module_exit(ppp_sync_cleanup);726module_exit(ppp_sync_cleanup);
727MODULE_DESCRIPTION("PPP synchronous TTY channel module");
727MODULE_LICENSE("GPL");728MODULE_LICENSE("GPL");
728MODULE_ALIAS_LDISC(N_SYNC_PPP);729MODULE_ALIAS_LDISC(N_SYNC_PPP);
drivers/net/ppp/pppoe.c+9−14
@@ -1007,26 +1007,21 @@ static int pppoe_recvmsg(struct socket *sock, struct msghdr *m, · 1006 unmodified lines
1007 struct sk_buff *skb;1007 struct sk_buff *skb;
1008 int error = 0;1008 int error = 0;
1009 1009
1010 if (sk->sk_state & PPPOX_BOUND) {1010 if (sk->sk_state & PPPOX_BOUND)
1011 error = -EIO;1011 return -EIO;
1012 goto end;
1013 }
1014 1012
1015 skb = skb_recv_datagram(sk, flags, &error);1013 skb = skb_recv_datagram(sk, flags, &error);
1016 if (error < 0)1014 if (!skb)
1017 goto end;1015 return error;
1018 1016
1019 if (skb) {1017 total_len = min_t(size_t, total_len, skb->len);
1020 total_len = min_t(size_t, total_len, skb->len);1018 error = skb_copy_datagram_msg(skb, 0, m, total_len);
1021 error = skb_copy_datagram_msg(skb, 0, m, total_len);1019 if (error == 0) {
1022 if (error == 0) {1020 consume_skb(skb);
1023 consume_skb(skb);1021 return total_len;
1024 return total_len;
1025 }
1026 }1022 }
1027 1023
1028 kfree_skb(skb);1024 kfree_skb(skb);
1029end:
1030 return error;1025 return error;
1031}1026}
1032 1027
drivers/net/wireless/intel/iwlwifi/fw/acpi.c+9−6
@@ -618,7 +618,7 @@ int iwl_sar_get_wrds_table(struct iwl_fw_runtime *fwrt) · 617 unmodified lines
618 &tbl_rev);618 &tbl_rev);
619 if (!IS_ERR(wifi_pkg)) {619 if (!IS_ERR(wifi_pkg)) {
620 if (tbl_rev != 2) {620 if (tbl_rev != 2) {
621 ret = PTR_ERR(wifi_pkg);621 ret = -EINVAL;
622 goto out_free;622 goto out_free;
623 }623 }
624 624
@@ -634,7 +634,7 @@ int iwl_sar_get_wrds_table(struct iwl_fw_runtime *fwrt) · 9 unmodified lines
634 &tbl_rev);634 &tbl_rev);
635 if (!IS_ERR(wifi_pkg)) {635 if (!IS_ERR(wifi_pkg)) {
636 if (tbl_rev != 1) {636 if (tbl_rev != 1) {
637 ret = PTR_ERR(wifi_pkg);637 ret = -EINVAL;
638 goto out_free;638 goto out_free;
639 }639 }
640 640
@@ -650,7 +650,7 @@ int iwl_sar_get_wrds_table(struct iwl_fw_runtime *fwrt) · 9 unmodified lines
650 &tbl_rev);650 &tbl_rev);
651 if (!IS_ERR(wifi_pkg)) {651 if (!IS_ERR(wifi_pkg)) {
652 if (tbl_rev != 0) {652 if (tbl_rev != 0) {
653 ret = PTR_ERR(wifi_pkg);653 ret = -EINVAL;
654 goto out_free;654 goto out_free;
655 }655 }
656 656
@@ -707,7 +707,7 @@ int iwl_sar_get_ewrd_table(struct iwl_fw_runtime *fwrt) · 50 unmodified lines
707 &tbl_rev);707 &tbl_rev);
708 if (!IS_ERR(wifi_pkg)) {708 if (!IS_ERR(wifi_pkg)) {
709 if (tbl_rev != 2) {709 if (tbl_rev != 2) {
710 ret = PTR_ERR(wifi_pkg);710 ret = -EINVAL;
711 goto out_free;711 goto out_free;
712 }712 }
713 713
@@ -723,7 +723,7 @@ int iwl_sar_get_ewrd_table(struct iwl_fw_runtime *fwrt) · 9 unmodified lines
723 &tbl_rev);723 &tbl_rev);
724 if (!IS_ERR(wifi_pkg)) {724 if (!IS_ERR(wifi_pkg)) {
725 if (tbl_rev != 1) {725 if (tbl_rev != 1) {
726 ret = PTR_ERR(wifi_pkg);726 ret = -EINVAL;
727 goto out_free;727 goto out_free;
728 }728 }
729 729
@@ -739,7 +739,7 @@ int iwl_sar_get_ewrd_table(struct iwl_fw_runtime *fwrt) · 9 unmodified lines
739 &tbl_rev);739 &tbl_rev);
740 if (!IS_ERR(wifi_pkg)) {740 if (!IS_ERR(wifi_pkg)) {
741 if (tbl_rev != 0) {741 if (tbl_rev != 0) {
742 ret = PTR_ERR(wifi_pkg);742 ret = -EINVAL;
743 goto out_free;743 goto out_free;
744 }744 }
745 745
@@ -1116,6 +1116,9 @@ int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt) · 370 unmodified lines
1116 goto read_table;1116 goto read_table;
1117 }1117 }
1118 1118
1119 ret = PTR_ERR(wifi_pkg);
1120 goto out_free;
1121
1119read_table:1122read_table:
1120 fwrt->ppag_ver = tbl_rev;1123 fwrt->ppag_ver = tbl_rev;
1121 flags = &wifi_pkg->package.elements[1];1124 flags = &wifi_pkg->package.elements[1];
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c+3−0
@@ -3687,6 +3687,9 @@ iwl_mvm_sta_state_notexist_to_none(struct iwl_mvm *mvm, · 3686 unmodified lines
3687 NL80211_TDLS_SETUP);3687 NL80211_TDLS_SETUP);
3688 }3688 }
3689 3689
3690 if (ret)
3691 return ret;
3692
3690 for_each_sta_active_link(vif, sta, link_sta, i)3693 for_each_sta_active_link(vif, sta, link_sta, i)
3691 link_sta->agg.max_rc_amsdu_len = 1;3694 link_sta->agg.max_rc_amsdu_len = 1;
3692 3695
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c+4−0
@@ -505,6 +505,10 @@ static bool iwl_mvm_is_dup(struct ieee80211_sta *sta, int queue, · 504 unmodified lines
505 return false;505 return false;
506 506
507 mvm_sta = iwl_mvm_sta_from_mac80211(sta);507 mvm_sta = iwl_mvm_sta_from_mac80211(sta);
508
509 if (WARN_ON_ONCE(!mvm_sta->dup_data))
510 return false;
511
508 dup_data = &mvm_sta->dup_data[queue];512 dup_data = &mvm_sta->dup_data[queue];
509 513
510 /*514 /*
drivers/net/wireless/intel/iwlwifi/mvm/time-event.c+2−1
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2/*2/*
3 * Copyright (C) 2012-2014, 2018-2023 Intel Corporation3 * Copyright (C) 2012-2014, 2018-2024 Intel Corporation
4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5 * Copyright (C) 2017 Intel Deutschland GmbH5 * Copyright (C) 2017 Intel Deutschland GmbH
6 */6 */
@@ -972,6 +972,7 @@ void iwl_mvm_rx_session_protect_notif(struct iwl_mvm *mvm, · 965 unmodified lines
972 if (!le32_to_cpu(notif->status) || !le32_to_cpu(notif->start)) {972 if (!le32_to_cpu(notif->status) || !le32_to_cpu(notif->start)) {
973 /* End TE, notify mac80211 */973 /* End TE, notify mac80211 */
974 mvmvif->time_event_data.id = SESSION_PROTECT_CONF_MAX_ID;974 mvmvif->time_event_data.id = SESSION_PROTECT_CONF_MAX_ID;
975 mvmvif->time_event_data.link_id = -1;
975 iwl_mvm_p2p_roc_finished(mvm);976 iwl_mvm_p2p_roc_finished(mvm);
976 ieee80211_remain_on_channel_expired(mvm->hw);977 ieee80211_remain_on_channel_expired(mvm->hw);
977 } else if (le32_to_cpu(notif->start)) {978 } else if (le32_to_cpu(notif->start)) {
drivers/net/wireless/intel/iwlwifi/mvm/tx.c+59−10
@@ -520,13 +520,24 @@ static void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm, · 519 unmodified lines
520 }520 }
521}521}
522 522
523static void iwl_mvm_copy_hdr(void *cmd, const void *hdr, int hdrlen,
524 const u8 *addr3_override)
525{
526 struct ieee80211_hdr *out_hdr = cmd;
527
528 memcpy(cmd, hdr, hdrlen);
529 if (addr3_override)
530 memcpy(out_hdr->addr3, addr3_override, ETH_ALEN);
531}
532
523/*533/*
524 * Allocates and sets the Tx cmd the driver data pointers in the skb534 * Allocates and sets the Tx cmd the driver data pointers in the skb
525 */535 */
526static struct iwl_device_tx_cmd *536static struct iwl_device_tx_cmd *
527iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb,537iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb,
528 struct ieee80211_tx_info *info, int hdrlen,538 struct ieee80211_tx_info *info, int hdrlen,
529 struct ieee80211_sta *sta, u8 sta_id)539 struct ieee80211_sta *sta, u8 sta_id,
540 const u8 *addr3_override)
530{541{
531 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;542 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
532 struct iwl_device_tx_cmd *dev_cmd;543 struct iwl_device_tx_cmd *dev_cmd;
@@ -584,7 +595,7 @@ iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb, · 51 unmodified lines
584 cmd->len = cpu_to_le16((u16)skb->len);595 cmd->len = cpu_to_le16((u16)skb->len);
585 596
586 /* Copy MAC header from skb into command buffer */597 /* Copy MAC header from skb into command buffer */
587 memcpy(cmd->hdr, hdr, hdrlen);598 iwl_mvm_copy_hdr(cmd->hdr, hdr, hdrlen, addr3_override);
588 599
589 cmd->flags = cpu_to_le16(flags);600 cmd->flags = cpu_to_le16(flags);
590 cmd->rate_n_flags = cpu_to_le32(rate_n_flags);601 cmd->rate_n_flags = cpu_to_le32(rate_n_flags);
@@ -599,7 +610,7 @@ iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb, · 8 unmodified lines
599 cmd->len = cpu_to_le16((u16)skb->len);610 cmd->len = cpu_to_le16((u16)skb->len);
600 611
601 /* Copy MAC header from skb into command buffer */612 /* Copy MAC header from skb into command buffer */
602 memcpy(cmd->hdr, hdr, hdrlen);613 iwl_mvm_copy_hdr(cmd->hdr, hdr, hdrlen, addr3_override);
603 614
604 cmd->flags = cpu_to_le32(flags);615 cmd->flags = cpu_to_le32(flags);
605 cmd->rate_n_flags = cpu_to_le32(rate_n_flags);616 cmd->rate_n_flags = cpu_to_le32(rate_n_flags);
@@ -617,7 +628,7 @@ iwl_mvm_set_tx_params(struct iwl_mvm *mvm, struct sk_buff *skb, · 11 unmodified lines
617 iwl_mvm_set_tx_cmd_rate(mvm, tx_cmd, info, sta, hdr->frame_control);628 iwl_mvm_set_tx_cmd_rate(mvm, tx_cmd, info, sta, hdr->frame_control);
618 629
619 /* Copy MAC header from skb into command buffer */630 /* Copy MAC header from skb into command buffer */
620 memcpy(tx_cmd->hdr, hdr, hdrlen);631 iwl_mvm_copy_hdr(tx_cmd->hdr, hdr, hdrlen, addr3_override);
621 632
622out:633out:
623 return dev_cmd;634 return dev_cmd;
@@ -820,7 +831,8 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb) · 196 unmodified lines
820 831
821 IWL_DEBUG_TX(mvm, "station Id %d, queue=%d\n", sta_id, queue);832 IWL_DEBUG_TX(mvm, "station Id %d, queue=%d\n", sta_id, queue);
822 833
823 dev_cmd = iwl_mvm_set_tx_params(mvm, skb, &info, hdrlen, NULL, sta_id);834 dev_cmd = iwl_mvm_set_tx_params(mvm, skb, &info, hdrlen, NULL, sta_id,
835 NULL);
824 if (!dev_cmd)836 if (!dev_cmd)
825 return -1;837 return -1;
826 838
@@ -1140,7 +1152,8 @@ static int iwl_mvm_tx_pkt_queued(struct iwl_mvm *mvm, · 313 unmodified lines
1140 */1152 */
1141static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,1153static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb,
1142 struct ieee80211_tx_info *info,1154 struct ieee80211_tx_info *info,
1143 struct ieee80211_sta *sta)1155 struct ieee80211_sta *sta,
1156 const u8 *addr3_override)
1144{1157{
1145 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;1158 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
1146 struct iwl_mvm_sta *mvmsta;1159 struct iwl_mvm_sta *mvmsta;
@@ -1172,7 +1185,8 @@ static int iwl_mvm_tx_mpdu(struct iwl_mvm *mvm, struct sk_buff *skb, · 25 unmodified lines
1172 iwl_mvm_probe_resp_set_noa(mvm, skb);1185 iwl_mvm_probe_resp_set_noa(mvm, skb);
1173 1186
1174 dev_cmd = iwl_mvm_set_tx_params(mvm, skb, info, hdrlen,1187 dev_cmd = iwl_mvm_set_tx_params(mvm, skb, info, hdrlen,
1175 sta, mvmsta->deflink.sta_id);1188 sta, mvmsta->deflink.sta_id,
1189 addr3_override);
1176 if (!dev_cmd)1190 if (!dev_cmd)
1177 goto drop;1191 goto drop;
1178 1192
@@ -1294,9 +1308,11 @@ int iwl_mvm_tx_skb_sta(struct iwl_mvm *mvm, struct sk_buff *skb, · 115 unmodified lines
1294 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);1308 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
1295 struct ieee80211_tx_info info;1309 struct ieee80211_tx_info info;
1296 struct sk_buff_head mpdus_skbs;1310 struct sk_buff_head mpdus_skbs;
1311 struct ieee80211_vif *vif;
1297 unsigned int payload_len;1312 unsigned int payload_len;
1298 int ret;1313 int ret;
1299 struct sk_buff *orig_skb = skb;1314 struct sk_buff *orig_skb = skb;
1315 const u8 *addr3;
1300 1316
1301 if (WARN_ON_ONCE(!mvmsta))1317 if (WARN_ON_ONCE(!mvmsta))
1302 return -1;1318 return -1;
@@ -1307,26 +1323,59 @@ int iwl_mvm_tx_skb_sta(struct iwl_mvm *mvm, struct sk_buff *skb, · 4 unmodified lines
1307 memcpy(&info, skb->cb, sizeof(info));1323 memcpy(&info, skb->cb, sizeof(info));
1308 1324
1309 if (!skb_is_gso(skb))1325 if (!skb_is_gso(skb))
1310 return iwl_mvm_tx_mpdu(mvm, skb, &info, sta);1326 return iwl_mvm_tx_mpdu(mvm, skb, &info, sta, NULL);
1311 1327
1312 payload_len = skb_tail_pointer(skb) - skb_transport_header(skb) -1328 payload_len = skb_tail_pointer(skb) - skb_transport_header(skb) -
1313 tcp_hdrlen(skb) + skb->data_len;1329 tcp_hdrlen(skb) + skb->data_len;
1314 1330
1315 if (payload_len <= skb_shinfo(skb)->gso_size)1331 if (payload_len <= skb_shinfo(skb)->gso_size)
1316 return iwl_mvm_tx_mpdu(mvm, skb, &info, sta);1332 return iwl_mvm_tx_mpdu(mvm, skb, &info, sta, NULL);
1317 1333
1318 __skb_queue_head_init(&mpdus_skbs);1334 __skb_queue_head_init(&mpdus_skbs);
1319 1335
1336 vif = info.control.vif;
1337 if (!vif)
1338 return -1;
1339
1320 ret = iwl_mvm_tx_tso(mvm, skb, &info, sta, &mpdus_skbs);1340 ret = iwl_mvm_tx_tso(mvm, skb, &info, sta, &mpdus_skbs);
1321 if (ret)1341 if (ret)
1322 return ret;1342 return ret;
1323 1343
1324 WARN_ON(skb_queue_empty(&mpdus_skbs));1344 WARN_ON(skb_queue_empty(&mpdus_skbs));
1325 1345
1346 /*
1347 * As described in IEEE sta 802.11-2020, table 9-30 (Address
1348 * field contents), A-MSDU address 3 should contain the BSSID
1349 * address.
1350 * Pass address 3 down to iwl_mvm_tx_mpdu() and further to set it
1351 * in the command header. We need to preserve the original
1352 * address 3 in the skb header to correctly create all the
1353 * A-MSDU subframe headers from it.
1354 */
1355 switch (vif->type) {
1356 case NL80211_IFTYPE_STATION:
1357 addr3 = vif->cfg.ap_addr;
1358 break;
1359 case NL80211_IFTYPE_AP:
1360 addr3 = vif->addr;
1361 break;
1362 default:
1363 addr3 = NULL;
1364 break;
1365 }
1366
1326 while (!skb_queue_empty(&mpdus_skbs)) {1367 while (!skb_queue_empty(&mpdus_skbs)) {
1368 struct ieee80211_hdr *hdr;
1369 bool amsdu;
1370
1327 skb = __skb_dequeue(&mpdus_skbs);1371 skb = __skb_dequeue(&mpdus_skbs);
1372 hdr = (void *)skb->data;
1373 amsdu = ieee80211_is_data_qos(hdr->frame_control) &&
1374 (*ieee80211_get_qos_ctl(hdr) &
1375 IEEE80211_QOS_CTL_A_MSDU_PRESENT);
1328 1376
1329 ret = iwl_mvm_tx_mpdu(mvm, skb, &info, sta);1377 ret = iwl_mvm_tx_mpdu(mvm, skb, &info, sta,
1378 amsdu ? addr3 : NULL);
1330 if (ret) {1379 if (ret) {
1331 /* Free skbs created as part of TSO logic that have not yet been dequeued */1380 /* Free skbs created as part of TSO logic that have not yet been dequeued */
1332 __skb_queue_purge(&mpdus_skbs);1381 __skb_queue_purge(&mpdus_skbs);
drivers/net/xen-netback/netback.c+1−0
@@ -1778,5 +1778,6 @@ static void __exit netback_fini(void) · 1777 unmodified lines
1778}1778}
1779module_exit(netback_fini);1779module_exit(netback_fini);
1780 1780
1781MODULE_DESCRIPTION("Xen backend network device module");
1781MODULE_LICENSE("Dual BSD/GPL");1782MODULE_LICENSE("Dual BSD/GPL");
1782MODULE_ALIAS("xen-backend:vif");1783MODULE_ALIAS("xen-backend:vif");
include/linux/netdevice.h+5−5
@@ -2141,6 +2141,11 @@ struct net_device { · 2140 unmodified lines
2141 2141
2142 /* TXRX read-mostly hotpath */2142 /* TXRX read-mostly hotpath */
2143 __cacheline_group_begin(net_device_read_txrx);2143 __cacheline_group_begin(net_device_read_txrx);
2144 union {
2145 struct pcpu_lstats __percpu *lstats;
2146 struct pcpu_sw_netstats __percpu *tstats;
2147 struct pcpu_dstats __percpu *dstats;
2148 };
2144 unsigned int flags;2149 unsigned int flags;
2145 unsigned short hard_header_len;2150 unsigned short hard_header_len;
2146 netdev_features_t features;2151 netdev_features_t features;
@@ -2395,11 +2400,6 @@ struct net_device { · 248 unmodified lines
2395 enum netdev_ml_priv_type ml_priv_type;2400 enum netdev_ml_priv_type ml_priv_type;
2396 2401
2397 enum netdev_stat_type pcpu_stat_type:8;2402 enum netdev_stat_type pcpu_stat_type:8;
2398 union {
2399 struct pcpu_lstats __percpu *lstats;
2400 struct pcpu_sw_netstats __percpu *tstats;
2401 struct pcpu_dstats __percpu *dstats;
2402 };
2403 2403
2404#if IS_ENABLED(CONFIG_GARP)2404#if IS_ENABLED(CONFIG_GARP)
2405 struct garp_port __rcu *garp_port;2405 struct garp_port __rcu *garp_port;
include/linux/tcp.h+3−3
@@ -221,8 +221,10 @@ struct tcp_sock { · 220 unmodified lines
221 u32 lost_out; /* Lost packets */221 u32 lost_out; /* Lost packets */
222 u32 sacked_out; /* SACK'd packets */222 u32 sacked_out; /* SACK'd packets */
223 u16 tcp_header_len; /* Bytes of tcp header to send */223 u16 tcp_header_len; /* Bytes of tcp header to send */
224 u8 scaling_ratio; /* see tcp_win_from_space() */
224 u8 chrono_type : 2, /* current chronograph type */225 u8 chrono_type : 2, /* current chronograph type */
225 repair : 1,226 repair : 1,
227 tcp_usec_ts : 1, /* TSval values in usec */
226 is_sack_reneg:1, /* in recovery from loss with SACK reneg? */228 is_sack_reneg:1, /* in recovery from loss with SACK reneg? */
227 is_cwnd_limited:1;/* forward progress limited by snd_cwnd? */229 is_cwnd_limited:1;/* forward progress limited by snd_cwnd? */
228 __cacheline_group_end(tcp_sock_read_txrx);230 __cacheline_group_end(tcp_sock_read_txrx);
@@ -352,7 +354,6 @@ struct tcp_sock { · 123 unmodified lines
352 u32 compressed_ack_rcv_nxt;354 u32 compressed_ack_rcv_nxt;
353 struct list_head tsq_node; /* anchor in tsq_tasklet.head list */355 struct list_head tsq_node; /* anchor in tsq_tasklet.head list */
354 356
355 u8 scaling_ratio; /* see tcp_win_from_space() */
356 /* Information of the most recently (s)acked skb */357 /* Information of the most recently (s)acked skb */
357 struct tcp_rack {358 struct tcp_rack {
358 u64 mstamp; /* (Re)sent time of the skb */359 u64 mstamp; /* (Re)sent time of the skb */
@@ -368,8 +369,7 @@ struct tcp_sock { · 9 unmodified lines
368 u8 compressed_ack;369 u8 compressed_ack;
369 u8 dup_ack_counter:2,370 u8 dup_ack_counter:2,
370 tlp_retrans:1, /* TLP is a retransmission */371 tlp_retrans:1, /* TLP is a retransmission */
371 tcp_usec_ts:1, /* TSval values in usec */372 unused:5;
372 unused:4;
373 u8 thin_lto : 1,/* Use linear timeouts for thin streams */373 u8 thin_lto : 1,/* Use linear timeouts for thin streams */
374 recvmsg_inq : 1,/* Indicate # of bytes in queue upon recvmsg */374 recvmsg_inq : 1,/* Indicate # of bytes in queue upon recvmsg */
375 fastopen_connect:1, /* FASTOPEN_CONNECT sockopt */375 fastopen_connect:1, /* FASTOPEN_CONNECT sockopt */
include/net/tls.h+0−5
@@ -97,9 +97,6 @@ struct tls_sw_context_tx { · 96 unmodified lines
97 struct tls_rec *open_rec;97 struct tls_rec *open_rec;
98 struct list_head tx_list;98 struct list_head tx_list;
99 atomic_t encrypt_pending;99 atomic_t encrypt_pending;
100 /* protect crypto_wait with encrypt_pending */
101 spinlock_t encrypt_compl_lock;
102 int async_notify;
103 u8 async_capable:1;100 u8 async_capable:1;
104 101
105#define BIT_TX_SCHEDULED 0102#define BIT_TX_SCHEDULED 0
@@ -136,8 +133,6 @@ struct tls_sw_context_rx { · 30 unmodified lines
136 struct tls_strparser strp;133 struct tls_strparser strp;
137 134
138 atomic_t decrypt_pending;135 atomic_t decrypt_pending;
139 /* protect crypto_wait with decrypt_pending*/
140 spinlock_t decrypt_compl_lock;
141 struct sk_buff_head async_hold;136 struct sk_buff_head async_hold;
142 struct wait_queue_head wq;137 struct wait_queue_head wq;
143};138};
net/6lowpan/core.c+1−0
@@ -179,4 +179,5 @@ static void __exit lowpan_module_exit(void) · 178 unmodified lines
179module_init(lowpan_module_init);179module_init(lowpan_module_init);
180module_exit(lowpan_module_exit);180module_exit(lowpan_module_exit);
181 181
182MODULE_DESCRIPTION("IPv6 over Low-Power Wireless Personal Area Network core module");
182MODULE_LICENSE("GPL");183MODULE_LICENSE("GPL");
net/atm/mpc.c+1−0
@@ -1532,4 +1532,5 @@ static void __exit atm_mpoa_cleanup(void) · 1531 unmodified lines
1532module_init(atm_mpoa_init);1532module_init(atm_mpoa_init);
1533module_exit(atm_mpoa_cleanup);1533module_exit(atm_mpoa_cleanup);
1534 1534
1535MODULE_DESCRIPTION("Multi-Protocol Over ATM (MPOA) driver");
1535MODULE_LICENSE("GPL");1536MODULE_LICENSE("GPL");
net/can/j1939/j1939-priv.h+2−1
@@ -86,7 +86,7 @@ struct j1939_priv { · 85 unmodified lines
86 unsigned int tp_max_packet_size;86 unsigned int tp_max_packet_size;
87 87
88 /* lock for j1939_socks list */88 /* lock for j1939_socks list */
89 spinlock_t j1939_socks_lock;89 rwlock_t j1939_socks_lock;
90 struct list_head j1939_socks;90 struct list_head j1939_socks;
91 91
92 struct kref rx_kref;92 struct kref rx_kref;
@@ -301,6 +301,7 @@ struct j1939_sock { · 208 unmodified lines
301 301
302 int ifindex;302 int ifindex;
303 struct j1939_addr addr;303 struct j1939_addr addr;
304 spinlock_t filters_lock;
304 struct j1939_filter *filters;305 struct j1939_filter *filters;
305 int nfilters;306 int nfilters;
306 pgn_t pgn_rx_filter;307 pgn_t pgn_rx_filter;
net/can/j1939/main.c+1−1
@@ -274,7 +274,7 @@ struct j1939_priv *j1939_netdev_start(struct net_device *ndev) · 273 unmodified lines
274 return ERR_PTR(-ENOMEM);274 return ERR_PTR(-ENOMEM);
275 275
276 j1939_tp_init(priv);276 j1939_tp_init(priv);
277 spin_lock_init(&priv->j1939_socks_lock);277 rwlock_init(&priv->j1939_socks_lock);
278 INIT_LIST_HEAD(&priv->j1939_socks);278 INIT_LIST_HEAD(&priv->j1939_socks);
279 279
280 mutex_lock(&j1939_netdev_lock);280 mutex_lock(&j1939_netdev_lock);
net/can/j1939/socket.c+30−16
@@ -80,16 +80,16 @@ static void j1939_jsk_add(struct j1939_priv *priv, struct j1939_sock *jsk) · 79 unmodified lines
80 jsk->state |= J1939_SOCK_BOUND;80 jsk->state |= J1939_SOCK_BOUND;
81 j1939_priv_get(priv);81 j1939_priv_get(priv);
82 82
83 spin_lock_bh(&priv->j1939_socks_lock);83 write_lock_bh(&priv->j1939_socks_lock);
84 list_add_tail(&jsk->list, &priv->j1939_socks);84 list_add_tail(&jsk->list, &priv->j1939_socks);
85 spin_unlock_bh(&priv->j1939_socks_lock);85 write_unlock_bh(&priv->j1939_socks_lock);
86}86}
87 87
88static void j1939_jsk_del(struct j1939_priv *priv, struct j1939_sock *jsk)88static void j1939_jsk_del(struct j1939_priv *priv, struct j1939_sock *jsk)
89{89{
90 spin_lock_bh(&priv->j1939_socks_lock);90 write_lock_bh(&priv->j1939_socks_lock);
91 list_del_init(&jsk->list);91 list_del_init(&jsk->list);
92 spin_unlock_bh(&priv->j1939_socks_lock);92 write_unlock_bh(&priv->j1939_socks_lock);
93 93
94 j1939_priv_put(priv);94 j1939_priv_put(priv);
95 jsk->state &= ~J1939_SOCK_BOUND;95 jsk->state &= ~J1939_SOCK_BOUND;
@@ -262,12 +262,17 @@ static bool j1939_sk_match_dst(struct j1939_sock *jsk, · 166 unmodified lines
262static bool j1939_sk_match_filter(struct j1939_sock *jsk,262static bool j1939_sk_match_filter(struct j1939_sock *jsk,
263 const struct j1939_sk_buff_cb *skcb)263 const struct j1939_sk_buff_cb *skcb)
264{264{
265 const struct j1939_filter *f = jsk->filters;265 const struct j1939_filter *f;
266 int nfilter = jsk->nfilters;266 int nfilter;
267
268 spin_lock_bh(&jsk->filters_lock);
269
270 f = jsk->filters;
271 nfilter = jsk->nfilters;
267 272
268 if (!nfilter)273 if (!nfilter)
269 /* receive all when no filters are assigned */274 /* receive all when no filters are assigned */
270 return true;275 goto filter_match_found;
271 276
272 for (; nfilter; ++f, --nfilter) {277 for (; nfilter; ++f, --nfilter) {
273 if ((skcb->addr.pgn & f->pgn_mask) != f->pgn)278 if ((skcb->addr.pgn & f->pgn_mask) != f->pgn)
@@ -276,9 +281,15 @@ static bool j1939_sk_match_filter(struct j1939_sock *jsk, · 2 unmodified lines
276 continue;281 continue;
277 if ((skcb->addr.src_name & f->name_mask) != f->name)282 if ((skcb->addr.src_name & f->name_mask) != f->name)
278 continue;283 continue;
279 return true;284 goto filter_match_found;
280 }285 }
286
287 spin_unlock_bh(&jsk->filters_lock);
281 return false;288 return false;
289
290filter_match_found:
291 spin_unlock_bh(&jsk->filters_lock);
292 return true;
282}293}
283 294
284static bool j1939_sk_recv_match_one(struct j1939_sock *jsk,295static bool j1939_sk_recv_match_one(struct j1939_sock *jsk,
@@ -329,13 +340,13 @@ bool j1939_sk_recv_match(struct j1939_priv *priv, struct j1939_sk_buff_cb *skcb) · 44 unmodified lines
329 struct j1939_sock *jsk;340 struct j1939_sock *jsk;
330 bool match = false;341 bool match = false;
331 342
332 spin_lock_bh(&priv->j1939_socks_lock);343 read_lock_bh(&priv->j1939_socks_lock);
333 list_for_each_entry(jsk, &priv->j1939_socks, list) {344 list_for_each_entry(jsk, &priv->j1939_socks, list) {
334 match = j1939_sk_recv_match_one(jsk, skcb);345 match = j1939_sk_recv_match_one(jsk, skcb);
335 if (match)346 if (match)
336 break;347 break;
337 }348 }
338 spin_unlock_bh(&priv->j1939_socks_lock);349 read_unlock_bh(&priv->j1939_socks_lock);
339 350
340 return match;351 return match;
341}352}
@@ -344,11 +355,11 @@ void j1939_sk_recv(struct j1939_priv *priv, struct sk_buff *skb) · 2 unmodified lines
344{355{
345 struct j1939_sock *jsk;356 struct j1939_sock *jsk;
346 357
347 spin_lock_bh(&priv->j1939_socks_lock);358 read_lock_bh(&priv->j1939_socks_lock);
348 list_for_each_entry(jsk, &priv->j1939_socks, list) {359 list_for_each_entry(jsk, &priv->j1939_socks, list) {
349 j1939_sk_recv_one(jsk, skb);360 j1939_sk_recv_one(jsk, skb);
350 }361 }
351 spin_unlock_bh(&priv->j1939_socks_lock);362 read_unlock_bh(&priv->j1939_socks_lock);
352}363}
353 364
354static void j1939_sk_sock_destruct(struct sock *sk)365static void j1939_sk_sock_destruct(struct sock *sk)
@@ -401,6 +412,7 @@ static int j1939_sk_init(struct sock *sk) · 46 unmodified lines
401 atomic_set(&jsk->skb_pending, 0);412 atomic_set(&jsk->skb_pending, 0);
402 spin_lock_init(&jsk->sk_session_queue_lock);413 spin_lock_init(&jsk->sk_session_queue_lock);
403 INIT_LIST_HEAD(&jsk->sk_session_queue);414 INIT_LIST_HEAD(&jsk->sk_session_queue);
415 spin_lock_init(&jsk->filters_lock);
404 416
405 /* j1939_sk_sock_destruct() depends on SOCK_RCU_FREE flag */417 /* j1939_sk_sock_destruct() depends on SOCK_RCU_FREE flag */
406 sock_set_flag(sk, SOCK_RCU_FREE);418 sock_set_flag(sk, SOCK_RCU_FREE);
@@ -703,9 +715,11 @@ static int j1939_sk_setsockopt(struct socket *sock, int level, int optname, · 296 unmodified lines
703 }715 }
704 716
705 lock_sock(&jsk->sk);717 lock_sock(&jsk->sk);
718 spin_lock_bh(&jsk->filters_lock);
706 ofilters = jsk->filters;719 ofilters = jsk->filters;
707 jsk->filters = filters;720 jsk->filters = filters;
708 jsk->nfilters = count;721 jsk->nfilters = count;
722 spin_unlock_bh(&jsk->filters_lock);
709 release_sock(&jsk->sk);723 release_sock(&jsk->sk);
710 kfree(ofilters);724 kfree(ofilters);
711 return 0;725 return 0;
@@ -1080,12 +1094,12 @@ void j1939_sk_errqueue(struct j1939_session *session, · 368 unmodified lines
1080 }1094 }
1081 1095
1082 /* spread RX notifications to all sockets subscribed to this session */1096 /* spread RX notifications to all sockets subscribed to this session */
1083 spin_lock_bh(&priv->j1939_socks_lock);1097 read_lock_bh(&priv->j1939_socks_lock);
1084 list_for_each_entry(jsk, &priv->j1939_socks, list) {1098 list_for_each_entry(jsk, &priv->j1939_socks, list) {
1085 if (j1939_sk_recv_match_one(jsk, &session->skcb))1099 if (j1939_sk_recv_match_one(jsk, &session->skcb))
1086 __j1939_sk_errqueue(session, &jsk->sk, type);1100 __j1939_sk_errqueue(session, &jsk->sk, type);
1087 }1101 }
1088 spin_unlock_bh(&priv->j1939_socks_lock);1102 read_unlock_bh(&priv->j1939_socks_lock);
1089};1103};
1090 1104
1091void j1939_sk_send_loop_abort(struct sock *sk, int err)1105void j1939_sk_send_loop_abort(struct sock *sk, int err)
@@ -1273,7 +1287,7 @@ void j1939_sk_netdev_event_netdown(struct j1939_priv *priv) · 181 unmodified lines
1273 struct j1939_sock *jsk;1287 struct j1939_sock *jsk;
1274 int error_code = ENETDOWN;1288 int error_code = ENETDOWN;
1275 1289
1276 spin_lock_bh(&priv->j1939_socks_lock);1290 read_lock_bh(&priv->j1939_socks_lock);
1277 list_for_each_entry(jsk, &priv->j1939_socks, list) {1291 list_for_each_entry(jsk, &priv->j1939_socks, list) {
1278 jsk->sk.sk_err = error_code;1292 jsk->sk.sk_err = error_code;
1279 if (!sock_flag(&jsk->sk, SOCK_DEAD))1293 if (!sock_flag(&jsk->sk, SOCK_DEAD))
@@ -1281,7 +1295,7 @@ void j1939_sk_netdev_event_netdown(struct j1939_priv *priv) · 1 unmodified line
1281 1295
1282 j1939_sk_queue_drop_all(priv, jsk, error_code);1296 j1939_sk_queue_drop_all(priv, jsk, error_code);
1283 }1297 }
1284 spin_unlock_bh(&priv->j1939_socks_lock);1298 read_unlock_bh(&priv->j1939_socks_lock);
1285}1299}
1286 1300
1287static int j1939_sk_no_ioctlcmd(struct socket *sock, unsigned int cmd,1301static int j1939_sk_no_ioctlcmd(struct socket *sock, unsigned int cmd,
net/core/dev.c+3−2
@@ -336,7 +336,7 @@ int netdev_name_node_alt_create(struct net_device *dev, const char *name) · 335 unmodified lines
336 return -ENOMEM;336 return -ENOMEM;
337 netdev_name_node_add(net, name_node);337 netdev_name_node_add(net, name_node);
338 /* The node that holds dev->name acts as a head of per-device list. */338 /* The node that holds dev->name acts as a head of per-device list. */
339 list_add_tail(&name_node->list, &dev->name_node->list);339 list_add_tail_rcu(&name_node->list, &dev->name_node->list);
340 340
341 return 0;341 return 0;
342}342}
@@ -11652,11 +11652,12 @@ static void __init net_dev_struct_check(void) · 11309 unmodified lines
11652 CACHELINE_ASSERT_GROUP_SIZE(struct net_device, net_device_read_tx, 160);11652 CACHELINE_ASSERT_GROUP_SIZE(struct net_device, net_device_read_tx, 160);
11653 11653
11654 /* TXRX read-mostly hotpath */11654 /* TXRX read-mostly hotpath */
11655 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, lstats);
11655 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, flags);11656 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, flags);
11656 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, hard_header_len);11657 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, hard_header_len);
11657 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, features);11658 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, features);
11658 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, ip6_ptr);11659 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_txrx, ip6_ptr);
11659 CACHELINE_ASSERT_GROUP_SIZE(struct net_device, net_device_read_txrx, 30);11660 CACHELINE_ASSERT_GROUP_SIZE(struct net_device, net_device_read_txrx, 38);
11660 11661
11661 /* RX read-mostly hotpath */11662 /* RX read-mostly hotpath */
11662 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_rx, ptype_specific);11663 CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_rx, ptype_specific);
net/core/rtnetlink.c+9−6
@@ -1020,14 +1020,17 @@ static size_t rtnl_xdp_size(void) · 1019 unmodified lines
1020static size_t rtnl_prop_list_size(const struct net_device *dev)1020static size_t rtnl_prop_list_size(const struct net_device *dev)
1021{1021{
1022 struct netdev_name_node *name_node;1022 struct netdev_name_node *name_node;
1023 size_t size;1023 unsigned int cnt = 0;
1024
1025 rcu_read_lock();
1026 list_for_each_entry_rcu(name_node, &dev->name_node->list, list)
1027 cnt++;
1028 rcu_read_unlock();
1024 1029
1025 if (list_empty(&dev->name_node->list))1030 if (!cnt)
1026 return 0;1031 return 0;
1027 size = nla_total_size(0);1032
1028 list_for_each_entry(name_node, &dev->name_node->list, list)1033 return nla_total_size(0) + cnt * nla_total_size(ALTIFNAMSIZ);
1029 size += nla_total_size(ALTIFNAMSIZ);
1030 return size;
1031}1034}
1032 1035
1033static size_t rtnl_proto_down_size(const struct net_device *dev)1036static size_t rtnl_proto_down_size(const struct net_device *dev)
net/handshake/handshake-test.c+4−1
@@ -471,7 +471,10 @@ static void handshake_req_destroy_test1(struct kunit *test) · 470 unmodified lines
471 handshake_req_cancel(sock->sk);471 handshake_req_cancel(sock->sk);
472 472
473 /* Act */473 /* Act */
474 fput(filp);474 /* Ensure the close/release/put process has run to
475 * completion before checking the result.
476 */
477 __fput_sync(filp);
475 478
476 /* Assert */479 /* Assert */
477 KUNIT_EXPECT_PTR_EQ(test, handshake_req_destroy_test, req);480 KUNIT_EXPECT_PTR_EQ(test, handshake_req_destroy_test, req);
net/ipv4/ah4.c+1−0
@@ -597,5 +597,6 @@ static void __exit ah4_fini(void) · 596 unmodified lines
597 597
598module_init(ah4_init);598module_init(ah4_init);
599module_exit(ah4_fini);599module_exit(ah4_fini);
600MODULE_DESCRIPTION("IPv4 AH transformation library");
600MODULE_LICENSE("GPL");601MODULE_LICENSE("GPL");
601MODULE_ALIAS_XFRM_TYPE(AF_INET, XFRM_PROTO_AH);602MODULE_ALIAS_XFRM_TYPE(AF_INET, XFRM_PROTO_AH);
net/ipv4/esp4.c+1−0
@@ -1247,5 +1247,6 @@ static void __exit esp4_fini(void) · 1246 unmodified lines
1247 1247
1248module_init(esp4_init);1248module_init(esp4_init);
1249module_exit(esp4_fini);1249module_exit(esp4_fini);
1250MODULE_DESCRIPTION("IPv4 ESP transformation library");
1250MODULE_LICENSE("GPL");1251MODULE_LICENSE("GPL");
1251MODULE_ALIAS_XFRM_TYPE(AF_INET, XFRM_PROTO_ESP);1252MODULE_ALIAS_XFRM_TYPE(AF_INET, XFRM_PROTO_ESP);
net/ipv4/ip_gre.c+1−0
@@ -1793,6 +1793,7 @@ static void __exit ipgre_fini(void) · 1792 unmodified lines
1793 1793
1794module_init(ipgre_init);1794module_init(ipgre_init);
1795module_exit(ipgre_fini);1795module_exit(ipgre_fini);
1796MODULE_DESCRIPTION("IPv4 GRE tunnels over IP library");
1796MODULE_LICENSE("GPL");1797MODULE_LICENSE("GPL");
1797MODULE_ALIAS_RTNL_LINK("gre");1798MODULE_ALIAS_RTNL_LINK("gre");
1798MODULE_ALIAS_RTNL_LINK("gretap");1799MODULE_ALIAS_RTNL_LINK("gretap");
net/ipv4/ip_output.c+8−5
@@ -972,8 +972,8 @@ static int __ip_append_data(struct sock *sk, · 971 unmodified lines
972 unsigned int maxfraglen, fragheaderlen, maxnonfragsize;972 unsigned int maxfraglen, fragheaderlen, maxnonfragsize;
973 int csummode = CHECKSUM_NONE;973 int csummode = CHECKSUM_NONE;
974 struct rtable *rt = (struct rtable *)cork->dst;974 struct rtable *rt = (struct rtable *)cork->dst;
975 bool paged, hold_tskey, extra_uref = false;
975 unsigned int wmem_alloc_delta = 0;976 unsigned int wmem_alloc_delta = 0;
976 bool paged, extra_uref = false;
977 u32 tskey = 0;977 u32 tskey = 0;
978 978
979 skb = skb_peek_tail(queue);979 skb = skb_peek_tail(queue);
@@ -982,10 +982,6 @@ static int __ip_append_data(struct sock *sk, · 2 unmodified lines
982 mtu = cork->gso_size ? IP_MAX_MTU : cork->fragsize;982 mtu = cork->gso_size ? IP_MAX_MTU : cork->fragsize;
983 paged = !!cork->gso_size;983 paged = !!cork->gso_size;
984 984
985 if (cork->tx_flags & SKBTX_ANY_TSTAMP &&
986 READ_ONCE(sk->sk_tsflags) & SOF_TIMESTAMPING_OPT_ID)
987 tskey = atomic_inc_return(&sk->sk_tskey) - 1;
988
989 hh_len = LL_RESERVED_SPACE(rt->dst.dev);985 hh_len = LL_RESERVED_SPACE(rt->dst.dev);
990 986
991 fragheaderlen = sizeof(struct iphdr) + (opt ? opt->optlen : 0);987 fragheaderlen = sizeof(struct iphdr) + (opt ? opt->optlen : 0);
@@ -1052,6 +1048,11 @@ static int __ip_append_data(struct sock *sk, · 60 unmodified lines
1052 1048
1053 cork->length += length;1049 cork->length += length;
1054 1050
1051 hold_tskey = cork->tx_flags & SKBTX_ANY_TSTAMP &&
1052 READ_ONCE(sk->sk_tsflags) & SOF_TIMESTAMPING_OPT_ID;
1053 if (hold_tskey)
1054 tskey = atomic_inc_return(&sk->sk_tskey) - 1;
1055
1055 /* So, what's going on in the loop below?1056 /* So, what's going on in the loop below?
1056 *1057 *
1057 * We use calculated fragment length to generate chained skb,1058 * We use calculated fragment length to generate chained skb,
@@ -1274,6 +1275,8 @@ error: · 216 unmodified lines
1274 cork->length -= length;1275 cork->length -= length;
1275 IP_INC_STATS(sock_net(sk), IPSTATS_MIB_OUTDISCARDS);1276 IP_INC_STATS(sock_net(sk), IPSTATS_MIB_OUTDISCARDS);
1276 refcount_add(wmem_alloc_delta, &sk->sk_wmem_alloc);1277 refcount_add(wmem_alloc_delta, &sk->sk_wmem_alloc);
1278 if (hold_tskey)
1279 atomic_dec(&sk->sk_tskey);
1277 return err;1280 return err;
1278}1281}
1279 1282
net/ipv4/ip_tunnel.c+1−0
@@ -1298,4 +1298,5 @@ void ip_tunnel_setup(struct net_device *dev, unsigned int net_id) · 1297 unmodified lines
1298}1298}
1299EXPORT_SYMBOL_GPL(ip_tunnel_setup);1299EXPORT_SYMBOL_GPL(ip_tunnel_setup);
1300 1300
1301MODULE_DESCRIPTION("IPv4 tunnel implementation library");
1301MODULE_LICENSE("GPL");1302MODULE_LICENSE("GPL");
net/ipv4/ip_vti.c+1−0
@@ -721,6 +721,7 @@ static void __exit vti_fini(void) · 720 unmodified lines
721 721
722module_init(vti_init);722module_init(vti_init);
723module_exit(vti_fini);723module_exit(vti_fini);
724MODULE_DESCRIPTION("Virtual (secure) IP tunneling library");
724MODULE_LICENSE("GPL");725MODULE_LICENSE("GPL");
725MODULE_ALIAS_RTNL_LINK("vti");726MODULE_ALIAS_RTNL_LINK("vti");
726MODULE_ALIAS_NETDEV("ip_vti0");727MODULE_ALIAS_NETDEV("ip_vti0");
net/ipv4/ipip.c+1−0
@@ -658,6 +658,7 @@ static void __exit ipip_fini(void) · 657 unmodified lines
658 658
659module_init(ipip_init);659module_init(ipip_init);
660module_exit(ipip_fini);660module_exit(ipip_fini);
661MODULE_DESCRIPTION("IP/IP protocol decoder library");
661MODULE_LICENSE("GPL");662MODULE_LICENSE("GPL");
662MODULE_ALIAS_RTNL_LINK("ipip");663MODULE_ALIAS_RTNL_LINK("ipip");
663MODULE_ALIAS_NETDEV("tunl0");664MODULE_ALIAS_NETDEV("tunl0");
net/ipv4/tcp.c+2−1
@@ -4615,7 +4615,8 @@ static void __init tcp_struct_check(void) · 4614 unmodified lines
4615 CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_read_txrx, prr_out);4615 CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_read_txrx, prr_out);
4616 CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_read_txrx, lost_out);4616 CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_read_txrx, lost_out);
4617 CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_read_txrx, sacked_out);4617 CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_read_txrx, sacked_out);
4618 CACHELINE_ASSERT_GROUP_SIZE(struct tcp_sock, tcp_sock_read_txrx, 31);4618 CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_read_txrx, scaling_ratio);
4619 CACHELINE_ASSERT_GROUP_SIZE(struct tcp_sock, tcp_sock_read_txrx, 32);
4619 4620
4620 /* RX read-mostly hotpath cache lines */4621 /* RX read-mostly hotpath cache lines */
4621 CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_read_rx, copied_seq);4622 CACHELINE_ASSERT_GROUP_MEMBER(struct tcp_sock, tcp_sock_read_rx, copied_seq);
net/ipv4/tunnel4.c+1−0
@@ -294,4 +294,5 @@ static void __exit tunnel4_fini(void) · 293 unmodified lines
294 294
295module_init(tunnel4_init);295module_init(tunnel4_init);
296module_exit(tunnel4_fini);296module_exit(tunnel4_fini);
297MODULE_DESCRIPTION("IPv4 XFRM tunnel library");
297MODULE_LICENSE("GPL");298MODULE_LICENSE("GPL");
net/ipv4/udp_tunnel_core.c+1−0
@@ -253,4 +253,5 @@ struct rtable *udp_tunnel_dst_lookup(struct sk_buff *skb, · 252 unmodified lines
253}253}
254EXPORT_SYMBOL_GPL(udp_tunnel_dst_lookup);254EXPORT_SYMBOL_GPL(udp_tunnel_dst_lookup);
255 255
256MODULE_DESCRIPTION("IPv4 Foo over UDP tunnel driver");
256MODULE_LICENSE("GPL");257MODULE_LICENSE("GPL");
net/ipv4/xfrm4_tunnel.c+1−0
@@ -114,5 +114,6 @@ static void __exit ipip_fini(void) · 113 unmodified lines
114 114
115module_init(ipip_init);115module_init(ipip_init);
116module_exit(ipip_fini);116module_exit(ipip_fini);
117MODULE_DESCRIPTION("IPv4 XFRM tunnel driver");
117MODULE_LICENSE("GPL");118MODULE_LICENSE("GPL");
118MODULE_ALIAS_XFRM_TYPE(AF_INET, XFRM_PROTO_IPIP);119MODULE_ALIAS_XFRM_TYPE(AF_INET, XFRM_PROTO_IPIP);
net/ipv6/ah6.c+1−0
@@ -800,5 +800,6 @@ static void __exit ah6_fini(void) · 799 unmodified lines
800module_init(ah6_init);800module_init(ah6_init);
801module_exit(ah6_fini);801module_exit(ah6_fini);
802 802
803MODULE_DESCRIPTION("IPv6 AH transformation helpers");
803MODULE_LICENSE("GPL");804MODULE_LICENSE("GPL");
804MODULE_ALIAS_XFRM_TYPE(AF_INET6, XFRM_PROTO_AH);805MODULE_ALIAS_XFRM_TYPE(AF_INET6, XFRM_PROTO_AH);
net/ipv6/esp6.c+1−0
@@ -1301,5 +1301,6 @@ static void __exit esp6_fini(void) · 1300 unmodified lines
1301module_init(esp6_init);1301module_init(esp6_init);
1302module_exit(esp6_fini);1302module_exit(esp6_fini);
1303 1303
1304MODULE_DESCRIPTION("IPv6 ESP transformation helpers");
1304MODULE_LICENSE("GPL");1305MODULE_LICENSE("GPL");
1305MODULE_ALIAS_XFRM_TYPE(AF_INET6, XFRM_PROTO_ESP);1306MODULE_ALIAS_XFRM_TYPE(AF_INET6, XFRM_PROTO_ESP);
net/ipv6/ip6_output.c+8−5
@@ -1424,11 +1424,11 @@ static int __ip6_append_data(struct sock *sk, · 1423 unmodified lines
1424 bool zc = false;1424 bool zc = false;
1425 u32 tskey = 0;1425 u32 tskey = 0;
1426 struct rt6_info *rt = (struct rt6_info *)cork->dst;1426 struct rt6_info *rt = (struct rt6_info *)cork->dst;
1427 bool paged, hold_tskey, extra_uref = false;
1427 struct ipv6_txoptions *opt = v6_cork->opt;1428 struct ipv6_txoptions *opt = v6_cork->opt;
1428 int csummode = CHECKSUM_NONE;1429 int csummode = CHECKSUM_NONE;
1429 unsigned int maxnonfragsize, headersize;1430 unsigned int maxnonfragsize, headersize;
1430 unsigned int wmem_alloc_delta = 0;1431 unsigned int wmem_alloc_delta = 0;
1431 bool paged, extra_uref = false;
1432 1432
1433 skb = skb_peek_tail(queue);1433 skb = skb_peek_tail(queue);
1434 if (!skb) {1434 if (!skb) {
@@ -1440,10 +1440,6 @@ static int __ip6_append_data(struct sock *sk, · 5 unmodified lines
1440 mtu = cork->gso_size ? IP6_MAX_MTU : cork->fragsize;1440 mtu = cork->gso_size ? IP6_MAX_MTU : cork->fragsize;
1441 orig_mtu = mtu;1441 orig_mtu = mtu;
1442 1442
1443 if (cork->tx_flags & SKBTX_ANY_TSTAMP &&
1444 READ_ONCE(sk->sk_tsflags) & SOF_TIMESTAMPING_OPT_ID)
1445 tskey = atomic_inc_return(&sk->sk_tskey) - 1;
1446
1447 hh_len = LL_RESERVED_SPACE(rt->dst.dev);1443 hh_len = LL_RESERVED_SPACE(rt->dst.dev);
1448 1444
1449 fragheaderlen = sizeof(struct ipv6hdr) + rt->rt6i_nfheader_len +1445 fragheaderlen = sizeof(struct ipv6hdr) + rt->rt6i_nfheader_len +
@@ -1538,6 +1534,11 @@ emsgsize: · 88 unmodified lines
1538 flags &= ~MSG_SPLICE_PAGES;1534 flags &= ~MSG_SPLICE_PAGES;
1539 }1535 }
1540 1536
1537 hold_tskey = cork->tx_flags & SKBTX_ANY_TSTAMP &&
1538 READ_ONCE(sk->sk_tsflags) & SOF_TIMESTAMPING_OPT_ID;
1539 if (hold_tskey)
1540 tskey = atomic_inc_return(&sk->sk_tskey) - 1;
1541
1541 /*1542 /*
1542 * Let's try using as much space as possible.1543 * Let's try using as much space as possible.
1543 * Use MTU if total length of the message fits into the MTU.1544 * Use MTU if total length of the message fits into the MTU.
@@ -1794,6 +1795,8 @@ error: · 250 unmodified lines
1794 cork->length -= length;1795 cork->length -= length;
1795 IP6_INC_STATS(sock_net(sk), rt->rt6i_idev, IPSTATS_MIB_OUTDISCARDS);1796 IP6_INC_STATS(sock_net(sk), rt->rt6i_idev, IPSTATS_MIB_OUTDISCARDS);
1796 refcount_add(wmem_alloc_delta, &sk->sk_wmem_alloc);1797 refcount_add(wmem_alloc_delta, &sk->sk_wmem_alloc);
1798 if (hold_tskey)
1799 atomic_dec(&sk->sk_tskey);
1797 return err;1800 return err;
1798}1801}
1799 1802
net/ipv6/ip6_udp_tunnel.c+1−0
@@ -182,4 +182,5 @@ struct dst_entry *udp_tunnel6_dst_lookup(struct sk_buff *skb, · 181 unmodified lines
182}182}
183EXPORT_SYMBOL_GPL(udp_tunnel6_dst_lookup);183EXPORT_SYMBOL_GPL(udp_tunnel6_dst_lookup);
184 184
185MODULE_DESCRIPTION("IPv6 Foo over UDP tunnel driver");
185MODULE_LICENSE("GPL");186MODULE_LICENSE("GPL");
net/ipv6/mip6.c+1−0
@@ -405,6 +405,7 @@ static void __exit mip6_fini(void) · 404 unmodified lines
405module_init(mip6_init);405module_init(mip6_init);
406module_exit(mip6_fini);406module_exit(mip6_fini);
407 407
408MODULE_DESCRIPTION("IPv6 Mobility driver");
408MODULE_LICENSE("GPL");409MODULE_LICENSE("GPL");
409MODULE_ALIAS_XFRM_TYPE(AF_INET6, XFRM_PROTO_DSTOPTS);410MODULE_ALIAS_XFRM_TYPE(AF_INET6, XFRM_PROTO_DSTOPTS);
410MODULE_ALIAS_XFRM_TYPE(AF_INET6, XFRM_PROTO_ROUTING);411MODULE_ALIAS_XFRM_TYPE(AF_INET6, XFRM_PROTO_ROUTING);
net/ipv6/sit.c+1−0
@@ -1956,6 +1956,7 @@ xfrm_tunnel_failed: · 1955 unmodified lines
1956 1956
1957module_init(sit_init);1957module_init(sit_init);
1958module_exit(sit_cleanup);1958module_exit(sit_cleanup);
1959MODULE_DESCRIPTION("IPv6-in-IPv4 tunnel SIT driver");
1959MODULE_LICENSE("GPL");1960MODULE_LICENSE("GPL");
1960MODULE_ALIAS_RTNL_LINK("sit");1961MODULE_ALIAS_RTNL_LINK("sit");
1961MODULE_ALIAS_NETDEV("sit0");1962MODULE_ALIAS_NETDEV("sit0");
net/ipv6/tunnel6.c+1−0
@@ -302,4 +302,5 @@ static void __exit tunnel6_fini(void) · 301 unmodified lines
302 302
303module_init(tunnel6_init);303module_init(tunnel6_init);
304module_exit(tunnel6_fini);304module_exit(tunnel6_fini);
305MODULE_DESCRIPTION("IP-in-IPv6 tunnel driver");
305MODULE_LICENSE("GPL");306MODULE_LICENSE("GPL");
net/ipv6/xfrm6_tunnel.c+1−0
@@ -401,5 +401,6 @@ static void __exit xfrm6_tunnel_fini(void) · 400 unmodified lines
401 401
402module_init(xfrm6_tunnel_init);402module_init(xfrm6_tunnel_init);
403module_exit(xfrm6_tunnel_fini);403module_exit(xfrm6_tunnel_fini);
404MODULE_DESCRIPTION("IPv6 XFRM tunnel driver");
404MODULE_LICENSE("GPL");405MODULE_LICENSE("GPL");
405MODULE_ALIAS_XFRM_TYPE(AF_INET6, XFRM_PROTO_IPV6);406MODULE_ALIAS_XFRM_TYPE(AF_INET6, XFRM_PROTO_IPV6);
net/key/af_key.c+1−0
@@ -3924,5 +3924,6 @@ out_unregister_key_proto: · 3923 unmodified lines
3924 3924
3925module_init(ipsec_pfkey_init);3925module_init(ipsec_pfkey_init);
3926module_exit(ipsec_pfkey_exit);3926module_exit(ipsec_pfkey_exit);
3927MODULE_DESCRIPTION("PF_KEY socket helpers");
3927MODULE_LICENSE("GPL");3928MODULE_LICENSE("GPL");
3928MODULE_ALIAS_NETPROTO(PF_KEY);3929MODULE_ALIAS_NETPROTO(PF_KEY);
net/mac80211/tx.c+3−2
@@ -5,7 +5,7 @@ · 4 unmodified lines
5 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>5 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
6 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>6 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
7 * Copyright 2013-2014 Intel Mobile Communications GmbH7 * Copyright 2013-2014 Intel Mobile Communications GmbH
8 * Copyright (C) 2018-2022 Intel Corporation8 * Copyright (C) 2018-2024 Intel Corporation
9 *9 *
10 * Transmit and frame generation functions.10 * Transmit and frame generation functions.
11 */11 */
@@ -3927,6 +3927,7 @@ begin: · 3915 unmodified lines
3927 goto begin;3927 goto begin;
3928 3928
3929 skb = __skb_dequeue(&tx.skbs);3929 skb = __skb_dequeue(&tx.skbs);
3930 info = IEEE80211_SKB_CB(skb);
3930 3931
3931 if (!skb_queue_empty(&tx.skbs)) {3932 if (!skb_queue_empty(&tx.skbs)) {
3932 spin_lock_bh(&fq->lock);3933 spin_lock_bh(&fq->lock);
@@ -3971,7 +3972,7 @@ begin: · 38 unmodified lines
3971 }3972 }
3972 3973
3973encap_out:3974encap_out:
3974 IEEE80211_SKB_CB(skb)->control.vif = vif;3975 info->control.vif = vif;
3975 3976
3976 if (tx.sta &&3977 if (tx.sta &&
3977 wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) {3978 wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) {
net/mptcp/fastopen.c+2−4
@@ -59,13 +59,12 @@ void mptcp_fastopen_subflow_synack_set_params(struct mptcp_subflow_context *subf · 58 unmodified lines
59 mptcp_data_unlock(sk);59 mptcp_data_unlock(sk);
60}60}
61 61
62void mptcp_fastopen_gen_msk_ackseq(struct mptcp_sock *msk, struct mptcp_subflow_context *subflow,62void __mptcp_fastopen_gen_msk_ackseq(struct mptcp_sock *msk, struct mptcp_subflow_context *subflow,
63 const struct mptcp_options_received *mp_opt)63 const struct mptcp_options_received *mp_opt)
64{64{
65 struct sock *sk = (struct sock *)msk;65 struct sock *sk = (struct sock *)msk;
66 struct sk_buff *skb;66 struct sk_buff *skb;
67 67
68 mptcp_data_lock(sk);
69 skb = skb_peek_tail(&sk->sk_receive_queue);68 skb = skb_peek_tail(&sk->sk_receive_queue);
70 if (skb) {69 if (skb) {
71 WARN_ON_ONCE(MPTCP_SKB_CB(skb)->end_seq);70 WARN_ON_ONCE(MPTCP_SKB_CB(skb)->end_seq);
@@ -77,5 +76,4 @@ void mptcp_fastopen_gen_msk_ackseq(struct mptcp_sock *msk, struct mptcp_subflow_ · 5 unmodified lines
77 }76 }
78 77
79 pr_debug("msk=%p ack_seq=%llx", msk, msk->ack_seq);78 pr_debug("msk=%p ack_seq=%llx", msk, msk->ack_seq);
80 mptcp_data_unlock(sk);
81}79}
net/mptcp/options.c+5−4
@@ -962,9 +962,7 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk, · 961 unmodified lines
962 /* subflows are fully established as soon as we get any962 /* subflows are fully established as soon as we get any
963 * additional ack, including ADD_ADDR.963 * additional ack, including ADD_ADDR.
964 */964 */
965 subflow->fully_established = 1;965 goto set_fully_established;
966 WRITE_ONCE(msk->fully_established, true);
967 goto check_notify;
968 }966 }
969 967
970 /* If the first established packet does not contain MP_CAPABLE + data968 /* If the first established packet does not contain MP_CAPABLE + data
@@ -986,7 +984,10 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk, · 15 unmodified lines
986set_fully_established:984set_fully_established:
987 if (unlikely(!READ_ONCE(msk->pm.server_side)))985 if (unlikely(!READ_ONCE(msk->pm.server_side)))
988 pr_warn_once("bogus mpc option on established client sk");986 pr_warn_once("bogus mpc option on established client sk");
989 mptcp_subflow_fully_established(subflow, mp_opt);987
988 mptcp_data_lock((struct sock *)msk);
989 __mptcp_subflow_fully_established(msk, subflow, mp_opt);
990 mptcp_data_unlock((struct sock *)msk);
990 991
991check_notify:992check_notify:
992 /* if the subflow is not already linked into the conn_list, we can't993 /* if the subflow is not already linked into the conn_list, we can't
net/mptcp/pm_userspace.c+12−1
@@ -130,10 +130,21 @@ int mptcp_userspace_pm_get_flags_and_ifindex_by_id(struct mptcp_sock *msk, · 129 unmodified lines
130int mptcp_userspace_pm_get_local_id(struct mptcp_sock *msk,130int mptcp_userspace_pm_get_local_id(struct mptcp_sock *msk,
131 struct mptcp_addr_info *skc)131 struct mptcp_addr_info *skc)
132{132{
133 struct mptcp_pm_addr_entry new_entry;133 struct mptcp_pm_addr_entry *entry = NULL, *e, new_entry;
134 __be16 msk_sport = ((struct inet_sock *)134 __be16 msk_sport = ((struct inet_sock *)
135 inet_sk((struct sock *)msk))->inet_sport;135 inet_sk((struct sock *)msk))->inet_sport;
136 136
137 spin_lock_bh(&msk->pm.lock);
138 list_for_each_entry(e, &msk->pm.userspace_pm_local_addr_list, list) {
139 if (mptcp_addresses_equal(&e->addr, skc, false)) {
140 entry = e;
141 break;
142 }
143 }
144 spin_unlock_bh(&msk->pm.lock);
145 if (entry)
146 return entry->addr.id;
147
137 memset(&new_entry, 0, sizeof(struct mptcp_pm_addr_entry));148 memset(&new_entry, 0, sizeof(struct mptcp_pm_addr_entry));
138 new_entry.addr = *skc;149 new_entry.addr = *skc;
139 new_entry.addr.id = 0;150 new_entry.addr.id = 0;
net/mptcp/protocol.c+17−14
@@ -1505,8 +1505,11 @@ static void mptcp_update_post_push(struct mptcp_sock *msk, · 1504 unmodified lines
1505 1505
1506void mptcp_check_and_set_pending(struct sock *sk)1506void mptcp_check_and_set_pending(struct sock *sk)
1507{1507{
1508 if (mptcp_send_head(sk))1508 if (mptcp_send_head(sk)) {
1509 mptcp_sk(sk)->push_pending |= BIT(MPTCP_PUSH_PENDING);1509 mptcp_data_lock(sk);
1510 mptcp_sk(sk)->cb_flags |= BIT(MPTCP_PUSH_PENDING);
1511 mptcp_data_unlock(sk);
1512 }
1510}1513}
1511 1514
1512static int __subflow_push_pending(struct sock *sk, struct sock *ssk,1515static int __subflow_push_pending(struct sock *sk, struct sock *ssk,
@@ -1960,6 +1963,9 @@ static void mptcp_rcv_space_adjust(struct mptcp_sock *msk, int copied) · 447 unmodified lines
1960 if (copied <= 0)1963 if (copied <= 0)
1961 return;1964 return;
1962 1965
1966 if (!msk->rcvspace_init)
1967 mptcp_rcv_space_init(msk, msk->first);
1968
1963 msk->rcvq_space.copied += copied;1969 msk->rcvq_space.copied += copied;
1964 1970
1965 mstamp = div_u64(tcp_clock_ns(), NSEC_PER_USEC);1971 mstamp = div_u64(tcp_clock_ns(), NSEC_PER_USEC);
@@ -3142,7 +3148,6 @@ static int mptcp_disconnect(struct sock *sk, int flags) · 1176 unmodified lines
3142 mptcp_destroy_common(msk, MPTCP_CF_FASTCLOSE);3148 mptcp_destroy_common(msk, MPTCP_CF_FASTCLOSE);
3143 WRITE_ONCE(msk->flags, 0);3149 WRITE_ONCE(msk->flags, 0);
3144 msk->cb_flags = 0;3150 msk->cb_flags = 0;
3145 msk->push_pending = 0;
3146 msk->recovery = false;3151 msk->recovery = false;
3147 msk->can_ack = false;3152 msk->can_ack = false;
3148 msk->fully_established = false;3153 msk->fully_established = false;
@@ -3158,6 +3163,7 @@ static int mptcp_disconnect(struct sock *sk, int flags) · 9 unmodified lines
3158 msk->bytes_received = 0;3163 msk->bytes_received = 0;
3159 msk->bytes_sent = 0;3164 msk->bytes_sent = 0;
3160 msk->bytes_retrans = 0;3165 msk->bytes_retrans = 0;
3166 msk->rcvspace_init = 0;
3161 3167
3162 WRITE_ONCE(sk->sk_shutdown, 0);3168 WRITE_ONCE(sk->sk_shutdown, 0);
3163 sk_error_report(sk);3169 sk_error_report(sk);
@@ -3180,6 +3186,7 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk, · 16 unmodified lines
3180{3186{
3181 struct mptcp_subflow_request_sock *subflow_req = mptcp_subflow_rsk(req);3187 struct mptcp_subflow_request_sock *subflow_req = mptcp_subflow_rsk(req);
3182 struct sock *nsk = sk_clone_lock(sk, GFP_ATOMIC);3188 struct sock *nsk = sk_clone_lock(sk, GFP_ATOMIC);
3189 struct mptcp_subflow_context *subflow;
3183 struct mptcp_sock *msk;3190 struct mptcp_sock *msk;
3184 3191
3185 if (!nsk)3192 if (!nsk)
@@ -3220,7 +3227,8 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk, · 34 unmodified lines
3220 3227
3221 /* The msk maintain a ref to each subflow in the connections list */3228 /* The msk maintain a ref to each subflow in the connections list */
3222 WRITE_ONCE(msk->first, ssk);3229 WRITE_ONCE(msk->first, ssk);
3223 list_add(&mptcp_subflow_ctx(ssk)->node, &msk->conn_list);3230 subflow = mptcp_subflow_ctx(ssk);
3231 list_add(&subflow->node, &msk->conn_list);
3224 sock_hold(ssk);3232 sock_hold(ssk);
3225 3233
3226 /* new mpc subflow takes ownership of the newly3234 /* new mpc subflow takes ownership of the newly
@@ -3235,6 +3243,9 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk, · 8 unmodified lines
3235 __mptcp_propagate_sndbuf(nsk, ssk);3243 __mptcp_propagate_sndbuf(nsk, ssk);
3236 3244
3237 mptcp_rcv_space_init(msk, ssk);3245 mptcp_rcv_space_init(msk, ssk);
3246
3247 if (mp_opt->suboptions & OPTION_MPTCP_MPC_ACK)
3248 __mptcp_subflow_fully_established(msk, subflow, mp_opt);
3238 bh_unlock_sock(nsk);3249 bh_unlock_sock(nsk);
3239 3250
3240 /* note: the newly allocated socket refcount is 2 now */3251 /* note: the newly allocated socket refcount is 2 now */
@@ -3245,6 +3256,7 @@ void mptcp_rcv_space_init(struct mptcp_sock *msk, const struct sock *ssk) · 4 unmodified lines
3245{3256{
3246 const struct tcp_sock *tp = tcp_sk(ssk);3257 const struct tcp_sock *tp = tcp_sk(ssk);
3247 3258
3259 msk->rcvspace_init = 1;
3248 msk->rcvq_space.copied = 0;3260 msk->rcvq_space.copied = 0;
3249 msk->rcvq_space.rtt_us = 0;3261 msk->rcvq_space.rtt_us = 0;
3250 3262
@@ -3255,8 +3267,6 @@ void mptcp_rcv_space_init(struct mptcp_sock *msk, const struct sock *ssk) · 4 unmodified lines
3255 TCP_INIT_CWND * tp->advmss);3267 TCP_INIT_CWND * tp->advmss);
3256 if (msk->rcvq_space.space == 0)3268 if (msk->rcvq_space.space == 0)
3257 msk->rcvq_space.space = TCP_INIT_CWND * TCP_MSS_DEFAULT;3269 msk->rcvq_space.space = TCP_INIT_CWND * TCP_MSS_DEFAULT;
3258
3259 WRITE_ONCE(msk->wnd_end, msk->snd_nxt + tcp_sk(ssk)->snd_wnd);
3260}3270}
3261 3271
3262void mptcp_destroy_common(struct mptcp_sock *msk, unsigned int flags)3272void mptcp_destroy_common(struct mptcp_sock *msk, unsigned int flags)
@@ -3330,8 +3340,7 @@ static void mptcp_release_cb(struct sock *sk) · 67 unmodified lines
3330 struct mptcp_sock *msk = mptcp_sk(sk);3340 struct mptcp_sock *msk = mptcp_sk(sk);
3331 3341
3332 for (;;) {3342 for (;;) {
3333 unsigned long flags = (msk->cb_flags & MPTCP_FLAGS_PROCESS_CTX_NEED) |3343 unsigned long flags = (msk->cb_flags & MPTCP_FLAGS_PROCESS_CTX_NEED);
3334 msk->push_pending;
3335 struct list_head join_list;3344 struct list_head join_list;
3336 3345
3337 if (!flags)3346 if (!flags)
@@ -3347,7 +3356,6 @@ static void mptcp_release_cb(struct sock *sk) · 9 unmodified lines
3347 * datapath acquires the msk socket spinlock while helding3356 * datapath acquires the msk socket spinlock while helding
3348 * the subflow socket lock3357 * the subflow socket lock
3349 */3358 */
3350 msk->push_pending = 0;
3351 msk->cb_flags &= ~flags;3359 msk->cb_flags &= ~flags;
3352 spin_unlock_bh(&sk->sk_lock.slock);3360 spin_unlock_bh(&sk->sk_lock.slock);
3353 3361
@@ -3475,13 +3483,8 @@ void mptcp_finish_connect(struct sock *ssk) · 121 unmodified lines
3475 * accessing the field below3483 * accessing the field below
3476 */3484 */
3477 WRITE_ONCE(msk->local_key, subflow->local_key);3485 WRITE_ONCE(msk->local_key, subflow->local_key);
3478 WRITE_ONCE(msk->write_seq, subflow->idsn + 1);
3479 WRITE_ONCE(msk->snd_nxt, msk->write_seq);
3480 WRITE_ONCE(msk->snd_una, msk->write_seq);
3481 3486
3482 mptcp_pm_new_connection(msk, ssk, 0);3487 mptcp_pm_new_connection(msk, ssk, 0);
3483
3484 mptcp_rcv_space_init(msk, ssk);
3485}3488}
3486 3489
3487void mptcp_sock_graft(struct sock *sk, struct socket *parent)3490void mptcp_sock_graft(struct sock *sk, struct socket *parent)
net/mptcp/protocol.h+9−7
@@ -286,7 +286,6 @@ struct mptcp_sock { · 285 unmodified lines
286 int rmem_released;286 int rmem_released;
287 unsigned long flags;287 unsigned long flags;
288 unsigned long cb_flags;288 unsigned long cb_flags;
289 unsigned long push_pending;
290 bool recovery; /* closing subflow write queue reinjected */289 bool recovery; /* closing subflow write queue reinjected */
291 bool can_ack;290 bool can_ack;
292 bool fully_established;291 bool fully_established;
@@ -305,7 +304,8 @@ struct mptcp_sock { · 12 unmodified lines
305 nodelay:1,304 nodelay:1,
306 fastopening:1,305 fastopening:1,
307 in_accept_queue:1,306 in_accept_queue:1,
308 free_first:1;307 free_first:1,
308 rcvspace_init:1;
309 struct work_struct work;309 struct work_struct work;
310 struct sk_buff *ooo_last_skb;310 struct sk_buff *ooo_last_skb;
311 struct rb_root out_of_order_queue;311 struct rb_root out_of_order_queue;
@@ -622,8 +622,9 @@ unsigned int mptcp_stale_loss_cnt(const struct net *net); · 310 unmodified lines
622unsigned int mptcp_close_timeout(const struct sock *sk);622unsigned int mptcp_close_timeout(const struct sock *sk);
623int mptcp_get_pm_type(const struct net *net);623int mptcp_get_pm_type(const struct net *net);
624const char *mptcp_get_scheduler(const struct net *net);624const char *mptcp_get_scheduler(const struct net *net);
625void mptcp_subflow_fully_established(struct mptcp_subflow_context *subflow,625void __mptcp_subflow_fully_established(struct mptcp_sock *msk,
626 const struct mptcp_options_received *mp_opt);626 struct mptcp_subflow_context *subflow,
627 const struct mptcp_options_received *mp_opt);
627bool __mptcp_retransmit_pending_data(struct sock *sk);628bool __mptcp_retransmit_pending_data(struct sock *sk);
628void mptcp_check_and_set_pending(struct sock *sk);629void mptcp_check_and_set_pending(struct sock *sk);
629void __mptcp_push_pending(struct sock *sk, unsigned int flags);630void __mptcp_push_pending(struct sock *sk, unsigned int flags);
@@ -952,8 +953,8 @@ void mptcp_event_pm_listener(const struct sock *ssk, · 322 unmodified lines
952 enum mptcp_event_type event);953 enum mptcp_event_type event);
953bool mptcp_userspace_pm_active(const struct mptcp_sock *msk);954bool mptcp_userspace_pm_active(const struct mptcp_sock *msk);
954 955
955void mptcp_fastopen_gen_msk_ackseq(struct mptcp_sock *msk, struct mptcp_subflow_context *subflow,956void __mptcp_fastopen_gen_msk_ackseq(struct mptcp_sock *msk, struct mptcp_subflow_context *subflow,
956 const struct mptcp_options_received *mp_opt);957 const struct mptcp_options_received *mp_opt);
957void mptcp_fastopen_subflow_synack_set_params(struct mptcp_subflow_context *subflow,958void mptcp_fastopen_subflow_synack_set_params(struct mptcp_subflow_context *subflow,
958 struct request_sock *req);959 struct request_sock *req);
959 960
@@ -1128,7 +1129,8 @@ static inline bool subflow_simultaneous_connect(struct sock *sk) · 168 unmodified lines
1128{1129{
1129 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);1130 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
1130 1131
1131 return (1 << sk->sk_state) & (TCPF_ESTABLISHED | TCPF_FIN_WAIT1) &&1132 return (1 << sk->sk_state) &
1133 (TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2 | TCPF_CLOSING) &&
1132 is_active_ssk(subflow) &&1134 is_active_ssk(subflow) &&
1133 !subflow->conn_finished;1135 !subflow->conn_finished;
1134}1136}
net/mptcp/subflow.c+44−27
@@ -421,29 +421,26 @@ static bool subflow_use_different_dport(struct mptcp_sock *msk, const struct soc · 420 unmodified lines
421 421
422void __mptcp_sync_state(struct sock *sk, int state)422void __mptcp_sync_state(struct sock *sk, int state)
423{423{
424 struct mptcp_subflow_context *subflow;
424 struct mptcp_sock *msk = mptcp_sk(sk);425 struct mptcp_sock *msk = mptcp_sk(sk);
426 struct sock *ssk = msk->first;
427
428 subflow = mptcp_subflow_ctx(ssk);
429 __mptcp_propagate_sndbuf(sk, ssk);
430 if (!msk->rcvspace_init)
431 mptcp_rcv_space_init(msk, ssk);
425 432
426 __mptcp_propagate_sndbuf(sk, msk->first);
427 if (sk->sk_state == TCP_SYN_SENT) {433 if (sk->sk_state == TCP_SYN_SENT) {
434 /* subflow->idsn is always available is TCP_SYN_SENT state,
435 * even for the FASTOPEN scenarios
436 */
437 WRITE_ONCE(msk->write_seq, subflow->idsn + 1);
438 WRITE_ONCE(msk->snd_nxt, msk->write_seq);
428 mptcp_set_state(sk, state);439 mptcp_set_state(sk, state);
429 sk->sk_state_change(sk);440 sk->sk_state_change(sk);
430 }441 }
431}442}
432 443
433static void mptcp_propagate_state(struct sock *sk, struct sock *ssk)
434{
435 struct mptcp_sock *msk = mptcp_sk(sk);
436
437 mptcp_data_lock(sk);
438 if (!sock_owned_by_user(sk)) {
439 __mptcp_sync_state(sk, ssk->sk_state);
440 } else {
441 msk->pending_state = ssk->sk_state;
442 __set_bit(MPTCP_SYNC_STATE, &msk->cb_flags);
443 }
444 mptcp_data_unlock(sk);
445}
446
447static void subflow_set_remote_key(struct mptcp_sock *msk,444static void subflow_set_remote_key(struct mptcp_sock *msk,
448 struct mptcp_subflow_context *subflow,445 struct mptcp_subflow_context *subflow,
449 const struct mptcp_options_received *mp_opt)446 const struct mptcp_options_received *mp_opt)
@@ -465,6 +462,31 @@ static void subflow_set_remote_key(struct mptcp_sock *msk, · 15 unmodified lines
465 atomic64_set(&msk->rcv_wnd_sent, subflow->iasn);462 atomic64_set(&msk->rcv_wnd_sent, subflow->iasn);
466}463}
467 464
465static void mptcp_propagate_state(struct sock *sk, struct sock *ssk,
466 struct mptcp_subflow_context *subflow,
467 const struct mptcp_options_received *mp_opt)
468{
469 struct mptcp_sock *msk = mptcp_sk(sk);
470
471 mptcp_data_lock(sk);
472 if (mp_opt) {
473 /* Options are available only in the non fallback cases
474 * avoid updating rx path fields otherwise
475 */
476 WRITE_ONCE(msk->snd_una, subflow->idsn + 1);
477 WRITE_ONCE(msk->wnd_end, subflow->idsn + 1 + tcp_sk(ssk)->snd_wnd);
478 subflow_set_remote_key(msk, subflow, mp_opt);
479 }
480
481 if (!sock_owned_by_user(sk)) {
482 __mptcp_sync_state(sk, ssk->sk_state);
483 } else {
484 msk->pending_state = ssk->sk_state;
485 __set_bit(MPTCP_SYNC_STATE, &msk->cb_flags);
486 }
487 mptcp_data_unlock(sk);
488}
489
468static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb)490static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb)
469{491{
470 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);492 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
@@ -499,10 +521,9 @@ static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb) · 28 unmodified lines
499 if (mp_opt.deny_join_id0)521 if (mp_opt.deny_join_id0)
500 WRITE_ONCE(msk->pm.remote_deny_join_id0, true);522 WRITE_ONCE(msk->pm.remote_deny_join_id0, true);
501 subflow->mp_capable = 1;523 subflow->mp_capable = 1;
502 subflow_set_remote_key(msk, subflow, &mp_opt);
503 MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPCAPABLEACTIVEACK);524 MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPCAPABLEACTIVEACK);
504 mptcp_finish_connect(sk);525 mptcp_finish_connect(sk);
505 mptcp_propagate_state(parent, sk);526 mptcp_propagate_state(parent, sk, subflow, &mp_opt);
506 } else if (subflow->request_join) {527 } else if (subflow->request_join) {
507 u8 hmac[SHA256_DIGEST_SIZE];528 u8 hmac[SHA256_DIGEST_SIZE];
508 529
@@ -545,8 +566,7 @@ static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb) · 36 unmodified lines
545 }566 }
546 } else if (mptcp_check_fallback(sk)) {567 } else if (mptcp_check_fallback(sk)) {
547fallback:568fallback:
548 mptcp_rcv_space_init(msk, sk);569 mptcp_propagate_state(parent, sk, subflow, NULL);
549 mptcp_propagate_state(parent, sk);
550 }570 }
551 return;571 return;
552 572
@@ -731,17 +751,16 @@ void mptcp_subflow_drop_ctx(struct sock *ssk) · 178 unmodified lines
731 kfree_rcu(ctx, rcu);751 kfree_rcu(ctx, rcu);
732}752}
733 753
734void mptcp_subflow_fully_established(struct mptcp_subflow_context *subflow,754void __mptcp_subflow_fully_established(struct mptcp_sock *msk,
735 const struct mptcp_options_received *mp_opt)755 struct mptcp_subflow_context *subflow,
756 const struct mptcp_options_received *mp_opt)
736{757{
737 struct mptcp_sock *msk = mptcp_sk(subflow->conn);
738
739 subflow_set_remote_key(msk, subflow, mp_opt);758 subflow_set_remote_key(msk, subflow, mp_opt);
740 subflow->fully_established = 1;759 subflow->fully_established = 1;
741 WRITE_ONCE(msk->fully_established, true);760 WRITE_ONCE(msk->fully_established, true);
742 761
743 if (subflow->is_mptfo)762 if (subflow->is_mptfo)
744 mptcp_fastopen_gen_msk_ackseq(msk, subflow, mp_opt);763 __mptcp_fastopen_gen_msk_ackseq(msk, subflow, mp_opt);
745}764}
746 765
747static struct sock *subflow_syn_recv_sock(const struct sock *sk,766static struct sock *subflow_syn_recv_sock(const struct sock *sk,
@@ -834,7 +853,6 @@ create_child: · 86 unmodified lines
834 * mpc option853 * mpc option
835 */854 */
836 if (mp_opt.suboptions & OPTION_MPTCP_MPC_ACK) {855 if (mp_opt.suboptions & OPTION_MPTCP_MPC_ACK) {
837 mptcp_subflow_fully_established(ctx, &mp_opt);
838 mptcp_pm_fully_established(owner, child);856 mptcp_pm_fully_established(owner, child);
839 ctx->pm_notified = 1;857 ctx->pm_notified = 1;
840 }858 }
@@ -1744,10 +1762,9 @@ static void subflow_state_change(struct sock *sk) · 903 unmodified lines
1744 msk = mptcp_sk(parent);1762 msk = mptcp_sk(parent);
1745 if (subflow_simultaneous_connect(sk)) {1763 if (subflow_simultaneous_connect(sk)) {
1746 mptcp_do_fallback(sk);1764 mptcp_do_fallback(sk);
1747 mptcp_rcv_space_init(msk, sk);
1748 pr_fallback(msk);1765 pr_fallback(msk);
1749 subflow->conn_finished = 1;1766 subflow->conn_finished = 1;
1750 mptcp_propagate_state(parent, sk);1767 mptcp_propagate_state(parent, sk, subflow, NULL);
1751 }1768 }
1752 1769
1753 /* as recvmsg() does not acquire the subflow socket for ssk selection1770 /* as recvmsg() does not acquire the subflow socket for ssk selection
net/netfilter/nf_nat_core.c+4−1
@@ -551,8 +551,11 @@ static void nf_nat_l4proto_unique_tuple(struct nf_conntrack_tuple *tuple, · 550 unmodified lines
551find_free_id:551find_free_id:
552 if (range->flags & NF_NAT_RANGE_PROTO_OFFSET)552 if (range->flags & NF_NAT_RANGE_PROTO_OFFSET)
553 off = (ntohs(*keyptr) - ntohs(range->base_proto.all));553 off = (ntohs(*keyptr) - ntohs(range->base_proto.all));
554 else554 else if ((range->flags & NF_NAT_RANGE_PROTO_RANDOM_ALL) ||
555 maniptype != NF_NAT_MANIP_DST)
555 off = get_random_u16();556 off = get_random_u16();
557 else
558 off = 0;
556 559
557 attempts = range_size;560 attempts = range_size;
558 if (attempts > NF_NAT_MAX_ATTEMPTS)561 if (attempts > NF_NAT_MAX_ATTEMPTS)
net/netfilter/nft_flow_offload.c+1−0
@@ -361,6 +361,7 @@ static void nft_flow_offload_eval(const struct nft_expr *expr, · 360 unmodified lines
361 ct->proto.tcp.seen[1].flags |= IP_CT_TCP_FLAG_BE_LIBERAL;361 ct->proto.tcp.seen[1].flags |= IP_CT_TCP_FLAG_BE_LIBERAL;
362 }362 }
363 363
364 __set_bit(NF_FLOW_HW_BIDIRECTIONAL, &flow->flags);
364 ret = flow_offload_add(flowtable, flow);365 ret = flow_offload_add(flowtable, flow);
365 if (ret < 0)366 if (ret < 0)
366 goto err_flow_add;367 goto err_flow_add;
net/netfilter/nft_set_pipapo.h+2−2
@@ -144,10 +144,10 @@ struct nft_pipapo_scratch { · 143 unmodified lines
144 144
145/**145/**
146 * struct nft_pipapo_match - Data used for lookup and matching146 * struct nft_pipapo_match - Data used for lookup and matching
147 * @field_count Amount of fields in set147 * @field_count: Amount of fields in set
148 * @scratch: Preallocated per-CPU maps for partial matching results148 * @scratch: Preallocated per-CPU maps for partial matching results
149 * @bsize_max: Maximum lookup table bucket size of all fields, in longs149 * @bsize_max: Maximum lookup table bucket size of all fields, in longs
150 * @rcu Matching data is swapped on commits150 * @rcu: Matching data is swapped on commits
151 * @f: Fields, with lookup and mapping tables151 * @f: Fields, with lookup and mapping tables
152 */152 */
153struct nft_pipapo_match {153struct nft_pipapo_match {
net/openvswitch/flow_netlink.c+33−16
@@ -48,6 +48,7 @@ struct ovs_len_tbl { · 47 unmodified lines
48 48
49#define OVS_ATTR_NESTED -149#define OVS_ATTR_NESTED -1
50#define OVS_ATTR_VARIABLE -250#define OVS_ATTR_VARIABLE -2
51#define OVS_COPY_ACTIONS_MAX_DEPTH 16
51 52
52static bool actions_may_change_flow(const struct nlattr *actions)53static bool actions_may_change_flow(const struct nlattr *actions)
53{54{
@@ -2545,13 +2546,15 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, · 2491 unmodified lines
2545 const struct sw_flow_key *key,2546 const struct sw_flow_key *key,
2546 struct sw_flow_actions **sfa,2547 struct sw_flow_actions **sfa,
2547 __be16 eth_type, __be16 vlan_tci,2548 __be16 eth_type, __be16 vlan_tci,
2548 u32 mpls_label_count, bool log);2549 u32 mpls_label_count, bool log,
2550 u32 depth);
2549 2551
2550static int validate_and_copy_sample(struct net *net, const struct nlattr *attr,2552static int validate_and_copy_sample(struct net *net, const struct nlattr *attr,
2551 const struct sw_flow_key *key,2553 const struct sw_flow_key *key,
2552 struct sw_flow_actions **sfa,2554 struct sw_flow_actions **sfa,
2553 __be16 eth_type, __be16 vlan_tci,2555 __be16 eth_type, __be16 vlan_tci,
2554 u32 mpls_label_count, bool log, bool last)2556 u32 mpls_label_count, bool log, bool last,
2557 u32 depth)
2555{2558{
2556 const struct nlattr *attrs[OVS_SAMPLE_ATTR_MAX + 1];2559 const struct nlattr *attrs[OVS_SAMPLE_ATTR_MAX + 1];
2557 const struct nlattr *probability, *actions;2560 const struct nlattr *probability, *actions;
@@ -2602,7 +2605,8 @@ static int validate_and_copy_sample(struct net *net, const struct nlattr *attr, · 44 unmodified lines
2602 return err;2605 return err;
2603 2606
2604 err = __ovs_nla_copy_actions(net, actions, key, sfa,2607 err = __ovs_nla_copy_actions(net, actions, key, sfa,
2605 eth_type, vlan_tci, mpls_label_count, log);2608 eth_type, vlan_tci, mpls_label_count, log,
2609 depth + 1);
2606 2610
2607 if (err)2611 if (err)
2608 return err;2612 return err;
@@ -2617,7 +2621,8 @@ static int validate_and_copy_dec_ttl(struct net *net, · 8 unmodified lines
2617 const struct sw_flow_key *key,2621 const struct sw_flow_key *key,
2618 struct sw_flow_actions **sfa,2622 struct sw_flow_actions **sfa,
2619 __be16 eth_type, __be16 vlan_tci,2623 __be16 eth_type, __be16 vlan_tci,
2620 u32 mpls_label_count, bool log)2624 u32 mpls_label_count, bool log,
2625 u32 depth)
2621{2626{
2622 const struct nlattr *attrs[OVS_DEC_TTL_ATTR_MAX + 1];2627 const struct nlattr *attrs[OVS_DEC_TTL_ATTR_MAX + 1];
2623 int start, action_start, err, rem;2628 int start, action_start, err, rem;
@@ -2660,7 +2665,8 @@ static int validate_and_copy_dec_ttl(struct net *net, · 36 unmodified lines
2660 return action_start;2665 return action_start;
2661 2666
2662 err = __ovs_nla_copy_actions(net, actions, key, sfa, eth_type,2667 err = __ovs_nla_copy_actions(net, actions, key, sfa, eth_type,
2663 vlan_tci, mpls_label_count, log);2668 vlan_tci, mpls_label_count, log,
2669 depth + 1);
2664 if (err)2670 if (err)
2665 return err;2671 return err;
2666 2672
@@ -2674,7 +2680,8 @@ static int validate_and_copy_clone(struct net *net, · 7 unmodified lines
2674 const struct sw_flow_key *key,2680 const struct sw_flow_key *key,
2675 struct sw_flow_actions **sfa,2681 struct sw_flow_actions **sfa,
2676 __be16 eth_type, __be16 vlan_tci,2682 __be16 eth_type, __be16 vlan_tci,
2677 u32 mpls_label_count, bool log, bool last)2683 u32 mpls_label_count, bool log, bool last,
2684 u32 depth)
2678{2685{
2679 int start, err;2686 int start, err;
2680 u32 exec;2687 u32 exec;
@@ -2694,7 +2701,8 @@ static int validate_and_copy_clone(struct net *net, · 13 unmodified lines
2694 return err;2701 return err;
2695 2702
2696 err = __ovs_nla_copy_actions(net, attr, key, sfa,2703 err = __ovs_nla_copy_actions(net, attr, key, sfa,
2697 eth_type, vlan_tci, mpls_label_count, log);2704 eth_type, vlan_tci, mpls_label_count, log,
2705 depth + 1);
2698 if (err)2706 if (err)
2699 return err;2707 return err;
2700 2708
@@ -3063,7 +3071,7 @@ static int validate_and_copy_check_pkt_len(struct net *net, · 362 unmodified lines
3063 struct sw_flow_actions **sfa,3071 struct sw_flow_actions **sfa,
3064 __be16 eth_type, __be16 vlan_tci,3072 __be16 eth_type, __be16 vlan_tci,
3065 u32 mpls_label_count,3073 u32 mpls_label_count,
3066 bool log, bool last)3074 bool log, bool last, u32 depth)
3067{3075{
3068 const struct nlattr *acts_if_greater, *acts_if_lesser_eq;3076 const struct nlattr *acts_if_greater, *acts_if_lesser_eq;
3069 struct nlattr *a[OVS_CHECK_PKT_LEN_ATTR_MAX + 1];3077 struct nlattr *a[OVS_CHECK_PKT_LEN_ATTR_MAX + 1];
@@ -3111,7 +3119,8 @@ static int validate_and_copy_check_pkt_len(struct net *net, · 41 unmodified lines
3111 return nested_acts_start;3119 return nested_acts_start;
3112 3120
3113 err = __ovs_nla_copy_actions(net, acts_if_lesser_eq, key, sfa,3121 err = __ovs_nla_copy_actions(net, acts_if_lesser_eq, key, sfa,
3114 eth_type, vlan_tci, mpls_label_count, log);3122 eth_type, vlan_tci, mpls_label_count, log,
3123 depth + 1);
3115 3124
3116 if (err)3125 if (err)
3117 return err;3126 return err;
@@ -3124,7 +3133,8 @@ static int validate_and_copy_check_pkt_len(struct net *net, · 6 unmodified lines
3124 return nested_acts_start;3133 return nested_acts_start;
3125 3134
3126 err = __ovs_nla_copy_actions(net, acts_if_greater, key, sfa,3135 err = __ovs_nla_copy_actions(net, acts_if_greater, key, sfa,
3127 eth_type, vlan_tci, mpls_label_count, log);3136 eth_type, vlan_tci, mpls_label_count, log,
3137 depth + 1);
3128 3138
3129 if (err)3139 if (err)
3130 return err;3140 return err;
@@ -3152,12 +3162,16 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, · 21 unmodified lines
3152 const struct sw_flow_key *key,3162 const struct sw_flow_key *key,
3153 struct sw_flow_actions **sfa,3163 struct sw_flow_actions **sfa,
3154 __be16 eth_type, __be16 vlan_tci,3164 __be16 eth_type, __be16 vlan_tci,
3155 u32 mpls_label_count, bool log)3165 u32 mpls_label_count, bool log,
3166 u32 depth)
3156{3167{
3157 u8 mac_proto = ovs_key_mac_proto(key);3168 u8 mac_proto = ovs_key_mac_proto(key);
3158 const struct nlattr *a;3169 const struct nlattr *a;
3159 int rem, err;3170 int rem, err;
3160 3171
3172 if (depth > OVS_COPY_ACTIONS_MAX_DEPTH)
3173 return -EOVERFLOW;
3174
3161 nla_for_each_nested(a, attr, rem) {3175 nla_for_each_nested(a, attr, rem) {
3162 /* Expected argument lengths, (u32)-1 for variable length. */3176 /* Expected argument lengths, (u32)-1 for variable length. */
3163 static const u32 action_lens[OVS_ACTION_ATTR_MAX + 1] = {3177 static const u32 action_lens[OVS_ACTION_ATTR_MAX + 1] = {
@@ -3355,7 +3369,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, · 191 unmodified lines
3355 err = validate_and_copy_sample(net, a, key, sfa,3369 err = validate_and_copy_sample(net, a, key, sfa,
3356 eth_type, vlan_tci,3370 eth_type, vlan_tci,
3357 mpls_label_count,3371 mpls_label_count,
3358 log, last);3372 log, last, depth);
3359 if (err)3373 if (err)
3360 return err;3374 return err;
3361 skip_copy = true;3375 skip_copy = true;
@@ -3426,7 +3440,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, · 64 unmodified lines
3426 err = validate_and_copy_clone(net, a, key, sfa,3440 err = validate_and_copy_clone(net, a, key, sfa,
3427 eth_type, vlan_tci,3441 eth_type, vlan_tci,
3428 mpls_label_count,3442 mpls_label_count,
3429 log, last);3443 log, last, depth);
3430 if (err)3444 if (err)
3431 return err;3445 return err;
3432 skip_copy = true;3446 skip_copy = true;
@@ -3440,7 +3454,8 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, · 7 unmodified lines
3440 eth_type,3454 eth_type,
3441 vlan_tci,3455 vlan_tci,
3442 mpls_label_count,3456 mpls_label_count,
3443 log, last);3457 log, last,
3458 depth);
3444 if (err)3459 if (err)
3445 return err;3460 return err;
3446 skip_copy = true;3461 skip_copy = true;
@@ -3450,7 +3465,8 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, · 3 unmodified lines
3450 case OVS_ACTION_ATTR_DEC_TTL:3465 case OVS_ACTION_ATTR_DEC_TTL:
3451 err = validate_and_copy_dec_ttl(net, a, key, sfa,3466 err = validate_and_copy_dec_ttl(net, a, key, sfa,
3452 eth_type, vlan_tci,3467 eth_type, vlan_tci,
3453 mpls_label_count, log);3468 mpls_label_count, log,
3469 depth);
3454 if (err)3470 if (err)
3455 return err;3471 return err;
3456 skip_copy = true;3472 skip_copy = true;
@@ -3495,7 +3511,8 @@ int ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, · 38 unmodified lines
3495 3511
3496 (*sfa)->orig_len = nla_len(attr);3512 (*sfa)->orig_len = nla_len(attr);
3497 err = __ovs_nla_copy_actions(net, attr, key, sfa, key->eth.type,3513 err = __ovs_nla_copy_actions(net, attr, key, sfa, key->eth.type,
3498 key->eth.vlan.tci, mpls_label_count, log);3514 key->eth.vlan.tci, mpls_label_count, log,
3515 0);
3499 if (err)3516 if (err)
3500 ovs_nla_free_flow_actions(*sfa);3517 ovs_nla_free_flow_actions(*sfa);
3501 3518
net/rds/recv.c+11−2
@@ -425,6 +425,7 @@ static int rds_still_queued(struct rds_sock *rs, struct rds_incoming *inc, · 424 unmodified lines
425 struct sock *sk = rds_rs_to_sk(rs);425 struct sock *sk = rds_rs_to_sk(rs);
426 int ret = 0;426 int ret = 0;
427 unsigned long flags;427 unsigned long flags;
428 struct rds_incoming *to_drop = NULL;
428 429
429 write_lock_irqsave(&rs->rs_recv_lock, flags);430 write_lock_irqsave(&rs->rs_recv_lock, flags);
430 if (!list_empty(&inc->i_item)) {431 if (!list_empty(&inc->i_item)) {
@@ -435,11 +436,14 @@ static int rds_still_queued(struct rds_sock *rs, struct rds_incoming *inc, · 4 unmodified lines
435 -be32_to_cpu(inc->i_hdr.h_len),436 -be32_to_cpu(inc->i_hdr.h_len),
436 inc->i_hdr.h_dport);437 inc->i_hdr.h_dport);
437 list_del_init(&inc->i_item);438 list_del_init(&inc->i_item);
438 rds_inc_put(inc);439 to_drop = inc;
439 }440 }
440 }441 }
441 write_unlock_irqrestore(&rs->rs_recv_lock, flags);442 write_unlock_irqrestore(&rs->rs_recv_lock, flags);
442 443
444 if (to_drop)
445 rds_inc_put(to_drop);
446
443 rdsdebug("inc %p rs %p still %d dropped %d\n", inc, rs, ret, drop);447 rdsdebug("inc %p rs %p still %d dropped %d\n", inc, rs, ret, drop);
444 return ret;448 return ret;
445}449}
@@ -758,16 +762,21 @@ void rds_clear_recv_queue(struct rds_sock *rs) · 312 unmodified lines
758 struct sock *sk = rds_rs_to_sk(rs);762 struct sock *sk = rds_rs_to_sk(rs);
759 struct rds_incoming *inc, *tmp;763 struct rds_incoming *inc, *tmp;
760 unsigned long flags;764 unsigned long flags;
765 LIST_HEAD(to_drop);
761 766
762 write_lock_irqsave(&rs->rs_recv_lock, flags);767 write_lock_irqsave(&rs->rs_recv_lock, flags);
763 list_for_each_entry_safe(inc, tmp, &rs->rs_recv_queue, i_item) {768 list_for_each_entry_safe(inc, tmp, &rs->rs_recv_queue, i_item) {
764 rds_recv_rcvbuf_delta(rs, sk, inc->i_conn->c_lcong,769 rds_recv_rcvbuf_delta(rs, sk, inc->i_conn->c_lcong,
765 -be32_to_cpu(inc->i_hdr.h_len),770 -be32_to_cpu(inc->i_hdr.h_len),
766 inc->i_hdr.h_dport);771 inc->i_hdr.h_dport);
772 list_move(&inc->i_item, &to_drop);
773 }
774 write_unlock_irqrestore(&rs->rs_recv_lock, flags);
775
776 list_for_each_entry_safe(inc, tmp, &to_drop, i_item) {
767 list_del_init(&inc->i_item);777 list_del_init(&inc->i_item);
768 rds_inc_put(inc);778 rds_inc_put(inc);
769 }779 }
770 write_unlock_irqrestore(&rs->rs_recv_lock, flags);
771}780}
772 781
773/*782/*
net/sched/act_mirred.c+0−2
@@ -533,8 +533,6 @@ static int mirred_device_event(struct notifier_block *unused, · 532 unmodified lines
533 * net_device are already rcu protected.533 * net_device are already rcu protected.
534 */534 */
535 RCU_INIT_POINTER(m->tcfm_dev, NULL);535 RCU_INIT_POINTER(m->tcfm_dev, NULL);
536 } else if (m->tcfm_blockid) {
537 m->tcfm_blockid = 0;
538 }536 }
539 spin_unlock_bh(&m->tcf_lock);537 spin_unlock_bh(&m->tcf_lock);
540 }538 }
net/sched/em_canid.c+1−0
@@ -222,6 +222,7 @@ static void __exit exit_em_canid(void) · 221 unmodified lines
222 tcf_em_unregister(&em_canid_ops);222 tcf_em_unregister(&em_canid_ops);
223}223}
224 224
225MODULE_DESCRIPTION("ematch classifier to match CAN IDs embedded in skb CAN frames");
225MODULE_LICENSE("GPL");226MODULE_LICENSE("GPL");
226 227
227module_init(init_em_canid);228module_init(init_em_canid);
net/sched/em_cmp.c+1−0
@@ -87,6 +87,7 @@ static void __exit exit_em_cmp(void) · 86 unmodified lines
87 tcf_em_unregister(&em_cmp_ops);87 tcf_em_unregister(&em_cmp_ops);
88}88}
89 89
90MODULE_DESCRIPTION("ematch classifier for basic data types(8/16/32 bit) against skb data");
90MODULE_LICENSE("GPL");91MODULE_LICENSE("GPL");
91 92
92module_init(init_em_cmp);93module_init(init_em_cmp);
net/sched/em_meta.c+1−0
@@ -1006,6 +1006,7 @@ static void __exit exit_em_meta(void) · 1005 unmodified lines
1006 tcf_em_unregister(&em_meta_ops);1006 tcf_em_unregister(&em_meta_ops);
1007}1007}
1008 1008
1009MODULE_DESCRIPTION("ematch classifier for various internal kernel metadata, skb metadata and sk metadata");
1009MODULE_LICENSE("GPL");1010MODULE_LICENSE("GPL");
1010 1011
1011module_init(init_em_meta);1012module_init(init_em_meta);
net/sched/em_nbyte.c+1−0
@@ -68,6 +68,7 @@ static void __exit exit_em_nbyte(void) · 67 unmodified lines
68 tcf_em_unregister(&em_nbyte_ops);68 tcf_em_unregister(&em_nbyte_ops);
69}69}
70 70
71MODULE_DESCRIPTION("ematch classifier for arbitrary skb multi-bytes");
71MODULE_LICENSE("GPL");72MODULE_LICENSE("GPL");
72 73
73module_init(init_em_nbyte);74module_init(init_em_nbyte);
net/sched/em_text.c+1−0
@@ -147,6 +147,7 @@ static void __exit exit_em_text(void) · 146 unmodified lines
147 tcf_em_unregister(&em_text_ops);147 tcf_em_unregister(&em_text_ops);
148}148}
149 149
150MODULE_DESCRIPTION("ematch classifier for embedded text in skbs");
150MODULE_LICENSE("GPL");151MODULE_LICENSE("GPL");
151 152
152module_init(init_em_text);153module_init(init_em_text);
net/sched/em_u32.c+1−0
@@ -52,6 +52,7 @@ static void __exit exit_em_u32(void) · 51 unmodified lines
52 tcf_em_unregister(&em_u32_ops);52 tcf_em_unregister(&em_u32_ops);
53}53}
54 54
55MODULE_DESCRIPTION("ematch skb classifier using 32 bit chunks of data");
55MODULE_LICENSE("GPL");56MODULE_LICENSE("GPL");
56 57
57module_init(init_em_u32);58module_init(init_em_u32);
net/sctp/inqueue.c+10−4
@@ -38,6 +38,14 @@ void sctp_inq_init(struct sctp_inq *queue) · 37 unmodified lines
38 INIT_WORK(&queue->immediate, NULL);38 INIT_WORK(&queue->immediate, NULL);
39}39}
40 40
41/* Properly release the chunk which is being worked on. */
42static inline void sctp_inq_chunk_free(struct sctp_chunk *chunk)
43{
44 if (chunk->head_skb)
45 chunk->skb = chunk->head_skb;
46 sctp_chunk_free(chunk);
47}
48
41/* Release the memory associated with an SCTP inqueue. */49/* Release the memory associated with an SCTP inqueue. */
42void sctp_inq_free(struct sctp_inq *queue)50void sctp_inq_free(struct sctp_inq *queue)
43{51{
@@ -53,7 +61,7 @@ void sctp_inq_free(struct sctp_inq *queue) · 9 unmodified lines
53 * free it as well.61 * free it as well.
54 */62 */
55 if (queue->in_progress) {63 if (queue->in_progress) {
56 sctp_chunk_free(queue->in_progress);64 sctp_inq_chunk_free(queue->in_progress);
57 queue->in_progress = NULL;65 queue->in_progress = NULL;
58 }66 }
59}67}
@@ -130,9 +138,7 @@ struct sctp_chunk *sctp_inq_pop(struct sctp_inq *queue) · 70 unmodified lines
130 goto new_skb;138 goto new_skb;
131 }139 }
132 140
133 if (chunk->head_skb)141 sctp_inq_chunk_free(chunk);
134 chunk->skb = chunk->head_skb;
135 sctp_chunk_free(chunk);
136 chunk = queue->in_progress = NULL;142 chunk = queue->in_progress = NULL;
137 } else {143 } else {
138 /* Nothing to do. Next chunk in the packet, please. */144 /* Nothing to do. Next chunk in the packet, please. */
net/smc/af_smc.c+1−0
@@ -924,6 +924,7 @@ static int smc_switch_to_fallback(struct smc_sock *smc, int reason_code) · 923 unmodified lines
924 smc->clcsock->file->private_data = smc->clcsock;924 smc->clcsock->file->private_data = smc->clcsock;
925 smc->clcsock->wq.fasync_list =925 smc->clcsock->wq.fasync_list =
926 smc->sk.sk_socket->wq.fasync_list;926 smc->sk.sk_socket->wq.fasync_list;
927 smc->sk.sk_socket->wq.fasync_list = NULL;
927 928
928 /* There might be some wait entries remaining929 /* There might be some wait entries remaining
929 * in smc sk->sk_wq and they should be woken up930 * in smc sk->sk_wq and they should be woken up
net/tls/tls_sw.c+62−73
@@ -63,6 +63,7 @@ struct tls_decrypt_ctx { · 62 unmodified lines
63 u8 iv[TLS_MAX_IV_SIZE];63 u8 iv[TLS_MAX_IV_SIZE];
64 u8 aad[TLS_MAX_AAD_SIZE];64 u8 aad[TLS_MAX_AAD_SIZE];
65 u8 tail;65 u8 tail;
66 bool free_sgout;
66 struct scatterlist sg[];67 struct scatterlist sg[];
67};68};
68 69
@@ -187,7 +188,6 @@ static void tls_decrypt_done(void *data, int err) · 118 unmodified lines
187 struct aead_request *aead_req = data;188 struct aead_request *aead_req = data;
188 struct crypto_aead *aead = crypto_aead_reqtfm(aead_req);189 struct crypto_aead *aead = crypto_aead_reqtfm(aead_req);
189 struct scatterlist *sgout = aead_req->dst;190 struct scatterlist *sgout = aead_req->dst;
190 struct scatterlist *sgin = aead_req->src;
191 struct tls_sw_context_rx *ctx;191 struct tls_sw_context_rx *ctx;
192 struct tls_decrypt_ctx *dctx;192 struct tls_decrypt_ctx *dctx;
193 struct tls_context *tls_ctx;193 struct tls_context *tls_ctx;
@@ -196,6 +196,17 @@ static void tls_decrypt_done(void *data, int err) · 2 unmodified lines
196 struct sock *sk;196 struct sock *sk;
197 int aead_size;197 int aead_size;
198 198
199 /* If requests get too backlogged crypto API returns -EBUSY and calls
200 * ->complete(-EINPROGRESS) immediately followed by ->complete(0)
201 * to make waiting for backlog to flush with crypto_wait_req() easier.
202 * First wait converts -EBUSY -> -EINPROGRESS, and the second one
203 * -EINPROGRESS -> 0.
204 * We have a single struct crypto_async_request per direction, this
205 * scheme doesn't help us, so just ignore the first ->complete().
206 */
207 if (err == -EINPROGRESS)
208 return;
209
199 aead_size = sizeof(*aead_req) + crypto_aead_reqsize(aead);210 aead_size = sizeof(*aead_req) + crypto_aead_reqsize(aead);
200 aead_size = ALIGN(aead_size, __alignof__(*dctx));211 aead_size = ALIGN(aead_size, __alignof__(*dctx));
201 dctx = (void *)((u8 *)aead_req + aead_size);212 dctx = (void *)((u8 *)aead_req + aead_size);
@@ -213,7 +224,7 @@ static void tls_decrypt_done(void *data, int err) · 11 unmodified lines
213 }224 }
214 225
215 /* Free the destination pages if skb was not decrypted inplace */226 /* Free the destination pages if skb was not decrypted inplace */
216 if (sgout != sgin) {227 if (dctx->free_sgout) {
217 /* Skip the first S/G entry as it points to AAD */228 /* Skip the first S/G entry as it points to AAD */
218 for_each_sg(sg_next(sgout), sg, UINT_MAX, pages) {229 for_each_sg(sg_next(sgout), sg, UINT_MAX, pages) {
219 if (!sg)230 if (!sg)
@@ -224,10 +235,17 @@ static void tls_decrypt_done(void *data, int err) · 4 unmodified lines
224 235
225 kfree(aead_req);236 kfree(aead_req);
226 237
227 spin_lock_bh(&ctx->decrypt_compl_lock);238 if (atomic_dec_and_test(&ctx->decrypt_pending))
228 if (!atomic_dec_return(&ctx->decrypt_pending))
229 complete(&ctx->async_wait.completion);239 complete(&ctx->async_wait.completion);
230 spin_unlock_bh(&ctx->decrypt_compl_lock);240}
241
242static int tls_decrypt_async_wait(struct tls_sw_context_rx *ctx)
243{
244 if (!atomic_dec_and_test(&ctx->decrypt_pending))
245 crypto_wait_req(-EINPROGRESS, &ctx->async_wait);
246 atomic_inc(&ctx->decrypt_pending);
247
248 return ctx->async_wait.err;
231}249}
232 250
233static int tls_do_decryption(struct sock *sk,251static int tls_do_decryption(struct sock *sk,
@@ -253,6 +271,7 @@ static int tls_do_decryption(struct sock *sk, · 19 unmodified lines
253 aead_request_set_callback(aead_req,271 aead_request_set_callback(aead_req,
254 CRYPTO_TFM_REQ_MAY_BACKLOG,272 CRYPTO_TFM_REQ_MAY_BACKLOG,
255 tls_decrypt_done, aead_req);273 tls_decrypt_done, aead_req);
274 DEBUG_NET_WARN_ON_ONCE(atomic_read(&ctx->decrypt_pending) < 1);
256 atomic_inc(&ctx->decrypt_pending);275 atomic_inc(&ctx->decrypt_pending);
257 } else {276 } else {
258 aead_request_set_callback(aead_req,277 aead_request_set_callback(aead_req,
@@ -261,6 +280,10 @@ static int tls_do_decryption(struct sock *sk, · 2 unmodified lines
261 }280 }
262 281
263 ret = crypto_aead_decrypt(aead_req);282 ret = crypto_aead_decrypt(aead_req);
283 if (ret == -EBUSY) {
284 ret = tls_decrypt_async_wait(ctx);
285 ret = ret ?: -EINPROGRESS;
286 }
264 if (ret == -EINPROGRESS) {287 if (ret == -EINPROGRESS) {
265 if (darg->async)288 if (darg->async)
266 return 0;289 return 0;
@@ -439,9 +462,10 @@ static void tls_encrypt_done(void *data, int err) · 172 unmodified lines
439 struct tls_rec *rec = data;462 struct tls_rec *rec = data;
440 struct scatterlist *sge;463 struct scatterlist *sge;
441 struct sk_msg *msg_en;464 struct sk_msg *msg_en;
442 bool ready = false;
443 struct sock *sk;465 struct sock *sk;
444 int pending;466
467 if (err == -EINPROGRESS) /* see the comment in tls_decrypt_done() */
468 return;
445 469
446 msg_en = &rec->msg_encrypted;470 msg_en = &rec->msg_encrypted;
447 471
@@ -476,23 +500,25 @@ static void tls_encrypt_done(void *data, int err) · 28 unmodified lines
476 /* If received record is at head of tx_list, schedule tx */500 /* If received record is at head of tx_list, schedule tx */
477 first_rec = list_first_entry(&ctx->tx_list,501 first_rec = list_first_entry(&ctx->tx_list,
478 struct tls_rec, list);502 struct tls_rec, list);
479 if (rec == first_rec)503 if (rec == first_rec) {
480 ready = true;504 /* Schedule the transmission */
505 if (!test_and_set_bit(BIT_TX_SCHEDULED,
506 &ctx->tx_bitmask))
507 schedule_delayed_work(&ctx->tx_work.work, 1);
508 }
481 }509 }
482 510
483 spin_lock_bh(&ctx->encrypt_compl_lock);511 if (atomic_dec_and_test(&ctx->encrypt_pending))
484 pending = atomic_dec_return(&ctx->encrypt_pending);
485
486 if (!pending && ctx->async_notify)
487 complete(&ctx->async_wait.completion);512 complete(&ctx->async_wait.completion);
488 spin_unlock_bh(&ctx->encrypt_compl_lock);513}
489 514
490 if (!ready)515static int tls_encrypt_async_wait(struct tls_sw_context_tx *ctx)
491 return;516{
517 if (!atomic_dec_and_test(&ctx->encrypt_pending))
518 crypto_wait_req(-EINPROGRESS, &ctx->async_wait);
519 atomic_inc(&ctx->encrypt_pending);
492 520
493 /* Schedule the transmission */521 return ctx->async_wait.err;
494 if (!test_and_set_bit(BIT_TX_SCHEDULED, &ctx->tx_bitmask))
495 schedule_delayed_work(&ctx->tx_work.work, 1);
496}522}
497 523
498static int tls_do_encryption(struct sock *sk,524static int tls_do_encryption(struct sock *sk,
@@ -541,9 +567,14 @@ static int tls_do_encryption(struct sock *sk, · 42 unmodified lines
541 567
542 /* Add the record in tx_list */568 /* Add the record in tx_list */
543 list_add_tail((struct list_head *)&rec->list, &ctx->tx_list);569 list_add_tail((struct list_head *)&rec->list, &ctx->tx_list);
570 DEBUG_NET_WARN_ON_ONCE(atomic_read(&ctx->encrypt_pending) < 1);
544 atomic_inc(&ctx->encrypt_pending);571 atomic_inc(&ctx->encrypt_pending);
545 572
546 rc = crypto_aead_encrypt(aead_req);573 rc = crypto_aead_encrypt(aead_req);
574 if (rc == -EBUSY) {
575 rc = tls_encrypt_async_wait(ctx);
576 rc = rc ?: -EINPROGRESS;
577 }
547 if (!rc || rc != -EINPROGRESS) {578 if (!rc || rc != -EINPROGRESS) {
548 atomic_dec(&ctx->encrypt_pending);579 atomic_dec(&ctx->encrypt_pending);
549 sge->offset -= prot->prepend_size;580 sge->offset -= prot->prepend_size;
@@ -984,7 +1015,6 @@ static int tls_sw_sendmsg_locked(struct sock *sk, struct msghdr *msg, · 434 unmodified lines
984 int num_zc = 0;1015 int num_zc = 0;
985 int orig_size;1016 int orig_size;
986 int ret = 0;1017 int ret = 0;
987 int pending;
988 1018
989 if (!eor && (msg->msg_flags & MSG_EOR))1019 if (!eor && (msg->msg_flags & MSG_EOR))
990 return -EINVAL;1020 return -EINVAL;
@@ -1163,24 +1193,12 @@ trim_sgl: · 172 unmodified lines
1163 if (!num_async) {1193 if (!num_async) {
1164 goto send_end;1194 goto send_end;
1165 } else if (num_zc) {1195 } else if (num_zc) {
1166 /* Wait for pending encryptions to get completed */1196 int err;
1167 spin_lock_bh(&ctx->encrypt_compl_lock);
1168 ctx->async_notify = true;
1169
1170 pending = atomic_read(&ctx->encrypt_pending);
1171 spin_unlock_bh(&ctx->encrypt_compl_lock);
1172 if (pending)
1173 crypto_wait_req(-EINPROGRESS, &ctx->async_wait);
1174 else
1175 reinit_completion(&ctx->async_wait.completion);
1176
1177 /* There can be no concurrent accesses, since we have no
1178 * pending encrypt operations
1179 */
1180 WRITE_ONCE(ctx->async_notify, false);
1181 1197
1182 if (ctx->async_wait.err) {1198 /* Wait for pending encryptions to get completed */
1183 ret = ctx->async_wait.err;1199 err = tls_encrypt_async_wait(ctx);
1200 if (err) {
1201 ret = err;
1184 copied = 0;1202 copied = 0;
1185 }1203 }
1186 }1204 }
@@ -1229,7 +1247,6 @@ void tls_sw_splice_eof(struct socket *sock) · 42 unmodified lines
1229 ssize_t copied = 0;1247 ssize_t copied = 0;
1230 bool retrying = false;1248 bool retrying = false;
1231 int ret = 0;1249 int ret = 0;
1232 int pending;
1233 1250
1234 if (!ctx->open_rec)1251 if (!ctx->open_rec)
1235 return;1252 return;
@@ -1264,22 +1281,7 @@ retry: · 28 unmodified lines
1264 }1281 }
1265 1282
1266 /* Wait for pending encryptions to get completed */1283 /* Wait for pending encryptions to get completed */
1267 spin_lock_bh(&ctx->encrypt_compl_lock);1284 if (tls_encrypt_async_wait(ctx))
1268 ctx->async_notify = true;
1269
1270 pending = atomic_read(&ctx->encrypt_pending);
1271 spin_unlock_bh(&ctx->encrypt_compl_lock);
1272 if (pending)
1273 crypto_wait_req(-EINPROGRESS, &ctx->async_wait);
1274 else
1275 reinit_completion(&ctx->async_wait.completion);
1276
1277 /* There can be no concurrent accesses, since we have no pending
1278 * encrypt operations
1279 */
1280 WRITE_ONCE(ctx->async_notify, false);
1281
1282 if (ctx->async_wait.err)
1283 goto unlock;1285 goto unlock;
1284 1286
1285 /* Transmit if any encryptions have completed */1287 /* Transmit if any encryptions have completed */
@@ -1581,6 +1583,7 @@ static int tls_decrypt_sg(struct sock *sk, struct iov_iter *out_iov, · 295 unmodified lines
1581 } else if (out_sg) {1583 } else if (out_sg) {
1582 memcpy(sgout, out_sg, n_sgout * sizeof(*sgout));1584 memcpy(sgout, out_sg, n_sgout * sizeof(*sgout));
1583 }1585 }
1586 dctx->free_sgout = !!pages;
1584 1587
1585 /* Prepare and submit AEAD request */1588 /* Prepare and submit AEAD request */
1586 err = tls_do_decryption(sk, sgin, sgout, dctx->iv,1589 err = tls_do_decryption(sk, sgin, sgout, dctx->iv,
@@ -2109,16 +2112,10 @@ put_on_rx_list: · 522 unmodified lines
2109 2112
2110recv_end:2113recv_end:
2111 if (async) {2114 if (async) {
2112 int ret, pending;2115 int ret;
2113 2116
2114 /* Wait for all previously submitted records to be decrypted */2117 /* Wait for all previously submitted records to be decrypted */
2115 spin_lock_bh(&ctx->decrypt_compl_lock);2118 ret = tls_decrypt_async_wait(ctx);
2116 reinit_completion(&ctx->async_wait.completion);
2117 pending = atomic_read(&ctx->decrypt_pending);
2118 spin_unlock_bh(&ctx->decrypt_compl_lock);
2119 ret = 0;
2120 if (pending)
2121 ret = crypto_wait_req(-EINPROGRESS, &ctx->async_wait);
2122 __skb_queue_purge(&ctx->async_hold);2119 __skb_queue_purge(&ctx->async_hold);
2123 2120
2124 if (ret) {2121 if (ret) {
@@ -2135,7 +2132,6 @@ recv_end: · 10 unmodified lines
2135 else2132 else
2136 err = process_rx_list(ctx, msg, &control, 0,2133 err = process_rx_list(ctx, msg, &control, 0,
2137 async_copy_bytes, is_peek);2134 async_copy_bytes, is_peek);
2138 decrypted += max(err, 0);
2139 }2135 }
2140 2136
2141 copied += decrypted;2137 copied += decrypted;
@@ -2435,16 +2431,9 @@ void tls_sw_release_resources_tx(struct sock *sk) · 293 unmodified lines
2435 struct tls_context *tls_ctx = tls_get_ctx(sk);2431 struct tls_context *tls_ctx = tls_get_ctx(sk);
2436 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);2432 struct tls_sw_context_tx *ctx = tls_sw_ctx_tx(tls_ctx);
2437 struct tls_rec *rec, *tmp;2433 struct tls_rec *rec, *tmp;
2438 int pending;
2439 2434
2440 /* Wait for any pending async encryptions to complete */2435 /* Wait for any pending async encryptions to complete */
2441 spin_lock_bh(&ctx->encrypt_compl_lock);2436 tls_encrypt_async_wait(ctx);
2442 ctx->async_notify = true;
2443 pending = atomic_read(&ctx->encrypt_pending);
2444 spin_unlock_bh(&ctx->encrypt_compl_lock);
2445
2446 if (pending)
2447 crypto_wait_req(-EINPROGRESS, &ctx->async_wait);
2448 2437
2449 tls_tx_records(sk, -1);2438 tls_tx_records(sk, -1);
2450 2439
@@ -2607,7 +2596,7 @@ static struct tls_sw_context_tx *init_ctx_tx(struct tls_context *ctx, struct soc · 156 unmodified lines
2607 }2596 }
2608 2597
2609 crypto_init_wait(&sw_ctx_tx->async_wait);2598 crypto_init_wait(&sw_ctx_tx->async_wait);
2610 spin_lock_init(&sw_ctx_tx->encrypt_compl_lock);2599 atomic_set(&sw_ctx_tx->encrypt_pending, 1);
2611 INIT_LIST_HEAD(&sw_ctx_tx->tx_list);2600 INIT_LIST_HEAD(&sw_ctx_tx->tx_list);
2612 INIT_DELAYED_WORK(&sw_ctx_tx->tx_work.work, tx_work_handler);2601 INIT_DELAYED_WORK(&sw_ctx_tx->tx_work.work, tx_work_handler);
2613 sw_ctx_tx->tx_work.sk = sk;2602 sw_ctx_tx->tx_work.sk = sk;
@@ -2628,7 +2617,7 @@ static struct tls_sw_context_rx *init_ctx_rx(struct tls_context *ctx) · 14 unmodified lines
2628 }2617 }
2629 2618
2630 crypto_init_wait(&sw_ctx_rx->async_wait);2619 crypto_init_wait(&sw_ctx_rx->async_wait);
2631 spin_lock_init(&sw_ctx_rx->decrypt_compl_lock);2620 atomic_set(&sw_ctx_rx->decrypt_pending, 1);
2632 init_waitqueue_head(&sw_ctx_rx->wq);2621 init_waitqueue_head(&sw_ctx_rx->wq);
2633 skb_queue_head_init(&sw_ctx_rx->rx_list);2622 skb_queue_head_init(&sw_ctx_rx->rx_list);
2634 skb_queue_head_init(&sw_ctx_rx->async_hold);2623 skb_queue_head_init(&sw_ctx_rx->async_hold);
net/unix/garbage.c+4−3
@@ -315,10 +315,11 @@ void unix_gc(void) · 314 unmodified lines
315 __skb_queue_purge(&hitlist);315 __skb_queue_purge(&hitlist);
316 316
317#if IS_ENABLED(CONFIG_AF_UNIX_OOB)317#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
318 list_for_each_entry_safe(u, next, &gc_candidates, link) {318 while (!list_empty(&gc_candidates)) {
319 struct sk_buff *skb = u->oob_skb;319 u = list_entry(gc_candidates.next, struct unix_sock, link);
320 if (u->oob_skb) {
321 struct sk_buff *skb = u->oob_skb;
320 322
321 if (skb) {
322 u->oob_skb = NULL;323 u->oob_skb = NULL;
323 kfree_skb(skb);324 kfree_skb(skb);
324 }325 }
net/xfrm/xfrm_algo.c+1−0
@@ -858,4 +858,5 @@ int xfrm_count_pfkey_enc_supported(void) · 857 unmodified lines
858}858}
859EXPORT_SYMBOL_GPL(xfrm_count_pfkey_enc_supported);859EXPORT_SYMBOL_GPL(xfrm_count_pfkey_enc_supported);
860 860
861MODULE_DESCRIPTION("XFRM Algorithm interface");
861MODULE_LICENSE("GPL");862MODULE_LICENSE("GPL");
net/xfrm/xfrm_user.c+1−0
@@ -3888,5 +3888,6 @@ static void __exit xfrm_user_exit(void) · 3887 unmodified lines
3888 3888
3889module_init(xfrm_user_init);3889module_init(xfrm_user_init);
3890module_exit(xfrm_user_exit);3890module_exit(xfrm_user_exit);
3891MODULE_DESCRIPTION("XFRM User interface");
3891MODULE_LICENSE("GPL");3892MODULE_LICENSE("GPL");
3892MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_XFRM);3893MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_XFRM);
tools/testing/selftests/net/config+5−1
@@ -24,10 +24,14 @@ CONFIG_IFB=y · 23 unmodified lines
24CONFIG_INET_DIAG=y24CONFIG_INET_DIAG=y
25CONFIG_INET_ESP=y25CONFIG_INET_ESP=y
26CONFIG_INET_ESP_OFFLOAD=y26CONFIG_INET_ESP_OFFLOAD=y
27CONFIG_NET_FOU=y
28CONFIG_NET_FOU_IP_TUNNELS=y
27CONFIG_IP_GRE=m29CONFIG_IP_GRE=m
28CONFIG_NETFILTER=y30CONFIG_NETFILTER=y
29CONFIG_NETFILTER_ADVANCED=y31CONFIG_NETFILTER_ADVANCED=y
30CONFIG_NF_CONNTRACK=m32CONFIG_NF_CONNTRACK=m
33CONFIG_IPV6_SIT=y
34CONFIG_IP_DCCP=m
31CONFIG_NF_NAT=m35CONFIG_NF_NAT=m
32CONFIG_IP6_NF_IPTABLES=m36CONFIG_IP6_NF_IPTABLES=m
33CONFIG_IP_NF_IPTABLES=m37CONFIG_IP_NF_IPTABLES=m
@@ -62,6 +66,7 @@ CONFIG_NET_CLS_MATCHALL=m · 28 unmodified lines
62CONFIG_NET_CLS_U32=m66CONFIG_NET_CLS_U32=m
63CONFIG_NET_IPGRE_DEMUX=m67CONFIG_NET_IPGRE_DEMUX=m
64CONFIG_NET_IPGRE=m68CONFIG_NET_IPGRE=m
69CONFIG_NET_IPIP=y
65CONFIG_NET_SCH_FQ_CODEL=m70CONFIG_NET_SCH_FQ_CODEL=m
66CONFIG_NET_SCH_HTB=m71CONFIG_NET_SCH_HTB=m
67CONFIG_NET_SCH_FQ=m72CONFIG_NET_SCH_FQ=m
@@ -78,7 +83,6 @@ CONFIG_TLS=m · 10 unmodified lines
78CONFIG_TRACEPOINTS=y83CONFIG_TRACEPOINTS=y
79CONFIG_NET_DROP_MONITOR=m84CONFIG_NET_DROP_MONITOR=m
80CONFIG_NETDEVSIM=m85CONFIG_NETDEVSIM=m
81CONFIG_NET_FOU=m
82CONFIG_MPLS_ROUTING=m86CONFIG_MPLS_ROUTING=m
83CONFIG_MPLS_IPTUNNEL=m87CONFIG_MPLS_IPTUNNEL=m
84CONFIG_NET_SCH_INGRESS=m88CONFIG_NET_SCH_INGRESS=m
tools/testing/selftests/net/forwarding/bridge_locked_port.sh+2−2
@@ -327,10 +327,10 @@ locked_port_mab_redirect() · 326 unmodified lines
327 RET=0327 RET=0
328 check_port_mab_support || return 0328 check_port_mab_support || return 0
329 329
330 bridge link set dev $swp1 learning on locked on mab on
331 tc qdisc add dev $swp1 clsact330 tc qdisc add dev $swp1 clsact
332 tc filter add dev $swp1 ingress protocol all pref 1 handle 101 flower \331 tc filter add dev $swp1 ingress protocol all pref 1 handle 101 flower \
333 action mirred egress redirect dev $swp2332 action mirred egress redirect dev $swp2
333 bridge link set dev $swp1 learning on locked on mab on
334 334
335 ping_do $h1 192.0.2.2335 ping_do $h1 192.0.2.2
336 check_err $? "Ping did not work with redirection"336 check_err $? "Ping did not work with redirection"
@@ -349,8 +349,8 @@ locked_port_mab_redirect() · 12 unmodified lines
349 check_err $? "Locked entry not created after deleting filter"349 check_err $? "Locked entry not created after deleting filter"
350 350
351 bridge fdb del `mac_get $h1` vlan 1 dev $swp1 master351 bridge fdb del `mac_get $h1` vlan 1 dev $swp1 master
352 tc qdisc del dev $swp1 clsact
353 bridge link set dev $swp1 learning off locked off mab off352 bridge link set dev $swp1 learning off locked off mab off
353 tc qdisc del dev $swp1 clsact
354 354
355 log_test "Locked port MAB redirect"355 log_test "Locked port MAB redirect"
356}356}
tools/testing/selftests/net/forwarding/bridge_mdb.sh+9−5
@@ -329,7 +329,7 @@ __cfg_test_port_ip_star_g() · 328 unmodified lines
329 329
330 bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q " 0.00"330 bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q " 0.00"
331 check_err $? "(*, G) \"permanent\" entry has a pending group timer"331 check_err $? "(*, G) \"permanent\" entry has a pending group timer"
332 bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q "\/0.00"332 bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q "/0.00"
333 check_err $? "\"permanent\" source entry has a pending source timer"333 check_err $? "\"permanent\" source entry has a pending source timer"
334 334
335 bridge mdb del dev br0 port $swp1 grp $grp vid 10335 bridge mdb del dev br0 port $swp1 grp $grp vid 10
@@ -346,7 +346,7 @@ __cfg_test_port_ip_star_g() · 10 unmodified lines
346 346
347 bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q " 0.00"347 bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q " 0.00"
348 check_fail $? "(*, G) EXCLUDE entry does not have a pending group timer"348 check_fail $? "(*, G) EXCLUDE entry does not have a pending group timer"
349 bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q "\/0.00"349 bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q "/0.00"
350 check_err $? "\"blocked\" source entry has a pending source timer"350 check_err $? "\"blocked\" source entry has a pending source timer"
351 351
352 bridge mdb del dev br0 port $swp1 grp $grp vid 10352 bridge mdb del dev br0 port $swp1 grp $grp vid 10
@@ -363,7 +363,7 @@ __cfg_test_port_ip_star_g() · 10 unmodified lines
363 363
364 bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q " 0.00"364 bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q " 0.00"
365 check_err $? "(*, G) INCLUDE entry has a pending group timer"365 check_err $? "(*, G) INCLUDE entry has a pending group timer"
366 bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q "\/0.00"366 bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q "/0.00"
367 check_fail $? "Source entry does not have a pending source timer"367 check_fail $? "Source entry does not have a pending source timer"
368 368
369 bridge mdb del dev br0 port $swp1 grp $grp vid 10369 bridge mdb del dev br0 port $swp1 grp $grp vid 10
@@ -1252,14 +1252,17 @@ fwd_test() · 882 unmodified lines
1252 echo1252 echo
1253 log_info "# Forwarding tests"1253 log_info "# Forwarding tests"
1254 1254
1255 # Set the Max Response Delay to 100 centiseconds (1 second) so that the
1256 # bridge will start forwarding according to its MDB soon after a
1257 # multicast querier is enabled.
1258 ip link set dev br0 type bridge mcast_query_response_interval 100
1259
1255 # Forwarding according to MDB entries only takes place when the bridge1260 # Forwarding according to MDB entries only takes place when the bridge
1256 # detects that there is a valid querier in the network. Set the bridge1261 # detects that there is a valid querier in the network. Set the bridge
1257 # as the querier and assign it a valid IPv6 link-local address to be1262 # as the querier and assign it a valid IPv6 link-local address to be
1258 # used as the source address for MLD queries.1263 # used as the source address for MLD queries.
1259 ip -6 address add fe80::1/64 nodad dev br01264 ip -6 address add fe80::1/64 nodad dev br0
1260 ip link set dev br0 type bridge mcast_querier 11265 ip link set dev br0 type bridge mcast_querier 1
1261 # Wait the default Query Response Interval (10 seconds) for the bridge
1262 # to determine that there are no other queriers in the network.
1263 sleep 101266 sleep 10
1264 1267
1265 fwd_test_host1268 fwd_test_host
@@ -1267,6 +1270,7 @@ fwd_test() · 1 unmodified line
1267 1270
1268 ip link set dev br0 type bridge mcast_querier 01271 ip link set dev br0 type bridge mcast_querier 0
1269 ip -6 address del fe80::1/64 dev br01272 ip -6 address del fe80::1/64 dev br0
1273 ip link set dev br0 type bridge mcast_query_response_interval 1000
1270}1274}
1271 1275
1272ctrl_igmpv3_is_in_test()1276ctrl_igmpv3_is_in_test()
tools/testing/selftests/net/forwarding/tc_flower_l2_miss.sh+6−2
@@ -209,14 +209,17 @@ test_l2_miss_multicast() · 208 unmodified lines
209 # both registered and unregistered multicast traffic.209 # both registered and unregistered multicast traffic.
210 bridge link set dev $swp2 mcast_router 2210 bridge link set dev $swp2 mcast_router 2
211 211
212 # Set the Max Response Delay to 100 centiseconds (1 second) so that the
213 # bridge will start forwarding according to its MDB soon after a
214 # multicast querier is enabled.
215 ip link set dev br1 type bridge mcast_query_response_interval 100
216
212 # Forwarding according to MDB entries only takes place when the bridge217 # Forwarding according to MDB entries only takes place when the bridge
213 # detects that there is a valid querier in the network. Set the bridge218 # detects that there is a valid querier in the network. Set the bridge
214 # as the querier and assign it a valid IPv6 link-local address to be219 # as the querier and assign it a valid IPv6 link-local address to be
215 # used as the source address for MLD queries.220 # used as the source address for MLD queries.
216 ip link set dev br1 type bridge mcast_querier 1221 ip link set dev br1 type bridge mcast_querier 1
217 ip -6 address add fe80::1/64 nodad dev br1222 ip -6 address add fe80::1/64 nodad dev br1
218 # Wait the default Query Response Interval (10 seconds) for the bridge
219 # to determine that there are no other queriers in the network.
220 sleep 10223 sleep 10
221 224
222 test_l2_miss_multicast_ipv4225 test_l2_miss_multicast_ipv4
@@ -224,6 +227,7 @@ test_l2_miss_multicast() · 1 unmodified line
224 227
225 ip -6 address del fe80::1/64 dev br1228 ip -6 address del fe80::1/64 dev br1
226 ip link set dev br1 type bridge mcast_querier 0229 ip link set dev br1 type bridge mcast_querier 0
230 ip link set dev br1 type bridge mcast_query_response_interval 1000
227 bridge link set dev $swp2 mcast_router 1231 bridge link set dev $swp2 mcast_router 1
228}232}
229 233
tools/testing/selftests/net/gro.sh+5−0
@@ -31,6 +31,11 @@ run_test() { · 30 unmodified lines
31 1>>log.txt31 1>>log.txt
32 wait "${server_pid}"32 wait "${server_pid}"
33 exit_code=$?33 exit_code=$?
34 if [[ ${test} == "large" && -n "${KSFT_MACHINE_SLOW}" && \
35 ${exit_code} -ne 0 ]]; then
36 echo "Ignoring errors due to slow environment" 1>&2
37 exit_code=0
38 fi
34 if [[ "${exit_code}" -eq 0 ]]; then39 if [[ "${exit_code}" -eq 0 ]]; then
35 break;40 break;
36 fi41 fi
tools/testing/selftests/net/ip_local_port_range.c+4−0
@@ -16,6 +16,10 @@ · 15 unmodified lines
16#define IP_LOCAL_PORT_RANGE 5116#define IP_LOCAL_PORT_RANGE 51
17#endif17#endif
18 18
19#ifndef IPPROTO_MPTCP
20#define IPPROTO_MPTCP 262
21#endif
22
19static __u32 pack_port_range(__u16 lo, __u16 hi)23static __u32 pack_port_range(__u16 lo, __u16 hi)
20{24{
21 return (hi << 16) | (lo << 0);25 return (hi << 16) | (lo << 0);
tools/testing/selftests/net/net_helper.sh+7−4
@@ -8,13 +8,16 @@ wait_local_port_listen() · 7 unmodified lines
8 local listener_ns="${1}"8 local listener_ns="${1}"
9 local port="${2}"9 local port="${2}"
10 local protocol="${3}"10 local protocol="${3}"
11 local port_hex11 local pattern
12 local i12 local i
13 13
14 port_hex="$(printf "%04X" "${port}")"14 pattern=":$(printf "%04X" "${port}") "
15
16 # for tcp protocol additionally check the socket state
17 [ ${protocol} = "tcp" ] && pattern="${pattern}0A"
15 for i in $(seq 10); do18 for i in $(seq 10); do
16 if ip netns exec "${listener_ns}" cat /proc/net/"${protocol}"* | \19 if ip netns exec "${listener_ns}" awk '{print $2" "$4}' \
17 grep -q "${port_hex}"; then20 /proc/net/"${protocol}"* | grep -q "${pattern}"; then
18 break21 break
19 fi22 fi
20 sleep 0.123 sleep 0.1
tools/testing/selftests/net/openvswitch/openvswitch.sh+13−0
@@ -502,7 +502,20 @@ test_netlink_checks () { · 501 unmodified lines
502 wc -l) == 2 ] || \502 wc -l) == 2 ] || \
503 return 1503 return 1
504 504
505 info "Checking clone depth"
505 ERR_MSG="Flow actions may not be safe on all matching packets"506 ERR_MSG="Flow actions may not be safe on all matching packets"
507 PRE_TEST=$(dmesg | grep -c "${ERR_MSG}")
508 ovs_add_flow "test_netlink_checks" nv0 \
509 'in_port(1),eth(),eth_type(0x800),ipv4()' \
510 'clone(clone(clone(clone(clone(clone(clone(clone(clone(clone(clone(clone(clone(clone(clone(clone(clone(drop)))))))))))))))))' \
511 >/dev/null 2>&1 && return 1
512 POST_TEST=$(dmesg | grep -c "${ERR_MSG}")
513
514 if [ "$PRE_TEST" == "$POST_TEST" ]; then
515 info "failed - clone depth too large"
516 return 1
517 fi
518
506 PRE_TEST=$(dmesg | grep -c "${ERR_MSG}")519 PRE_TEST=$(dmesg | grep -c "${ERR_MSG}")
507 ovs_add_flow "test_netlink_checks" nv0 \520 ovs_add_flow "test_netlink_checks" nv0 \
508 'in_port(1),eth(),eth_type(0x0806),arp()' 'drop(0),2' \521 'in_port(1),eth(),eth_type(0x0806),arp()' 'drop(0),2' \
tools/testing/selftests/net/openvswitch/ovs-dpctl.py+56−15
@@ -299,7 +299,7 @@ class ovsactions(nla): · 298 unmodified lines
299 ("OVS_ACTION_ATTR_PUSH_NSH", "none"),299 ("OVS_ACTION_ATTR_PUSH_NSH", "none"),
300 ("OVS_ACTION_ATTR_POP_NSH", "flag"),300 ("OVS_ACTION_ATTR_POP_NSH", "flag"),
301 ("OVS_ACTION_ATTR_METER", "none"),301 ("OVS_ACTION_ATTR_METER", "none"),
302 ("OVS_ACTION_ATTR_CLONE", "none"),302 ("OVS_ACTION_ATTR_CLONE", "recursive"),
303 ("OVS_ACTION_ATTR_CHECK_PKT_LEN", "none"),303 ("OVS_ACTION_ATTR_CHECK_PKT_LEN", "none"),
304 ("OVS_ACTION_ATTR_ADD_MPLS", "none"),304 ("OVS_ACTION_ATTR_ADD_MPLS", "none"),
305 ("OVS_ACTION_ATTR_DEC_TTL", "none"),305 ("OVS_ACTION_ATTR_DEC_TTL", "none"),
@@ -465,29 +465,42 @@ class ovsactions(nla): · 159 unmodified lines
465 print_str += "pop_mpls"465 print_str += "pop_mpls"
466 else:466 else:
467 datum = self.get_attr(field[0])467 datum = self.get_attr(field[0])
468 print_str += datum.dpstr(more)468 if field[0] == "OVS_ACTION_ATTR_CLONE":
469 print_str += "clone("
470 print_str += datum.dpstr(more)
471 print_str += ")"
472 else:
473 print_str += datum.dpstr(more)
469 474
470 return print_str475 return print_str
471 476
472 def parse(self, actstr):477 def parse(self, actstr):
478 totallen = len(actstr)
473 while len(actstr) != 0:479 while len(actstr) != 0:
474 parsed = False480 parsed = False
481 parencount = 0
475 if actstr.startswith("drop"):482 if actstr.startswith("drop"):
476 # If no reason is provided, the implicit drop is used (i.e no483 # If no reason is provided, the implicit drop is used (i.e no
477 # action). If some reason is given, an explicit action is used.484 # action). If some reason is given, an explicit action is used.
478 actstr, reason = parse_extract_field(485 reason = None
479 actstr,486 if actstr.startswith("drop("):
480 "drop(",487 parencount += 1
481 "([0-9]+)",488
482 lambda x: int(x, 0),489 actstr, reason = parse_extract_field(
483 False,490 actstr,
484 None,491 "drop(",
485 )492 "([0-9]+)",
493 lambda x: int(x, 0),
494 False,
495 None,
496 )
497
486 if reason is not None:498 if reason is not None:
487 self["attrs"].append(["OVS_ACTION_ATTR_DROP", reason])499 self["attrs"].append(["OVS_ACTION_ATTR_DROP", reason])
488 parsed = True500 parsed = True
489 else:501 else:
490 return502 actstr = actstr[len("drop"): ]
503 return (totallen - len(actstr))
491 504
492 elif parse_starts_block(actstr, "^(\d+)", False, True):505 elif parse_starts_block(actstr, "^(\d+)", False, True):
493 actstr, output = parse_extract_field(506 actstr, output = parse_extract_field(
@@ -504,6 +517,7 @@ class ovsactions(nla): · 10 unmodified lines
504 False,517 False,
505 0,518 0,
506 )519 )
520 parencount += 1
507 self["attrs"].append(["OVS_ACTION_ATTR_RECIRC", recircid])521 self["attrs"].append(["OVS_ACTION_ATTR_RECIRC", recircid])
508 parsed = True522 parsed = True
509 523
@@ -516,12 +530,22 @@ class ovsactions(nla): · 6 unmodified lines
516 530
517 for flat_act in parse_flat_map:531 for flat_act in parse_flat_map:
518 if parse_starts_block(actstr, flat_act[0], False):532 if parse_starts_block(actstr, flat_act[0], False):
519 actstr += len(flat_act[0])533 actstr = actstr[len(flat_act[0]):]
520 self["attrs"].append([flat_act[1]])534 self["attrs"].append([flat_act[1]])
521 actstr = actstr[strspn(actstr, ", ") :]535 actstr = actstr[strspn(actstr, ", ") :]
522 parsed = True536 parsed = True
523 537
524 if parse_starts_block(actstr, "ct(", False):538 if parse_starts_block(actstr, "clone(", False):
539 parencount += 1
540 subacts = ovsactions()
541 actstr = actstr[len("clone("):]
542 parsedLen = subacts.parse(actstr)
543 lst = []
544 self["attrs"].append(("OVS_ACTION_ATTR_CLONE", subacts))
545 actstr = actstr[parsedLen:]
546 parsed = True
547 elif parse_starts_block(actstr, "ct(", False):
548 parencount += 1
525 actstr = actstr[len("ct(") :]549 actstr = actstr[len("ct(") :]
526 ctact = ovsactions.ctact()550 ctact = ovsactions.ctact()
527 551
@@ -553,6 +577,7 @@ class ovsactions(nla): · 25 unmodified lines
553 natact = ovsactions.ctact.natattr()577 natact = ovsactions.ctact.natattr()
554 578
555 if actstr.startswith("("):579 if actstr.startswith("("):
580 parencount += 1
556 t = None581 t = None
557 actstr = actstr[1:]582 actstr = actstr[1:]
558 if actstr.startswith("src"):583 if actstr.startswith("src"):
@@ -607,15 +632,29 @@ class ovsactions(nla): · 48 unmodified lines
607 actstr = actstr[strspn(actstr, ", ") :]632 actstr = actstr[strspn(actstr, ", ") :]
608 633
609 ctact["attrs"].append(["OVS_CT_ATTR_NAT", natact])634 ctact["attrs"].append(["OVS_CT_ATTR_NAT", natact])
610 actstr = actstr[strspn(actstr, ",) ") :]635 actstr = actstr[strspn(actstr, ", ") :]
611 636
612 self["attrs"].append(["OVS_ACTION_ATTR_CT", ctact])637 self["attrs"].append(["OVS_ACTION_ATTR_CT", ctact])
613 parsed = True638 parsed = True
614 639
615 actstr = actstr[strspn(actstr, "), ") :]640 actstr = actstr[strspn(actstr, ", ") :]
641 while parencount > 0:
642 parencount -= 1
643 actstr = actstr[strspn(actstr, " "):]
644 if len(actstr) and actstr[0] != ")":
645 raise ValueError("Action str: '%s' unbalanced" % actstr)
646 actstr = actstr[1:]
647
648 if len(actstr) and actstr[0] == ")":
649 return (totallen - len(actstr))
650
651 actstr = actstr[strspn(actstr, ", ") :]
652
616 if not parsed:653 if not parsed:
617 raise ValueError("Action str: '%s' not supported" % actstr)654 raise ValueError("Action str: '%s' not supported" % actstr)
618 655
656 return (totallen - len(actstr))
657
619 658
620class ovskey(nla):659class ovskey(nla):
621 nla_flags = NLA_F_NESTED660 nla_flags = NLA_F_NESTED
@@ -2111,6 +2150,8 @@ def main(argv): · 1489 unmodified lines
2111 ovsflow = OvsFlow()2150 ovsflow = OvsFlow()
2112 ndb = NDB()2151 ndb = NDB()
2113 2152
2153 sys.setrecursionlimit(100000)
2154
2114 if hasattr(args, "showdp"):2155 if hasattr(args, "showdp"):
2115 found = False2156 found = False
2116 for iface in ndb.interfaces:2157 for iface in ndb.interfaces:
tools/testing/selftests/net/pmtu.sh+2−2
@@ -1336,16 +1336,16 @@ test_pmtu_ipvX_over_bridged_vxlanY_or_geneveY_exception() { · 1335 unmodified lines
1336 else1336 else
1337 TCPDST="TCP:[${dst}]:50000"1337 TCPDST="TCP:[${dst}]:50000"
1338 fi1338 fi
1339 ${ns_b} socat -T 3 -u -6 TCP-LISTEN:50000 STDOUT > $tmpoutfile &1339 ${ns_b} socat -T 3 -u -6 TCP-LISTEN:50000,reuseaddr STDOUT > $tmpoutfile &
1340 local socat_pid=$!1340 local socat_pid=$!
1341 1341
1342 wait_local_port_listen ${NS_B} 50000 tcp1342 wait_local_port_listen ${NS_B} 50000 tcp
1343 1343
1344 dd if=/dev/zero status=none bs=1M count=1 | ${target} socat -T 3 -u STDIN $TCPDST,connect-timeout=31344 dd if=/dev/zero status=none bs=1M count=1 | ${target} socat -T 3 -u STDIN $TCPDST,connect-timeout=3
1345 1345
1346 wait ${socat_pid}
1346 size=$(du -sb $tmpoutfile)1347 size=$(du -sb $tmpoutfile)
1347 size=${size%%/tmp/*}1348 size=${size%%/tmp/*}
1348 wait ${socat_pid}
1349 1349
1350 [ $size -ne 1048576 ] && err "File size $size mismatches exepcted value in locally bridged vxlan test" && return 11350 [ $size -ne 1048576 ] && err "File size $size mismatches exepcted value in locally bridged vxlan test" && return 1
1351 done1351 done
tools/testing/selftests/net/so_txtime.sh+25−4
@@ -5,6 +5,7 @@ · 4 unmodified lines
5 5
6set -e6set -e
7 7
8readonly ksft_skip=4
8readonly DEV="veth0"9readonly DEV="veth0"
9readonly BIN="./so_txtime"10readonly BIN="./so_txtime"
10 11
@@ -46,7 +47,7 @@ ip -netns "${NS2}" addr add 192.168.1.2/24 dev "${DEV}" · 35 unmodified lines
46ip -netns "${NS1}" addr add fd::1/64 dev "${DEV}" nodad47ip -netns "${NS1}" addr add fd::1/64 dev "${DEV}" nodad
47ip -netns "${NS2}" addr add fd::2/64 dev "${DEV}" nodad48ip -netns "${NS2}" addr add fd::2/64 dev "${DEV}" nodad
48 49
49do_test() {50run_test() {
50 local readonly IP="$1"51 local readonly IP="$1"
51 local readonly CLOCK="$2"52 local readonly CLOCK="$2"
52 local readonly TXARGS="$3"53 local readonly TXARGS="$3"
@@ -64,12 +65,25 @@ do_test() { · 11 unmodified lines
64 fi65 fi
65 66
66 local readonly START="$(date +%s%N --date="+ 0.1 seconds")"67 local readonly START="$(date +%s%N --date="+ 0.1 seconds")"
68
67 ip netns exec "${NS2}" "${BIN}" -"${IP}" -c "${CLOCK}" -t "${START}" -S "${SADDR}" -D "${DADDR}" "${RXARGS}" -r &69 ip netns exec "${NS2}" "${BIN}" -"${IP}" -c "${CLOCK}" -t "${START}" -S "${SADDR}" -D "${DADDR}" "${RXARGS}" -r &
68 ip netns exec "${NS1}" "${BIN}" -"${IP}" -c "${CLOCK}" -t "${START}" -S "${SADDR}" -D "${DADDR}" "${TXARGS}"70 ip netns exec "${NS1}" "${BIN}" -"${IP}" -c "${CLOCK}" -t "${START}" -S "${SADDR}" -D "${DADDR}" "${TXARGS}"
69 wait "$!"71 wait "$!"
70}72}
71 73
74do_test() {
75 run_test $@
76 [ $? -ne 0 ] && ret=1
77}
78
79do_fail_test() {
80 run_test $@
81 [ $? -eq 0 ] && ret=1
82}
83
72ip netns exec "${NS1}" tc qdisc add dev "${DEV}" root fq84ip netns exec "${NS1}" tc qdisc add dev "${DEV}" root fq
85set +e
86ret=0
73do_test 4 mono a,-1 a,-187do_test 4 mono a,-1 a,-1
74do_test 6 mono a,0 a,088do_test 6 mono a,0 a,0
75do_test 6 mono a,10 a,1089do_test 6 mono a,10 a,10
@@ -77,13 +91,20 @@ do_test 4 mono a,10,b,20 a,10,b,20 · 1 unmodified line
77do_test 6 mono a,20,b,10 b,20,a,2091do_test 6 mono a,20,b,10 b,20,a,20
78 92
79if ip netns exec "${NS1}" tc qdisc replace dev "${DEV}" root etf clockid CLOCK_TAI delta 400000; then93if ip netns exec "${NS1}" tc qdisc replace dev "${DEV}" root etf clockid CLOCK_TAI delta 400000; then
80 ! do_test 4 tai a,-1 a,-194 do_fail_test 4 tai a,-1 a,-1
81 ! do_test 6 tai a,0 a,095 do_fail_test 6 tai a,0 a,0
82 do_test 6 tai a,10 a,1096 do_test 6 tai a,10 a,10
83 do_test 4 tai a,10,b,20 a,10,b,2097 do_test 4 tai a,10,b,20 a,10,b,20
84 do_test 6 tai a,20,b,10 b,10,a,2098 do_test 6 tai a,20,b,10 b,10,a,20
85else99else
86 echo "tc ($(tc -V)) does not support qdisc etf. skipping"100 echo "tc ($(tc -V)) does not support qdisc etf. skipping"
101 [ $ret -eq 0 ] && ret=$ksft_skip
87fi102fi
88 103
89echo OK. All tests passed104if [ $ret -eq 0 ]; then
105 echo OK. All tests passed
106elif [[ $ret -ne $ksft_skip && -n "$KSFT_MACHINE_SLOW" ]]; then
107 echo "Ignoring errors due to slow environment" 1>&2
108 ret=0
109fi
110exit $ret
tools/testing/selftests/net/test_bridge_backup_port.sh+23−0
@@ -124,6 +124,16 @@ tc_check_packets() · 123 unmodified lines
124 [[ $pkts == $count ]]124 [[ $pkts == $count ]]
125}125}
126 126
127bridge_link_check()
128{
129 local ns=$1; shift
130 local dev=$1; shift
131 local state=$1; shift
132
133 bridge -n $ns -d -j link show dev $dev | \
134 jq -e ".[][\"state\"] == \"$state\"" &> /dev/null
135}
136
127################################################################################137################################################################################
128# Setup138# Setup
129 139
@@ -259,6 +269,7 @@ backup_port() · 129 unmodified lines
259 log_test $? 0 "No forwarding out of vx0"269 log_test $? 0 "No forwarding out of vx0"
260 270
261 run_cmd "ip -n $sw1 link set dev swp1 carrier off"271 run_cmd "ip -n $sw1 link set dev swp1 carrier off"
272 busywait $BUSYWAIT_TIMEOUT bridge_link_check $sw1 swp1 disabled
262 log_test $? 0 "swp1 carrier off"273 log_test $? 0 "swp1 carrier off"
263 274
264 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"275 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"
@@ -268,6 +279,7 @@ backup_port() · 3 unmodified lines
268 log_test $? 0 "No forwarding out of vx0"279 log_test $? 0 "No forwarding out of vx0"
269 280
270 run_cmd "ip -n $sw1 link set dev swp1 carrier on"281 run_cmd "ip -n $sw1 link set dev swp1 carrier on"
282 busywait $BUSYWAIT_TIMEOUT bridge_link_check $sw1 swp1 forwarding
271 log_test $? 0 "swp1 carrier on"283 log_test $? 0 "swp1 carrier on"
272 284
273 # Configure vx0 as the backup port of swp1 and check that packets are285 # Configure vx0 as the backup port of swp1 and check that packets are
@@ -284,6 +296,7 @@ backup_port() · 10 unmodified lines
284 log_test $? 0 "No forwarding out of vx0"296 log_test $? 0 "No forwarding out of vx0"
285 297
286 run_cmd "ip -n $sw1 link set dev swp1 carrier off"298 run_cmd "ip -n $sw1 link set dev swp1 carrier off"
299 busywait $BUSYWAIT_TIMEOUT bridge_link_check $sw1 swp1 disabled
287 log_test $? 0 "swp1 carrier off"300 log_test $? 0 "swp1 carrier off"
288 301
289 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"302 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"
@@ -293,6 +306,7 @@ backup_port() · 3 unmodified lines
293 log_test $? 0 "Forwarding out of vx0"306 log_test $? 0 "Forwarding out of vx0"
294 307
295 run_cmd "ip -n $sw1 link set dev swp1 carrier on"308 run_cmd "ip -n $sw1 link set dev swp1 carrier on"
309 busywait $BUSYWAIT_TIMEOUT bridge_link_check $sw1 swp1 forwarding
296 log_test $? 0 "swp1 carrier on"310 log_test $? 0 "swp1 carrier on"
297 311
298 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"312 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"
@@ -314,6 +328,7 @@ backup_port() · 15 unmodified lines
314 log_test $? 0 "No forwarding out of vx0"328 log_test $? 0 "No forwarding out of vx0"
315 329
316 run_cmd "ip -n $sw1 link set dev swp1 carrier off"330 run_cmd "ip -n $sw1 link set dev swp1 carrier off"
331 busywait $BUSYWAIT_TIMEOUT bridge_link_check $sw1 swp1 disabled
317 log_test $? 0 "swp1 carrier off"332 log_test $? 0 "swp1 carrier off"
318 333
319 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"334 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"
@@ -369,6 +384,7 @@ backup_nhid() · 49 unmodified lines
369 log_test $? 0 "No forwarding out of vx0"384 log_test $? 0 "No forwarding out of vx0"
370 385
371 run_cmd "ip -n $sw1 link set dev swp1 carrier off"386 run_cmd "ip -n $sw1 link set dev swp1 carrier off"
387 busywait $BUSYWAIT_TIMEOUT bridge_link_check $sw1 swp1 disabled
372 log_test $? 0 "swp1 carrier off"388 log_test $? 0 "swp1 carrier off"
373 389
374 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"390 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"
@@ -382,6 +398,7 @@ backup_nhid() · 7 unmodified lines
382 log_test $? 0 "Forwarding using VXLAN FDB entry"398 log_test $? 0 "Forwarding using VXLAN FDB entry"
383 399
384 run_cmd "ip -n $sw1 link set dev swp1 carrier on"400 run_cmd "ip -n $sw1 link set dev swp1 carrier on"
401 busywait $BUSYWAIT_TIMEOUT bridge_link_check $sw1 swp1 forwarding
385 log_test $? 0 "swp1 carrier on"402 log_test $? 0 "swp1 carrier on"
386 403
387 # Configure nexthop ID 10 as the backup nexthop ID of swp1 and check404 # Configure nexthop ID 10 as the backup nexthop ID of swp1 and check
@@ -398,6 +415,7 @@ backup_nhid() · 10 unmodified lines
398 log_test $? 0 "No forwarding out of vx0"415 log_test $? 0 "No forwarding out of vx0"
399 416
400 run_cmd "ip -n $sw1 link set dev swp1 carrier off"417 run_cmd "ip -n $sw1 link set dev swp1 carrier off"
418 busywait $BUSYWAIT_TIMEOUT bridge_link_check $sw1 swp1 disabled
401 log_test $? 0 "swp1 carrier off"419 log_test $? 0 "swp1 carrier off"
402 420
403 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"421 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"
@@ -411,6 +429,7 @@ backup_nhid() · 7 unmodified lines
411 log_test $? 0 "No forwarding using VXLAN FDB entry"429 log_test $? 0 "No forwarding using VXLAN FDB entry"
412 430
413 run_cmd "ip -n $sw1 link set dev swp1 carrier on"431 run_cmd "ip -n $sw1 link set dev swp1 carrier on"
432 busywait $BUSYWAIT_TIMEOUT bridge_link_check $sw1 swp1 forwarding
414 log_test $? 0 "swp1 carrier on"433 log_test $? 0 "swp1 carrier on"
415 434
416 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"435 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"
@@ -441,6 +460,7 @@ backup_nhid() · 24 unmodified lines
441 log_test $? 0 "No forwarding using VXLAN FDB entry"460 log_test $? 0 "No forwarding using VXLAN FDB entry"
442 461
443 run_cmd "ip -n $sw1 link set dev swp1 carrier off"462 run_cmd "ip -n $sw1 link set dev swp1 carrier off"
463 busywait $BUSYWAIT_TIMEOUT bridge_link_check $sw1 swp1 disabled
444 log_test $? 0 "swp1 carrier off"464 log_test $? 0 "swp1 carrier off"
445 465
446 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"466 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"
@@ -497,6 +517,7 @@ backup_nhid_invalid() · 50 unmodified lines
497 log_test $? 0 "Valid nexthop as backup nexthop"517 log_test $? 0 "Valid nexthop as backup nexthop"
498 518
499 run_cmd "ip -n $sw1 link set dev swp1 carrier off"519 run_cmd "ip -n $sw1 link set dev swp1 carrier off"
520 busywait $BUSYWAIT_TIMEOUT bridge_link_check $sw1 swp1 disabled
500 log_test $? 0 "swp1 carrier off"521 log_test $? 0 "swp1 carrier off"
501 522
502 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"523 run_cmd "ip netns exec $sw1 mausezahn br0.10 -a $smac -b $dmac -A 198.51.100.1 -B 198.51.100.2 -t ip -p 100 -q -c 1"
@@ -604,7 +625,9 @@ backup_nhid_ping() · 101 unmodified lines
604 run_cmd "bridge -n $sw2 link set dev swp1 backup_nhid 10"625 run_cmd "bridge -n $sw2 link set dev swp1 backup_nhid 10"
605 626
606 run_cmd "ip -n $sw1 link set dev swp1 carrier off"627 run_cmd "ip -n $sw1 link set dev swp1 carrier off"
628 busywait $BUSYWAIT_TIMEOUT bridge_link_check $sw1 swp1 disabled
607 run_cmd "ip -n $sw2 link set dev swp1 carrier off"629 run_cmd "ip -n $sw2 link set dev swp1 carrier off"
630 busywait $BUSYWAIT_TIMEOUT bridge_link_check $sw2 swp1 disabled
608 631
609 run_cmd "ip netns exec $sw1 ping -i 0.1 -c 10 -w $PING_TIMEOUT 192.0.2.66"632 run_cmd "ip netns exec $sw1 ping -i 0.1 -c 10 -w $PING_TIMEOUT 192.0.2.66"
610 log_test $? 0 "Ping with backup nexthop ID"633 log_test $? 0 "Ping with backup nexthop ID"
tools/testing/selftests/net/tls.c+6−6
@@ -1002,12 +1002,12 @@ TEST_F(tls, recv_partial) · 1001 unmodified lines
1002 1002
1003 memset(recv_mem, 0, sizeof(recv_mem));1003 memset(recv_mem, 0, sizeof(recv_mem));
1004 EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len);1004 EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len);
1005 EXPECT_NE(recv(self->cfd, recv_mem, strlen(test_str_first),1005 EXPECT_EQ(recv(self->cfd, recv_mem, strlen(test_str_first),
1006 MSG_WAITALL), -1);1006 MSG_WAITALL), strlen(test_str_first));
1007 EXPECT_EQ(memcmp(test_str_first, recv_mem, strlen(test_str_first)), 0);1007 EXPECT_EQ(memcmp(test_str_first, recv_mem, strlen(test_str_first)), 0);
1008 memset(recv_mem, 0, sizeof(recv_mem));1008 memset(recv_mem, 0, sizeof(recv_mem));
1009 EXPECT_NE(recv(self->cfd, recv_mem, strlen(test_str_second),1009 EXPECT_EQ(recv(self->cfd, recv_mem, strlen(test_str_second),
1010 MSG_WAITALL), -1);1010 MSG_WAITALL), strlen(test_str_second));
1011 EXPECT_EQ(memcmp(test_str_second, recv_mem, strlen(test_str_second)),1011 EXPECT_EQ(memcmp(test_str_second, recv_mem, strlen(test_str_second)),
1012 0);1012 0);
1013}1013}
@@ -1874,13 +1874,13 @@ TEST_F(tls_err, poll_partial_rec_async) · 860 unmodified lines
1874 /* Child should sleep in poll(), never get a wake */1874 /* Child should sleep in poll(), never get a wake */
1875 pfd.fd = self->cfd2;1875 pfd.fd = self->cfd2;
1876 pfd.events = POLLIN;1876 pfd.events = POLLIN;
1877 EXPECT_EQ(poll(&pfd, 1, 5), 0);1877 EXPECT_EQ(poll(&pfd, 1, 20), 0);
1878 1878
1879 EXPECT_EQ(write(p[1], &token, 1), 1); /* Barrier #1 */1879 EXPECT_EQ(write(p[1], &token, 1), 1); /* Barrier #1 */
1880 1880
1881 pfd.fd = self->cfd2;1881 pfd.fd = self->cfd2;
1882 pfd.events = POLLIN;1882 pfd.events = POLLIN;
1883 EXPECT_EQ(poll(&pfd, 1, 5), 1);1883 EXPECT_EQ(poll(&pfd, 1, 20), 1);
1884 1884
1885 exit(!_metadata->passed);1885 exit(!_metadata->passed);
1886 }1886 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t