From: "Loftus, Ciara" <ciara.loftus@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH 1/1] net/i40e: unset vector flag when scalar path is chosen
Date: Thu, 18 Dec 2025 15:38:43 +0000 [thread overview]
Message-ID: <SJ5PPF6E320AF71A861448AF6624A93EC5C8EA8A@SJ5PPF6E320AF71.namprd11.prod.outlook.com> (raw)
In-Reply-To: <aULNOcN6-wCBIFNY@bricha3-mobl1.ger.corp.intel.com>
>
> On Wed, Dec 17, 2025 at 03:18:42PM +0000, Loftus, Ciara wrote:
> > > Subject: Re: [PATCH 1/1] net/i40e: unset vector flag when scalar path is
> > > chosen
> > >
> > > On Wed, Dec 17, 2025 at 02:54:36PM +0000, Ciara Loftus wrote:
> > > > The tx_vec_allowed flag should be set to false if a scalar Tx path is
> > > > chosen.
> > > >
> > > > Fixes: 1ff08bb7ad90 ("net/i40e: use common Tx path selection
> > > infrastructure")
> > > >
> > > > Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> > > > ---
> > > > drivers/net/intel/i40e/i40e_rxtx.c | 3 +++
> > > > 1 file changed, 3 insertions(+)
> > > >
> > > > diff --git a/drivers/net/intel/i40e/i40e_rxtx.c
> > > b/drivers/net/intel/i40e/i40e_rxtx.c
> > > > index 2db58c6b24..dd859bda4e 100644
> > > > --- a/drivers/net/intel/i40e/i40e_rxtx.c
> > > > +++ b/drivers/net/intel/i40e/i40e_rxtx.c
> > > > @@ -3631,6 +3631,9 @@ i40e_set_tx_function(struct rte_eth_dev
> *dev)
> > > > ad->tx_func_type == I40E_TX_ALTIVEC ||
> > > > ad->tx_func_type == I40E_TX_AVX2)
> > > > dev->recycle_tx_mbufs_reuse =
> > > i40e_recycle_tx_mbufs_reuse_vec;
> > > > +
> > > > + if (i40e_tx_path_infos[ad->tx_func_type].features.simd_width <
> > > RTE_VECT_SIMD_128)
> > > > + ad->tx_vec_allowed = false;
> > > > }
> > > >
> > > Under what circumstances would this be a problem, or under what
> > > circumstances would we have this situaion?
> >
> > The circumstances we would have this situation is when the driver
> > determines that tx vectorisation is allowed but we end up selecting
> > a scalar path. The result would be "vector_tx" being set for the txq
> > during tx_queue_start and later during tx_queue_stop, the wrong
> > path being taken in ci_txq_release_all_mbufs
> >
> Would this be better fixed by some refactoring to chose the release
> function based on ad->tx_func_type, rather than having a separate vector
> flag?
>
> If not, may I suggest that you remove the if condition, and just do:
> ad->tx_vec_allowed =
> (i40e_tx_path_infos[ad->tx_func_type].features.simd_width <
> RTE_VECT_SIMD_128);
The release function is in the common code so it must use the
txq->vector_tx flag.
I think we need to also keep the adapter->tx_vec_allowed flag as it's
used elsewhere in the driver beyond setting the appropriate value to
txq->vector_tx. eg. in the i40e_dev_tx_queue_setup_runtime function.
I think there might scope for some further refactoring here but it would
end up touching a number of places in the code. In the interest of time
and simplicity I propose implementing the fix you suggested above
for now and maybe revisiting further refactoring later.
prev parent reply other threads:[~2025-12-18 15:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 14:54 [PATCH 0/1] " Ciara Loftus
2025-12-17 14:54 ` [PATCH 1/1] " Ciara Loftus
2025-12-17 15:08 ` Bruce Richardson
2025-12-17 15:18 ` Loftus, Ciara
2025-12-17 15:33 ` Bruce Richardson
2025-12-18 15:38 ` Loftus, Ciara [this message]
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=SJ5PPF6E320AF71A861448AF6624A93EC5C8EA8A@SJ5PPF6E320AF71.namprd11.prod.outlook.com \
--to=ciara.loftus@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@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).