Skip to content

Commit

Permalink
Fix #9: error variable i in loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
whl739 committed May 17, 2017
1 parent 8a0cdb9 commit c15aae7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ff_dpdk_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ init_mem_pool(void)
static int
init_arp_ring(void)
{
int i, ret;
int i, j, ret;
char name_buf[RTE_RING_NAMESIZE];
int nb_procs = ff_global_cfg.dpdk.nb_procs;
int proc_id = ff_global_cfg.dpdk.proc_id;
Expand All @@ -468,8 +468,8 @@ init_arp_ring(void)

/* Create ring according to ports actually being used. */
nb_ports = ff_global_cfg.dpdk.nb_ports;
for (i = 0; i < nb_ports; i++) {
uint8_t port_id = ff_global_cfg.dpdk.port_cfgs[i].port_id;
for (j = 0; j < nb_ports; j++) {
uint8_t port_id = ff_global_cfg.dpdk.port_cfgs[j].port_id;

for(i = 0; i < nb_procs; ++i) {
snprintf(name_buf, RTE_RING_NAMESIZE, "ring_%d_%d", i, port_id);
Expand Down

0 comments on commit c15aae7

Please sign in to comment.