summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/device.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-01-04 20:15:59 +0100
committerOle Tr�an <otroan@employees.org>2022-01-05 10:42:58 +0000
commit70e808b1bfc25d1664ddb917457040b419e123c8 (patch)
treeb5d34b718052c905a91ac77656de8287d5c69f0a /src/plugins/dpdk/device/device.c
parent7dc6f7fb497e9c9eac96057b2528fb072225a809 (diff)
dpdk: remove "convenience" vars
It is actually longer and slower... Type: refactor Change-Id: I0f126d4cdb13ecc60a2d370409f23820d7f7eb72 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device/device.c')
-rw-r--r--src/plugins/dpdk/device/device.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/dpdk/device/device.c b/src/plugins/dpdk/device/device.c
index 893dc41a488..336167b86f8 100644
--- a/src/plugins/dpdk/device/device.c
+++ b/src/plugins/dpdk/device/device.c
@@ -158,7 +158,6 @@ static_always_inline
dpdk_device_t * xd,
struct rte_mbuf **mb, u32 n_left)
{
- dpdk_main_t *dm = &dpdk_main;
dpdk_tx_queue_t *txq;
u32 n_retry;
int n_sent = 0;
@@ -189,7 +188,7 @@ static_always_inline
if (PREDICT_FALSE (n_sent < 0))
{
// emit non-fatal message, bump counter
- vnet_main_t *vnm = dm->vnet_main;
+ vnet_main_t *vnm = vnet_get_main ();
vnet_interface_main_t *im = &vnm->interface_main;
u32 node_index;
@@ -495,7 +494,7 @@ dpdk_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags)
if (vec_len (xd->errors))
return clib_error_create ("Interface start failed");
xd->flags |= DPDK_DEVICE_FLAG_ADMIN_UP;
- f64 now = vlib_time_now (dm->vlib_main);
+ f64 now = vlib_time_now (vlib_get_main ());
dpdk_update_counters (xd, now);
dpdk_update_link_state (xd, now);
}
@@ -531,7 +530,7 @@ dpdk_set_interface_next_node (vnet_main_t * vnm, u32 hw_if_index,
}
xd->per_interface_next_index =
- vlib_node_add_next (xm->vlib_main, dpdk_input_node.index, node_index);
+ vlib_node_add_next (vlib_get_main (), dpdk_input_node.index, node_index);
}