patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Connolly, Padraig J" <padraig.j.connolly@intel.com>
To: "Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	"Stokes, Ian" <ian.stokes@intel.com>,
	 "Zhang, Qi Z" <qi.z.zhang@intel.com>,
	Kevin Liu <kevinx.liu@intel.com>
Subject: Re: [PATCH] net/iavf: add segment-length check to Tx prep
Date: Tue, 19 Nov 2024 09:54:33 +0000	[thread overview]
Message-ID: <DS7PR11MB60150DB22F2F19EFF6999019D7202@DS7PR11MB6015.namprd11.prod.outlook.com> (raw)
In-Reply-To: <DS7PR11MB60158B50DDE23437F2B70E86D7202@DS7PR11MB6015.namprd11.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1661 bytes --]


 Tested-by: Padraig Connolly <padraig.j.connolly@intel.com>
> Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

>On 11/11/2024 16:42, Bruce Richardson wrote:
> > In the Tx prep function, the metadata checks were only checking the
> > packet length and ignoring the data length. For single-buffer packets we
> > can quickly check that the data length is the packet length.
> >
> > Fixes: 19ee91c6bd9a ("net/iavf: check illegal packet sizes")
> > Cc: stable@dpdk.org
> >
> > Reported-by: Padraig Connolly <padraig.j.connolly@intel.com>
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> >   drivers/net/iavf/iavf_rxtx.c | 6 +++++-
> >   1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
> > index 4850b9e381..6a093c6746 100644
> > --- a/drivers/net/iavf/iavf_rxtx.c
> > +++ b/drivers/net/iavf/iavf_rxtx.c
> > @@ -3677,7 +3677,11 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
> >                        return i;
> >                }
> >
> > -             if (m->pkt_len < IAVF_TX_MIN_PKT_LEN) {
> > +             /* valid packets are greater than min size, and single-buffer pkts
> > +              * must have data_len == pkt_len
> > +              */
> > +             if (m->pkt_len < IAVF_TX_MIN_PKT_LEN ||
> > +                             (m->nb_segs == 1 && m->data_len != m->pkt_len)) {
> >                        rte_errno = EINVAL;
> >                        return i;
> >                }

--
Regards,
Vladimir
Tested-by: Padraig Connolly <padraig.j.connolly@intel.com>

[-- Attachment #2: Type: text/html, Size: 3803 bytes --]

  reply	other threads:[~2024-11-19  9:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-11 16:42 Bruce Richardson
2024-11-11 17:46 ` Medvedkin, Vladimir
2024-11-19  9:17   ` Connolly, Padraig J
2024-11-19  9:54     ` Connolly, Padraig J [this message]
2024-11-19 11:41     ` Bruce Richardson

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=DS7PR11MB60150DB22F2F19EFF6999019D7202@DS7PR11MB6015.namprd11.prod.outlook.com \
    --to=padraig.j.connolly@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ian.stokes@intel.com \
    --cc=kevinx.liu@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=vladimir.medvedkin@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).