summaryrefslogtreecommitdiff
path: root/examples/ipv4_multicast
diff options
context:
space:
mode:
authorHerakliusz Lipiec <herakliusz.lipiec@intel.com>2018-11-13 11:49:29 +0000
committerThomas Monjalon <thomas@monjalon.net>2018-11-18 22:55:52 +0100
commit91dc9c13ba978fb8147240ed6fa20c41145bf0db (patch)
treed314972c1a22e0c768cc508ed6cae5f8acdcc5ce /examples/ipv4_multicast
parente772cf1bd0c10c13375d7de9acff842b76cb8f35 (diff)
downloaddpdk-91dc9c13ba978fb8147240ed6fa20c41145bf0db.zip
dpdk-91dc9c13ba978fb8147240ed6fa20c41145bf0db.tar.gz
dpdk-91dc9c13ba978fb8147240ed6fa20c41145bf0db.tar.xz
examples/ipv4_multicast: fix leak of cloned packets
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") Cc: stable@dpdk.org Reported-by: Dong Wang <dong1.wang@intel.com> Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Dong Wang <dong1.wang@intel.com>
Diffstat (limited to 'examples/ipv4_multicast')
-rw-r--r--examples/ipv4_multicast/main.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 4073a49..428ca46 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)
hdr->tx_offload = pkt->tx_offload;
hdr->hash = pkt->hash;
- hdr->ol_flags = pkt->ol_flags;
-
__rte_mbuf_sanity_check(hdr, 1);
return hdr;
}