summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorcohu <cong.hu@tieto.com>2019-04-19 06:27:22 -0400
committerNeale Ranns <nranns@cisco.com>2019-05-23 09:45:16 +0000
commit9febbcdc885880d716991ffaf581ff484cdd8731 (patch)
tree4fa2a98486d554ff9c7137680dea78e5f7f55dbb /src
parentd5023a72ddabe7e9a8698ad57c82d6be117fff73 (diff)
fix rte_eth_dev_info’ has no member named ‘pci_dev’ when run show_dpdk_hqos_queue_stats
Change-Id: Ic1a900e0fb85ee016af21535764dfca2e6282194 Signed-off-by: cohu <cong.hu@tieto.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/dpdk/device/cli.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/plugins/dpdk/device/cli.c b/src/plugins/dpdk/device/cli.c
index 04cf37f5304..215235434f4 100644
--- a/src/plugins/dpdk/device/cli.c
+++ b/src/plugins/dpdk/device/cli.c
@@ -1567,6 +1567,7 @@ show_dpdk_hqos_queue_stats (vlib_main_t * vm, unformat_input_t * input,
dpdk_device_t *xd;
uword *p = 0;
struct rte_eth_dev_info dev_info;
+ struct rte_pci_device *pci_dev;
dpdk_device_config_t *devconf = 0;
u32 qindex;
struct rte_sched_queue_stats stats;
@@ -1612,14 +1613,17 @@ show_dpdk_hqos_queue_stats (vlib_main_t * vm, unformat_input_t * input,
xd = vec_elt_at_index (dm->devices, hw->dev_instance);
rte_eth_dev_info_get (xd->port_id, &dev_info);
- if (dev_info.pci_dev)
+
+ pci_dev = dpdk_get_pci_device (&dev_info);
+
+ if (pci_dev)
{ /* bonded interface has no pci info */
vlib_pci_addr_t pci_addr;
- pci_addr.domain = dev_info.pci_dev->addr.domain;
- pci_addr.bus = dev_info.pci_dev->addr.bus;
- pci_addr.slot = dev_info.pci_dev->addr.devid;
- pci_addr.function = dev_info.pci_dev->addr.function;
+ pci_addr.domain = pci_dev->addr.domain;
+ pci_addr.bus = pci_dev->addr.bus;
+ pci_addr.slot = pci_dev->addr.devid;
+ pci_addr.function = pci_dev->addr.function;
p =
hash_get (dm->conf->device_config_index_by_pci_addr, pci_addr.as_u32);