summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/init.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-03-22 08:15:05 -0400
committerDamjan Marion <dmarion.lists@gmail.com>2018-03-22 22:36:28 +0000
commit6e3c682b188cc0d1a80c165c4b2773574a163bb1 (patch)
tree72f7bb988bb79a834cb25388a9db35db15bdda7e /src/plugins/dpdk/device/init.c
parent6ddede72126a8e5854908b6fcf4c80f55bf450cc (diff)
VPP-1204: Fix coverity warning
Change-Id: Iacb32e6e855f7b77108154d956ef27ee141bbde0 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/plugins/dpdk/device/init.c')
-rwxr-xr-xsrc/plugins/dpdk/device/init.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index a425c585dad..76d122d37d5 100755
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -696,8 +696,11 @@ dpdk_lib_init (dpdk_main_t * dm)
clib_warning ("VLAN strip cannot be supported by interface\n");
}
- hi->max_l3_packet_bytes[VLIB_RX] = hi->max_l3_packet_bytes[VLIB_TX] =
- xd->port_conf.rxmode.max_rx_pkt_len - sizeof (ethernet_header_t);
+ if (hi)
+ hi->max_l3_packet_bytes[VLIB_RX] = hi->max_l3_packet_bytes[VLIB_TX] =
+ xd->port_conf.rxmode.max_rx_pkt_len - sizeof (ethernet_header_t);
+ else
+ clib_warning ("hi NULL");
rte_eth_dev_set_mtu (xd->device_index, mtu);
}