From: Bruce Richardson <bruce.richardson@intel.com>
To: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>,
dev@dpdk.org, Olga Shern <olgas@mellanox.com>,
Yongseok Koh <yskoh@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix a segmentation fault in Rx
Date: Fri, 8 Jul 2016 21:53:24 +0100 [thread overview]
Message-ID: <20160708205324.GC34980@bricha3-MOBL3> (raw)
In-Reply-To: <20160708132902.GF7621@6wind.com>
On Fri, Jul 08, 2016 at 03:29:02PM +0200, Adrien Mazarguil wrote:
> On Fri, Jul 08, 2016 at 02:43:26PM +0200, Nelio Laranjeiro wrote:
> > Fixed issue could occur when a Mbuf starvation happens in a middle of
> > reception of a segmented packet, in such situation, the PMD has to release
> > all segments of such packet. The end condition was wrong causing it to
> > free a Mbuf still handled by the NIC.
> >
> > Fixes: 9964b965ad69 ("net/mlx5: re-add Rx scatter support")
> >
> > Reported-by: Yongseok Koh <yskoh@mellanox.com>
> > Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> > ---
> > drivers/net/mlx5/mlx5_rxtx.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
> > index 0c352f3..3564937 100644
> > --- a/drivers/net/mlx5/mlx5_rxtx.c
> > +++ b/drivers/net/mlx5/mlx5_rxtx.c
> > @@ -1572,7 +1572,8 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
> > rte_prefetch0(wqe);
> > rep = rte_mbuf_raw_alloc(rxq->mp);
> > if (unlikely(rep == NULL)) {
> > - while (pkt) {
> > + while (pkt != seg) {
> > + assert(pkt != (*rxq->elts)[idx]);
> > seg = NEXT(pkt);
> > rte_mbuf_refcnt_set(pkt, 0);
> > __rte_mbuf_raw_free(pkt);
> > --
> > 2.1.4
> >
>
> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
>
Applied to dpdk-next-net/rel_16_07
/Bruce
prev parent reply other threads:[~2016-07-08 20:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-08 12:43 Nelio Laranjeiro
2016-07-08 13:29 ` Adrien Mazarguil
2016-07-08 20:53 ` Bruce Richardson [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=20160708205324.GC34980@bricha3-MOBL3 \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=nelio.laranjeiro@6wind.com \
--cc=olgas@mellanox.com \
--cc=yskoh@mellanox.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).