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 B2B54A04FD; Mon, 23 May 2022 07:17:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 957284014F; Mon, 23 May 2022 07:17:42 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id B68C240041 for ; Mon, 23 May 2022 07:17:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653283061; x=1684819061; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=3lOZiO363v/bMHGTUwjOsY9u64Au8C0L8HiyOcUoUno=; b=To3Is0KUezG9qAoxyecKGyjKKuLdox0+NN5SolXKVxDPxw3Qrbie+UeA fIamr7hfqU3A71BZVwkKvQe72uXQejmZpXjDju5kyubq6wYG4ZjOhIUqh x/m+Opfx/eXMvUY/4Mqzri5E9P5gaAgzno1572rCcioBDBJQXSrlUc8bN TljRoXrW5Gt61JfWRFtzdtMuBJcaL6lFz4QDeFskWdNGrPyc/5KIGkj2R GuhR8pYNWNtz4gAOJ8FDOY1GV8ZU8XsF1l8+6Dlmkh0UgBi/NsGgFXSOw NkLF4/RdOv9gpecST/7fIvgmFERdtO5EcgvkB5JOr8ZrWET3PDH6Y73GU w==; X-IronPort-AV: E=McAfee;i="6400,9594,10355"; a="273099594" X-IronPort-AV: E=Sophos;i="5.91,245,1647327600"; d="scan'208";a="273099594" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2022 22:17:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,245,1647327600"; d="scan'208";a="702820127" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga004.jf.intel.com with ESMTP; 22 May 2022 22:17:40 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sun, 22 May 2022 22:17:40 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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.2308.27 via Frontend Transport; Sun, 22 May 2022 22:17:40 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Sun, 22 May 2022 22:17:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N0mN8IFOPUwO3gxnmRoYlPSDKK7kUHBFjjVJDeebRpU3/8DRN1IaKZB6ZuFUVPsOirOBdL38ELp7RP1Y29I5tJr8erGTIWytwkf9EFxOzZgrFnfra+hR+Jubqneqpc596lz2FDvLSAm9FgbDJMvQch8fqJWt2wf+h8YtdJVYSAlCAIOhcXlQpOMB94q1qCB/B9S46F97JvIx8MLt+KwBYHb00vh1FRu36VQTKdShtZPO0AaCOYWONS2p5uwsaRAq5UwytUfz7MnkqoLJDOzOMJ4x7+qACGW75PjgQH0AYBGJwk7dSG488wONHB9zfvLZ+j8u+DdJQ7hZdrAt5A2iBA== 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=3lOZiO363v/bMHGTUwjOsY9u64Au8C0L8HiyOcUoUno=; b=MT0sens9M85K4PiywrIQsLQ+jXtEhVg5vaEa5WMz8a+BH+jTrOUDmrOxhldbu8BFAu7OOVLLKPnAM5QgpDMLdxJBEj4AReb02nt++ay+1TopdCh95FnlqKbn0DlS6yRK3ixX9ompZ2FWaBiV2DMy10OSkt6qbysLHVHIiKUeBU+2JG+QVFBs1/KM1s0SOWO0kwx/aZGVgP7Ilcmfyb7xD8y3BKt7u+YczPl0vYHYXr1oz1NLr/FkHQon29xoRPtqvaH7updCLpM9IuwD2Bgcd7i279b8p04hsTl488wc/Us1wm0ZsWYQ9LtRsPU1QKlBvTVwFoeT1z77G3GT9zA7VQ== 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 Received: from DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by DM5PR11MB1819.namprd11.prod.outlook.com (2603:10b6:3:10a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.16; Mon, 23 May 2022 05:17:38 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::b4f6:f68:2e31:ddf7]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::b4f6:f68:2e31:ddf7%7]) with mapi id 15.20.5273.022; Mon, 23 May 2022 05:17:38 +0000 From: "Zhang, Qi Z" To: "Wu, Wenjun1" , "dev@dpdk.org" , "Wu, Jingjing" , "Xing, Beilei" , "Su, Simei" CC: "stephen@networkplumber.org" Subject: RE: [PATCH v4] net/iavf: fix race condition for multi-cores Thread-Topic: [PATCH v4] net/iavf: fix race condition for multi-cores Thread-Index: AQHYbmO7SFimPQdQFUOFq7hd9KtNjK0r6+GA Date: Mon, 23 May 2022 05:17:38 +0000 Message-ID: References: <20220519011959.613966-1-wenjun1.wu@intel.com> <20220523044900.1437947-1-wenjun1.wu@intel.com> In-Reply-To: <20220523044900.1437947-1-wenjun1.wu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.401.20 dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ef60a7cc-4ef8-459a-c643-08da3c7b8dbc x-ms-traffictypediagnostic: DM5PR11MB1819:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xJzeDV4+6UeibcYOdoDE1FE5GenCuIzFGRD71SXIK882x14GgfCSCvtEvWoJS/VKnfGci22zA/6LTGU0F1uxrqmDoU6x/IOxcMyNAseQfdSajh9cmK1b7rzeUfQKImjhMytJbaleuFpxaUZ5+8XGdNQYKV9gDtwrwPJq8OpS72BoLg50Y9T/23R6K8TOnyxJnxVUyOWwlJgb+Jfnu4t/bEb1WobgAVXegQcxzJzMwn5URFQ+/9ahzweCu0km9UObOWmPndPjTrU+a2vBuKZs7H3G/nvA4Jku4ptu69jnoB7MSjC3W5ciFCamjwHlz5tR5L7RQE47V0mNJiFIXXpv0baeWPe0UV9DhYyHJzhCHq6eKE/YwdTBobX5lpCfeU6K3tk0B4xws7BlU3DqGjtSy9nPxyKLHoHxIheZ99EXfl79Mc3DjHcGcxE4+M1Ica64+THLvgRfPrtKxnoM07ezoW7wGDSja34uodyJwxm8u+cjZRKo1x0yi7en3oz/1XanOt9tWhaGt7CCLunoPpUKPPC08jpDEOZvmqXZA5ft/99NSzUvEYy4ilj5LorylQSlX7bEYShVnm3AI0/uDasG9MoPef8d+Lst3a64U6m5RIaRMx7UZ35/v6SmHQwIGNb2BrKMglHmjmYIRr5lof/tsnjd9B+nm98A/0sSVXII4PmqB+FsBPiPrMyuw8lYka8GeIABXN5XBaOl772o/UZIFw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(508600001)(110136005)(86362001)(316002)(83380400001)(6636002)(71200400001)(9686003)(26005)(186003)(82960400001)(122000001)(38070700005)(6506007)(53546011)(7696005)(33656002)(38100700002)(52536014)(2906002)(8936002)(4744005)(5660300002)(55016003)(64756008)(66946007)(76116006)(4326008)(8676002)(66556008)(66446008)(66476007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?cruTElLe09JpAGurslomAUGjYwbX2L8ZjUbD5MM6KTOzjlCHpVC31794V8Pj?= =?us-ascii?Q?fA/S6D6rHVyU6s0x852cSZdJvwDnCxmH/gMyWhfPexVaLOHgSXSqGB65O6zy?= =?us-ascii?Q?ofyX0qFDH9VVsbHTNtTdO/kCOVUqDNLNaXaCFae5dQzAmu7rRmwv8+Wnl5Qo?= =?us-ascii?Q?EwRq8u7EAyB/iWWXNVjf6TaapJlxW//NZZb7WjG9QC4ApeKHOdCH0/hrs9WZ?= =?us-ascii?Q?xhE3tnhnbg1riZIzH12Yf+lG0Yv8NSe9jzAeUPRNRu1VBPga3Bj06haocUrj?= =?us-ascii?Q?yuVhejmB88cD6mu628cfOmjcyG7CSjqD8+Zd/VnfMuEQy5s6N5kz/UthhYn6?= =?us-ascii?Q?6y/UKJOY+VC5e286NE/VAdNnQ1X+3Ik4qYXvyz/DNjsI/Q/lw3/6ZgxvHhIJ?= =?us-ascii?Q?Dai6UBQc406rH0PDTY/RnthRGgClF+iuZfhvx0zSjx/wrp72igztWAvHN1Gv?= =?us-ascii?Q?peCAD8KtL47Q3dpb6c3fkOP2sVuPTgeVnDpqG0lqVB2sZH/te66F/UjCVycs?= =?us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7w0sjKbdp9rhWz2E5S/vnGFG0Eg?= =?us-ascii?Q?SXZ/fI4AXHCXmQSw2CzxCswSEFG7MiX5YkMKTKgSpmVeWELLz5RWAIemZiNB?= =?us-ascii?Q?nsdvgb9Y19s37eNtVd1hObBdHfjZlzLjLjfHezwClqsbXHV9mn07E2twpmER?= =?us-ascii?Q?HV4+r3oKL90Z2eBn9J7YrHgCMFFSVGsUYoA+h2WPh92j/C5U0VKJi/QaiJeg?= =?us-ascii?Q?6y2HlHWGcxc7CNAfLbZjPlyIeKdH9J9wee7tcN1G6SVOYx7b0e6N0BD9ho8k?= =?us-ascii?Q?UiIJ9uDSE8ManqcFavbiviG78Qt/32jdozvPDdwi783gWN/76Bcci2z7oJcb?= =?us-ascii?Q?ZtXhBX3uwA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef60a7cc-4ef8-459a-c643-08da3c7b8dbc X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2022 05:17:38.2793 (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: sjBRPvzZQIIkw4DYjrDx8dmMqZVMAsf5cwr1Y4gkosXxX3nzoBkHVu6UbkpOW22GNA16BjN8MVUlB4wpm+I/3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1819 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 > -----Original Message----- > From: Wu, Wenjun1 > Sent: Monday, May 23, 2022 12:49 PM > To: dev@dpdk.org; Wu, Jingjing ; Xing, Beilei > ; Zhang, Qi Z ; Su, Simei > > Cc: stephen@networkplumber.org; Wu, Wenjun1 > Subject: [PATCH v4] net/iavf: fix race condition for multi-cores >=20 > In multi-cores cases for RX timestamp offload, if packets arrive too fast= , aq > command to get phc time will be pended. >=20 > This patch adds spinlock to fix this issue. To avoid phc time being frequ= ently > overwritten, move related variables to iavf_rx_queue structure, and each > queue will handle timestamp calculation by itself. >=20 > Fixes: 2a0a62f40af5 ("net/iavf: enable Rx timestamp on Flex Descriptor") > Fixes: 33db16136e55 ("net/iavf: improve performance of Rx timestamp > offload") >=20 > Signed-off-by: Wenjun Wu Acked-by: Qi Zhang Applied to dpdk-next-net-intel. Thanks Qi