netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, gospo@broadcom.com,
	Somnath Kotur <somnath.kotur@broadcom.com>,
	Andy Gospodarek <andrew.gospodarek@broadcom.com>,
	Hongguang Gao <hongguang.gao@broadcom.com>
Subject: [PATCH net-next 04/13] bnxt_en: Prevent TX timeout with a very small TX ring
Date: Mon, 11 Dec 2023 16:51:13 -0800	[thread overview]
Message-ID: <20231212005122.2401-5-michael.chan@broadcom.com> (raw)
In-Reply-To: <20231212005122.2401-1-michael.chan@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 1445 bytes --]

If xmit_more condition is true, the driver may set the
TX_BD_FLAGS_NO_CMPL flag.  If after this packet, the TX ring can no
longer hold a packet with maximum fragments, we will stop the TX
queue.  When this happens, we must clear the TX_BD_FLAGS_NO_CMPL flag
on the last packet or there will be no completion and cause TX
timeout.

Fixes: c1056a59aee1 ("bnxt_en: Optimize xmit_more TX path")
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Reviewed-by: Hongguang Gao <hongguang.gao@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 83a47feaf869..cc6cab340423 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -666,8 +666,11 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
 tx_done:
 
 	if (unlikely(bnxt_tx_avail(bp, txr) <= MAX_SKB_FRAGS + 1)) {
-		if (netdev_xmit_more() && !tx_buf->is_push)
+		if (netdev_xmit_more() && !tx_buf->is_push) {
+			txbd0->tx_bd_len_flags_type &=
+				cpu_to_le32(~TX_BD_FLAGS_NO_CMPL);
 			bnxt_txr_db_kick(bp, txr, prod);
+		}
 
 		netif_txq_try_stop(txq, bnxt_tx_avail(bp, txr),
 				   bp->tx_wake_thresh);
-- 
2.30.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

  parent reply	other threads:[~2023-12-12  0:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12  0:51 [PATCH net-next 00/13] bnxt_en: Update for net-next Michael Chan
2023-12-12  0:51 ` [PATCH net-next 01/13] bnxt_en: Fix trimming of P5 RX and TX rings Michael Chan
2023-12-12  0:51 ` [PATCH net-next 02/13] bnxt_en: Fix AGG ring check logic in bnxt_check_rings() Michael Chan
2023-12-12  0:51 ` [PATCH net-next 03/13] bnxt_en: Fix TX ring indexing logic Michael Chan
2023-12-12  0:51 ` Michael Chan [this message]
2023-12-12  0:51 ` [PATCH net-next 05/13] bnxt_en: Support TX coalesced completion on 5760X chips Michael Chan
2023-12-12  0:51 ` [PATCH net-next 06/13] bnxt_en: Allocate extra QP backing store memory when RoCE FW reports it Michael Chan
2023-12-12  0:51 ` [PATCH net-next 07/13] bnxt_en: Use proper TUNNEL_DST_PORT_ALLOC* commands Michael Chan
2023-12-12  0:51 ` [PATCH net-next 08/13] bnxt_en: Add support for VXLAN GPE Michael Chan
2023-12-12  0:51 ` [PATCH net-next 09/13] bnxt_en: Configure UDP tunnel TPA Michael Chan
2023-12-12  0:51 ` [PATCH net-next 10/13] bnxt_en: add rx_filter_miss extended stats Michael Chan
2023-12-12  0:51 ` [PATCH net-next 11/13] bnxt_en: Add support for UDP GSO on 5760X chips Michael Chan
2023-12-12  0:51 ` [PATCH net-next 12/13] bnxt_en: Skip nic close/open when configuring tstamp filters Michael Chan
2023-12-12  0:51 ` [PATCH net-next 13/13] bnxt_en: Make PTP TX timestamp HWRM query silent Michael Chan
2024-01-24 10:18   ` Breno Leitao
2024-01-25  3:35     ` Pavan Chebbi
2024-01-25  4:47       ` Michael Chan
2024-01-25  9:52         ` Breno Leitao
2024-01-25  9:51       ` Breno Leitao
2023-12-13  0:10 ` [PATCH net-next 00/13] bnxt_en: Update for net-next patchwork-bot+netdevbpf

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=20231212005122.2401-5-michael.chan@broadcom.com \
    --to=michael.chan@broadcom.com \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gospo@broadcom.com \
    --cc=hongguang.gao@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=somnath.kotur@broadcom.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).