DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: "Jayatheerthan, Jay" <jay.jayatheerthan@intel.com>
Cc: "Naga Harish K, S V" <s.v.naga.harish.k@intel.com>,
	"jerinj@marvell.com" <jerinj@marvell.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] eventdev/rx_adapter: fix wrr buffer overrun issue
Date: Wed, 20 Oct 2021 14:55:33 +0530	[thread overview]
Message-ID: <CALBAE1OndjxP586UrhA4e+FB6kjgUei32yxwavEA6dspR3srxw@mail.gmail.com> (raw)
In-Reply-To: <DM6PR11MB4348F9297220FDED8522FC6BFDBC9@DM6PR11MB4348.namprd11.prod.outlook.com>

On Mon, Oct 18, 2021 at 4:39 PM Jayatheerthan, Jay
<jay.jayatheerthan@intel.com> wrote:
>
> Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>


Changed the subject to:
eventdev/rx_adapter: fix WRR buffer overrun issue
Cced stable@dpdk.org

Series applied to dpdk-next-net-eventdev/for-main. Thanks

>
> > -----Original Message-----
> > From: Naga Harish K, S V <s.v.naga.harish.k@intel.com>
> > Sent: Monday, October 18, 2021 1:56 PM
> > To: jerinj@marvell.com; Jayatheerthan, Jay <jay.jayatheerthan@intel.com>
> > Cc: dev@dpdk.org
> > Subject: [PATCH] eventdev/rx_adapter: fix wrr buffer overrun issue
> >
> > when a poll queue is removed from a rx_adapter instance, the wrr poll
> > array is recomputed. The wrr array length is reduced in this case. The
> > next wrr position to poll is stored in wrr_pos variable of rx_adapter
> > instance. This wrr_pos can become invalid in some cases after wrr is
> > recomputed. Using this variable to get the next queue and device pair
> > may leed to wrr buffer overruns.
> >
> > Resetting the wrr_pos to zero after recomputation of wrr array fixes
> > the buffer overrun issue.
> >
> > Fixes: 9c38b704d280 ("eventdev: add eth Rx adapter implementation")
> >
> > Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
> > ---
> >  lib/eventdev/rte_event_eth_rx_adapter.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
> > index bd68b8efe1..82a652d305 100644
> > --- a/lib/eventdev/rte_event_eth_rx_adapter.c
> > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c
> > @@ -2773,6 +2773,11 @@ rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,
> >               rx_adapter->eth_rx_poll = rx_poll;
> >               rx_adapter->wrr_sched = rx_wrr;
> >               rx_adapter->wrr_len = nb_wrr;
> > +             /*
> > +              * reset next poll start position (wrr_pos) to avoid buffer
> > +              * overrun when wrr_len is reduced in case of queue delete
> > +              */
> > +             rx_adapter->wrr_pos = 0;
> >               rx_adapter->num_intr_vec += num_intr_vec;
> >
> >               if (dev_info->nb_dev_queues == 0) {
> > --
> > 2.25.1
>

  reply	other threads:[~2021-10-20  9:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18  8:25 Naga Harish K S V
2021-10-18 11:09 ` Jayatheerthan, Jay
2021-10-20  9:25   ` Jerin Jacob [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-10-18  8:20 Naga Harish K S V

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=CALBAE1OndjxP586UrhA4e+FB6kjgUei32yxwavEA6dspR3srxw@mail.gmail.com \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=jay.jayatheerthan@intel.com \
    --cc=jerinj@marvell.com \
    --cc=s.v.naga.harish.k@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).