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

Yongseok Koh yskoh at mellanox.com
Fri Nov 30 00:11:50 CET 2018


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 <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 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 <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>
@@ -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;
  


More information about the stable mailing list