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 1DE76423F5; Tue, 17 Jan 2023 02:20:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA0E5400D4; Tue, 17 Jan 2023 02:20:48 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 61D0240042; Tue, 17 Jan 2023 02:20:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673918446; x=1705454446; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=yQzwCA4lt+ndrbXqYSj8Buoq9eA2XnW806GH3tAvPGg=; b=lLEqEZVXsArJIoGY0QvE6j5PH5+UvqJhBaJNOE5yPFCirrRfH1o27hKb foegMcXeCxqGKGqWepjncjpxoc6ffFrlpnqyY4DhmMzebebvzU382Dx5m 1VB1yEDrzet/ZGHgKnNn9lQLUUHGzYZMw6jiFZ5sb/QPgscFpgSR+B2wE MarUw6aI2eaE6PL3hNtNEUvRZEzU0GRQXf1o3cTPBqtwmkf8tHwKiTwLq LQvfNg7YzmJmhaOPhR5X94H9WpOeXGELK4RXIzF0wFniY3G/MYh180RZb J3HKU7VzP1V/TDyCrWfqCCfGkElYnPbrUhXpHOCz/bi641YM7tB6aVxoB g==; X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="312445726" X-IronPort-AV: E=Sophos;i="5.97,222,1669104000"; d="scan'208";a="312445726" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2023 17:20:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="904474898" X-IronPort-AV: E=Sophos;i="5.97,222,1669104000"; d="scan'208";a="904474898" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga006.fm.intel.com with ESMTP; 16 Jan 2023 17:20:44 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.2507.16; Mon, 16 Jan 2023 17:20:44 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 16 Jan 2023 17:20:43 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Mon, 16 Jan 2023 17:20:43 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.42) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Mon, 16 Jan 2023 17:20:43 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RzNPFOEUulyrP2LcYKhtO6XtEaYcUTuUtOdAp0og87gUdZbsW4x7N+yTSfAq+rfYcbzYhnAmTnbSfxF2G+s+HuIEtvdpZNw/8DNxkLVr6OCknYDjoFp72bTE94FcXNTB+9sY90nNypcmbnf+Q2Xpg2Hka5HRmFrQQCIAi55pNbOyhrJyL/Mh0gwkWZ2t+xwNDsLns54CZrHR/f8OWOKtSwL8+wtJarYCDIokhY+fnyG5RpWXjDGhxtlybd3B0z1/1DH2g28BNle9GpCbBIVwEHsjVQ9+2PahyqwCwgSjoIw5PErKOlwoz7Bla3n/7GZATuLpzdGvyipzSKU2JgIa/A== 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=yQzwCA4lt+ndrbXqYSj8Buoq9eA2XnW806GH3tAvPGg=; b=dpAuhB/Jmj7X7bu2d6BWkDZqnD4kOjpoTKxLzKIZ/Uu2+Lcv4No2mW/mxQqCNogU92EHfyoRmcUD8GlgMN12r926Z5e7jhHaF/Jb4RoXLTn20wTLNaI4SwNLKyKROXGOXkA1BeNpx2XKQLlijAex/NoBuUxmV5w5QNIneK8jZSKZ8e+/YeIXKVNDmDUXA6hGxVuvq3YJLNem0RiZzUsr59wGaH+Ofxms8qA0nFnMrSwV9x9uOqjpY1vgbLa//T3fV7PyMHrRDU/LBAIimn69aZBSX7O/qOmKZYvmm4Q6ua+GUws15LX+snLfnVxk/CoSparZzsqrR0wrxJV5nmrZiw== 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 PH8PR11MB6801.namprd11.prod.outlook.com (2603:10b6:510:1c9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.19; Tue, 17 Jan 2023 01:20:41 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::eb70:80e0:1b88:3ca5]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::eb70:80e0:1b88:3ca5%9]) with mapi id 15.20.5986.023; Tue, 17 Jan 2023 01:20:41 +0000 From: "Zhang, Qi Z" To: Mike Pattrick , "dev@dpdk.org" CC: "thomas@monjalon.net" , "david.marchand@redhat.com" , "Zhou, YidingX" , "ktraynor@redhat.com" , "stable@dpdk.org" Subject: RE: [PATCH v4] net/iavf: add lock for vf commands Thread-Topic: [PATCH v4] net/iavf: add lock for vf commands Thread-Index: AQHZGxBCwUnEgOM1zE2l0lkksarDAa6h7ZBA Date: Tue, 17 Jan 2023 01:20:41 +0000 Message-ID: References: <20221220155414.266309-1-mkp@redhat.com> <20221228230025.1430743-1-mkp@redhat.com> In-Reply-To: <20221228230025.1430743-1-mkp@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB5994:EE_|PH8PR11MB6801:EE_ x-ms-office365-filtering-correlation-id: b92fae02-f0ad-4994-69b2-08daf8290c68 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ovylKWCSUl4Qvlu12fsWTgufj4VLn39kH7g4hSls8eh3q5/5SRets5kXmTicZVV/u67bfNtxVScbD3S5F1zOFOF9QBzZYpl3c/gpTuOy2q8Aetlwto46BndEP81xcDJev5McNKZflmBq+t1lDVgPgvGFJQ8kbCl5NYmNaOOjDvi2x0lQ5cFNbQfaKU/PlzKY8nmyCIiXaWgMXkfJfy4g6nrkGx6uGeHRtWwHc1bAbEVfNwWFitArsrxCjcThnpMSp7PRx/v+enZoSRHHOXVU2PgpB5I1iakUyQarPePaXRbEN9dX9ecPPWF0fPH07kkDhchmpTZ2bkVb825JkeZNkKptA8tt2hr0Cpy4OBLmKqxUrNXwHj47e/f9pIUoQsq52EOSQwjKXIBOY/mdXiaVOAozzXTpJCBHVgBfkoXy/7RrJZNwzASA0LmVmAP3IwrMHP9ueaXwW3nd/oy4a3HO6Y7sT+10Oe3ulBbrm/UPcZoazdINffYFgU7JzAUbvFze+8hnOpwLm9Sgkbq/DC9+hsVfAPo8LUsi0Rmo+BYl8Gc6B1PNBVMheYbb1WieMeqXkN5hBYK1silfcvallB4WmZBUYL3+A4T8s3ESjE7ESzY6BSl7J86HdkZRBVovQomQ3bn32GKV/XaMLJuH5MzUOUCmyRtLgX9QaGY9cirkRxihCDFWRKxPtSQn22jTSqBOg19eau7xJYCur4r54y4mKw== 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:(13230022)(366004)(136003)(39860400002)(376002)(346002)(396003)(451199015)(66476007)(33656002)(41300700001)(76116006)(66946007)(186003)(66446008)(66556008)(55016003)(8676002)(4326008)(9686003)(26005)(64756008)(53546011)(86362001)(83380400001)(8936002)(82960400001)(52536014)(110136005)(5660300002)(478600001)(6506007)(316002)(7696005)(54906003)(71200400001)(38070700005)(2906002)(38100700002)(122000001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?0N8rAEHqIyfvT93mzCbN09ZNMW9TooC0mCTRitS2rifYfS3JYKCjVlU7RkQe?= =?us-ascii?Q?ks9xDeJZT2PJTyHSPHWnDOQA65p1EyRS4I0FwY74T6V+LWbIVoAmpLYITr9W?= =?us-ascii?Q?0gfe3WLHYuBy6NQQtWLD/qno+1+MoaX0Q3+d6GrHuKYSXXSHvoFE5le3y15o?= =?us-ascii?Q?JlH8tjyUaaICEpND6p0s90BS57ypLtBdc1IacdlKAR631kc5i1b+7vaI8jBE?= =?us-ascii?Q?+VuiLWW5wluk0qfaV3Co2x6JAKUbZRewG+oAqiP76pdMs3Uty6xrhAgyOgDK?= =?us-ascii?Q?68FNjdBWzB+zIDS+q+QtHyNHFHF1PhyF4jkiKUMnuT1ouQUhE05B5j6eZQEG?= =?us-ascii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YhM6FvXL2hdko/ZcYzNe5lU7wQLk9?= =?us-ascii?Q?erPn/Y6Y6iogs4L0YSasSTOw07fzNVOR4YjDbnIplulF95EKf57pPpzd4o+R?= =?us-ascii?Q?wdJDU1yhlgxQ/XTNHoXjIrnghohws8BEmodnL97AS1kKFm9Go4wF+K3qyP8c?= =?us-ascii?Q?oi11CJa+SqA6JjWb+rp4jZaHrAnu//3Pgs2x2XaR/O35+VpRp5+MWrEB+9Qe?= =?us-ascii?Q?axqpsxdD4iSK1rlEdFQc66gH+OiZRUlD1r/Pd1ewbeH0lNO115NaQ/zMb1gv?= =?us-ascii?Q?T0/5TClaL1UCs3SER8HjkV+PR/nVzyI+waR3XDM7UyNKrbttQ4G7gCjtTeKk?= =?us-ascii?Q?tyiO5KVHNP0eKsf3PVrKo7v4ULF9nELfQDTnCKs4?= 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: b92fae02-f0ad-4994-69b2-08daf8290c68 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jan 2023 01:20:41.1238 (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: ObAvjkkZ75Bx2qJrxphkjgqvM17F1cLCr3keFmLwRXy6dD4XAUL/uVglOwDSEPlOjyDp5ATCoWEflE8uSn/HLA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB6801 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: Mike Pattrick > Sent: Thursday, December 29, 2022 7:00 AM > To: dev@dpdk.org > Cc: Zhang, Qi Z ; thomas@monjalon.net; > david.marchand@redhat.com; Zhou, YidingX ; > ktraynor@redhat.com; Mike Pattrick ; stable@dpdk.org > Subject: [PATCH v4] net/iavf: add lock for vf commands >=20 > iavf admin queue commands aren't thread-safe. Bugs surrounding this issue > can manifest in a variety of ways but frequently pend_cmd is over written= . > Simultaneously executing commands can result in a misconfigured device or > DPDK sleeping in a thread for 2 second. >=20 > Despite this limitation, vf commands may be executed from both > iavf_dev_alarm_handler() in a control thread and the applications main > thread. This is trivial to simulate in the testpmd application by creatin= g a bond > of vf's in active backup mode, and then turning the bond off and then on > again repeatedly. >=20 > Previously [1] was proposed as a potential solution, but this commit did = not > resolve all potential issues concerning the admin queue and has been > reverted from the stable branch. I propose adding locks until a more > complete solution is available. >=20 > [1] commit cb5c1b91f76f ("net/iavf: add thread for event callbacks") >=20 > Fixes: 48de41ca11f0 ("net/avf: enable link status update") > Fixes: 84108425054a ("net/iavf: support asynchronous virtual channel > message") > Cc: stable@dpdk.org >=20 > Signed-off-by: Mike Pattrick Acked-by: Qi Zhang Applied to dpdk-next-net-intel. Thanks Qi