From mboxrd@z Thu Jan 1 00:00:00 1970 From: "David Harton (dharton)" Subject: Re: [PATCH] net/i40e: fix VF reset stats crash Date: Thu, 11 Jan 2018 14:59:16 +0000 Message-ID: References: <20180111132337.14389-1-dharton@cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" , "Zhao1, Wei" To: "Van Haaren, Harry" , "Wu, Jingjing" , "Xing, Beilei" Return-path: Received: from alln-iport-7.cisco.com (alln-iport-7.cisco.com [173.37.142.94]) by dpdk.org (Postfix) with ESMTP id 266547288 for ; Thu, 11 Jan 2018 15:59:18 +0100 (CET) In-Reply-To: Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Van Haaren, Harry [mailto:harry.van.haaren@intel.com] >=20 > > 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. >=20 > 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 to > execute. >=20 > 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. =20 If desired I can capture the return code and base the check off the rc inst= ead. That's the pattern used in a couple other places. Thanks, Dave