mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-21 10:05:00 +08:00
sfc: Correct efx_for_each_possible_channel_tx_queue() to skip non-TX channels
efx_for_each_possible_channel_tx_queue() should do nothing for RX-only or extra channels. The current definition results in allocating additional unused hardware TX queues when using the mqprio qdisc and either separate_tx_channels or SR-IOV. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
This commit is contained in:
parent
2d0cc56da3
commit
73e0026fb2
@ -1030,6 +1030,9 @@ static inline bool efx_tx_queue_used(struct efx_tx_queue *tx_queue)
|
|||||||
|
|
||||||
/* Iterate over all possible TX queues belonging to a channel */
|
/* Iterate over all possible TX queues belonging to a channel */
|
||||||
#define efx_for_each_possible_channel_tx_queue(_tx_queue, _channel) \
|
#define efx_for_each_possible_channel_tx_queue(_tx_queue, _channel) \
|
||||||
|
if (!efx_channel_has_tx_queues(_channel)) \
|
||||||
|
; \
|
||||||
|
else \
|
||||||
for (_tx_queue = (_channel)->tx_queue; \
|
for (_tx_queue = (_channel)->tx_queue; \
|
||||||
_tx_queue < (_channel)->tx_queue + EFX_TXQ_TYPES; \
|
_tx_queue < (_channel)->tx_queue + EFX_TXQ_TYPES; \
|
||||||
_tx_queue++)
|
_tx_queue++)
|
||||||
|
Loading…
Reference in New Issue
Block a user