summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dpdk')
-rw-r--r--src/plugins/dpdk/device/common.c2
-rw-r--r--src/plugins/dpdk/device/dpdk.h3
-rw-r--r--src/plugins/dpdk/device/format.c4
-rw-r--r--src/plugins/dpdk/device/init.c10
4 files changed, 10 insertions, 9 deletions
diff --git a/src/plugins/dpdk/device/common.c b/src/plugins/dpdk/device/common.c
index e42395f2133..e9eac140753 100644
--- a/src/plugins/dpdk/device/common.c
+++ b/src/plugins/dpdk/device/common.c
@@ -289,7 +289,7 @@ dpdk_port_state_callback_inline (dpdk_portid_t port_id,
dpdk_log_info ("Port %d state to %s, "
"slave of port %d BondEthernet%d in mode %d",
port_id, (link_up) ? "UP" : "DOWN",
- bd_port, xd->port_id, bd_mode);
+ bd_port, xd->bond_instance_num, bd_mode);
if (bd_mode == BONDING_MODE_ACTIVE_BACKUP)
{
vl_api_force_rpc_call_main_thread
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index b1610e72fa1..86cc6705721 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -233,7 +233,8 @@ typedef struct
dpdk_device_hqos_per_hqos_thread_t *hqos_ht;
/* af_packet or BondEthernet instance number */
- dpdk_portid_t port_id;
+ u16 af_packet_instance_num;
+ u16 bond_instance_num;
/* Bonded interface port# of a slave -
only valid if DPDK_DEVICE_FLAG_BOND_SLAVE bit is set */
diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c
index 3750eb33fbb..22f37c4c63e 100644
--- a/src/plugins/dpdk/device/format.c
+++ b/src/plugins/dpdk/device/format.c
@@ -213,7 +213,7 @@ format_dpdk_device_name (u8 * s, va_list * args)
break;
case VNET_DPDK_PORT_TYPE_ETH_BOND:
- return format (s, "BondEthernet%d", dm->devices[i].port_id);
+ return format (s, "BondEthernet%d", dm->devices[i].bond_instance_num);
case VNET_DPDK_PORT_TYPE_ETH_SWITCH:
device_name = "EthernetSwitch";
@@ -225,7 +225,7 @@ format_dpdk_device_name (u8 * s, va_list * args)
case VNET_DPDK_PORT_TYPE_AF_PACKET:
rte_eth_dev_info_get (i, &dev_info);
- return format (s, "af_packet%d", dm->devices[i].port_id);
+ return format (s, "af_packet%d", dm->devices[i].af_packet_instance_num);
case VNET_DPDK_PORT_TYPE_VIRTIO_USER:
device_name = "VirtioUser";
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index f147bcb6e11..7156e69b4dc 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -207,8 +207,8 @@ dpdk_lib_init (dpdk_main_t * dm)
uword *p_hqos;
u32 next_hqos_cpu = 0;
- u8 af_packet_port_id = 0;
- u8 bond_ether_port_id = 0;
+ u8 af_packet_instance_num = 0;
+ u8 bond_ether_instance_num = 0;
last_pci_addr.as_u32 = ~0;
dm->hqos_cpu_first_index = 0;
@@ -460,12 +460,12 @@ dpdk_lib_init (dpdk_main_t * dm)
case VNET_DPDK_PMD_AF_PACKET:
xd->port_type = VNET_DPDK_PORT_TYPE_AF_PACKET;
- xd->port_id = af_packet_port_id++;
+ xd->af_packet_instance_num = af_packet_instance_num++;
break;
case VNET_DPDK_PMD_BOND:
xd->port_type = VNET_DPDK_PORT_TYPE_ETH_BOND;
- xd->port_id = bond_ether_port_id++;
+ xd->bond_instance_num = bond_ether_instance_num++;
break;
case VNET_DPDK_PMD_VIRTIO_USER:
@@ -1556,7 +1556,7 @@ dpdk_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
/* Set MAC of bounded interface to that of 1st slave link */
dpdk_log_info ("Set MAC for bond port %d BondEthernet%d",
- i, xd->port_id);
+ i, xd->bond_instance_num);
rv = rte_eth_bond_mac_address_set
(i, (struct ether_addr *) addr);
if (rv)