From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 09D5291; Tue, 13 Nov 2018 12:49:40 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2018 03:49:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,499,1534834800"; d="scan'208";a="103964263" Received: from silpixa00399499.ir.intel.com (HELO silpixa00399499.ger.corp.intel.com) ([10.237.222.133]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2018 03:49:38 -0800 From: Herakliusz Lipiec To: dev@dpdk.org Cc: konstantin.ananyev@intel.com, dong1.wang@intel.com, thomas@monjalon.net, anatoly.burakov@intel.com, Herakliusz Lipiec , stable@dpdk.org Date: Tue, 13 Nov 2018 11:49:29 +0000 Message-Id: <20181113114929.9269-1-herakliusz.lipiec@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181112204650.7175-1-herakliusz.lipiec@intel.com> References: <20181112204650.7175-1-herakliusz.lipiec@intel.com> Subject: [dpdk-dev] [PATCH v2] example/ipv4_multicast: fix app hanging when using clone X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2018 11:49:41 -0000 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: Wang Dong Signed-off-by: Herakliusz Lipiec --- 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 @@ -319,7 +319,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 4073a4907..428ca4694 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; } -- 2.17.1