mirror of https://github.com/F-Stack/f-stack.git
Fix #7:arp ring lookup called after create.
This commit is contained in:
parent
8f57dbbcb5
commit
5e3a4c7748
|
@ -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]));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue