From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 31D621B50A for ; Fri, 30 Nov 2018 00:15:56 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Nov 2018 01:21:45 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id wATNCW8u032075; Fri, 30 Nov 2018 01:15:49 +0200 From: Yongseok Koh To: Herakliusz Lipiec Cc: Dong Wang , Konstantin Ananyev , dpdk stable Date: Thu, 29 Nov 2018 15:11:50 -0800 Message-Id: <20181129231202.30436-116-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181129231202.30436-1-yskoh@mellanox.com> References: <20181129231202.30436-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'examples/ipv4_multicast: fix leak of cloned packets' has been queued to LTS release 17.11.5 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 23:15:56 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.5 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/01/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. Yongseok --- >>From c57aeca6d1e1ad8f09324b710fc66bc357c0c3fa 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 7a8e7ebce..cca53096c 100644 --- a/doc/guides/sample_app_ug/ipv4_multicast.rst +++ b/doc/guides/sample_app_ug/ipv4_multicast.rst @@ -346,7 +346,6 @@ It is the mcast_out_pkt() function that performs the packet duplication (either hdr->pkt.in_port = pkt->pkt.in_port; 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); return hdr; diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c index 1c5851654..6cfa6ebb4 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c @@ -298,8 +298,6 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone) hdr->tx_offload = pkt->tx_offload; hdr->hash = pkt->hash; - hdr->ol_flags = pkt->ol_flags; - __rte_mbuf_sanity_check(hdr, 1); return hdr; } -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 15:01:50.283468259 -0800 +++ 0116-examples-ipv4_multicast-fix-leak-of-cloned-packets.patch 2018-11-29 15:01:45.310961000 -0800 @@ -1,8 +1,10 @@ -From 91dc9c13ba978fb8147240ed6fa20c41145bf0db Mon Sep 17 00:00:00 2001 +From c57aeca6d1e1ad8f09324b710fc66bc357c0c3fa 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 @@ -25,10 +26,10 @@ 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 +index 7a8e7ebce..cca53096c 100644 --- a/doc/guides/sample_app_ug/ipv4_multicast.rst +++ b/doc/guides/sample_app_ug/ipv4_multicast.rst -@@ -319,7 +319,6 @@ It is the mcast_out_pkt() function that performs the packet duplication (either +@@ -346,7 +346,6 @@ It is the mcast_out_pkt() function that performs the packet duplication (either hdr->pkt.in_port = pkt->pkt.in_port; hdr->pkt.vlan_macip = pkt->pkt.vlan_macip; hdr->pkt.hash = pkt->pkt.hash; @@ -37,10 +38,10 @@ return hdr; diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c -index 4073a4907..428ca4694 100644 +index 1c5851654..6cfa6ebb4 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c -@@ -266,8 +266,6 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone) +@@ -298,8 +298,6 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone) hdr->tx_offload = pkt->tx_offload; hdr->hash = pkt->hash;