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 7209AA0552; Wed, 1 Jun 2022 03:53:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 645A440E09; Wed, 1 Jun 2022 03:53:42 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 278EF40150; Wed, 1 Jun 2022 03:53:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654048420; x=1685584420; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=pktpGmlaFwoevHctg8Te063Nve/njhxZFwL06iRrSpo=; b=leHwtfVnfb20vEZtqBR3/XTlM8vb+uoAHan4Unc3P3iLcu+uq2GgDpD5 a2U98aQ5WQfHP7eHJOvobdz+8ucFMwFYNiQ9OHEaXLbnmZPWdjO4xbNlg 7ETz/HaQsHg5W7k9YXiFM6Anh11Q1TMzTGFUeA3a9xwynxHzOPj2aqv/S En5vvJ3sMqbyFgvRo5FJVvSgSCCAeYfbu8OuEcbWwrctMTU5SHLSKKo0W 6OmCUvT/k9EBxyUk6Mk0twV9WCB57a7CMTAuWbVkpfOKXI1MBdWwfneUx 7D1ZjBBOJI1TFKrNOCn3cfjPu1YvDeL0Jj2Lb0QlnFznrJsVstfoOUo2Z g==; X-IronPort-AV: E=McAfee;i="6400,9594,10364"; a="275165937" X-IronPort-AV: E=Sophos;i="5.91,266,1647327600"; d="scan'208";a="275165937" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2022 18:53:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,266,1647327600"; d="scan'208";a="823537300" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga006.fm.intel.com with ESMTP; 31 May 2022 18:53:38 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) 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.2308.27; Tue, 31 May 2022 18:53:38 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx609.amr.corp.intel.com (10.18.126.89) 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:53:38 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx607.amr.corp.intel.com (10.18.126.87) 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:53:38 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (192.55.55.68) 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:53:37 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CHWIQOoi09IckzLpXbva2cBE/GnTIjEThS8GISUTw7oiUNJXtpQ1/9PSYiUj9n76G31DY5ywhevdgoaGEYgcjo6Zc3BtWe6nIjUo8uslccQh710QX8aOjkORPJdwHiDH1Ib2gSrDQrhtsF1jecZ8hoIVvHHQv54udEZ4jeKjTUHXP9NVpMEmMRYPe2DEDHyz+uumvLxlm8D8GTkAOEs03g/T9M/vfRJ1kd9cgW6m3+xLvQCrYDluv2I67AEVzzbquLc/4u+/f56X+A+lFkYXEzOcuxcJFgqsz6xL4bz9Psfxq+PWMiNQv3ImZdCnAjR88MFdJvjjhQtLLCIYtTB6ug== 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=J3Xao0pnfIWnmzJgwcpb20E03o/3hKcH6xXkCWYrFUo=; b=Jejd6I6NdARn2aI5BzutkeyU2q6yVjL0Ea7LR8JUFAKrmaZuJZCjfKnFLVinc9NAHbkDyQvraisLjhyGpEp2gD62WWK3Gh/L6J9L7WH3qhg+Mhto7yGB9fZCx7+wQBx/JvQnneLZQmOUI+GK4gt2xTgqX6LpFDhHWIzWTDj8RQMDczOsYHUJJO7XEi5W9Phej1AWtMUhLxPgML2qg5VmFs9V2cVP/6sOh6e+xnj4WZP0v+vu9f0GGJbp1vP+BbqL5FcSzwOmmvPAREu33c6jr9Y5RBjzFYZbHfl199CdNBcsUP1FociEhb/1pqbTlu2RZwU9tQ9cnoS6UU1k/Fih1A== 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 MN2PR11MB4287.namprd11.prod.outlook.com (2603:10b6:208:189::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.16; Wed, 1 Jun 2022 01:53:31 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::b4f6:f68:2e31:ddf7]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::b4f6:f68:2e31:ddf7%6]) with mapi id 15.20.5293.019; Wed, 1 Jun 2022 01:53:31 +0000 From: "Zhang, Qi Z" To: "Zhang, Peng1X" , "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: AQHYdNSiXBpek/VeY0qC3RcbCZNBtK043TlwgADshICAAAEVoA== Date: Wed, 1 Jun 2022 01:53:31 +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: dlp-reaction: no-action dlp-version: 11.6.500.17 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: 86f1b006-d267-4b5b-0e6a-08da437187d1 x-ms-traffictypediagnostic: MN2PR11MB4287: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: Jz3u6RuwyCUcghJKIxJhjvIMx3SX6Kk4nURkwkxvSV4XCdr5/iDYqWFVl2I4ZH6BNBdjevE6VHDB9lX59R4CRkoQ4RBWdFWdMTKpjXpxr398mTYbJnsh9xpSfRobmMOc5iXzZ6vHBs3K4/UqNnCM/G2S+7EKGVmqr+GHKbNaKpEfry34i42gh3+fAM88iIFwahFme9WFZDhJHn9GqiXCEJgce7Ef/LU2fPU6IFvVVTa1p/5kllAQ6cjxoiqH9d9pxtNc6NnWzsMZnH3L5sTT8amIP+oEszRJT5XrOPtdxPZqbZKw32A7/066E0QcKp7OYLRSm18puZPFgqlU3RwFQyua/6X4B64YiPbtTPAaqyauFGrMHaHgGIYXhevtjDQ7ViU4gsx7lxsmnV8Duz9b9KH17AD25ZSSv1YXUC5wLL0/lg1ZohHqKjyZ7gdcHd3v6MFNjAxRe8SkYRpJElqcAK4TtyV+M3M++LFP4vHUJJ7p/1bCD6FC4GPEIk5O91YwAUpqz/2WYzjDX/1i1nzMURpaZJPthDoCtwriSdafAlnYx9y+YRl8AHpw7w0rv4dgt4o43eifow8wsYcjPWGoEUSSE854cTlCWKtyDNg+BmipEdP1P/WBYBTzBemr5hqKAPSjENtULQY+kJZLcBBRNp+G8mn1d+638I+YYxfXqKz+yXIlocJ96xpsdaMUxPZCq1w5m0JNVDT/JCZhahmlaQ== 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)(86362001)(8936002)(52536014)(6506007)(26005)(9686003)(33656002)(2906002)(82960400001)(186003)(38100700002)(7696005)(83380400001)(53546011)(66946007)(4326008)(8676002)(508600001)(76116006)(122000001)(66556008)(316002)(64756008)(66446008)(66476007)(38070700005)(450100002)(55016003)(71200400001)(5660300002)(110136005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?LvVWu7J7aDa64mPlB409mOvXCqZoKTsft6UPbsZsuVROX4QJtBVYUaiBDtaT?= =?us-ascii?Q?1M44p4WkB5DGq9m2YHr190MKy4CJRsOllPRNeJrH9329PRKN3wSym+uxCQvI?= =?us-ascii?Q?1pNwlugUtzSaJJ7RwRqZgIdvo1HDo4K//Epn4GgIqw+HKEi7/+2TkQGxm7Ea?= =?us-ascii?Q?xHbLb/UL86LdXrY4M+98ZNzEHh3Vo6TaAmm7itwAcNVWXERHaDSQxCyTReQJ?= =?us-ascii?Q?3sT7DOA/h4NfHW7Nmsk/lYZoPrgmgkKbedZEfSsosj2POlHzVS53CMkb/1xl?= =?us-ascii?Q?AZ2C+soAJchIuehUxRxNGTC6sWuXSSh/b7zJZpFsroYXTRUFUpJ/o3ENBZQW?= =?us-ascii?Q?byeQJe8cY8xDUNZ36XCNRXwKOhJlxP6FXnPTkjdips6KR1Fzy2ABr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mH9fLTvAI9nKeAEhOxaWXwrj7BRhy7IFUq?= =?us-ascii?Q?PzSo3bQZuCIxFFLqnYsQ5WfHCS4UXPWYqVA6Zns1zlzG8vahGTJWpornj7vl?= =?us-ascii?Q?gR33IHWuhbJ7n1YET7N0H6TmBnVYBN+Rszel3OD17xyONJgwtvaB+rzg52l+?= =?us-ascii?Q?3llf8tryCuIAF8WiycJKziEwQPGoW4QR6OBPUY+QLi5TlyyejsviKDlVR5W/?= =?us-ascii?Q?+aAReql0AjXdQMT6ilxsSuIQWk74DDcY+8pQ5063PWEbiB6fHb9k+JJHDpb1?= =?us-ascii?Q?Xokec7TKa8do1U3Ky9dJcBwMwUeDvKSWe03/tWuPEC7IlGaDXZ81YMEeSsEI?= =?us-ascii?Q?3e/nnYkAf2XRLnSXfZr3G9h9NNNE1J1RS0ChmrNQ2BmovNLFUQRvZy2oPFRI?= =?us-ascii?Q?Vla2tB/KkcbUNpemOXQ40+AZwDbedtQ2/Cy8/JkV3zkkh5T9Vk6YBI5bPjas?= =?us-ascii?Q?fHgbz5qRmQ=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: 86f1b006-d267-4b5b-0e6a-08da437187d1 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jun 2022 01:53:31.4711 (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: +rwiD77ryhijRhNjUcecBVU6hNTUj5QHOR1ytmj5oTD6D49o16kbyyhq47Vrye1MQpR7xuB8TWx6ppKJ73SKyw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4287 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: Zhang, Peng1X > Sent: Wednesday, June 1, 2022 9:49 AM > To: Zhang, Qi Z ; Yang, Qiming > ; dev@dpdk.org > Cc: stable@dpdk.org > Subject: RE: [PATCH v4] net/ice: retry sending adminQ command after failu= re >=20 > I see, so ice_aq_retry_send_cmd function will conduct whether DCF is > enabled or not with 'hw->dcf_enabled'. Why not just enable retry in ice_dcf_send_aq_cmd?=20 > > -----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 > > failure > > > > > > > > > -----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 > EAGAIN. > > > > > > 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); > > > > this is the fix only for DCF, we don't need to retry in a PF driver con= text. > > 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 > > context