Skip to content

Commit

Permalink
net: add macro netif_subqueue_completed_wake
Browse files Browse the repository at this point in the history
Add netif_subqueue_completed_wake, complementing the subqueue versions
netif_subqueue_try_stop and netif_subqueue_maybe_stop.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Heiner Kallweit authored and Paolo Abeni committed Apr 18, 2023
1 parent 3684a23 commit cb18e55
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/net/netdev_queues.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit cb18e55

Please sign in to comment.