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 E5CD6A034F; Mon, 11 Oct 2021 18:26:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD416410E2; Mon, 11 Oct 2021 18:26:55 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 4FD4A410D7; Mon, 11 Oct 2021 18:26:53 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10134"; a="224326925" X-IronPort-AV: E=Sophos;i="5.85,364,1624345200"; d="scan'208";a="224326925" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2021 09:26:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,364,1624345200"; d="scan'208";a="591392802" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga004.jf.intel.com with ESMTP; 11 Oct 2021 09:26:51 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 11 Oct 2021 09:26:51 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Mon, 11 Oct 2021 09:26:50 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx612.amr.corp.intel.com (10.22.229.25) 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, 11 Oct 2021 09:26:50 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.102) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Mon, 11 Oct 2021 09:26:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NpXlfw9vt/yhOa/mZh0cK/Q5ITfEDbhD/dR1ggoowrPwNPIti2vP4fdtEBal0xv38XoqoqVHzOgEYb6445+aFQCsfdziQZdXNF0I+MggEpk31nVOJvMprWf6MDXvplepPmaFzcSi/fcCm2GeKOwZWlHjt9dqNVZ52myZcm9n/dJYmZaYXDDLUa6fTQ3+1dQ5lOuOQI83WNGMDcHtSlEyQnqhsdMqFUZgrTM2X8kmbJttCw/bERIxTyovYCewPXYPzmu1bv+PYCzuXRFSjZwaF1DT/+v5NKrIn7ZMR2fhj9KD/QvHMH9g/kpH7R2QA/goQB4mfEVKuRvrqDEJLWpfSw== 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=pzRg3j2v6IZnxjxsyaI4CiAa0Egg5TKMlMdKQ8UQN1Y=; b=IJ2FFdBLMvKGit0m+gSdobBSFwi/TqASNoR2sCvY4FNyPHclKYS21UVXpuF5mhWarSnmFbmcFJR+iI4riUsf5+Qp6vmWImCJsfw7scam8hu8/+YsQuiSZ07vC3ooqKRzJYYr/DFXNaKVu6aOL0Vc2WPkQX9i5RDVHBasJDznsmlbgwQQXtBVU8ZL2WOglRIyJkDBGP3iE3OuWOv7u3OHqw9JaMNmlVGcMhJWrKFgnSuGsmYRv10/ZAuT0L6ZnL/182KXt7tVO8uJVedGe/d7FHVj/yWXNhBb14ivZf1GO4Myx4IRlrPAg6kM1lCPFjFjV12XYf/IigEVsoTQt23vwA== 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=pzRg3j2v6IZnxjxsyaI4CiAa0Egg5TKMlMdKQ8UQN1Y=; b=AzxeUb05czPhOB57ctOB21J9Y/DWOTdglW78HK91zJlv/l80ZpxNryBpRrL3OU7kBVD1/Fm9B4jsPHBixEzFIc7llbZe9/vIw29FalEiE2OnsSkgx6v4ncaZ9LFtJftFlk1XcONOsQMPN3VLMnDpQhxn24QAvA0sV5Gk4/qThKQ= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5206.namprd11.prod.outlook.com (2603:10b6:510:3f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Mon, 11 Oct 2021 16:26:48 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c%5]) with mapi id 15.20.4587.026; Mon, 11 Oct 2021 16:26:48 +0000 Message-ID: Date: Mon, 11 Oct 2021 17:26:41 +0100 Content-Language: en-US To: Honnappa Nagarahalli , Ruifeng Wang , "dev@dpdk.org" , "Min Hu (Connor)" , Yisen Zhuang , Lijun Ou CC: "beilei.xing@intel.com" , "qi.z.zhang@intel.com" , "bruce.richardson@intel.com" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , "drc@linux.vnet.ibm.com" , "stable@dpdk.org" , nd , "humin29@huawei.com" References: <20210906033201.1789796-1-ruifeng.wang@arm.com> <20210915083339.2424369-1-ruifeng.wang@arm.com> <20210915083339.2424369-3-ruifeng.wang@arm.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU2PR04CA0003.eurprd04.prod.outlook.com (2603:10a6:10:3b::8) 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 DU2PR04CA0003.eurprd04.prod.outlook.com (2603:10a6:10:3b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.25 via Frontend Transport; Mon, 11 Oct 2021 16:26:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 53b9c75a-0595-45b7-7ea3-08d98cd3ec74 X-MS-TrafficTypeDiagnostic: PH0PR11MB5206: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-Transport-Forked: True 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: 0Zj1gJK98rTN33Dqp9LnOJzDpnZ9A6+/6amkR6i4b+r9+hyUPYfBZOCbh1XQrob8CGkfX7+sqB86HswXQ7D23z1A5nGT5SaVsYimp8UytE+lOu+lxwP4X8gFHoRGqmudPbbEbGqU5pkp2Kw45VGl+pw4cz4bBWoKV8JePQZ4ElVMbQYRnwX+iNaW1Sr51E3e8Ogxk1dUwCJy3yuD2zzjlf2ZqcFbEl5X1R6QnMBDF2gkXV4atAlvK+SX3vSXV385gnKvyQqQ3HCFtwXfaWcMqSif2SVjmhyVjtiwzNqy9YlAuRrj5m1Uu+joXcivjhpaUOzU2i7kdeLbb39/XxeDOTU2PJ+SUOEuAdQCRZKBbrtl30Bh7eEBK8n5L8rhPzrDB3vnhHOdGsx9oCKHeKRtvVZ2ronyhq9gUBwdBHKObIyY3JP9EU1o9y0tUap4gQrSx3SQkmoIUekVMeKjJSorCivq3rLfgnno7gLfvLRX4uEwEmLOVjRG1ANzOS14lX4yL+sIQGmcssG4sT1W/bf8uJTvyDUgZjx/qnwHFCcO5pglIFCEabzcZ3tqyfnSwYS2OAeKZOqkjJdHh6wzGuaWNE1d0g27R2qRyZx+i0ywg0zMPMX5+g1bzPZrVb1GXvwv1oymWrPHIhx/1lvYLlDVG+tWT4/llkm7diZk66BfM+qreh+2KwG0x4aobeZasvQ2h5THbn+K+/EuaFTrm5v9XA== 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:(4636009)(366004)(66946007)(508600001)(36756003)(7416002)(54906003)(5660300002)(110136005)(53546011)(6486002)(4326008)(66556008)(66476007)(31686004)(8676002)(186003)(26005)(8936002)(6666004)(316002)(956004)(2616005)(31696002)(2906002)(38100700002)(16576012)(86362001)(44832011)(83380400001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QWpHdXNNMXc1WTRYUVVCK3hzRDVzZnV3ZnMrNERDQXdUa01FUlozUDFWS1ZO?= =?utf-8?B?SXN2VFp3ZUhYM1A2Nk5UUUY5S1VFdFB1bFdoVDMyZU9JdCtUZitrMjc3Slkv?= =?utf-8?B?NFI1WmZTcGFoOTNkWkVnZnBHQWRsaHczVUFScXZmZ0RJb2VILzZ5aEhPMnIv?= =?utf-8?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4V2Iz?= =?utf-8?B?akdVZDllSzBJOHdLampIVkhFRHJORnpxRnNxRUUrWDl2aVc0RlJCWXVoUFp3?= =?utf-8?B?NTQ3T3NDM25hVXJPdGU3VmJ2TjZHSUJvUUUvZXVOZ1drRDRrNTZXdXp6L3pU?= =?utf-8?B?MHg3QkVGSnljUytHYy83TGxPblN3MHM3M25mMTJxb3pFNG0wdWJsRjBmR1ho?= =?utf-8?B?SWdXMkVvRDczRFRNVlFLejF1UmF5VXVhK0hHMEN4NS9uaTErVTVxc1ZtMHFZ?= =?utf-8?B?ZldROTZSeVpuWFAxZUgwNGJJQ1Q2OWlmM0FLUmFlOFRleUdCb0k3bmZTZUl4?= =?utf-8?B?L2hTcEVBL0xPREluc2c5OFk4b2xQNDdvc1BTS0VXY3BoQmwxdVpBcXVjdnRw?= =?utf-8?B?cm5oVkNNVWRVMFY1L2VrbjJvSHNmRm9IU2dQSkg1TDVLd2lRbmg1N0tabjBL?= =?utf-8?B?THhQUzg3eUgxeE1NMTY0UWt5S2x2em1VV1RkVThLSFZpRm1JWWJHbXhjbzdY?= =?utf-8?B?Y1BrRXcvV2hxRS9sWERNdHlFRzA4R0IrUEo0OUtNeWRHT21Jc0Z3bHlqdmh2?= =?utf-8?B?N3dRVmI4dDVQNE5SODJVMWI4UThiWk1aTklOZ1Zwckx2S0tOUXIxdE5GdjRD?= =?utf-8?B?WVJYMGVSdk1SOUovbmI1MEF4QWtNUVhzNWsranRyQXA3MEtEeDBOc0MxS2RI?= =?utf-8?Q?ge3Ois5Ftwk+t5rdMeDE/7n2YbFEixUZefrhNV0?= X-MS-Exchange-CrossTenant-Network-Message-Id: 53b9c75a-0595-45b7-7ea3-08d98cd3ec74 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2021 16:26:48.5339 (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: FfeiUkOLnXwfcsW+VN90+Thj2ECtGhfxYPdEWdisyrM4xJ8So2MqX80zSze/ZaSXXs5RWO+11W80aGH72+Irmg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5206 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2 2/2] net/i40e: fix risk in Rx descriptor read in scalar path 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 Sender: "dev" On 9/29/2021 4:29 PM, Honnappa Nagarahalli wrote: > >> >> On 9/15/2021 9:33 AM, Ruifeng Wang wrote: >>> Rx descriptor is 16B/32B in size. If the DD bit is set, it indicates >>> that the rest of the descriptor words have valid values. Hence, the >>> word containing DD bit must be read first before reading the rest of >>> the descriptor words. >>> >>> Since the entire descriptor is not read atomically, on relaxed memory >>> ordered systems like Aarch64, read of the word containing DD field >>> could be reordered after read of other words. >>> >>> Read barrier is inserted between read of the word with DD field and >>> read of other words. The barrier ensures that the fetched data is >>> correct. >>> >>> Testpmd single core test showed no performance drop on x86 or N1SDP. >>> On ThunderX2, 22% performance regression was observed. >>> >> >> Is 22% performance drop value correct? That is a big drop, is it acceptable? > Agree, it is a big drop. Fixing it will require using the barrier less frequently. For ex: read 4 descriptors (4 words containing the DD bits) before using the barrier. > >> >> Is this performance drop valid for all Arm scalar datapath, or is it specific to >> ThunderX2? > This is specific to ThunderX2. N1 CPU does not see any impact. A72 is not tested. Considering that the ThunderXx line of CPUs are not in further development, and it is scalar path, I would not suggest to make further changes to the code. > > It would be good to test this on Kunpeng servers and get some feedback. Hi Connor, Yisen, Lijun, Can you please check this patch? I don't know if you are using i40e nic on your platform but if you do can you please test it? Overall this patch cause a big performance drop on Arm for i40e, I just want to be sure this is not impacting any user negatively. > >> >>> Fixes: 7b0cf70135d1 ("net/i40e: support ARM platform") >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: Ruifeng Wang >>> Reviewed-by: Honnappa Nagarahalli >