From: Xiaoxin Peng Date: Thu, 28 Jun 2018 20:15:40 +0000 (-0700) Subject: net/bnxt: fix Tx with multiple mbuf X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b2a4a69f7b663f712437c7c31dc0916ffe4ad84b;p=dpdk.git net/bnxt: fix Tx with multiple mbuf When using multi-mbuf to xmit large packets, we need to use total packet lengths (sum of all segments) to set txbd->flags_type. Packets will not be sent when using tx_pkt->data_len(The first segment of packets). Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code") Cc: stable@dpdk.org Signed-off-by: Xiaoxin Peng Reviewed-by: Herry Chen Reviewed-by: Jason He Reviewed-by: Scott Branden Reviewed-by: Ajit Khaparde --- diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c index 68645b2f77..e85511f9a5 100644 --- a/drivers/net/bnxt/bnxt_txr.c +++ b/drivers/net/bnxt/bnxt_txr.c @@ -160,10 +160,10 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt, *cmpl_next = false; } txbd->len = tx_pkt->data_len; - if (txbd->len >= 2014) + if (tx_pkt->pkt_len >= 2014) txbd->flags_type |= TX_BD_LONG_FLAGS_LHINT_GTE2K; else - txbd->flags_type |= lhint_arr[txbd->len >> 9]; + txbd->flags_type |= lhint_arr[tx_pkt->pkt_len >> 9]; txbd->address = rte_cpu_to_le_32(rte_mbuf_data_iova(tx_buf->mbuf)); if (long_bd) {