DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Yang, Qiming" <qiming.yang@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [PATCH] net/iavf: fix Tx preparation
Date: Mon, 6 Nov 2023 01:40:39 +0000	[thread overview]
Message-ID: <DM4PR11MB599481D6CDB70CF3BE58BBB3D7AAA@DM4PR11MB5994.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CH0PR11MB808661F0CF92B12DDB3564FFE5A6A@CH0PR11MB8086.namprd11.prod.outlook.com>



> -----Original Message-----
> From: Yang, Qiming <qiming.yang@intel.com>
> Sent: Thursday, November 2, 2023 2:45 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; stable@dpdk.org
> Subject: RE: [PATCH] net/iavf: fix Tx preparation
> 
> Hi,
> 
> > -----Original Message-----
> > From: Qi Zhang <qi.z.zhang@intel.com>
> > Sent: Thursday, November 2, 2023 8:05 PM
> > To: Xing, Beilei <beilei.xing@intel.com>
> > Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; stable@dpdk.org
> > Subject: [PATCH] net/iavf: fix Tx preparation
> >
> > 1. check nb_segs > Tx ring size for TSO case.
> > 2. report nb_mtu_seg_max and nb_seg_max in dev_info.
> >
> > Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> > ---
> >  drivers/net/iavf/iavf_ethdev.c | 2 ++
> >  drivers/net/iavf/iavf_rxtx.c   | 3 ++-
> >  2 files changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/iavf/iavf_ethdev.c
> > b/drivers/net/iavf/iavf_ethdev.c index 98cc5c8ea8..0c6ab4ac5a 100644
> > --- a/drivers/net/iavf/iavf_ethdev.c
> > +++ b/drivers/net/iavf/iavf_ethdev.c
> > @@ -1207,6 +1207,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev,
> > struct rte_eth_dev_info *dev_info)
> >  		.nb_max = IAVF_MAX_RING_DESC,
> >  		.nb_min = IAVF_MIN_RING_DESC,
> >  		.nb_align = IAVF_ALIGN_RING_DESC,
> > +		.nb_mtu_seg_max = IAVF_TX_MAX_MTU_SEG,
> > +		.nb_seg_max = IAVF_MAX_RING_DESC,
> >  	};
> >
> >  	dev_info->err_handle_mode =
> > RTE_ETH_ERROR_HANDLE_MODE_PASSIVE;
> > diff --git a/drivers/net/iavf/iavf_rxtx.c
> > b/drivers/net/iavf/iavf_rxtx.c index
> > 610912f635..45f638c1d2 100644
> > --- a/drivers/net/iavf/iavf_rxtx.c
> > +++ b/drivers/net/iavf/iavf_rxtx.c
> > @@ -3656,7 +3656,8 @@ iavf_prep_pkts(__rte_unused void *tx_queue,
> > struct rte_mbuf **tx_pkts,
> >  				return i;
> >  			}
> >  		} else if ((m->tso_segsz < IAVF_MIN_TSO_MSS) ||
> > -			   (m->tso_segsz > IAVF_MAX_TSO_MSS)) {
> > +			   (m->tso_segsz > IAVF_MAX_TSO_MSS) ||
> > +			   (m->nb_segs > txq->nb_tx_desc)) {
> >  			/* MSS outside the range are considered malicious */
> >  			rte_errno = EINVAL;
> >  			return i;
> > --
> > 2.31.1
> 
> Acked-by: Qiming Yang <qiming.yang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

      reply	other threads:[~2023-11-06  1:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 12:05 Qi Zhang
2023-11-02  6:44 ` Yang, Qiming
2023-11-06  1:40   ` Zhang, Qi Z [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=DM4PR11MB599481D6CDB70CF3BE58BBB3D7AAA@DM4PR11MB5994.namprd11.prod.outlook.com \
    --to=qi.z.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=qiming.yang@intel.com \
    --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).