DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Rong, Leyi" <leyi.rong@intel.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: add Tx preparation for simple Tx data path
Date: Tue, 20 Apr 2021 05:31:07 +0000	[thread overview]
Message-ID: <SN6PR11MB262146A7584F2B8356DA5D25EC489@SN6PR11MB2621.namprd11.prod.outlook.com> (raw)
In-Reply-To: <DM6PR11MB4491620C10DABDC21F4BF7539A499@DM6PR11MB4491.namprd11.prod.outlook.com>


> -----Original Message-----
> From: Ananyev, Konstantin <konstantin.ananyev@intel.com>
> Sent: Monday, April 19, 2021 6:59 PM
> To: Rong, Leyi <leyi.rong@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH v2] net/i40e: add Tx preparation for simple Tx data path
> 
> Hi Leyi,
> 
> > Introduce i40e_simple_prep_pkts() as the preparation function for
> > simple Tx data path, as it's for sanity check for simple Tx.
> >
> > Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> > Signed-off-by: Leyi Rong <leyi.rong@intel.com>
> > ---
> >  drivers/net/i40e/i40e_rxtx.c | 42
> > +++++++++++++++++++++++++++++++++++-
> >  drivers/net/i40e/i40e_rxtx.h |  2 ++
> >  2 files changed, 43 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/i40e/i40e_rxtx.c
> > b/drivers/net/i40e/i40e_rxtx.c index 3c7686c3f4..282eb5924b 100644
> > --- a/drivers/net/i40e/i40e_rxtx.c
> > +++ b/drivers/net/i40e/i40e_rxtx.c
> > @@ -1479,6 +1479,46 @@ i40e_xmit_pkts_vec(void *tx_queue, struct
> rte_mbuf **tx_pkts,
> >  	return nb_tx;
> >  }
> >
> >
> +/***************************************************************
> *****
> > +*
> > + *
> > + *  TX simple prep functions
> > + *
> > +
> >
> +****************************************************************
> *****
> > +*/
> > +uint16_t
> > +i40e_simple_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf
> **tx_pkts,
> > +		      uint16_t nb_pkts)
> > +{
> > +	int i;
> > +	uint64_t ol_flags;
> > +	struct rte_mbuf *m;
> > +	struct i40e_tx_queue *txq = (struct i40e_tx_queue *)tx_queue;
> > +
> > +	for (i = 0; i < nb_pkts; i++) {
> > +		m = tx_pkts[i];
> > +		ol_flags = m->ol_flags;
> > +
> > +		if (!(txq->offloads ==
> > +			(txq->offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
> &&
> > +			m->nb_segs == 1)) {
> 
> I think we don't need to check  txq->offloads here, they should be already
> checked at setup phase.
> I suppose:
> if (m->nb_segs != 1) {...}
> should be enough here.
> 
> > +			rte_errno = EINVAL;
> > +			return i;
> > +		}
> > +
> > +		if (ol_flags & I40E_TX_OFFLOAD_NOTSUP_MASK) {
> 
> It would return OK for the packet with any supported by any i40e TX offload
> (full-featured path).
> Probably we need here instead:
> if (ol_flags & PKT_TX_OFFLOAD_MASK)  {...}
> 
> > +			rte_errno = ENOTSUP;
> > +			return i;
> > +		}

Hi Konstantin,

Got your points, will be fixed in v3, thanks!

  reply	other threads:[~2021-04-20  5:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31  8:53 [dpdk-dev] [PATCH] net/i40e: add Tx preparation for vector " Leyi Rong
2021-04-01 12:27 ` Zhang, Qi Z
2021-04-01 12:33 ` David Marchand
2021-04-01 13:19   ` Ananyev, Konstantin
2021-04-07 16:39 ` Ferruh Yigit
2021-04-08  8:29   ` Rong, Leyi
2021-04-08 10:32     ` Ananyev, Konstantin
2021-04-09  7:19       ` Rong, Leyi
2021-04-09 10:40         ` Ananyev, Konstantin
2021-04-13 10:23           ` Rong, Leyi
2021-04-13 10:41             ` Ananyev, Konstantin
2021-04-08  8:39   ` David Marchand
2021-04-08  8:49     ` Rong, Leyi
2021-04-19  8:36 ` [dpdk-dev] [PATCH v2] net/i40e: add Tx preparation for simple Tx " Leyi Rong
2021-04-19  9:36   ` Zhang, Qi Z
2021-04-19 10:59   ` Ananyev, Konstantin
2021-04-20  5:31     ` Rong, Leyi [this message]
2021-04-20  5:29 ` [dpdk-dev] [PATCH v3] " Leyi Rong
2021-04-20  8:03   ` Ananyev, Konstantin
2021-04-20 14:00     ` Zhang, Qi Z

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=SN6PR11MB262146A7584F2B8356DA5D25EC489@SN6PR11MB2621.namprd11.prod.outlook.com \
    --to=leyi.rong@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=qi.z.zhang@intel.com \
    /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).