From: Min Hu (Connor) Date: Fri, 28 Jan 2022 02:25:33 +0000 (+0800) Subject: net/bonding: fix reference count on mbufs X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=814e79f3afad8c45c6922617f26292af3221ae2b;p=dpdk.git net/bonding: fix reference count on mbufs In bonding Tx broadcast mode, Packets should be sent by every slave, but only one mbuf exits. The solution is to increment reference count on mbufs, but it ignores multi segments. This patch fixed it by adding reference for every segment in multi segments Tx scenario. Fixes: 2efb58cbab6e ("bond: new link bonding library") Cc: stable@dpdk.org Signed-off-by: Min Hu (Connor) --- diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index d2fcfad676..bfa931098e 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1318,7 +1318,7 @@ bond_ethdev_tx_burst_broadcast(void *queue, struct rte_mbuf **bufs, /* Increment reference count on mbufs */ for (i = 0; i < nb_pkts; i++) - rte_mbuf_refcnt_update(bufs[i], num_of_slaves - 1); + rte_pktmbuf_refcnt_update(bufs[i], num_of_slaves - 1); /* Transmit burst on each active slave */ for (i = 0; i < num_of_slaves; i++) {