[dpdk-dev] [PATCH] net/i40e: fix VF reset stats crash

David Harton (dharton) dharton at cisco.com
Thu Jan 11 15:59:16 CET 2018


> -----Original Message-----
> From: Van Haaren, Harry [mailto:harry.van.haaren at intel.com]
> 
> > From: dev [mailto:dev-bounces at 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 == NULL) is a
> valid error return from i40evf_query_stats(), if the vf command fails to
> execute.
> 
> Hence, we are not hiding symptoms of a different issue here, this NULL
> check is required to validate the returned values.
>
 
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.

Thanks,
Dave



More information about the dev mailing list