DPDK patches and discussions
 help / color / mirror / Atom feed
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: "Myers, Charles" <Charles.Myers@spirent.com>
Cc: "nelio.laranjeiro@6wind.com" <nelio.laranjeiro@6wind.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/mlx4: fix rx not working after mbuf alloc failure
Date: Thu, 13 Apr 2017 14:05:08 +0200	[thread overview]
Message-ID: <20170413120508.GD3790@6wind.com> (raw)
In-Reply-To: <BY2PR1001MB11763C697502CAED06261E15EE020@BY2PR1001MB1176.namprd10.prod.outlook.com>

Hi Charles,

On Thu, Apr 13, 2017 at 07:52:34AM +0000, Myers, Charles wrote:
> I ran into an issue where the mlx4 driver stops receiving packets when mbuf allocation fails in mlx4_rx_burst().
> 
> This issue appears to be caused because the code doesn't recycle the existing mbuf to the sges array
> when mbuf allocation fails as is done in the code right above it which handles the
> (wc.status != IBV_WC_SUCCESS) case.
> 
> Copying the code from the above case before jumping to repost fixes the issue for me.
> 
> Signed-off-by: Charles Myers <Charles.Myers@spirent.com>

Thanks, this addresses a very old bug present since v2.1.0. As a fix, the
subject line should contain the word "fix", something like:

 net/mlx4: fix Rx after mbuf allocation failure

And since it's a fix:

 Fixes: acac55f16412 ("mlx4: use MOFED 3.0 fast verbs interface for Rx operations")
 Cc: stable@dpdk.org

Please also make sure the commit log is formatted according to the
submission guidelines (50 chars max for subject line, 75 chars for the rest
(except for the Fixes line), yada yada - see check-git-log.sh).

> ---
>  drivers/net/mlx4/mlx4.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index aff9155..59d26fe 100644
> --- a/drivers/net/mlx4/mlx4.c
> +++ b/drivers/net/mlx4/mlx4.c
> @@ -3169,6 +3169,9 @@ struct txq_mp2mr_mbuf_check_data {
>  			/* Increase out of memory counters. */
>  			++rxq->stats.rx_nombuf;
>  			++rxq->priv->dev->data->rx_mbuf_alloc_failed;
> +

Another nit here, the above blank line is unnecessary.

> +			/* Add SGE to array for repost. */
> +			sges[i] = elt->sge;
>  			goto repost;
>  		}
>  
> --
> 1.7.9.5
> 

Otherwise,

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

-- 
Adrien Mazarguil
6WIND

  reply	other threads:[~2017-04-13 12:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1492069426-123358-1-git-send-email-Charles.Myers@spirent.com>
2017-04-13  7:52 ` Myers, Charles
2017-04-13 12:05   ` Adrien Mazarguil [this message]
2017-04-13 12:22     ` Ferruh Yigit
2017-04-13 12:28       ` Adrien Mazarguil
2017-04-13 22:15   ` Charles Myers
2017-04-14  9:58     ` Ferruh Yigit

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=20170413120508.GD3790@6wind.com \
    --to=adrien.mazarguil@6wind.com \
    --cc=Charles.Myers@spirent.com \
    --cc=dev@dpdk.org \
    --cc=nelio.laranjeiro@6wind.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).