netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: add macro netif_subqueue_completed_wake
@ 2023-04-12 21:25 Heiner Kallweit
  2023-04-13 13:05 ` Leon Romanovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2023-04-12 21:25 UTC (permalink / raw)
  To: Jakub Kicinski, David Miller, Eric Dumazet, Paolo Abeni
  Cc: netdev@vger.kernel.org

Add netif_subqueue_completed_wake, complementing the subqueue versions
netif_subqueue_try_stop and netif_subqueue_maybe_stop.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 include/net/netdev_queues.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/net/netdev_queues.h b/include/net/netdev_queues.h
index b26fdb441..d68b0a483 100644
--- a/include/net/netdev_queues.h
+++ b/include/net/netdev_queues.h
@@ -160,4 +160,14 @@ netdev_txq_completed_mb(struct netdev_queue *dev_queue,
 		netif_txq_maybe_stop(txq, get_desc, stop_thrs, start_thrs); \
 	})
 
+#define netif_subqueue_completed_wake(dev, idx, pkts, bytes,		\
+				      get_desc, start_thrs)		\
+	({								\
+		struct netdev_queue *txq;				\
+									\
+		txq = netdev_get_tx_queue(dev, idx);			\
+		netif_txq_completed_wake(txq, pkts, bytes,		\
+					 get_desc, start_thrs);		\
+	})
+
 #endif
-- 
2.40.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: add macro netif_subqueue_completed_wake
  2023-04-12 21:25 [PATCH net-next] net: add macro netif_subqueue_completed_wake Heiner Kallweit
@ 2023-04-13 13:05 ` Leon Romanovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2023-04-13 13:05 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: Jakub Kicinski, David Miller, Eric Dumazet, Paolo Abeni,
	netdev@vger.kernel.org

On Wed, Apr 12, 2023 at 11:25:10PM +0200, Heiner Kallweit wrote:
> Add netif_subqueue_completed_wake, complementing the subqueue versions
> netif_subqueue_try_stop and netif_subqueue_maybe_stop.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
>  include/net/netdev_queues.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Please send together with in-tree user of this macro.

Thanks


> 
> diff --git a/include/net/netdev_queues.h b/include/net/netdev_queues.h
> index b26fdb441..d68b0a483 100644
> --- a/include/net/netdev_queues.h
> +++ b/include/net/netdev_queues.h
> @@ -160,4 +160,14 @@ netdev_txq_completed_mb(struct netdev_queue *dev_queue,
>  		netif_txq_maybe_stop(txq, get_desc, stop_thrs, start_thrs); \
>  	})
>  
> +#define netif_subqueue_completed_wake(dev, idx, pkts, bytes,		\
> +				      get_desc, start_thrs)		\
> +	({								\
> +		struct netdev_queue *txq;				\
> +									\
> +		txq = netdev_get_tx_queue(dev, idx);			\
> +		netif_txq_completed_wake(txq, pkts, bytes,		\
> +					 get_desc, start_thrs);		\
> +	})
> +
>  #endif
> -- 
> 2.40.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-13 13:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-12 21:25 [PATCH net-next] net: add macro netif_subqueue_completed_wake Heiner Kallweit
2023-04-13 13:05 ` Leon Romanovsky

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).