From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id C196B4F94; Wed, 14 Nov 2018 11:09:12 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2018 02:09:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,232,1539673200"; d="scan'208";a="91015448" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga006.jf.intel.com with ESMTP; 14 Nov 2018 02:09:11 -0800 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 14 Nov 2018 02:09:11 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 14 Nov 2018 02:09:10 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.161]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.117]) with mapi id 14.03.0415.000; Wed, 14 Nov 2018 18:09:09 +0800 From: "Wang, Dong1" To: "Ananyev, Konstantin" , "Lipiec, Herakliusz" , "dev@dpdk.org" CC: "thomas@monjalon.net" , "Burakov, Anatoly" , "stable@dpdk.org" Thread-Topic: [PATCH v2] example/ipv4_multicast: fix app hanging when using clone Thread-Index: AQHUe0b5pKJEC1/DAEOLWHRQIh7gp6VOiIxw///sa4CAAJHk4A== Date: Wed, 14 Nov 2018 10:09:08 +0000 Message-ID: <3E2E5017C928014B90FD7864A64F0B5514F74E83@SHSMSX103.ccr.corp.intel.com> References: <20181112204650.7175-1-herakliusz.lipiec@intel.com> <20181113114929.9269-1-herakliusz.lipiec@intel.com> <3E2E5017C928014B90FD7864A64F0B5514F74985@SHSMSX103.ccr.corp.intel.com> <2601191342CEEE43887BDE71AB977258010CEB7388@IRSMSX106.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB977258010CEB7388@IRSMSX106.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjJlN2RhY2MtY2RiYi00MzljLWI2ZjItZjgwZThkZWZmMTY3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiN2dPMkZmd1FaUStHd1pIQ1F6V3JrS3hvUFFBajdVOGtkcTBZdW51aUNlNEk0Tnc1ZTRmdWQ0emF6ZmpTcTFTcCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH v2] example/ipv4_multicast: fix app hanging when using clone X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2018 10:09:13 -0000 Hi Konstantin, In this example, no flags be set by user, so no need to copy flags from ori= ginal mbuf. I'm thinking about some DPDK developers may create their own application ba= sed on this example, they add some flags before packet be cloned. Regards, Dong -----Original Message----- From: Ananyev, Konstantin=20 Sent: Wednesday, November 14, 2018 17:03 To: Wang, Dong1 ; Lipiec, Herakliusz ; dev@dpdk.org Cc: thomas@monjalon.net; Burakov, Anatoly ; stab= le@dpdk.org Subject: RE: [PATCH v2] example/ipv4_multicast: fix app hanging when using = clone Hi Dong, > Hi Herakliusz, >=20 > Since pkt->ol_flags might set some other bits except=20 > IND_ATTACHED_MBUF, how about set its value to original pkt->ol_flag It could be done, but not sure what is the point? Which flags you think we need to copy from cloned mbuf (segment #2) to new = header? Konstantin >=20 > Regards, > Dong >=20 > -----Original Message----- > From: Lipiec, Herakliusz > Sent: Tuesday, November 13, 2018 19:49 > To: dev@dpdk.org > Cc: Ananyev, Konstantin ; Wang, Dong1=20 > ; thomas@monjalon.net; Burakov, Anatoly=20 > ; Lipiec, Herakliusz=20 > ; stable@dpdk.org > Subject: [PATCH v2] example/ipv4_multicast: fix app hanging when using=20 > clone >=20 > The ipv4_multicast sample application was dropping packets when using=20 > mbuf clone. When creating an L2 header and copying metadata from the=20 > source packet, the ol_flags were also copied along with all the other met= adata. Because the cloned packet had IND_ATTACHED_MBUF flag set in its ol_f= lags, 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 fir= st place, just don't do it. >=20 > Fixes: af75078fece3 ("first public release") > CC: stable@dpdk.org >=20 > 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(-) >=20 > diff --git a/doc/guides/sample_app_ug/ipv4_multicast.rst=20 > 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 =3D pkt->pkt.in_port; > hdr->pkt.vlan_macip =3D pkt->pkt.vlan_macip; > hdr->pkt.hash =3D pkt->pkt.hash; > - hdr->ol_flags =3D pkt->ol_flags; > rte_mbuf_sanity_check(hdr, RTE_MBUF_PKT, 1); >=20 > return hdr; > diff --git a/examples/ipv4_multicast/main.c=20 > 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 =3D pkt->tx_offload; > hdr->hash =3D pkt->hash; >=20 > - hdr->ol_flags =3D pkt->ol_flags; > - > __rte_mbuf_sanity_check(hdr, 1); > return hdr; > } > -- > 2.17.1