Check all booleans for special queues at once, when deciding whether to
go to the fast path in mlx5e_select_queue. Pack them into bitfields to
have some room for extensibility.
Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
unsigned int num_regular_queues;
unsigned int num_channels;
unsigned int num_tcs;
- bool is_htb;
- bool is_ptp;
+ union {
+ u8 is_special_queues;
+ struct {
+ bool is_htb : 1;
+ bool is_ptp : 1;
+ };
+ };
};
int mlx5e_selq_init(struct mlx5e_selq *selq, struct mutex *state_lock)
if (unlikely(!selq))
return 0;
- if (likely(!selq->is_ptp && !selq->is_htb)) {
+ if (likely(!selq->is_special_queues)) {
/* No special queues, netdev_pick_tx returns one of the regular ones. */
txq_ix = netdev_pick_tx(dev, skb, NULL);