summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
diff options
context:
space:
mode:
authorBodong Wang2019-02-13 07:55:42 +0100
committerSaeed Mahameed2019-02-14 21:14:42 +0100
commitcd7e4186af9d968559852b4eeb1039b3419cc590 (patch)
tree38f673a16ba1f523b314da0dfdde24fbc60bab01 /drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
parentnet/mlx5: Relocate vport macros to the vport header file (diff)
downloadkernel-qcow2-linux-cd7e4186af9d968559852b4eeb1039b3419cc590.tar.gz
kernel-qcow2-linux-cd7e4186af9d968559852b4eeb1039b3419cc590.tar.xz
kernel-qcow2-linux-cd7e4186af9d968559852b4eeb1039b3419cc590.zip
net/mlx5: E-Switch, Avoid magic numbers when initializing offloads mode
When dealing with the offloads mode initialization, driver refers to the number of VFs and add magic number one (1) to take account of the uplink. This is not clear and will make the code less readable after adding other vports (e.g. host PF). As these are special vports compared to VF vports, add a helper macro to denote such special vports and eliminate the use of magic number. Moreover, when creating offloads flow table and groups, the driver reserves two more slots for UC and MC miss rules. Replace this magic number with a helper macro as well. This patch doesn't change any functionality. Signed-off-by: Bodong Wang <bodong@mellanox.com> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c')
0 files changed, 0 insertions, 0 deletions