aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-03-26 13:45:37 +0100
committerDamjan Marion <damarion@cisco.com>2021-03-26 16:33:42 +0100
commitf553a2cbbb8cca84ebf033335ebd2cd26dc19d69 (patch)
tree3705c2c0121769dff96a122cef13886d5f0e5205 /src/plugins/dpdk
parent6ffb7c61899eb782416cbd2f117042a583f189f7 (diff)
vlib: introduce vlib_get_elog_main()
Type: improvement Change-Id: I73383eb15186021cd6527d112da8443a0082f129 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk')
-rw-r--r--src/plugins/dpdk/device/init.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 2834a3196e4..24f822ec495 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -1730,7 +1730,6 @@ dpdk_update_link_state (dpdk_device_t * xd, f64 now)
if (LINK_STATE_ELOGS)
{
- vlib_main_t *vm = vlib_get_main ();
ELOG_TYPE_DECLARE (e) =
{
.format =
@@ -1744,7 +1743,7 @@ dpdk_update_link_state (dpdk_device_t * xd, f64 now)
u8 old_link_state;
u8 new_link_state;
} *ed;
- ed = ELOG_DATA (&vm->elog_main, e);
+ ed = ELOG_DATA (&vlib_global_main.elog_main, e);
ed->sw_if_index = xd->sw_if_index;
ed->admin_up = (xd->flags & DPDK_DEVICE_FLAG_ADMIN_UP) != 0;
ed->old_link_state = (u8)
@@ -1783,8 +1782,6 @@ dpdk_update_link_state (dpdk_device_t * xd, f64 now)
{
if (LINK_STATE_ELOGS)
{
- vlib_main_t *vm = vlib_get_main ();
-
ELOG_TYPE_DECLARE (e) =
{
.format =
@@ -1796,7 +1793,7 @@ dpdk_update_link_state (dpdk_device_t * xd, f64 now)
u32 sw_if_index;
u32 flags;
} *ed;
- ed = ELOG_DATA (&vm->elog_main, e);
+ ed = ELOG_DATA (&vlib_global_main.elog_main, e);
ed->sw_if_index = xd->sw_if_index;
ed->flags = hw_flags;
}