From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E3E00A04C0; Fri, 25 Sep 2020 10:44:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0DD011D508; Fri, 25 Sep 2020 10:44:59 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 6D5481D16E for ; Fri, 25 Sep 2020 10:44:57 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08P8e5bT005303; Fri, 25 Sep 2020 01:44:56 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pfpt0220; bh=t+/KrUo41EEh28LI7VjiLXx4+B86PZAXIvxZsmApZLk=; b=jYQ3f9dS7I+8+InsjYstJduAYcsRo9Ov8kyp+mIHOGAbq5Ti/vBQ2b/Txi6cAu9PKbHF dKth/spLtayZFnOqlTHVicUPZoIf1Zne92iKJQ0r/pmI3BDoAXPOf1oG9Di/R3LcuqWW q/nDtJsmg96+BPgtLQcMFIrvHTFn2sc54JoeC0h4G2WuHtsVWDGBE3CWXz9FMVcKW2ay 0Y/b015DOgDQjitj2el+sfOt7w76PsaxF+Cl4ZHYrfwiDZ4qoweCA6YraVahT76vkFL+ 3DdtVnOOHMPTurctTVJnEBnuxtFY0PPqWK9fuDBS8+uhoQXa/iGmArYVya5fh3D+nyja 4Q== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 33nfbqa57g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 25 Sep 2020 01:44:56 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 25 Sep 2020 01:44:55 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 25 Sep 2020 01:44:55 -0700 Received: from [10.193.39.7] (NN-LT0019.marvell.com [10.193.39.7]) by maili.marvell.com (Postfix) with ESMTP id 57D1A3F703F; Fri, 25 Sep 2020 01:44:53 -0700 (PDT) To: Stephen Hemminger CC: , Rasesh Mody , Devendra Singh Rawat , Wenzhuo Lu , Beilei Xing , Bernard Iremonger References: <20200924113414.483-1-irusskikh@marvell.com> <20200924075647.3e160c0b@hermes.lan> From: Igor Russkikh Message-ID: <693fb7a7-4109-66c2-e566-a7f25e2b5813@marvell.com> Date: Fri, 25 Sep 2020 11:44:51 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Thunderbird/81.0 MIME-Version: 1.0 In-Reply-To: <20200924075647.3e160c0b@hermes.lan> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-25_02:2020-09-24, 2020-09-25 signatures=0 Subject: Re: [dpdk-dev] [EXT] Re: [RFC PATCH] app/testpmd: tx pkt clones parameter in flowgen 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" >> + } else { >> + nb_clones--; >> + } >> + pkts_burst[nb_pkt] = pkt; >> >> next_flow = (next_flow + 1) % cfg_n_flows; >> } > > > This doesn't look safe. You can't just send same mbuf N times without > incrementing > the reference count. Hi Stephen, You are right, of course we need refcnt increment here. It looks like it worked for me, because occasionally its possible to execute rte_pktmbuf_free multiple times over mbuf with refcnt==1 without any immediate side effects. Will repost. Thanks, Igor