From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id E2A933DC for ; Tue, 21 Aug 2018 13:17:20 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Aug 2018 04:17:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,269,1531810800"; d="scan'208";a="83599006" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by orsmga001.jf.intel.com with ESMTP; 21 Aug 2018 04:17:18 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.180]) by IRSMSX152.ger.corp.intel.com ([169.254.6.200]) with mapi id 14.03.0319.002; Tue, 21 Aug 2018 12:17:17 +0100 From: "Ananyev, Konstantin" To: Luca Boccassi , "dev@dpdk.org" CC: "Lu, Wenzhuo" Thread-Topic: [PATCH] net/ixgbe: do not return internal code in rte_eth_dev_reset Thread-Index: AQHUOT8fOqouSBkzq0uYN4UzeEBgEqTKDlMA Date: Tue, 21 Aug 2018 11:17:17 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258E9FA2BAB@IRSMSX102.ger.corp.intel.com> References: <20180821110649.26711-1-bluca@debian.org> In-Reply-To: <20180821110649.26711-1-bluca@debian.org> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzk5ZDQ1MjQtNWI0Mi00NmIwLWE2ZmYtMDM5M2IzMDMzOWIwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSDZQWlJxNUhWZGg5KzZTMm8xUlZLWDM5cEFWRWI2S3lVNFhtUGhHbnBmdFU3MEtEcUN4OTFjV1BlRDcrUDFyRCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.180] 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: Tue, 21 Aug 2018 11:17:21 -0000 > -----Original Message----- > From: Luca Boccassi [mailto:bluca@debian.org] > Sent: Tuesday, August 21, 2018 12:07 PM > To: dev@dpdk.org > Cc: Lu, Wenzhuo ; Ananyev, Konstantin > Subject: [PATCH] net/ixgbe: do not return internal code in rte_eth_dev_re= set >=20 > In case of a temporary failure the ixgbe driver can return the internal > error 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/i= xgbe_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; >=20 > /* Reset VF registers to initial values */ > ixgbe_virt_clr_reg(hw); > -- > 2.18.0 Acked-by: Konstantin Ananyev