From e0f7ebe88ab4588dd352e9ec14270ce4e3b1470b Mon Sep 17 00:00:00 2001 From: Tathagat Priyadarshi Date: Fri, 2 Aug 2024 05:08:08 +0000 Subject: [PATCH] net/gve: fix Tx for chained mbuf The EOP and CSUM bit was not set for all the packets in mbuf chain causing packet transmission stalls for packets split across mbuf in chain. Fixes: 4022f9999f56 ("net/gve: support basic Tx data path for DQO") Cc: stable@dpdk.org Signed-off-by: Tathagat Priyadarshi Signed-off-by: Varun Lakkur Ambaji Rao Acked-by: Joshua Washington --- .mailmap | 1 + drivers/net/gve/gve_tx_dqo.c | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.mailmap b/.mailmap index 4a508bafad5..09fa253e121 100644 --- a/.mailmap +++ b/.mailmap @@ -1531,6 +1531,7 @@ Vakul Garg Vamsi Attunuru Vamsi Krishna Atluri Vanshika Shukla +Varun Lakkur Ambaji Rao Varun Sethi Vasily Philipov Veerasenareddy Burru diff --git a/drivers/net/gve/gve_tx_dqo.c b/drivers/net/gve/gve_tx_dqo.c index 1b85557a15b..b9d6d01749a 100644 --- a/drivers/net/gve/gve_tx_dqo.c +++ b/drivers/net/gve/gve_tx_dqo.c @@ -89,6 +89,7 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) uint16_t sw_id; uint64_t bytes; uint16_t first_sw_id; + uint8_t csum; sw_ring = txq->sw_ring; txr = txq->tx_ring; @@ -114,6 +115,9 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) ol_flags = tx_pkt->ol_flags; nb_used = tx_pkt->nb_segs; first_sw_id = sw_id; + + csum = !!(ol_flags & GVE_TX_CKSUM_OFFLOAD_MASK_DQO); + do { if (sw_ring[sw_id] != NULL) PMD_DRV_LOG(DEBUG, "Overwriting an entry in sw_ring"); @@ -126,6 +130,8 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) txd->pkt.dtype = GVE_TX_PKT_DESC_DTYPE_DQO; txd->pkt.compl_tag = rte_cpu_to_le_16(first_sw_id); txd->pkt.buf_size = RTE_MIN(tx_pkt->data_len, GVE_TX_MAX_BUF_SIZE_DQO); + txd->pkt.end_of_packet = 0; + txd->pkt.checksum_offload_enable = csum; /* size of desc_ring and sw_ring could be different */ tx_id = (tx_id + 1) & mask; @@ -138,9 +144,6 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) /* fill the last descriptor with End of Packet (EOP) bit */ txd->pkt.end_of_packet = 1; - if (ol_flags & GVE_TX_CKSUM_OFFLOAD_MASK_DQO) - txd->pkt.checksum_offload_enable = 1; - txq->nb_free -= nb_used; txq->nb_used += nb_used; }