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 BDD4CA054F; Wed, 1 Jun 2022 07:35:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A27AE40689; Wed, 1 Jun 2022 07:35:36 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 2C7D440150; Wed, 1 Jun 2022 07:35:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654061735; x=1685597735; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=cIX17ILa9VCvo/gsnU+jtxcc5r2jpD+eAwZEkcExpL4=; b=G3VIPabpftuKihgvC36o49W1EBYxneFG9SZC1hkwhmNAP8c8axCjoPee rzNAtGxhpoSL5q4O1kzmMi/JDLgXmqQ/45zIRhDkhJd2MfvOvx9Xcv2RN PxxNUg+JSNINXAOoDCArSCpScnYamz53UfCL5n2sPLrNcU9ZYYQHpMuCj DWe9L5QclhFNMAIH+BLJf5agm/Gg5yL/oyvjwfAuQH47aR7Zvp/yhsm/R QI+Lg/fDaFq5KJICMsmYe9rvrtNQC6fRey4b1zS5JyBAJyvcNzJJD+LTt XrFmKt21hBDlh6/IsaFxYtvaLqwgLOEZbHtxmSIEyyCK5D0YPM8EM7+4A g==; X-IronPort-AV: E=McAfee;i="6400,9594,10364"; a="275488647" X-IronPort-AV: E=Sophos;i="5.91,266,1647327600"; d="scan'208";a="275488647" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2022 22:35:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,266,1647327600"; d="scan'208";a="645339963" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga004.fm.intel.com with ESMTP; 31 May 2022 22:35:34 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx604.amr.corp.intel.com (10.18.126.84) 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 22:35:33 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx604.amr.corp.intel.com (10.18.126.84) 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 22:35:33 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.43) by edgegateway.intel.com (192.55.55.71) 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 22:35:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OnztSkAjZgza7DCa9ae2PUaixwHzgpB0K95fzFUsXHV9kFJz0xJGXb8vtyqy7s8iHLT5VXt6x1sOKfVEf/Kt2QFHNEopjXAPBVKJA0VyastkvPU3EBZq1j8bfK1dAB+iLwoi9BqMC3jU3Ijh78PKrhjUXtdPLuC7ZphNuELUbPJz8dGNVqaX50ho4v93/EQU0Gd2ZYslPXacmm4Z7dWJp9tREPKaVcdNT4iabzWuEBxJWQqZ06DlqOn2LbAXF0L2V4kVyp5DeGvyl3ve/lBWT0KsHR/8evH5kTJ0yvjzO5wTVp9IuzgUDX+ZUvA0WBa7AhI5DOHpq0umNgXLRkXtNQ== 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=tXMh1HXURu0+bT0Z5QqWt5XqvEUUzC1TSl35llmJEqc=; b=m8PDodsjeBePXMnJpvGBNyQwgS/E9XjO82sa4MqPhOqTuoAYN+Xhw2w9Uj2fTKHXoGlOdT8v9xcMC1DqmR0e1ktqPRg+xvA7ZjPxk9xVdQZZmvt4KuJuK/V4LtxkERfiZdbJZ9G1uV9gVGdVM8XyqTwoqpDK4e34EM+QTLPMRrGxZukv10JKpZ9RBC/fRJzJkReFphKmc456lZUCHOlQ4bbeKUNy8BQXuzA9X//6jwBaNCgCWLmGOcI+mAytFM6qeXMHznJSqYlGtdzZqlHPEeTSMvubBiyU5PomwM/de6ZNPgNIGZT87JAaGAUpfHuRvOIIgBKrTfotI80iAmOEIQ== 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 CO1PR11MB5105.namprd11.prod.outlook.com (2603:10b6:303:9f::7) by DM8PR11MB5734.namprd11.prod.outlook.com (2603:10b6:8:31::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.15; Wed, 1 Jun 2022 05:35:31 +0000 Received: from CO1PR11MB5105.namprd11.prod.outlook.com ([fe80::b40b:9689:e820:fc3d]) by CO1PR11MB5105.namprd11.prod.outlook.com ([fe80::b40b:9689:e820:fc3d%7]) with mapi id 15.20.5314.012; Wed, 1 Jun 2022 05:35:31 +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/yAgADoyoCAAAJagIAAByxQgAARsoCAAB8w0A== Date: Wed, 1 Jun 2022 05:35: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: 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: b8ebdb67-f988-473b-5afb-08da43908aff x-ms-traffictypediagnostic: DM8PR11MB5734: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: Ny6ruMPzYlh7LxDtcchZTcy4kTZNnRP/fPveMRvXNsgaRZBqIEjC1bVKQBYp7I/9CbEVLHYeGsw5+bER42fNdyNY+fe1bZmyDHcw0otmfqjnsQn7i7mjJpUCk581ipyHP83IPcw/4wycAMK83ARDFQnqTuIdNxAbGWh/mmT30Mz0/XIc+HQPidOdMEEICZtNyXh/9MOHlk3mz5Jun8wzhuS2byUHlqEXKniaa7n6zD3TYrZo0YTknW96QBWUxFHhWa09V2w87mSgWRgbuKZuZB4YFDAnxkbbpKE8ZBF0DmTNHRivKZlmXpd4TkOund8tWktke4YG9PPemv3M8DhDdjoyZm8/AjIiVU/WTYgjymFJf7tYpmaGq4V4/gvvnndV4GDfNoirV5TozRAj2515mYP6sOE6iEMzPOtcUquJR/jKSnuyhzBWG0Q9c4kLUHPo+qOVaxboOr2fuz/rfsaB2UaEwoJVpy6vrzyM+gvmf+uyadve0DpkOJR8C3uhjSJfG4CIHt9xO5LTQAnhegkHLhwvUlkLiqh3fCYa/eEYhfGHXdPkAN7PTT/tvRGui9bvdnVjJTxJIx7OtHQtCEvSF36hjsUZ5KlqCP3QTSlY4l5lZ9sPBL9npkK8tTr6x5ats/kPxQSawCCgT74UvJJe0dl8aKi9Pz6zzz6eHW4ssfT6CuKS852ZgfQs4z7184woVAAnwj3J/7LXhx/3ISe5YA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR11MB5105.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(110136005)(66476007)(64756008)(52536014)(71200400001)(83380400001)(66446008)(55016003)(66946007)(82960400001)(186003)(2906002)(66556008)(8936002)(38100700002)(6506007)(4326008)(7696005)(53546011)(26005)(86362001)(38070700005)(8676002)(76116006)(122000001)(508600001)(316002)(5660300002)(450100002)(33656002)(9686003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?sEAYLFYnPxFNi4h+ujHa6ERzUNS00QOz1/ghTb7O1gX1z6g3QBx0eUtZaiqq?= =?us-ascii?Q?lvk8QqPPhnrEMwNIksmVrr5o/Uyyior1mdyCs9/SZttF4bY8TXB6KTlQT/qt?= =?us-ascii?Q?nAx+55hU487DNGNPnlhoNqoB1JBfD8Hu1ZOlfcGAzYrRMQJJOO7y5zBaPtVS?= =?us-ascii?Q?6DV3IICTKw2FmbVvKtJPYqZUe5aDyiSaBBjiLLjSFS+NunyX+8davSfu9E/p?= =?us-ascii?Q?jbrK4SPVGG0eHOJPJmVRCFbo11GmUpo007qk/qvaLnVRgQdY281zMhMA3Jpk?= =?us-ascii?Q?jWb9EtcdGUVqsS5qVKZaCrPDiuVlhO34XLIIZifO4NbQA/s7GcskOQGwUBs4?= =?us-ascii?Q?DRp5jlVMTYmq4h6T2zpDI7LmfP+XJAZvP7kSkfKrzHxV4CzUJRVyEXXTPzDt?= =?us-ascii?Q?TtQuU9ESerW/d3OBv8kTRsJHVLWPl9bl0ROYdnCQe+9WZ+q1BoxQwyji60Kr?= =?us-ascii?Q?D7vkcFOnna20ICa2KsoAR/Uilu1uI5Dku6R50ejg+IISK9gmnMF9RFw1PcKC?= =?us-ascii?Q?9q3eutqx5zz6p8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SV63kxsiBKl?= =?us-ascii?Q?OI10pLDzdKegZu9AkL9zGAGCd9nwy8LiM6Qjy1fCRtDMjisKJOf5RZ69PHcS?= =?us-ascii?Q?xlbYmTHt8zeCiF+OFU05cDi3/3ivCjbg1smKG/ofAyeorq4RCFCihASrKPRn?= =?us-ascii?Q?LCRH2SGqioZXKT5WMazgi6gn8hjvL+Lca3LYlYAKd0p6Qdw5et7zBlOPR8jT?= =?us-ascii?Q?rw5oSPqECukmJ7fw83bNXbOS3EPHx547Q+m3sqIgR6Los0gHXfOzFJd28p//?= =?us-ascii?Q?8pXRGE5CuXA2eYzVRHOp/J5BPT6uLyxIE/TLOzeZPgOlMd3R/3UkCebpoPQg?= =?us-ascii?Q?Bl7+qRDeyg=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: CO1PR11MB5105.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8ebdb67-f988-473b-5afb-08da43908aff X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jun 2022 05:35:31.2532 (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: H2gH9czvKyCjR789ibqsfN9kVFIWDDKTJRa/UvMyE6z/a1Or3ystKSYeNIkXFBs4o0ChRJhNdRBF+CD09ocwpw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR11MB5734 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 Because under the following given situation, it still have some issue. To t= his given situation, it is sure that retry mechanism is necessary.=20 While is it confirm that under other situation retry mechanism is always be= tter than without retry?=20 If modify 'ice_dcf_send_aq_cmd', it will affect the handling to AdminQ unde= r DCF. It looks like it will affect much more than following given situatio= n.=20 > -----Original Message----- > From: Zhang, Qi Z > Sent: Wednesday, June 1, 2022 11:23 AM > 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 10:46 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 > > failure > > > > Because currently just focus on the following given situation, and use > > 'hw- > > >dcf_enabled' it should only affect on DCF. > > After having checked code 'ice_dcf_send_aq_cmd', it already have retry > > mechanism. >=20 >=20 > If it is already retried, then why we need this patch? > Btw, we are talking about "retry virtual channel command from DCF to kern= el > PF" here, not the case "retry polling reply status of the a request". >=20 > > > > > -----Original Message----- > > > From: Zhang, Qi Z > > > Sent: Wednesday, June 1, 2022 9:54 AM > > > 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 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 failure > > > > > > > > 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? > > > > > > > > > > > -----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 sit= uation. > > > > > > > > > > > > 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 driv= er context. > > > > > 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