examples/ipv4_multicast: fix leak of cloned packets
authorHerakliusz Lipiec <herakliusz.lipiec@intel.com>
Tue, 13 Nov 2018 11:49:29 +0000 (11:49 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 18 Nov 2018 21:55:52 +0000 (22:55 +0100)
commit91dc9c13ba978fb8147240ed6fa20c41145bf0db
treed314972c1a22e0c768cc508ed6cae5f8acdcc5ce
parente772cf1bd0c10c13375d7de9acff842b76cb8f35
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>
doc/guides/sample_app_ug/ipv4_multicast.rst
examples/ipv4_multicast/main.c