From: Andriy Berestovskyy Date: Thu, 27 Apr 2017 09:27:54 +0000 (+0200) Subject: examples/load_balancer: fix Tx flush X-Git-Tag: spdx-start~3305 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=509f35d4c48434ec5a4a8b60342bf633eea69062;p=dpdk.git examples/load_balancer: fix Tx flush Port ID is not an index from 0 to n_nic_ports, but rather a value of nic_ports array. Fixes: af75078fece3 ("first public release") Signed-off-by: Andriy Berestovskyy --- diff --git a/examples/load_balancer/runtime.c b/examples/load_balancer/runtime.c index 8192c08127..7f918aa457 100644 --- a/examples/load_balancer/runtime.c +++ b/examples/load_balancer/runtime.c @@ -420,10 +420,12 @@ static inline void app_lcore_io_tx_flush(struct app_lcore_params_io *lp) { uint8_t port; + uint32_t i; - for (port = 0; port < lp->tx.n_nic_ports; port ++) { + for (i = 0; i < lp->tx.n_nic_ports; i++) { uint32_t n_pkts; + port = lp->tx.nic_ports[i]; if (likely((lp->tx.mbuf_out_flush[port] == 0) || (lp->tx.mbuf_out[port].n_mbufs == 0))) { lp->tx.mbuf_out_flush[port] = 1;