summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/format.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dpdk/device/format.c')
-rw-r--r--src/plugins/dpdk/device/format.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c
index 22f37c4c63e..f10b00e27a6 100644
--- a/src/plugins/dpdk/device/format.c
+++ b/src/plugins/dpdk/device/format.c
@@ -253,7 +253,7 @@ format_dpdk_device_name (u8 * s, va_list * args)
dev_info.pci_dev->addr.devid,
dev_info.pci_dev->addr.function);
else
- ret = format (s, "%s%d", device_name, dm->devices[i].device_index);
+ ret = format (s, "%s%d", device_name, dm->devices[i].port_id);
if (dm->devices[i].interface_name_suffix)
return format (ret, "/%s", dm->devices[i].interface_name_suffix);
@@ -396,7 +396,7 @@ format_dpdk_link_status (u8 * s, va_list * args)
s = format (s, "%s ", l->link_status ? "up" : "down");
if (l->link_status)
{
- u32 promisc = rte_eth_promiscuous_get (xd->device_index);
+ u32 promisc = rte_eth_promiscuous_get (xd->port_id);
s = format (s, "%s duplex ", (l->link_duplex == ETH_LINK_FULL_DUPLEX) ?
"full" : "half");
@@ -489,12 +489,12 @@ format_dpdk_device (u8 * s, va_list * args)
dpdk_update_link_state (xd, now);
s = format (s, "%U\n%Ucarrier %U",
- format_dpdk_device_type, xd->device_index,
+ format_dpdk_device_type, xd->port_id,
format_white_space, indent + 2, format_dpdk_link_status, xd);
s = format (s, "%Uflags: %U\n",
format_white_space, indent + 2, format_dpdk_device_flags, xd);
- rte_eth_dev_info_get (xd->device_index, &di);
+ rte_eth_dev_info_get (xd->port_id, &di);
if (verbose > 1 && xd->flags & DPDK_DEVICE_FLAG_PMD)
{
@@ -504,7 +504,7 @@ format_dpdk_device (u8 * s, va_list * args)
int retval;
rss_conf.rss_key = 0;
- retval = rte_eth_dev_rss_hash_conf_get (xd->device_index, &rss_conf);
+ retval = rte_eth_dev_rss_hash_conf_get (xd->port_id, &rss_conf);
if (retval < 0)
clib_warning ("rte_eth_dev_rss_hash_conf_get returned %d", retval);
pci = di.pci_dev;
@@ -528,9 +528,10 @@ format_dpdk_device (u8 * s, va_list * args)
s =
format (s, "%Upromiscuous: unicast %s all-multicast %s\n",
format_white_space, indent + 2,
- rte_eth_promiscuous_get (xd->device_index) ? "on" : "off",
- rte_eth_allmulticast_get (xd->device_index) ? "on" : "off");
- vlan_off = rte_eth_dev_get_vlan_offload (xd->device_index);
+ rte_eth_promiscuous_get (xd->port_id) ?
+ "on" : "off",
+ rte_eth_allmulticast_get (xd->port_id) ? "on" : "off");
+ vlan_off = rte_eth_dev_get_vlan_offload (xd->port_id);
s = format (s, "%Uvlan offload: strip %s filter %s qinq %s\n",
format_white_space, indent + 2,
vlan_off & ETH_VLAN_STRIP_OFFLOAD ? "on" : "off",
@@ -576,9 +577,9 @@ format_dpdk_device (u8 * s, va_list * args)
u32 i = 0;
struct rte_eth_xstat *xstat, *last_xstat;
struct rte_eth_xstat_name *xstat_names = 0;
- int len = rte_eth_xstats_get_names (xd->device_index, NULL, 0);
+ int len = rte_eth_xstats_get_names (xd->port_id, NULL, 0);
vec_validate (xstat_names, len - 1);
- rte_eth_xstats_get_names (xd->device_index, xstat_names, len);
+ rte_eth_xstats_get_names (xd->port_id, xstat_names, len);
ASSERT (vec_len (xd->xstats) == vec_len (xd->last_cleared_xstats));