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 1D7FFA0552; Wed, 1 Jun 2022 03:48:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C491740A84; Wed, 1 Jun 2022 03:48:39 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 55EBA40150; Wed, 1 Jun 2022 03:48:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654048117; x=1685584117; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=5AJ7t6D0rwgz9hfsURmXeRHfo3Ma9FtrA+7ZTrOVMHQ=; b=J37LGrbf3TrhOjMyjjPQNVXs6S5K/zOoy973zVP4HOTk5zbA1H2bIp+B 2dK0x6md+doo6kDa0Mnn/I7vbUlXMp4L5GPRTEofp1xzGsV5hCnBv1PHB g9IRzF9IypTpgaMiKfT6cCnUm6fp2Aex4L4o+2+OUzn/rtoq7TJ8byM+5 chR2glYcXpW81pfyr9of/bFg0Z6GnyOVVcXo6CpfVeg0pBJBzockkNNVI Fcj1KdAIynF/W5lZDEGCHMApXDynE22utbIPvgF/cXEwh/M8PwAvGc/uc YMr4fgcf/wK0JKdaGumYHc3DJLN/fJ33x9Cku21oZmpwC3Hx6lgj9uHJg Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10364"; a="338486283" X-IronPort-AV: E=Sophos;i="5.91,266,1647327600"; d="scan'208";a="338486283" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2022 18:48:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,266,1647327600"; d="scan'208";a="823535632" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga006.fm.intel.com with ESMTP; 31 May 2022 18:48:35 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 31 May 2022 18:48:34 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Tue, 31 May 2022 18:48:34 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) 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.2308.27; Tue, 31 May 2022 18:48:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ijx7JmUfnNXs6BrXR49kEoLHQliETppWNYkJVQE9+J9MamH/VvDMw+GtUSkl2W7mLTnEk/fOMthCZIGDbnjvrB0HUj876zX7pIL+RNbAAJXPJC6VsB2UG65DOCchFaFqTjb4ijOW7aa3p8Vgw+BDRFCi4tDsvuNXN3AZb95vO0Te9/2nxs88m52Ww/pIuugL5ur8/mJsUI68Kc73eKNk0Cbt7z/Bd2NwG4u4p7DAwQFzDdyjU8jNlyfD1RuH5Wwli5F9BDGp7L1wbMkHMO4e7b4+hesrDnwndltWhgLkw0vj59kW/0T2E7/ONBgOCz7d7p97tNyAOC2Mic2K37BWEQ== 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=4baibbJ6aJui1TSbIXFc0RbHvW76X7fJOoA0xLR3J58=; b=GbzY5NOASm8GSb3XFnaNFGALOwM+UlPdUGOgYrjX39+bICxSRpoUlJHysS+pThO93GPr9eIiMHk2lSW1iLNtgmD05Lerm7SCauw95dNUycYkeclJ0EwmG5GWVvI2nGJwlIUSc0nbZG4GCIS1hIgKlJ8Ve/VOUQRD9SBHFgycp4IZePL42HSsYlF9HslZsiKo7cJ5WTNvQ73Doe+x0KIUa1JG08T4CwfdJVao8tNyvYrRNmgrNtdoD+eXqE4QO9VwfyDnu5gS4gnCmxpekGEhphTJ3ZG8fECGEWUm86cJjaDV2gMOVzvNf/XOiD46rZzNSOxj5FyPjGjxIh5mE+oywQ== 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 SJ0PR11MB5120.namprd11.prod.outlook.com (2603:10b6:a03:2d1::13) by BN9PR11MB5450.namprd11.prod.outlook.com (2603:10b6:408:11f::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.12; Wed, 1 Jun 2022 01:48:33 +0000 Received: from SJ0PR11MB5120.namprd11.prod.outlook.com ([fe80::1dd1:f84c:5731:708]) by SJ0PR11MB5120.namprd11.prod.outlook.com ([fe80::1dd1:f84c:5731:708%5]) with mapi id 15.20.5314.012; Wed, 1 Jun 2022 01:48:33 +0000 From: "Zhang, Peng1X" To: "Zhang, Qi Z" , "Yang, Qiming" , "dev@dpdk.org" CC: "stable@dpdk.org" Subject: RE: [PATCH v4] net/ice: retry sending adminQ command after failure Thread-Topic: [PATCH v4] net/ice: retry sending adminQ command after failure Thread-Index: AQHYdNSiC4CZeAdpNU67dV/VNGeN3K043/yAgADoyoA= Date: Wed, 1 Jun 2022 01:48:33 +0000 Message-ID: References: <20220520183112.26546-1-peng1x.zhang@intel.com> <20220531174827.357629-1-peng1x.zhang@intel.com> In-Reply-To: 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-office365-filtering-correlation-id: 78862f39-4779-45dd-7c4c-08da4370d616 x-ms-traffictypediagnostic: BN9PR11MB5450: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: utdl4nWVYHFjKTlyzPm7EVi53Z+HlCWilJCNdAUE0K0kFiHxDwHn1ILG0JaArbfmrjmsnwMGJl6oIxHCDw302M9c8ZxPMEzyFOjmH8GVDZ6DQxWJyKnxa+XnC5iu+RIxzT/dUh07uL4Rjf54cCYDouJHSzgCOX2dr+dVqcpndZ131ocumWNe0viH26XwGcgbIr5DYUKyw/DoBmn5HwSVZIbqN/eXZue+WWSzrswXuuxPrMJBGpSOEvmC5/8iESOYf58M5NeyGc6EO0lAKdVstwSZa53G2ws3rlPWzkBMiD6Wor4h6xwV1G3SdlPtsZ4Lca7n1iqKwnu8XrjAvyd6nNtLK9+nY+UYEvebrvMiDHdYwJ2yID0H7V3/1GxWmMh5DuLMBsF2FRZvtWpBM8IxkXLPn/qDSDEfJCFrGibpyi+tJ0cPf6bRi/OmLKQ4mhf7Eo9EAl5jaRZ/fNs7LuU9qUW2gepWPPgyeKK82zff476VfWb4x5bLvIUkTkNxq45khXcm30RkIrH5y13nvBrc6R0zocKgt8tJw8/j5bUCHTUPx/4JMWUHN+AJl4bpmNfaKy7Ma5AxcxY7N735DPIm11Nc3UGNzp2//pL3TxF/VCQhkZPmHh1W0Gwg1gKAbtxR7NGR5fOZgbvt/Le1Sobbp7WyKltS5zLtQhtjmaguBBS6zAdQrRtb8ZReOilruJbcCniOoIuLRL1WYf+Sed/WYQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5120.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(508600001)(316002)(66946007)(26005)(71200400001)(76116006)(450100002)(53546011)(110136005)(52536014)(5660300002)(8936002)(33656002)(2906002)(66476007)(9686003)(8676002)(66556008)(66446008)(4326008)(64756008)(55016003)(86362001)(186003)(38100700002)(83380400001)(122000001)(38070700005)(6506007)(7696005)(82960400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?K0jy2w2gcvmQJ4PKawgwDrshmliMEMPnx2EO6tMG9Ulc3gxrTWbWx3fA5AOR?= =?us-ascii?Q?DuJZzNc4rLt8+KQidHvQBfaqgVByZUXf/oQAg9GCZLK4NUX9/+B0IvdneuGJ?= =?us-ascii?Q?nRWO+QkTUf1PehkD+/a1ZcpTP78lJAU0DzKaotsy2ttffpvRDohrYhu3a+Xm?= =?us-ascii?Q?WXgafTTqti3mEU+8pfsedesPzQmOUA+zpHB+qXC8jtN2NBliUwO0lXYgZlYy?= =?us-ascii?Q?hknoHise+e7yvrpc07/Z9JhKEec7A5KGWqZer4YO2SawAYNL4WtrHeE4Xggp?= =?us-ascii?Q?TvSE0Mta8dmia6S44o2WB9Z8FUKQWqI1YYzE5V8LZjA0uEy1fxwdMMpPBDKx?= =?us-ascii?Q?aMKEYIj/PcePtBdOli7fNhYEM/BgUWOZ6ZXNTC8AsiqTa7HIVJjUKTvexFH0?= =?us-ascii?Q?8y7s80VEZokoz1EK+bYwjuAGaERFIkcLDw4Irps6dw5fyKgFYYQaiFj+in4W?= =?us-ascii?Q?GvsjBATwBduGySU1/mAPmS/WTqzg7ld0CP5k/jnOcLFeidOS54O35gtliM78?= =?us-ascii?Q?Iv9Z+imTrAX4lyuJNErrDyUTOdbFAm5UCG61uqG/x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dn2t+HlciTg436jgHByMpXF2cFzxJgLK1cktmAWw?= =?us-ascii?Q?ub3IAR9uE6ddIxAGW3yaK8EF5c7m7vGkENNP3JPs5zP9YvOcBDkzYSSYncw/?= =?us-ascii?Q?D/ze9wP3lNdAuO+GRT7GPWHC5hcffQNOs1pB56gbaD9ggpZOz9+jKgGbZFGm?= =?us-ascii?Q?+PAJuHdNfZcVuvpGKXA4Ucuc1kzC+jiaAQ5HzmSMVtnnjyBaiiSdok8AjpSd?= =?us-ascii?Q?9HfPHdLdmyVs+V6DHTmbmXH/gKeMT95bsSG0DQsWh4dYKsm/0a3HVnJo4GnY?= =?us-ascii?Q?TSf3yp8Aug=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: SJ0PR11MB5120.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78862f39-4779-45dd-7c4c-08da4370d616 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jun 2022 01:48:33.3385 (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: Xz34ZJF5g2fcQNStjxdIFDP+JzPcmndZkxtX4eq4S78Zw1A0fNubM1hFf3hoIzVWgXihY8kAnZFEdqSMLX1E7g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5450 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 I see, so ice_aq_retry_send_cmd function will conduct whether DCF is ena= bled or not with=20 'hw->dcf_enabled'. > -----Original Message----- > From: Zhang, Qi Z > Sent: Tuesday, May 31, 2022 7:52 PM > To: Zhang, Peng1X ; Yang, Qiming > ; dev@dpdk.org > Cc: stable@dpdk.org > Subject: RE: [PATCH v4] net/ice: retry sending adminQ command after failu= re >=20 >=20 >=20 > > -----Original Message----- > > From: Zhang, Peng1X > > Sent: Wednesday, June 1, 2022 1:48 AM > > To: Yang, Qiming ; Zhang, Qi Z > > ; dev@dpdk.org > > Cc: Zhang, Peng1X ; stable@dpdk.org > > Subject: [PATCH v4] net/ice: retry sending adminQ command after > > failure > > > > From: Peng Zhang > > > > The origin design is if error happen during the step 3 of following > > given situation, it will return error directly without retry. While in > > current patch, it will retry again and again during certain time. If > > retry succeed, rule can be continuously created. It will improve > > success rate of creating rule under following given situation. > > > > The given situation as following steps show: > > step 1. Kernel PF and DCF are ready at the beginning. > > step 2. A VF reset happen, kernel send an event to DPDK DCF and set > > STATE to pause. > > step 3. Before DPDK DCF receive the event, it is possible a rule > > creation is ongoing and switch rules, recipe, or vsi list related > > adminQ operation is executing. > > step 4. Then result of operation is failure, it will lead to error > > return to DPDK DCF. DPDK DCF error code will be set as EINVAL, not EAGA= IN. > > > > Fixes: 6bad5047be24 ("net/ice/base: return correct error code") > > Fixes: 453d087ccaff ("net/ice/base: add common functions") > > Cc: stable@dpdk.org > > > > Signed-off-by: Peng Zhang > > --- > > v4 changes: > > - Add retry mechanism if fail to send adminQ command under given > situation. > > v3 Changes: > > - Add the situation description, expected error code and incorrect > > error code > > - in commit log. > > v2 Changes: > > - Modify DCF state checking mechanism. > > > > drivers/net/ice/base/ice_common.c | 2 +- > > drivers/net/ice/base/ice_switch.c | > > 46 +++++++++++++++++++++++++++---- drivers/net/ice/base/ice_switch.h > > | 5 > > ++++ > > 3 files changed, 46 insertions(+), 7 deletions(-) > > > > diff --git a/drivers/net/ice/base/ice_common.c > > b/drivers/net/ice/base/ice_common.c > > index db87bacd97..013c255371 100644 > > --- a/drivers/net/ice/base/ice_common.c > > +++ b/drivers/net/ice/base/ice_common.c > > @@ -2127,7 +2127,7 @@ ice_aq_alloc_free_res(struct ice_hw *hw, u16 > > num_entries, > > > > cmd->num_entries =3D CPU_TO_LE16(num_entries); > > > > - return ice_aq_send_cmd(hw, &desc, buf, buf_size, cd); > > + return ice_aq_retry_send_cmd(hw, &desc, buf, buf_size, cd); >=20 > this is the fix only for DCF, we don't need to retry in a PF driver conte= xt. > Better keep the same function name, but implements the retry mechanism > inside the function, and should only be triggered when it is in a DCF co= ntext