From: Sasha Levin Date: Fri, 13 Sep 2024 23:37:08 +0000 (-0400) Subject: Fixes for 4.19 X-Git-Tag: v6.1.111~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fd3c78fe9e95876647e861b1de8843e3608b754a;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.19 Signed-off-by: Sasha Levin --- 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 index 00000000000..6cc3215f292 --- /dev/null +++ b/queue-4.19/net-dpaa-pad-packets-to-eth_zlen.patch @@ -0,0 +1,62 @@ +From 34240792796dfdef8981cdb8c7e45676d9c86ad6 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 10 Sep 2024 10:31:44 -0400 +Subject: net: dpaa: Pad packets to ETH_ZLEN + +From: Sean Anderson + +[ 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 +Signed-off-by: Sean Anderson +Reviewed-by: Eric Dumazet +Link: https://patch.msgid.link/20240910143144.1439910-1-sean.anderson@linux.dev +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + 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 index 00000000000..7bf6bfcea50 --- /dev/null +++ b/queue-4.19/net-ftgmac100-enable-tx-interrupt-to-avoid-tx-timeou.patch @@ -0,0 +1,69 @@ +From 65dbff1c5ccc63813a5339270c41faa38f2eba39 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 6 Sep 2024 14:28:31 +0800 +Subject: net: ftgmac100: Enable TX interrupt to avoid TX timeout + +From: Jacky Chou + +[ 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 +Link: https://patch.msgid.link/20240906062831.2243399-1-jacky_chou@aspeedtech.com +Signed-off-by: Paolo Abeni +Signed-off-by: Sasha Levin +--- + 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 index 00000000000..e257d731b4f --- /dev/null +++ b/queue-4.19/net-mlx5-update-the-list-of-the-pci-supported-device.patch @@ -0,0 +1,39 @@ +From cc6f7961c51a5c6b989cc11de3f96126cf4a1bff Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 27 Jan 2019 15:01:25 +0200 +Subject: net/mlx5: Update the list of the PCI supported devices + +From: Eran Ben Elisha + +[ 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 +Reviewed-by: Aya Levin +Signed-off-by: Saeed Mahameed +Signed-off-by: Sasha Levin +--- + 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 + diff --git a/queue-4.19/series b/queue-4.19/series index 900b0a525ab..5182f9e8e7a 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -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