X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbonding%2Frte_eth_bond_pmd.c;h=c34c3251f3a59621aa801818882509f16ea7704f;hb=d4b89002b0b7792e5fc0f2f9d8d2e4c5489b33b3;hp=92ad688b183b750f903ba0a48da4e5f0b149e873;hpb=ffe353bd2c26ec47011be7599c812f05aeb8bacd;p=dpdk.git diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 92ad688b18..c34c3251f3 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -800,7 +800,7 @@ burst_xmit_l2_hash(struct rte_mbuf **buf, uint16_t nb_pkts, hash = ether_hash(eth_hdr); - slaves[i++] = (hash ^= hash >> 8) % slave_count; + slaves[i] = (hash ^= hash >> 8) % slave_count; } } @@ -838,7 +838,7 @@ burst_xmit_l23_hash(struct rte_mbuf **buf, uint16_t nb_pkts, hash ^= hash >> 16; hash ^= hash >> 8; - slaves[i++] = hash % slave_count; + slaves[i] = hash % slave_count; } } @@ -907,7 +907,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts, hash ^= hash >> 16; hash ^= hash >> 8; - slaves[i++] = hash % slave_count; + slaves[i] = hash % slave_count; } } @@ -1229,7 +1229,7 @@ bond_ethdev_tx_burst_balance(void *queue, struct rte_mbuf **bufs, /* Number of mbufs for transmission on each slave */ uint16_t slave_nb_bufs[RTE_MAX_ETHPORTS] = { 0 }; /* Mapping array generated by hash function to map mbufs to slaves */ - uint16_t bufs_slave_port_idxs[RTE_MAX_ETHPORTS] = { 0 }; + uint16_t bufs_slave_port_idxs[nb_bufs]; uint16_t slave_tx_count, slave_tx_fail_count[RTE_MAX_ETHPORTS] = { 0 }; uint16_t total_tx_count = 0, total_tx_fail_count = 0;