[dpdk-stable] patch 'examples/ipv4_multicast: fix leak of cloned packets' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Thu Nov 29 14:20:58 CET 2018


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 <herakliusz.lipiec at intel.com>
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 <dong1.wang at intel.com>
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec at intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
Acked-by: Dong Wang <dong1.wang at intel.com>
---
 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 <herakliusz.lipiec at intel.com>
 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 at dpdk.org
 
 Reported-by: Dong Wang <dong1.wang at intel.com>
 Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec at intel.com>
@@ -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;


More information about the stable mailing list