From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6F2E6A0032; Mon, 15 Nov 2021 18:31:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF39D40E01; Mon, 15 Nov 2021 18:31:24 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 0E0CF40141 for ; Mon, 15 Nov 2021 18:31:21 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10169"; a="213521185" X-IronPort-AV: E=Sophos;i="5.87,237,1631602800"; d="scan'208";a="213521185" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Nov 2021 09:31:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,237,1631602800"; d="scan'208";a="585449304" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by FMSMGA003.fm.intel.com with ESMTP; 15 Nov 2021 09:31:08 -0800 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 15 Nov 2021 09:31:07 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Mon, 15 Nov 2021 09:31:07 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Mon, 15 Nov 2021 09:31:07 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UjCBpR2zvylTuR+tmIxRS2eSY320HIMHaBgGxJ7f99swISvU8VLQMXEa8L6FLRnra3TovO/nfzjAKjWu/b4Bq5sogOp3hJ14FviadbV78NvSF+RGBK34A/Nhdf5ofRVvq//E4hOcbCfk1hUg2lxG1T4vkmgFT8yoDwNukAamDjmspq49Y5pOz0IAWHRQuPW0lC6U56mQSiliJ1RAR+iZs6micJnClF4YGjBk3TimJAmF6GqFImven1JswBAR7Gb7+8bLEdOhOpt45sxyGkt0GZ97aQIR5/w3Y4Wrg5nd0oZrqEFtn1wkdhUk49sT1gk0DAc/sCACKTwTq09BYm/z4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tgpSj62HpI6SoY/QeYe/VMbc9L7iM8xSa+j412DuiGw=; b=cvLAtnaQPOEkOwWlvb+p47s8g+tUBL3kR5ncWjiYaFLQ2zKmchLLHy9Ybnz1QFgowdbpyjeO2PeXWKQ9V8GsfzN+rBn7/jaI3BodUML9CiaE9g9LlNxv9yNSOo4xoSOPkoktanD26SimjEfXR+uo2KA9kKH8V30arJ4Jo65Zo+pombhaQyMof3sWGX1Ve62YYUj1wkbX7iars2dt/63+RW59UpdYKHrErYyvJ8Aw+uj8TFn4lKc1kKakytX2tcSlBpwHK9bG1SQdhkW1FglpZS/+5eYkYYTFTOuLp3mKqAogBZqOrCSJqNlSMjXj7OmmIg4dGyGm0cwRe7L2P0iGTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tgpSj62HpI6SoY/QeYe/VMbc9L7iM8xSa+j412DuiGw=; b=HEB9YqfruLAXiyWwwvTuuHASTeQTO2sKEWxZ3bprRRmO67mpjFs2cZpVv0JG2a/achUT3zzNwOT4lPx/stEA9/4yIg25dH3r41uCebkmDhm1UCaECwW4BpkjBW1bLkpXPDl4L4d4sBj/iUItAhmmJAeGjaEgiG/H7mFKY6r0Rp8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5782.namprd11.prod.outlook.com (2603:10b6:510:147::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15; Mon, 15 Nov 2021 17:31:06 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c%5]) with mapi id 15.20.4690.027; Mon, 15 Nov 2021 17:31:06 +0000 Message-ID: <91dc58ee-64fc-b520-9716-d7e0fc9d34d9@intel.com> Date: Mon, 15 Nov 2021 17:30:59 +0000 Content-Language: en-US To: "Min Hu (Connor)" , CC: References: <20211111133859.13705-1-humin29@huawei.com> <20211111133859.13705-2-humin29@huawei.com> From: Ferruh Yigit Subject: Re: [PATCH 1/2] net/hns3: optimized Tx performance by mbuf fast free X-User: ferruhy In-Reply-To: <20211111133859.13705-2-humin29@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB6PR0601CA0015.eurprd06.prod.outlook.com (2603:10a6:4:7b::25) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB6PR0601CA0015.eurprd06.prod.outlook.com (2603:10a6:4:7b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.16 via Frontend Transport; Mon, 15 Nov 2021 17:31:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 19a68399-18d4-4b8a-bc21-08d9a85db420 X-MS-TrafficTypeDiagnostic: PH0PR11MB5782: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pywigfX6RSxhpT7yBq3l2rvV+igy66syOkVRih0Ffyv1oqFWQcseHRs54L5UtrgPdeRSQpHVqo6efa1+CaGv9T32T8wF40YVhQ041ubxKMO9IUE2yyecBEbu5yCIwidpU0mjb3VBnYI7T+jBCBwrzN83r9CB88Zq9lvxUVCZzlR/siYGrW+PYqmtdebvT34GdbuJT/0cw/7j05KWMvWMbaJpNqXARjl8BcoIPzhOCv+gqktX0kKpiEOmi+10ixqFgklgLE2XTxcA18Ka0+cSpaRA31G/oXfYvPQl8UBt17C/5VNHm2ou7KJOTFyQ3c9y0+hi1VyUEScb8YBZil+rfN1fulBC7OdtbP0fyLaWHdTbrzCxVnMp8yXLXMUeIOdWnelE3sfv1pfVlcZUagYS1OsA38Ns0iELJxFEdo3fcbzGq0Ha3XfV/9LxECcjo5xtmE10ZC15a1Wql0feGYATJS23S/jT9hGsQjQuH8LkyCMjfZ5ii7qY7UbvOS7t2toMxDVM2v3PlRs23BjhAY4t9RibRa9OFW/2GQpg7hwkptB/mYS21BqjIDbfaL6meZmiu14og/AXR4DJfqz/NVBsMGgY1dKxhhc/SWOx3V5xyC7olgkRne/kKrcjQSFo/ZLyh4uCRtltNsnds/Ml6Ug2L39OjRCayxOWUMSFkaE78h/cfm7i/FjY8T036WMN0n7Cpd1QEWqgzB1e0bQwUFOgtg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(82960400001)(2906002)(38100700002)(6486002)(4326008)(6666004)(36756003)(31696002)(5660300002)(316002)(83380400001)(508600001)(186003)(44832011)(956004)(2616005)(8676002)(31686004)(16576012)(86362001)(66946007)(66476007)(66556008)(53546011)(8936002)(26005)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Z0FxYVJWMUsvcDYxakNiWUpjcHd6UWxyN0hsN2pvOEZjclpFU2Z6U2loVW9S?= =?utf-8?B?YWgvbHgxTms4b1NBUnVodEd0dXBIREQ4cFRxbDR6bFpLWSt1M2lqUFZvRHF6?= =?utf-8?B?a0Rzbm1leW5OWkhiZlc5Y0dxM3JVMWxZblp2UHFqWTZjRjVxU042bnRHMGZa?= =?utf-8?B?N2grVDZNQTc1YjdjSEg0VzBUOGZFL1hMVEFsOCtRU3g1NEdMc2lDV3l5d0ky?= =?utf-8?B?TGpHaG83VjltYmZ3VkJjcVRWZW1DaHc2dGZvWmdTRDh1UCtoODZpdVNYR1Nn?= =?utf-8?B?OCtiVTVLZjhjTXF5cHp0WVUwRE9QWHBKN2t5UVRFTzNyWlFLaWZybnJSc3RG?= =?utf-8?B?UmtOZnBDNmZsb0ZhUC9VUFNRZDVWMnpQeHREUFJZdnNzdXdSK1dvRWFud3Vi?= =?utf-8?B?UmFDKzZYL0xoZ1BrbzZhNXRENTZoS1FBOTVMZ0tGcDVrRUNzY3RQbFJHOUk2?= =?utf-8?B?c1MvS1BubW1zOVd5ZzlKam43eWNJdGN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Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2021 17:31:05.9345 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FbFSSN/FZ4MowWp5WNm2tKa5AuEPprti38ic7oSwK/Hh9J31VThReCipBrDjgZ4mzg9x2yiEzF27tMp4C9Lt+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5782 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 11/11/2021 1:38 PM, Min Hu (Connor) wrote: > From: Chengwen Feng > > Currently the vector and simple xmit algorithm don't support multi_segs, > so if Tx offload support MBUF_FAST_FREE, driver could invoke > rte_mempool_put_bulk() to free Tx mbufs in this situation. > > In the testpmd single core MAC forwarding scenario, the performance is > improved by 8% at 64B on Kunpeng920 platform. > 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE' seems already announced in 'tx_offload_capa', was it wrong? > Cc: stable@dpdk.org > > Signed-off-by: Chengwen Feng > Signed-off-by: Min Hu (Connor) > --- > drivers/net/hns3/hns3_rxtx.c | 11 +++++++++++ > drivers/net/hns3/hns3_rxtx.h | 2 ++ > drivers/net/hns3/hns3_rxtx_vec.h | 9 +++++++++ > 3 files changed, 22 insertions(+) > Can you please update 'doc/guides/nics/features/hns3.ini' to announce "Free Tx mbuf on demand" feature. > diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c > index d26e262335..78227a139f 100644 > --- a/drivers/net/hns3/hns3_rxtx.c > +++ b/drivers/net/hns3/hns3_rxtx.c > @@ -3059,6 +3059,8 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc, > txq->min_tx_pkt_len = hw->min_tx_pkt_len; > txq->tso_mode = hw->tso_mode; > txq->udp_cksum_mode = hw->udp_cksum_mode; > + txq->mbuf_fast_free_en = !!(dev->data->dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_MBUF_FAST_FREE); Can you please use updated macro name, 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE'?