From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id E18362986 for ; Thu, 13 Apr 2017 14:28:30 +0200 (CEST) Received: by mail-wm0-f45.google.com with SMTP id y18so3569012wmh.0 for ; Thu, 13 Apr 2017 05:28:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=LZq1/XGWm3RPAQgyLTUE82R8HoOtsIBfeOl80IYwBw4=; b=KGGVbuZzGwpSRp2IdZxbh+uL6aM7qsWbSfVxXG3dV48LkVZtSZ3wYvEn0Ne0BBpl3w 1W6NiiduogSE44mSMSVES2s+223+uhz/G2ZlvjLsZANeUwL4zf7+Y1+Gy5X6tMF20LwE z1vjghPF6cY6YH9r6ZkD7TRgAa/SLetZCQ6kxWyUqIYS9QIgAPNOhPrX6zLo+DdgqDuf 9idDHeGOck6zOB7gYCFTz0xL5LN/BxpA03S3tJVcno92W3Sdxga78OCMSwxVcAmgtKvs 2srs0VJHQMPXvQhiC5SX16pv4sszI9x/SnNilbS9QnjawfIKcn75nQOlava2IOZBdiOt AwHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=LZq1/XGWm3RPAQgyLTUE82R8HoOtsIBfeOl80IYwBw4=; b=foCEVGUQtVr5gSjcQJiNtQdQCh8M7tHKdDQcY9z3H0KjGjeSpn2jZuV3+nDBSnY+L1 2s6nKVxPYT18G7s5niKhfKKe+lLnjumhAzc/vAKK9ZakuXiOEpDUsmEw31zDYRsrhfQP Ieer4H+n2flPJCCmfWWhqqpfe1bJ4Wdl0U0bhyTDczOgB1GN0xDHMq7RNvKLmB8uTXel a1VSBQfHWiGhEUywME3QR09mfnKNjJzEVISiU2kogyjN6ZA9jBqzgHy+ag4HjTrWSbfF 2/m5k5+dHmPlBSeb+mFAByOVEu8Z/0i3oma0zZzsTJLDDvlaltwKwWai6FvDbU22Holy T/mA== X-Gm-Message-State: AN3rC/44XuU4CN1al94zsqTCcvTcbpZPpsTUetYNVU6lIer+lEADpkbO mOSx3b5jGEO6Qy9z X-Received: by 10.28.68.6 with SMTP id r6mr3183206wma.7.1492086510642; Thu, 13 Apr 2017 05:28:30 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id l141sm10411795wma.32.2017.04.13.05.28.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Apr 2017 05:28:29 -0700 (PDT) Date: Thu, 13 Apr 2017 14:28:22 +0200 From: Adrien Mazarguil To: Ferruh Yigit Cc: "Myers, Charles" , "nelio.laranjeiro@6wind.com" , "dev@dpdk.org" Message-ID: <20170413122822.GE3790@6wind.com> References: <1492069426-123358-1-git-send-email-Charles.Myers@spirent.com> <20170413120508.GD3790@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dpdk-dev] [PATCH] net/mlx4: fix rx not working after mbuf alloc failure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 12:28:31 -0000 On Thu, Apr 13, 2017 at 01:22:39PM +0100, Ferruh Yigit wrote: > On 4/13/2017 1:05 PM, Adrien Mazarguil wrote: > > 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 > > > > 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: > > Hi Adrien, Charles, > > I can't see this patch, any chance that it doesn't hit the mail list? Is > there a patchwork link for patch? Ah, I probably only got it because I was also a recipient. Charles, have you subscribed to dev@dpdk.org? > > > > 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