[dpdk-stable] patch 'net/ena: advertise scattered Rx capability' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:30:45 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/62a0570fb5f3e3efbe60269a374585b99172345f

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 62a0570fb5f3e3efbe60269a374585b99172345f Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk at semihalf.com>
Date: Tue, 19 Oct 2021 12:56:26 +0200
Subject: [PATCH] net/ena: advertise scattered Rx capability
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit e2a6d08bef489215ebb77b1d3033875ada757cfa ]

ENA can't be forced to always pass single descriptor for the Rx packet.
Even if the passed buffer size is big enough to hold the data, we can't
make assumption that the HW won't use extra descriptor because of
internal optimizations. This assumption may be true, but only for some
of the FW revisions, which may differ depending on the used AWS instance
type.

As the scattered Rx support on the Rx path already exists, the driver
just needs to announce DEV_RX_OFFLOAD_SCATTER capability by turning on
the rte_eth_dev_data::scattered_rx option.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")

Signed-off-by: Michal Krawczyk <mk at semihalf.com>
Reviewed-by: Igor Chauskin <igorch at amazon.com>
Reviewed-by: Shai Brandes <shaibran at amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index f4e26927a4..6d42846092 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2023,8 +2023,14 @@ static int ena_dev_configure(struct rte_eth_dev *dev)
 		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 	dev->data->dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_MULTI_SEGS;
 
+	/* Scattered Rx cannot be turned off in the HW, so this capability must
+	 * be forced.
+	 */
+	dev->data->scattered_rx = 1;
+
 	adapter->tx_selected_offloads = dev->data->dev_conf.txmode.offloads;
 	adapter->rx_selected_offloads = dev->data->dev_conf.rxmode.offloads;
+
 	return 0;
 }
 
@@ -2072,6 +2078,8 @@ static uint64_t ena_get_rx_port_offloads(struct ena_adapter *adapter)
 	if (adapter->offloads.rx_offloads & ENA_RX_RSS_HASH)
 		port_offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 
+	port_offloads |= DEV_RX_OFFLOAD_SCATTER;
+
 	return port_offloads;
 }
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:09.092642538 +0800
+++ 0161-net-ena-advertise-scattered-Rx-capability.patch	2021-11-10 14:17:01.970745273 +0800
@@ -1 +1 @@
-From e2a6d08bef489215ebb77b1d3033875ada757cfa Mon Sep 17 00:00:00 2001
+From 62a0570fb5f3e3efbe60269a374585b99172345f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit e2a6d08bef489215ebb77b1d3033875ada757cfa ]
@@ -18 +20,0 @@
-Cc: stable at dpdk.org
@@ -28 +30 @@
-index 655c53b525..94dbb3164e 100644
+index f4e26927a4..6d42846092 100644
@@ -31 +33 @@
-@@ -1917,8 +1917,14 @@ static int ena_dev_configure(struct rte_eth_dev *dev)
+@@ -2023,8 +2023,14 @@ static int ena_dev_configure(struct rte_eth_dev *dev)
@@ -46 +48 @@
-@@ -1966,6 +1972,8 @@ static uint64_t ena_get_rx_port_offloads(struct ena_adapter *adapter)
+@@ -2072,6 +2078,8 @@ static uint64_t ena_get_rx_port_offloads(struct ena_adapter *adapter)


More information about the stable mailing list