From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 435F71B4BC for ; Thu, 29 Nov 2018 14:23:41 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A0E89307EAAE; Thu, 29 Nov 2018 13:23:40 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-117-230.ams2.redhat.com [10.36.117.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0A2891019626; Thu, 29 Nov 2018 13:23:38 +0000 (UTC) From: Kevin Traynor To: Herakliusz Lipiec Cc: Dong Wang , Konstantin Ananyev , dpdk stable Date: Thu, 29 Nov 2018 13:20:58 +0000 Message-Id: <20181129132128.7609-58-ktraynor@redhat.com> In-Reply-To: <20181129132128.7609-1-ktraynor@redhat.com> References: <20181129132128.7609-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 29 Nov 2018 13:23:40 +0000 (UTC) Subject: [dpdk-stable] patch 'examples/ipv4_multicast: fix leak of cloned packets' has been queued to stable release 18.08.1 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: , X-List-Received-Date: Thu, 29 Nov 2018 13:23:41 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 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/08/18. 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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From 2c9a64f051b930810f083ff45a8f9459f26c69d8 Mon Sep 17 00:00:00 2001 From: Herakliusz Lipiec Date: Tue, 13 Nov 2018 11:49:29 +0000 Subject: [PATCH] examples/ipv4_multicast: fix leak of cloned packets [ upstream commit 91dc9c13ba978fb8147240ed6fa20c41145bf0db ] The ipv4_multicast sample application was dropping packets when using mbuf clone. When creating an L2 header and copying metadata from the source packet, the ol_flags were also copied along with all the other metadata. Because the cloned packet had IND_ATTACHED_MBUF flag set in its ol_flags, this caused the packets to never be freed when using rte_pktmbuf_free. Since copying ol_flags from the cloned packet is not necessary in the first place, just don't do it. Fixes: af75078fece3 ("first public release") Reported-by: Dong Wang Signed-off-by: Herakliusz Lipiec Acked-by: Konstantin Ananyev Acked-by: Dong Wang --- doc/guides/sample_app_ug/ipv4_multicast.rst | 1 - examples/ipv4_multicast/main.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/doc/guides/sample_app_ug/ipv4_multicast.rst b/doc/guides/sample_app_ug/ipv4_multicast.rst index ce1474ec7..f6efa7f6f 100644 --- a/doc/guides/sample_app_ug/ipv4_multicast.rst +++ b/doc/guides/sample_app_ug/ipv4_multicast.rst @@ -320,5 +320,4 @@ It is the mcast_out_pkt() function that performs the packet duplication (either hdr->pkt.vlan_macip = pkt->pkt.vlan_macip; hdr->pkt.hash = pkt->pkt.hash; - hdr->ol_flags = pkt->ol_flags; rte_mbuf_sanity_check(hdr, RTE_MBUF_PKT, 1); diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c index 331c32e71..dec680597 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c @@ -268,6 +268,4 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone) hdr->hash = pkt->hash; - hdr->ol_flags = pkt->ol_flags; - __rte_mbuf_sanity_check(hdr, 1); return hdr; -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 13:11:36.511473860 +0000 +++ 0057-examples-ipv4_multicast-fix-leak-of-cloned-packets.patch 2018-11-29 13:11:34.000000000 +0000 @@ -1,8 +1,10 @@ -From 91dc9c13ba978fb8147240ed6fa20c41145bf0db Mon Sep 17 00:00:00 2001 +From 2c9a64f051b930810f083ff45a8f9459f26c69d8 Mon Sep 17 00:00:00 2001 From: Herakliusz Lipiec Date: Tue, 13 Nov 2018 11:49:29 +0000 Subject: [PATCH] examples/ipv4_multicast: fix leak of cloned packets +[ upstream commit 91dc9c13ba978fb8147240ed6fa20c41145bf0db ] + The ipv4_multicast sample application was dropping packets when using mbuf clone. When creating an L2 header and copying metadata from the source packet, the ol_flags were also copied @@ -13,7 +15,6 @@ not necessary in the first place, just don't do it. Fixes: af75078fece3 ("first public release") -Cc: stable@dpdk.org Reported-by: Dong Wang Signed-off-by: Herakliusz Lipiec @@ -35,10 +36,10 @@ rte_mbuf_sanity_check(hdr, RTE_MBUF_PKT, 1); diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c -index 4073a4907..428ca4694 100644 +index 331c32e71..dec680597 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c -@@ -267,6 +267,4 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone) +@@ -268,6 +268,4 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone) hdr->hash = pkt->hash; - hdr->ol_flags = pkt->ol_flags;