summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/cli.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/cli.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/cli.c')
-rw-r--r--src/plugins/dpdk/device/cli.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/dpdk/device/cli.c b/src/plugins/dpdk/device/cli.c
index ba922e29a54..2487fc12252 100644
--- a/src/plugins/dpdk/device/cli.c
+++ b/src/plugins/dpdk/device/cli.c
@@ -265,6 +265,7 @@ set_dpdk_if_desc (vlib_main_t * vm, unformat_input_t * input,
{
unformat_input_t _line_input, *line_input = &_line_input;
dpdk_main_t *dm = &dpdk_main;
+ vnet_main_t *vnm = vnet_get_main ();
vnet_hw_interface_t *hw;
dpdk_device_t *xd;
u32 hw_if_index = (u32) ~ 0;
@@ -277,9 +278,8 @@ set_dpdk_if_desc (vlib_main_t * vm, unformat_input_t * input,
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
- if (unformat
- (line_input, "%U", unformat_vnet_hw_interface, dm->vnet_main,
- &hw_if_index))
+ if (unformat (line_input, "%U", unformat_vnet_hw_interface, vnm,
+ &hw_if_index))
;
else if (unformat (line_input, "tx %d", &nb_tx_desc))
;
@@ -299,7 +299,7 @@ set_dpdk_if_desc (vlib_main_t * vm, unformat_input_t * input,
goto done;
}
- hw = vnet_get_hw_interface (dm->vnet_main, hw_if_index);
+ hw = vnet_get_hw_interface (vnm, hw_if_index);
xd = vec_elt_at_index (dm->devices, hw->dev_instance);
if ((xd->flags & DPDK_DEVICE_FLAG_PMD) == 0)