net/ice: fix Rx of large packets

Message ID 20250408155736.2739406-1-bruce.richardson@intel.com (mailing list archive)
State Accepted
Delegated to: Bruce Richardson
Headers
Series net/ice: fix Rx of large packets |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build success github build: passed
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Functional success Functional PASS
ci/intel-Testing success Testing PASS

Commit Message

Bruce Richardson April 8, 2025, 3:57 p.m. UTC
The determination of whether or not the buffer size is less than the
packet MTU is made in the Rx queue start function in the ice driver.
This means that we cannot choose the Rx function before we have started
the queues. Move the Rx function section down in the code to fix this.

Fixes: 3c79a3d91d9d ("net/ice: fix mbuf cleanup function")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/intel/ice/ice_ethdev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Comments

Liao, TingtingX April 18, 2025, 3:04 a.m. UTC | #1
> -----Original Message-----
> From: Bruce Richardson
> Sent: Tuesday, April 08, 2025 23:57
> To: dev@dpdk.org
> Cc: Richardson, Bruce; stable@dpdk.org; Burakov, Anatoly
> Subject: [PATCH] net/ice: fix Rx of large packets
>
> The determination of whether or not the buffer size is less than the
> packet MTU is made in the Rx queue start function in the ice driver.
> This means that we cannot choose the Rx function before we have started
> the queues. Move the Rx function section down in the code to fix this.
>
> Fixes: 3c79a3d91d9d ("net/ice: fix mbuf cleanup function")
> Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
Tested-by: Liao, Tingting <tingtingx.liao@intel.com>
  
Bruce Richardson April 28, 2025, 2:59 p.m. UTC | #2
On Fri, Apr 18, 2025 at 04:04:26AM +0100, Liao, TingtingX wrote:
>    > -----Original Message-----
> 
>    > From: Bruce Richardson
> 
>    > Sent: Tuesday, April 08, 2025 23:57
> 
>    > To: dev@dpdk.org
> 
>    > Cc: Richardson, Bruce; stable@dpdk.org; Burakov, Anatoly
>    > Subject: [PATCH] net/ice: fix Rx of large packets
> 
>    >
> 
>    > The determination of whether or not the buffer size is less than the
>    > packet MTU is made in the Rx queue start function in the ice driver.
>    > This means that we cannot choose the Rx function before we have
>    started
>    > the queues. Move the Rx function section down in the code to fix
>    this.
>    >
>    > Fixes: 3c79a3d91d9d ("net/ice: fix mbuf cleanup function")
>    > Cc: stable@dpdk.org
>    >
>    > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> 
>    > ---
> 
>    Tested-by: Liao, Tingting <tingtingx.liao@intel.com>

Applied to dpdk-next-net-intel.

/Bruce
  

Patch

diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
index 21d3795954..2e163d706c 100644
--- a/drivers/net/intel/ice/ice_ethdev.c
+++ b/drivers/net/intel/ice/ice_ethdev.c
@@ -3965,7 +3965,7 @@  ice_dev_start(struct rte_eth_dev *dev)
 	ice_declare_bitmap(pmask, ICE_PROMISC_MAX);
 	ice_zero_bitmap(pmask, ICE_PROMISC_MAX);
 
-	ice_set_rx_function(dev);
+	/* choose vector Tx function before starting queues */
 	ice_set_tx_function(dev);
 
 	/* program Tx queues' context in hardware */
@@ -3996,6 +3996,9 @@  ice_dev_start(struct rte_eth_dev *dev)
 		}
 	}
 
+	/* we need to choose Rx fn after queue start, when we know if we need scattered Rx */
+	ice_set_rx_function(dev);
+
 	mask = RTE_ETH_VLAN_STRIP_MASK | RTE_ETH_VLAN_FILTER_MASK |
 			RTE_ETH_VLAN_EXTEND_MASK;
 	if (ice_is_dvm_ena(hw))