From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0EEADA04F0 for ; Tue, 10 Dec 2019 16:02:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 04F0C37A2; Tue, 10 Dec 2019 16:02:04 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id D886D37A2 for ; Tue, 10 Dec 2019 16:02:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575990122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xo2B2p6/a30XQhjUgvp3OQwbtYsm+abO0OIymId+Uzg=; b=YwR4X46bXfItnAQJ5OhjOY4XIrHRdWnMy5hbe2aXG5vuwKmlutRnG+7hUCWBVy8kcNoDbM xgey7LUWtkr+monL2Y3KaUrPyLmEvSzjgyqbV0B7yYmTty84Rz+oynpcm6zKusj6yKh1Lf XfhTWWGOqLtNCDopO5aLBjbU4wNpDTU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-305-zaEEggcsMeSn9c8hGf9hgQ-1; Tue, 10 Dec 2019 10:01:59 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D6A3F190D366; Tue, 10 Dec 2019 15:01:57 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 542A15ED4C; Tue, 10 Dec 2019 15:01:53 +0000 (UTC) From: Kevin Traynor To: Xiao Wang Cc: Anna Lukin , Xiaolong Ye , dpdk stable Date: Tue, 10 Dec 2019 14:59:34 +0000 Message-Id: <20191210145937.32755-60-ktraynor@redhat.com> In-Reply-To: <20191210145937.32755-1-ktraynor@redhat.com> References: <20191210145937.32755-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: zaEEggcsMeSn9c8hGf9hgQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/fm10k: fix mbuf free in vector Rx' has been queued to LTS release 18.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/16/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/6f0f144c7c71253546= 580db6fceb3f0bd06de70a Thanks. Kevin. --- >From 6f0f144c7c71253546580db6fceb3f0bd06de70a Mon Sep 17 00:00:00 2001 From: Xiao Wang Date: Fri, 25 Oct 2019 20:33:22 -0400 Subject: [PATCH] net/fm10k: fix mbuf free in vector Rx [ upstream commit 84fff3425b896a465a29b92a81aab563c07847cd ] There's a corner case that all the Rx queue mbufs are allocated but none of them is used, this patch fixes mbuf free for this case. Fixes: b6719f8a04bb ("fm10k: release mbuf for vector Rx") Signed-off-by: Xiao Wang Signed-off-by: Anna Lukin Reviewed-by: Xiaolong Ye --- drivers/net/fm10k/fm10k_rxtx_vec.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_r= xtx_vec.c index 45542bef3..d76dfd16f 100644 --- a/drivers/net/fm10k/fm10k_rxtx_vec.c +++ b/drivers/net/fm10k/fm10k_rxtx_vec.c @@ -360,6 +360,13 @@ fm10k_rx_queue_release_mbufs_vec(struct fm10k_rx_queue= *rxq) =20 =09/* free all mbufs that are valid in the ring */ -=09for (i =3D rxq->next_dd; i !=3D rxq->rxrearm_start; i =3D (i + 1) & mas= k) -=09=09rte_pktmbuf_free_seg(rxq->sw_ring[i]); +=09if (rxq->rxrearm_nb =3D=3D 0) { +=09=09for (i =3D 0; i < rxq->nb_desc; i++) +=09=09=09if (rxq->sw_ring[i] !=3D NULL) +=09=09=09=09rte_pktmbuf_free_seg(rxq->sw_ring[i]); +=09} else { +=09=09for (i =3D rxq->next_dd; i !=3D rxq->rxrearm_start; +=09=09=09=09i =3D (i + 1) & mask) +=09=09=09rte_pktmbuf_free_seg(rxq->sw_ring[i]); +=09} =09rxq->rxrearm_nb =3D rxq->nb_desc; =20 --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-10 14:49:43.023441154 +0000 +++ 0060-net-fm10k-fix-mbuf-free-in-vector-Rx.patch=092019-12-10 14:49:39.1= 02456835 +0000 @@ -1 +1 @@ -From 84fff3425b896a465a29b92a81aab563c07847cd Mon Sep 17 00:00:00 2001 +From 6f0f144c7c71253546580db6fceb3f0bd06de70a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 84fff3425b896a465a29b92a81aab563c07847cd ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org