aboutsummaryrefslogtreecommitdiff
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorMaxim Mikityanskiy <maximmi@nvidia.com>2022-01-25 12:52:57 +0200
committerSaeed Mahameed <saeedm@nvidia.com>2022-02-14 22:30:51 -0800
commit3c87aedd48997f9ab3afdeb2084f6b6163a21db8 (patch)
tree8aad713fe496497d53263df7fee1a91e2c887519 /net/switchdev/switchdev.c
parented5f9cf06b20f74c1098d6d62313e3e9af217fcb (diff)
downloadlinux-3c87aedd48997f9ab3afdeb2084f6b6163a21db8.tar.gz
linux-3c87aedd48997f9ab3afdeb2084f6b6163a21db8.tar.bz2
linux-3c87aedd48997f9ab3afdeb2084f6b6163a21db8.zip
net/mlx5e: Optimize mlx5e_select_queue
This commit optimizes mlx5e_select_queue for HTB and PTP cases by short-cutting some checks, without sacrificing performance of the common non-HTB non-PTP flow. 1. The HTB flow uses the fact that num_tcs == 1 to drop these checks (it's not possible to attach both mqprio and htb as the root qdisc). It's also enough to calculate `txq_ix % num_channels` only once, instead of twice. 2. The PTP flow drops the check for HTB and the second calculation of `txq_ix % num_channels`. Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions