net/mlx5e: Move repeating code that gets TC prio into a function
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Tue, 25 Jan 2022 10:52:55 +0000 (12:52 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 15 Feb 2022 06:30:51 +0000 (22:30 -0800)
commit62f7991feab69ed398ad6a03b911fa0ee0549516
tree010bc8b6b4e12a9384666c48dde7836957dd0279
parent3ab45777a27c5f53a55a2c353b70648449ca7a33
net/mlx5e: Move repeating code that gets TC prio into a function

Both mlx5e_select_queue and mlx5e_select_ptpsq contain the same logic to
get user priority of a packet, according to the current trust state
settings. This commit moves this repeating code to its own function.

Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/selq.c