patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Tathagat Priyadarshi <tathagat.dpdk@gmail.com>
To: stephen@networkplumber.org, dev@dpdk.org
Cc: Tathagat Priyadarshi <tathagat.dpdk@gmail.com>,
	stable@dpdk.org, Varun Lakkur Ambaji Rao <varun.la@gmail.com>
Subject: [PATCH v5] net/gve : Update EOP & csum bit in txd rte_mbuf chain
Date: Fri,  2 Aug 2024 05:08:08 +0000	[thread overview]
Message-ID: <1722575288-2408630-1-git-send-email-tathagat.dpdk@gmail.com> (raw)
In-Reply-To: <1722443901-2400194-1-git-send-email-tathagat.dpdk@gmail.com>

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: 4022f99 ("net/gve: support basic Tx data path for DQO")
Cc: stable@dpdk.org

Signed-off-by: Tathagat Priyadarshi <tathagat.dpdk@gmail.com>
Signed-off-by: Varun Lakkur Ambaji Rao <varun.la@gmail.com>

Acked-by: Joshua Washington <joshwash@google.com>
---
 drivers/net/gve/gve_tx_dqo.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/gve/gve_tx_dqo.c b/drivers/net/gve/gve_tx_dqo.c
index a65e6aa..bbaf46d 100644
--- a/drivers/net/gve/gve_tx_dqo.c
+++ b/drivers/net/gve/gve_tx_dqo.c
@@ -89,6 +89,7 @@
 	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 @@
 		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 @@
 			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 @@
 		/* 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;
 	}
-- 
1.8.3.1


  parent reply	other threads:[~2024-08-02  5:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1722443901-2400194-1-git-send-email-tathagat.dpdk@gmail.com>
2024-08-01 11:31 ` [PATCH v2] net/gve : Update EOP " Tathagat Priyadarshi
2024-08-01 17:27 ` [PATCH v3] net/gve : Update EOP & csum " Tathagat Priyadarshi
2024-08-01 18:54   ` Stephen Hemminger
2024-08-01 18:58     ` Tathagat Priyadarshi
2024-08-01 17:48 ` [PATCH v4] " Tathagat Priyadarshi
2024-08-02  5:08 ` Tathagat Priyadarshi [this message]
2024-08-02  5:10   ` [PATCH v5] " Tathagat Priyadarshi
2024-08-07  9:39   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1722575288-2408630-1-git-send-email-tathagat.dpdk@gmail.com \
    --to=tathagat.dpdk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=varun.la@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).