From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 625AF5F13 for ; Mon, 3 Sep 2018 14:54:55 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Sep 2018 05:54:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,325,1531810800"; d="scan'208";a="68015696" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga008.fm.intel.com with ESMTP; 03 Sep 2018 05:54:41 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 3 Sep 2018 05:54:41 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 3 Sep 2018 05:54:41 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.240]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.150]) with mapi id 14.03.0319.002; Mon, 3 Sep 2018 20:54:39 +0800 From: "Zhang, Qi Z" To: Luca Boccassi , "dev@dpdk.org" CC: "Lu, Wenzhuo" , "Ananyev, Konstantin" Thread-Topic: [dpdk-dev] [PATCH] net/ixgbe: do not return internal code in rte_eth_dev_reset Thread-Index: AQHUOT8qrj5o+miVAUeiRwAPX36zuqTelmeQ Date: Mon, 3 Sep 2018 12:54:38 +0000 Message-ID: <039ED4275CED7440929022BC67E706115327F55B@SHSMSX103.ccr.corp.intel.com> References: <20180821110649.26711-1-bluca@debian.org> In-Reply-To: <20180821110649.26711-1-bluca@debian.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjU4MTcyZTUtYjBkMi00NzExLWIwZDktOWQ5OTExMzEwYTNjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUjNRdlprNlJ3ekZwMGtDT2F5Sk56MVdZZEt4dEpCbUdVNUNTWmp0RFlWdmR4Slhab0x5cEFUbzdtMEsyaG1CdCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: do not return internal code in rte_eth_dev_reset X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Sep 2018 12:54:56 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Luca Boccassi > Sent: Tuesday, August 21, 2018 7:07 PM > To: dev@dpdk.org > Cc: Lu, Wenzhuo ; Ananyev, Konstantin > > Subject: [dpdk-dev] [PATCH] net/ixgbe: do not return internal code in > rte_eth_dev_reset >=20 > In case of a temporary failure the ixgbe driver can return the internal e= rror > IXGBE_ERR_RESET_FAILED to the application. Instead, return -EAGAIN as per > the public API specification. >=20 > Signed-off-by: Luca Boccassi > --- > drivers/net/ixgbe/base/ixgbe_vf.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/ixgbe/base/ixgbe_vf.c > b/drivers/net/ixgbe/base/ixgbe_vf.c > index 5b25a6b4d4..62f2bf2e7d 100644 > --- a/drivers/net/ixgbe/base/ixgbe_vf.c > +++ b/drivers/net/ixgbe/base/ixgbe_vf.c > @@ -203,8 +203,13 @@ s32 ixgbe_reset_hw_vf(struct ixgbe_hw *hw) > usec_delay(5); > } >=20 > + /* > + * This error code will be propagated to the app by rte_eth_dev_reset, > + * so use a public error code rather than the internal-only > + * IXGBE_ERR_RESET_FAILED > + */ > if (!timeout) > - return IXGBE_ERR_RESET_FAILED; > + return -EAGAIN; I think it's better not to change this in base code which are assumed to on= ly return IXGBE_ERR_xxx And also this is not the only place in ixgbe_reset_hw_vf that will propagat= ed the internal error. Why not convert it in "eth_ixgbevf_dev_init" which looks like a right place= ? >=20 > /* Reset VF registers to initial values */ > ixgbe_virt_clr_reg(hw); > -- > 2.18.0