numam-dpdk/drivers/net/ixgbe
Olivier Matz 513c78ae3f ethdev: fix extended statistics name index
The function rte_eth_xstats_get() return an array of tuples (id,
value). The value is the statistic counter, while the id references a
name in the array returned by rte_eth_xstats_get_name().

Today, each 'id' returned by rte_eth_xstats_get() is equal to the index
in the returned array, making this value useless. It also prevents a
driver from having different indexes for names and value, like in the
example below:

  rte_eth_xstats_get_name() returns:
    0: "rx0_stat"
    1: "rx1_stat"
    2: ...
    7: "rx7_stat"
    8: "tx0_stat"
    9: "tx1_stat"
    ...
    15: "tx7_stat"

  rte_eth_xstats_get() returns:
    0: id=0, val=<stat>    ("rx0_stat")
    1: id=1, val=<stat>    ("rx1_stat")
    2: id=8, val=<stat>    ("tx0_stat")
    3: id=9, val=<stat>    ("tx1_stat")

This patch fixes the drivers to set the 'id' in their ethdev->xstats_get()
(except e1000 which was already doing it), and fixes ethdev by not setting
the 'id' field to the index of the table for pmd-specific stats: instead,
they should just be shifted by the max number of generic statistics.

Fixes: bd6aa172cf ("ethdev: fetch extended statistics with integer ids")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Remy Horton <remy.horton@intel.com>
2017-01-04 19:04:30 +01:00
..
base net/ixgbe: fix link up with X552 2016-11-11 00:53:22 +01:00
ixgbe_82599_bypass.c ixgbe: clean up code style 2016-05-06 15:51:22 +02:00
ixgbe_bypass_api.h ixgbe: support new devices and MAC types 2016-03-16 17:09:27 +01:00
ixgbe_bypass_defines.h ixgbe: clean up code style 2016-05-06 15:51:22 +02:00
ixgbe_bypass.c ixgbe: clean up code style 2016-05-06 15:51:22 +02:00
ixgbe_bypass.h ixgbe: clean up code style 2016-05-06 15:51:22 +02:00
ixgbe_ethdev.c ethdev: fix extended statistics name index 2017-01-04 19:04:30 +01:00
ixgbe_ethdev.h ethdev: decouple from PCI device 2016-12-25 23:30:19 +01:00
ixgbe_fdir.c net/ixgbe: fix flow director mask 2016-10-26 19:38:18 +02:00
ixgbe_logs.h drivers: allow pruning log during build 2015-07-30 20:16:04 +02:00
ixgbe_pf.c net/ixgbe: localize mapping of ethdev to PCI device 2016-12-24 18:54:41 +01:00
ixgbe_regs.h net/ixgbe: fix VF registers 2016-11-07 16:19:30 +01:00
ixgbe_rxtx_vec_common.h net/ixgbe: support checksum flags in SSE vector Rx 2016-10-14 01:23:40 +02:00
ixgbe_rxtx_vec_neon.c net/ixgbe: support checksum flags in SSE vector Rx 2016-10-14 01:23:40 +02:00
ixgbe_rxtx_vec_sse.c net/ixgbe: fix out of order Rx read 2016-10-26 19:38:18 +02:00
ixgbe_rxtx.c net/ixgbe: support multiqueue mode VMDq DCB with SRIOV 2016-10-26 20:12:45 +02:00
ixgbe_rxtx.h mbuf: add new Rx flags for stripped VLAN 2016-06-15 17:18:57 +02:00
Makefile net/ixgbe: add API for VF management 2016-10-13 15:38:55 +02:00
rte_pmd_ixgbe_version.map net/ixgbe: add API for VF management 2016-10-13 15:38:55 +02:00
rte_pmd_ixgbe.h net/ixgbe: fix VF VLAN insert API 2016-10-26 19:42:23 +02:00