mirror of https://github.com/F-Stack/f-stack.git
Fix #9: error variable i in loop.
This commit is contained in:
parent
8a0cdb99c3
commit
c15aae717a
|
@ -444,7 +444,7 @@ init_mem_pool(void)
|
||||||
static int
|
static int
|
||||||
init_arp_ring(void)
|
init_arp_ring(void)
|
||||||
{
|
{
|
||||||
int i, ret;
|
int i, j, ret;
|
||||||
char name_buf[RTE_RING_NAMESIZE];
|
char name_buf[RTE_RING_NAMESIZE];
|
||||||
int nb_procs = ff_global_cfg.dpdk.nb_procs;
|
int nb_procs = ff_global_cfg.dpdk.nb_procs;
|
||||||
int proc_id = ff_global_cfg.dpdk.proc_id;
|
int proc_id = ff_global_cfg.dpdk.proc_id;
|
||||||
|
@ -468,8 +468,8 @@ init_arp_ring(void)
|
||||||
|
|
||||||
/* Create ring according to ports actually being used. */
|
/* Create ring according to ports actually being used. */
|
||||||
nb_ports = ff_global_cfg.dpdk.nb_ports;
|
nb_ports = ff_global_cfg.dpdk.nb_ports;
|
||||||
for (i = 0; i < nb_ports; i++) {
|
for (j = 0; j < nb_ports; j++) {
|
||||||
uint8_t port_id = ff_global_cfg.dpdk.port_cfgs[i].port_id;
|
uint8_t port_id = ff_global_cfg.dpdk.port_cfgs[j].port_id;
|
||||||
|
|
||||||
for(i = 0; i < nb_procs; ++i) {
|
for(i = 0; i < nb_procs; ++i) {
|
||||||
snprintf(name_buf, RTE_RING_NAMESIZE, "ring_%d_%d", i, port_id);
|
snprintf(name_buf, RTE_RING_NAMESIZE, "ring_%d_%d", i, port_id);
|
||||||
|
|
Loading…
Reference in New Issue