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 8B7E9A0552; Wed, 1 Jun 2022 05:22:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F96B40A84; Wed, 1 Jun 2022 05:22:36 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 6645740150; Wed, 1 Jun 2022 05:22: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=1654053755; x=1685589755; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=XjRD38WTc/WhnI6gDp/mAuqY/fVaII4H6ZUO8bD+jtI=; b=RNAOzlojbJG7QR1/roV4r4aaXbMI4KCh5/tLpzJfrEntUFvVoc2qmdve tAueT2/9rwHIbmyHC1ylI8aVPSjd7virHFuZxxU4bekGn0nekIAmRWAtH wqK59ltjh5zuw+oVhHhS/R6NngK89lFE5zbMHSUM3kumAi/viZ6Updzdk KwMKZBq0+mpNGLPkvDc8x573eJmQD+42RD1dvbnA8TrCrmT0Qw3CH4MIk erKPMq4NPkIFMdSr0yaVM1lFgEm7JyplRSLsHrJ65oeZSLc4e2pwf45EO 2ElSVKG8EfOfT5/9bGhbTwipjb323lkjc+GrIWvv5ShE54wbR1FPDTB3O A==; X-IronPort-AV: E=McAfee;i="6400,9594,10364"; a="255327112" X-IronPort-AV: E=Sophos;i="5.91,266,1647327600"; d="scan'208";a="255327112" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2022 20:22:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,266,1647327600"; d="scan'208";a="667219310" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by FMSMGA003.fm.intel.com with ESMTP; 31 May 2022 20:22:34 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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 20:22:34 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx606.amr.corp.intel.com (10.18.126.86) 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 20:22:34 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170) 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 20:22:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nf2Ev9KwAPtacrqCSar8A30UHbxGl7+hNN/Jadp4sSjDDh4hr2KBqPPgp6HUmJF2W40JqcIiAd+K+wWyiABc0uiPlp6XlveS8ImW/G3Ao5xEVotPgrd0guV71P5QwD/5WT7SFn4vkPr9z5pYzLKAZhoKk1xyK+pfKRzwuHPKURiPE9rfJcq2t9P6Jv06pyrpy1+tzdEMQFiG1X4DtA/zjtotHhjdjm4VKkrbWOH/Ac5IzaRzX+D186A1qd9XlsbL3LcdSDAY/uVSJIBUmkT7wcCOZqdCmuIj+5zFPa0yyTpIJCHH2NZQuGlDj8RJ6IkJPQkqVrwp7Ony3UwH7MIVdg== 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=TUrn7jA/PwCoyjXs/k//6FYxxvdRMAUkSb8U4P5X9zI=; b=UNdeH+KLgP7UnrpOei0vkE8Eiba7NF83avWFSdjWPDP6EPG6MUQ8at+C4iLVLGSmkaWcuwj0SfMjN8png/bC8m07WIBTgJ7mo2/sof6QIKDrOZ+/0muVoMiLGla7Gj8mHsyru7HiP5eYQ6qhFtuOV8DzNlrvBzzPhId+DsaItzAZYsypCNlRN3/7M3Q3QpuDQhBo/KE4lGTbJ0drQmqOLJInRi/bPBxbhZw6jKpzlGzCxLH26QiDNRAfwtlC9TuoSTPAwrrpzyFWTGkjadSJcd1cI4PLAwyVLCuo1XzamqaNXOjQLfjLd7z1ngQbBs24dJ6ho3NxyTyjHtMA4WZKGQ== 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 DS7PR11MB6038.namprd11.prod.outlook.com (2603:10b6:8:75::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.19; Wed, 1 Jun 2022 03:22:32 +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 03:22:32 +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/VeY0qC3RcbCZNBtK043TlwgADshICAAAEVoIAADwqAgAAGmNA= Date: Wed, 1 Jun 2022 03:22: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: 31fd8552-debf-4d5a-0ce3-08da437df6f2 x-ms-traffictypediagnostic: DS7PR11MB6038: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: sy2sKWeROdBH5AEdmD+hPa3KJQqrET6QNaw4sOAS+KBe9JR5FtUJ0K01wWKavIASNYQrZaHbvZBN99eLyH0NgcvGiFA3v+2rzlNO/mJEQFM6o0PuzbmtLrIPdW7KPX7ew5z6NDL7sB9UC6p+S3SyPme/B16C0r57wOj+SEkysZMjbY8Wapds+ZqMOXS+QESQRloON5vmbVT5eOpLJjgXT32UwnfyXmb3TwmElcsJlIYCNE2+tgIRNFkM6IlEngt3xym1YOsGemytC3QOnuMiqlky2f6DM4bgNh2xHKyJMTizxMp7xrkl3USnUtasYfUxp85A4+Emr5mM3Syau65OszU3/alklBmIlR+ge8sbudi6m95+P2KK+3oJAVM819L5d501uTv18qcYhrYYLZCHieSeNjzm10jpN07YM93tEhMl8UoPROkbo3uK3KTmXGHPeAEl1QFBhwaVjRxLfqi4hU3l33fN9uTNt0E/pcl9sT5unHmtxYtNAIa/TjzgifwtiYpHu9h3OvLDVQoQ+lB3eFr8WbtX2YNGEvaiuAHJwlYoM9dcgTFYAvvCUlCpJi6iW6/cJqMZIGJ1wCqymczgVIZAoYKPt4BQF5thQSFV8aMwfumwpEjm2AVQLgqMbKCbMMPVApi6DDCc9yKHH/vEMJPcOgV5VVobJmO+4Rz9TRXxU68cI0FyK0n6vhzTWH6UdeVv9UrZ+fHRYt21BpYXbg== 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)(8676002)(76116006)(66476007)(64756008)(66446008)(66556008)(4326008)(66946007)(71200400001)(52536014)(186003)(5660300002)(110136005)(450100002)(8936002)(55016003)(86362001)(33656002)(83380400001)(7696005)(6506007)(82960400001)(38100700002)(38070700005)(316002)(122000001)(2906002)(9686003)(53546011)(26005)(508600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?0NG4j0DQxwXYOgTpRIEV0dJ2Vi/d918IxSL6DOY+E1mQ7Jmm+uQEpgTELvvm?= =?us-ascii?Q?9PGkQsbg5le8DOyiSiyGgTIcKBxT4GezUwIh6xf24NeR11+/wGIxB7wL/QGx?= =?us-ascii?Q?RACTN1XaxrWI0JQ5O0oI4cesyPt+YR8vHqQfCj4uzcQpELHY9EeVgV0vh695?= =?us-ascii?Q?K90MErIdpE7uF4hfxqn97J1Z8O1U3iz4hwQaryWxlB/zrrG2VlVkR3cpnDpI?= =?us-ascii?Q?JaziUiiSPxw0RqejeaaHU0hbiPdbyqh4fEHjsUnsul5FlX4bip0ujT3nS+lO?= =?us-ascii?Q?MBMA7OCdonLjftnIzP0R7vt8uYcS94BhGP6o71xvAao6enqba7RdGZ8po/Ue?= =?us-ascii?Q?GCLBIeME2ioRnme3OKzh+EOBe7oaz+jb5XRIpggrTAwOtby9djRtTjF5wzsL?= =?us-ascii?Q?P0dkmuSX0Je0GXM1B++MxcXb3fAC4T0vYep6NKzF+Je1E7+Wtu/hibd+85pw?= =?us-ascii?Q?HehQLLNT6+xoz8WTPJYRt2++oZduCKneEZ2HT66xH6tbV+2AuzMpcYsnboMr?= =?us-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BV1Gg3hADK6RRrVshKIEUynlHOKZdqt5YJLdb8gKW?= =?us-ascii?Q?pfCQdRmkJLv98KOLFMO4TOrZ6gWFlJSSehHBue98rwCnfid0sfn9KZN4jYtA?= =?us-ascii?Q?kUf3aqnLTvTmQn8wtA7TYxe7gzyybvTJgRTRNH1adjsnEGFg4cqTexaru8iV?= =?us-ascii?Q?irdWqZpIR5UsjBPI4FPdtzcsJ2g2nkLeHx8iEUEkI4wuDgbkGHUhha76h+f6?= =?us-ascii?Q?TQSWXki1MW9TzWhXuXzFuY/sw6CmJ0Du3hXZbaMQ9xmjmq3uzzOB175g2UQC?= =?us-ascii?Q?sNTA+fxAosY9UIR3XmfX8gnoPFhwtfaqgN8EkBrqW+Yt/+DzV54lqxN4CiOf?= =?us-ascii?Q?tswpt9y59A=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: 31fd8552-debf-4d5a-0ce3-08da437df6f2 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jun 2022 03:22:31.8752 (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: j70415wOSPL+qUpEuMMJM8356Hu6ZgTTeQuuIC93b4PVgEIxbDJT5lYjxzRtficwW1wYEb5ERPS1zfTRsYywWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6038 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 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 failu= re >=20 > Because currently just focus on the following given situation, and use 'h= w- > >dcf_enabled' it should only affect on DCF. > After having checked code 'ice_dcf_send_aq_cmd', it already have retry > mechanism. If it is already retried, then why we need this patch? Btw, we are talking about "retry virtual channel command from DCF to kernel= 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 situa= tion. > > > > > > > > > > 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= 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