diff mbox series

[net-next,1/3] net: add macro netif_subqueue_completed_wake

Message ID 16e51984-a539-24d4-a2d6-604c0b75f14b@gmail.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series r8169: use new macros from netdev_queues.h | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 19 this patch: 19
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 19 this patch: 19
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Heiner Kallweit April 13, 2023, 7:14 p.m. UTC
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(+)

Comments

Jacob Keller April 13, 2023, 7:22 p.m. UTC | #1
On 4/13/2023 12:14 PM, 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>
> ---

Reviewed-by: Jacob Keller <jacob.e.keller@intel.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
diff mbox series

Patch

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