diff --git a/lib/ff_dpdk_if.c b/lib/ff_dpdk_if.c index b91d4dbd5..b915fde96 100644 --- a/lib/ff_dpdk_if.c +++ b/lib/ff_dpdk_if.c @@ -477,6 +477,8 @@ init_arp_ring(void) arp_ring[i][port_id] = rte_ring_create(name_buf, ARP_RING_SIZE, socketid, RING_F_SC_DEQ); + if (rte_ring_lookup(name_buf) != arp_ring[i][port_id]) + rte_panic("lookup kni ring:%s failed!\n", name_buf); } else { arp_ring[i][port_id] = rte_ring_lookup(name_buf); } @@ -484,9 +486,6 @@ init_arp_ring(void) if (arp_ring[i][port_id] == NULL) rte_panic("create kni ring::%s failed!\n", name_buf); - if (rte_ring_lookup(name_buf) != arp_ring[i][port_id]) - rte_panic("lookup kni ring:%s failed!\n", name_buf); - printf("create arp ring:%s success, %u ring entries are now free!\n", name_buf, rte_ring_free_count(arp_ring[i][port_id])); }