[dpdk-dev] net/thunderx: fix multi segment xmit function return

Message ID 20171128132238.15592-1-jerin.jacob@caviumnetworks.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Jerin Jacob Nov. 28, 2017, 1:22 p.m.
multi segment version of tx burst function was not
returning the actual number of packets sent out
in PMD xmit function.

Fixes: 1c421f18e0 ("net/thunderx: add single and multi-segment Tx")
Cc: stable@dpdk.org

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Sunil Kulkarni <sunil.kulkarni@caviumnetworks.com>
---
 drivers/net/thunderx/nicvf_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ferruh Yigit Dec. 4, 2017, 11:59 p.m. | #1
On 11/28/2017 5:22 AM, Jerin Jacob wrote:
> multi segment version of tx burst function was not
> returning the actual number of packets sent out
> in PMD xmit function.
> 
> Fixes: 1c421f18e0 ("net/thunderx: add single and multi-segment Tx")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Signed-off-by: Sunil Kulkarni <sunil.kulkarni@caviumnetworks.com>

Applied to dpdk-next-net/master, thanks.

Patch

diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c
index e27776e6d..9d69cf4e2 100644
--- a/drivers/net/thunderx/nicvf_rxtx.c
+++ b/drivers/net/thunderx/nicvf_rxtx.c
@@ -252,7 +252,7 @@  nicvf_xmit_pkts_multiseg(void *tx_queue, struct rte_mbuf **tx_pkts,
 
 	/* Inform HW to xmit the packets */
 	nicvf_addr_write(sq->sq_door, used_desc);
-	return nb_pkts;
+	return i;
 }
 
 static const uint32_t ptype_table[16][16] __rte_cache_aligned = {