]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.19
authorSasha Levin <sashal@kernel.org>
Fri, 13 Sep 2024 23:37:08 +0000 (19:37 -0400)
committerSasha Levin <sashal@kernel.org>
Fri, 13 Sep 2024 23:37:08 +0000 (19:37 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.19/net-dpaa-pad-packets-to-eth_zlen.patch [new file with mode: 0644]
queue-4.19/net-ftgmac100-enable-tx-interrupt-to-avoid-tx-timeou.patch [new file with mode: 0644]
queue-4.19/net-mlx5-update-the-list-of-the-pci-supported-device.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/net-dpaa-pad-packets-to-eth_zlen.patch b/queue-4.19/net-dpaa-pad-packets-to-eth_zlen.patch
new file mode 100644 (file)
index 0000000..6cc3215
--- /dev/null
@@ -0,0 +1,62 @@
+From 34240792796dfdef8981cdb8c7e45676d9c86ad6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 10 Sep 2024 10:31:44 -0400
+Subject: net: dpaa: Pad packets to ETH_ZLEN
+
+From: Sean Anderson <sean.anderson@linux.dev>
+
+[ Upstream commit cbd7ec083413c6a2e0c326d49e24ec7d12c7a9e0 ]
+
+When sending packets under 60 bytes, up to three bytes of the buffer
+following the data may be leaked. Avoid this by extending all packets to
+ETH_ZLEN, ensuring nothing is leaked in the padding. This bug can be
+reproduced by running
+
+       $ ping -s 11 destination
+
+Fixes: 9ad1a3749333 ("dpaa_eth: add support for DPAA Ethernet")
+Suggested-by: Eric Dumazet <edumazet@google.com>
+Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
+Reviewed-by: Eric Dumazet <edumazet@google.com>
+Link: https://patch.msgid.link/20240910143144.1439910-1-sean.anderson@linux.dev
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+index 4b21ae27a9fd..5c60f2a2b6d8 100644
+--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
++++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+@@ -2055,12 +2055,12 @@ static netdev_tx_t
+ dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
+ {
+       const int queue_mapping = skb_get_queue_mapping(skb);
+-      bool nonlinear = skb_is_nonlinear(skb);
+       struct rtnl_link_stats64 *percpu_stats;
+       struct dpaa_percpu_priv *percpu_priv;
+       struct netdev_queue *txq;
+       struct dpaa_priv *priv;
+       struct qm_fd fd;
++      bool nonlinear;
+       int offset = 0;
+       int err = 0;
+@@ -2070,6 +2070,13 @@ dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
+       qm_fd_clear_fd(&fd);
++      /* Packet data is always read as 32-bit words, so zero out any part of
++       * the skb which might be sent if we have to pad the packet
++       */
++      if (__skb_put_padto(skb, ETH_ZLEN, false))
++              goto enomem;
++
++      nonlinear = skb_is_nonlinear(skb);
+       if (!nonlinear) {
+               /* We're going to store the skb backpointer at the beginning
+                * of the data buffer, so we need a privately owned skb
+-- 
+2.43.0
+
diff --git a/queue-4.19/net-ftgmac100-enable-tx-interrupt-to-avoid-tx-timeou.patch b/queue-4.19/net-ftgmac100-enable-tx-interrupt-to-avoid-tx-timeou.patch
new file mode 100644 (file)
index 0000000..7bf6bfc
--- /dev/null
@@ -0,0 +1,69 @@
+From 65dbff1c5ccc63813a5339270c41faa38f2eba39 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 6 Sep 2024 14:28:31 +0800
+Subject: net: ftgmac100: Enable TX interrupt to avoid TX timeout
+
+From: Jacky Chou <jacky_chou@aspeedtech.com>
+
+[ Upstream commit fef2843bb49f414d1523ca007d088071dee0e055 ]
+
+Currently, the driver only enables RX interrupt to handle RX
+packets and TX resources. Sometimes there is not RX traffic,
+so the TX resource needs to wait for RX interrupt to free.
+This situation will toggle the TX timeout watchdog when the MAC
+TX ring has no more resources to transmit packets.
+Therefore, enable TX interrupt to release TX resources at any time.
+
+When I am verifying iperf3 over UDP, the network hangs.
+Like the log below.
+
+root# iperf3 -c 192.168.100.100 -i1 -t10 -u -b0
+Connecting to host 192.168.100.100, port 5201
+[  4] local 192.168.100.101 port 35773 connected to 192.168.100.100 port 5201
+[ ID] Interval           Transfer     Bandwidth       Total Datagrams
+[  4]   0.00-20.42  sec   160 KBytes  64.2 Kbits/sec  20
+[  4]  20.42-20.42  sec  0.00 Bytes  0.00 bits/sec  0
+[  4]  20.42-20.42  sec  0.00 Bytes  0.00 bits/sec  0
+[  4]  20.42-20.42  sec  0.00 Bytes  0.00 bits/sec  0
+[  4]  20.42-20.42  sec  0.00 Bytes  0.00 bits/sec  0
+[  4]  20.42-20.42  sec  0.00 Bytes  0.00 bits/sec  0
+[  4]  20.42-20.42  sec  0.00 Bytes  0.00 bits/sec  0
+[  4]  20.42-20.42  sec  0.00 Bytes  0.00 bits/sec  0
+[  4]  20.42-20.42  sec  0.00 Bytes  0.00 bits/sec  0
+[  4]  20.42-20.42  sec  0.00 Bytes  0.00 bits/sec  0
+- - - - - - - - - - - - - - - - - - - - - - - - -
+[ ID] Interval          Transfer    Bandwidth      Jitter   Lost/Total Datagrams
+[  4]   0.00-20.42  sec  160 KBytes 64.2 Kbits/sec 0.000 ms 0/20 (0%)
+[  4] Sent 20 datagrams
+iperf3: error - the server has terminated
+
+The network topology is FTGMAC connects directly to a PC.
+UDP does not need to wait for ACK, unlike TCP.
+Therefore, FTGMAC needs to enable TX interrupt to release TX resources instead
+of waiting for the RX interrupt.
+
+Fixes: 10cbd6407609 ("ftgmac100: Rework NAPI & interrupts handling")
+Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
+Link: https://patch.msgid.link/20240906062831.2243399-1-jacky_chou@aspeedtech.com
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/faraday/ftgmac100.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/faraday/ftgmac100.h b/drivers/net/ethernet/faraday/ftgmac100.h
+index 0653d8176e6a..6349e7c7c074 100644
+--- a/drivers/net/ethernet/faraday/ftgmac100.h
++++ b/drivers/net/ethernet/faraday/ftgmac100.h
+@@ -97,7 +97,7 @@
+                           FTGMAC100_INT_RPKT_BUF)
+ /* All the interrupts we care about */
+-#define FTGMAC100_INT_ALL (FTGMAC100_INT_RPKT_BUF  |  \
++#define FTGMAC100_INT_ALL (FTGMAC100_INT_RXTX  |  \
+                          FTGMAC100_INT_BAD)
+ /*
+-- 
+2.43.0
+
diff --git a/queue-4.19/net-mlx5-update-the-list-of-the-pci-supported-device.patch b/queue-4.19/net-mlx5-update-the-list-of-the-pci-supported-device.patch
new file mode 100644 (file)
index 0000000..e257d73
--- /dev/null
@@ -0,0 +1,39 @@
+From cc6f7961c51a5c6b989cc11de3f96126cf4a1bff Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 27 Jan 2019 15:01:25 +0200
+Subject: net/mlx5: Update the list of the PCI supported devices
+
+From: Eran Ben Elisha <eranbe@mellanox.com>
+
+[ Upstream commit 85327a9c415057259b337805d356705d0d0f4200 ]
+
+Add the upcoming ConnectX-6 Dx.
+
+In addition, add "ConnectX Family mlx5Gen Virtual Function" device ID.
+Every new HCA VF will be identified with this device ID. Different VF
+models will be distinguished by their revision id.
+
+Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
+Reviewed-by: Aya Levin <ayal@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
+index e09bd059984e..908984464c13 100644
+--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
+@@ -1642,6 +1642,8 @@ static const struct pci_device_id mlx5_core_pci_table[] = {
+       { PCI_VDEVICE(MELLANOX, 0x101a), MLX5_PCI_DEV_IS_VF},   /* ConnectX-5 Ex VF */
+       { PCI_VDEVICE(MELLANOX, 0x101b) },                      /* ConnectX-6 */
+       { PCI_VDEVICE(MELLANOX, 0x101c), MLX5_PCI_DEV_IS_VF},   /* ConnectX-6 VF */
++      { PCI_VDEVICE(MELLANOX, 0x101d) },                      /* ConnectX-6 Dx */
++      { PCI_VDEVICE(MELLANOX, 0x101e), MLX5_PCI_DEV_IS_VF},   /* ConnectX Family mlx5Gen Virtual Function */
+       { PCI_VDEVICE(MELLANOX, 0xa2d2) },                      /* BlueField integrated ConnectX-5 network controller */
+       { PCI_VDEVICE(MELLANOX, 0xa2d3), MLX5_PCI_DEV_IS_VF},   /* BlueField integrated ConnectX-5 network controller VF */
+       { PCI_VDEVICE(MELLANOX, 0xa2d6) },                      /* BlueField-2 integrated ConnectX-6 Dx network controller */
+-- 
+2.43.0
+
index 900b0a525abe48b18ab7fc028200bf82560c5cdb..5182f9e8e7a301211aca102f4e46126b2f9a881b 100644 (file)
@@ -6,3 +6,6 @@ net-ethernet-use-ip_hdrlen-instead-of-bit-shift.patch
 net-phy-vitesse-repair-vsc73xx-autonegotiation.patch
 scripts-kconfig-merge_config-config-files-add-a-trai.patch
 arm64-dts-rockchip-override-bios_disable-signal-via-gpio-hog-on-rk3399-puma.patch
+net-mlx5-update-the-list-of-the-pci-supported-device.patch
+net-ftgmac100-enable-tx-interrupt-to-avoid-tx-timeou.patch
+net-dpaa-pad-packets-to-eth_zlen.patch