Stephen Hemminger
5d0c255e6b
ethdev: fix xstats size query with NULL
Normal usage of rte_eth_dev_xstats_get is to call twice. The first time the function is called with portid, xstats = NULL and n = 0; this returns the number of entries in the statistics table that need to be allocated. The problem is that the routine adds a count value to NULL (0) and assumes that this is a valid pointer (it isn't). Device drivers all have a check for NULL, and this no longer matches. Fixes: d4fef8b0d5e5 ("ethdev: expose generic and driver specific stats in xstats") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Olivier Matz <olivier.matz@6wind.com>
DPDK is a set of libraries and drivers for fast packet processing. It supports many processor architectures and both FreeBSD and Linux. The DPDK uses the Open Source BSD license for the core libraries and drivers. The kernel components are GPLv2 licensed. Please check the doc directory for release notes, API documentation, and sample application information. For questions and usage discussions, subscribe to: users@dpdk.org Report bugs and issues to the development mailing list: dev@dpdk.org
Description
Languages
C
99.1%
Meson
0.5%
Python
0.2%
Shell
0.1%