Re: [PATCH net-next v5 10/15] idpf: add splitq start_xmit
From: Jakub Kicinski <kuba@kernel.org>
Date: 2023-08-18 18:37:42
From: Jakub Kicinski <kuba@kernel.org>
Date: 2023-08-18 18:37:42
On Tue, 15 Aug 2023 17:43:00 -0700 Tony Nguyen wrote:
+ netif_stop_subqueue(tx_q->vport->netdev, tx_q->idx); + + /* Memory barrier before checking head and tail */ + smp_mb(); + + /* Check again in a case another CPU has just made room available. */ + if (likely(IDPF_DESC_UNUSED(tx_q) < size)) + return -EBUSY; + + /* A reprieve! - use start_subqueue because it doesn't call schedule */ + netif_start_subqueue(tx_q->vport->netdev, tx_q->idx);
Please use the helpers from include/net/netdev_queues.h.