From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id EC5042986 for ; Thu, 13 Apr 2017 14:22:42 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP; 13 Apr 2017 05:22:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,194,1488873600"; d="scan'208";a="88665952" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.122]) ([10.237.220.122]) by fmsmga006.fm.intel.com with ESMTP; 13 Apr 2017 05:22:40 -0700 To: Adrien Mazarguil , "Myers, Charles" Cc: "nelio.laranjeiro@6wind.com" , "dev@dpdk.org" References: <1492069426-123358-1-git-send-email-Charles.Myers@spirent.com> <20170413120508.GD3790@6wind.com> From: Ferruh Yigit Message-ID: Date: Thu, 13 Apr 2017 13:22:39 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <20170413120508.GD3790@6wind.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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:22:43 -0000 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? > > 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 >