Thread (12 messages) flat view 12 messages, 3 authors, 2021-08-13

Re: [PATCH net v2 3/4] bnxt: make sure xmit_more + errors does not miss doorbells

From: Michael Chan <michael.chan@broadcom.com>
Date: 2021-08-12 06:51:40

On Wed, Aug 11, 2021 at 2:38 PM Jakub Kicinski [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -396,6 +404,8 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
        free_size = bnxt_tx_avail(bp, txr);
        if (unlikely(free_size < skb_shinfo(skb)->nr_frags + 2)) {
                netif_tx_stop_queue(txq);
+               if (net_ratelimit() && txr->kick_pending)
+                       netif_warn(bp, tx_err, dev, "bnxt: ring busy!\n");
I think there is one more problem here.  Now that it is possible to
get here, we can race with bnxt_tx_int() again here.  We can call
netif_tx_stop_queue() here after bnxt_tx_int() has already cleaned the
entire TX ring.  So I think we need to call bnxt_tx_wake_queue() here
again if descriptors have become available.
                return NETDEV_TX_BUSY;
        }

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help