#define IP_DEFTTL 64 /* from RFC 1340. */
+RTE_DEFINE_PER_LCORE(int, _next_flow);
+
/*
* Multi-flow generation mode.
*
uint32_t retry;
uint64_t tx_offloads;
uint64_t start_tsc = 0;
- static int next_flow = 0;
+ int next_flow = RTE_PER_LCORE(_next_flow);
get_start_cycles(&start_tsc);
}
pkts_burst[nb_pkt] = pkt;
- next_flow = (next_flow + 1) % cfg_n_flows;
+ if (++next_flow >= (int)cfg_n_flows)
+ next_flow = 0;
}
nb_tx = rte_eth_tx_burst(fs->tx_port, fs->tx_queue, pkts_burst, nb_pkt);
} while (++nb_tx < nb_pkt);
}
+ RTE_PER_LCORE(_next_flow) = next_flow;
+
get_end_cycles(fs, start_tsc);
}