From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id AE9024D3A for ; Thu, 11 Jan 2018 16:02:13 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jan 2018 07:02:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,344,1511856000"; d="scan'208";a="194174748" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga006.fm.intel.com with ESMTP; 11 Jan 2018 07:02:11 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.180]) by irsmsx110.ger.corp.intel.com ([163.33.3.25]) with mapi id 14.03.0319.002; Thu, 11 Jan 2018 15:02:10 +0000 From: "Van Haaren, Harry" To: "David Harton (dharton)" , "Wu, Jingjing" , "Xing, Beilei" CC: "dev@dpdk.org" , "Zhao1, Wei" Thread-Topic: [dpdk-dev] [PATCH] net/i40e: fix VF reset stats crash Thread-Index: AQHTit98iFGDe2K9lUqOHeLAJtSOD6Nuv72wgAAEAwCAAABXYA== Date: Thu, 11 Jan 2018 15:02:10 +0000 Message-ID: References: <20180111132337.14389-1-dharton@cisco.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmQ5OWZmZDQtM2MxNC00MmFlLTgyZWEtMGFiNDUyZDIzOWJjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImR4amloclZQZitnTEl3ZVNEazE2QncwcG55RjdlSDNJWkE0Nk9cL1ozVndjPSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix VF reset stats crash 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: Thu, 11 Jan 2018 15:02:14 -0000 > From: David Harton (dharton) [mailto:dharton@cisco.com] > Sent: Thursday, January 11, 2018 2:59 PM > To: Van Haaren, Harry ; Wu, Jingjing > ; Xing, Beilei > Cc: dev@dpdk.org; Zhao1, Wei > Subject: RE: [dpdk-dev] [PATCH] net/i40e: fix VF reset stats crash >=20 >=20 > > -----Original Message----- > > From: Van Haaren, Harry [mailto:harry.van.haaren@intel.com] > > > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David C Harton > > > > > > Calling i40evf_dev_xstats_reset can sometimes crash. > > > > > > Fixed issue by adding a pstats NULL check. > > > > Perhaps add a note here, that the root cause of (pstats =3D=3D NULL) is= a > > valid error return from i40evf_query_stats(), if the vf command fails t= o > > execute. > > > > Hence, we are not hiding symptoms of a different issue here, this NULL > > check is required to validate the returned values. > > >=20 > NULL is returned if the call fails. > If desired I can capture the return code and base the check off the rc > instead. > That's the pattern used in a couple other places. If you prefer that implementation of the check, you can keep my Ack, I don'= t mind much. I reviewed as in my experience a NULL pointer can often be detected earlier= , but that wasn't the case here. PS: Apologies I didn't reply to v2, was reading "up" and didn't check for n= ewer..