DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	stable@dpdk.org, Anatoly Burakov <anatoly.burakov@intel.com>
Subject: [PATCH] net/ice: fix Rx of large packets
Date: Tue,  8 Apr 2025 16:57:36 +0100	[thread overview]
Message-ID: <20250408155736.2739406-1-bruce.richardson@intel.com> (raw)

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(-)

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))
-- 
2.45.2


                 reply	other threads:[~2025-04-08 15:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250408155736.2739406-1-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).