net/mlx5: E-Switch, Normalize the name of uplink vport number
Driver used to name uplink vport as FDB_UPLINK_VPORT, it's hard to comply with the same naming convention along with the introduction of other vports. Use MLX5_VPORT as the prefix for such vports and relocate the uplink vport definition to public header file for the benefits of both net and IB drivers. 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>
This commit is contained in:

committed by
Saeed Mahameed

parent
feb3936933
commit
b05af6aacd
@@ -3,6 +3,7 @@
|
||||
* Copyright (c) 2018 Mellanox Technologies. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/mlx5/vport.h>
|
||||
#include "ib_rep.h"
|
||||
#include "srq.h"
|
||||
|
||||
@@ -48,11 +49,10 @@ static const struct mlx5_ib_profile vf_rep_profile = {
|
||||
static int
|
||||
mlx5_ib_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
|
||||
{
|
||||
#define FDB_UPLINK_VPORT 0xffff
|
||||
const struct mlx5_ib_profile *profile;
|
||||
struct mlx5_ib_dev *ibdev;
|
||||
|
||||
if (rep->vport == FDB_UPLINK_VPORT)
|
||||
if (rep->vport == MLX5_VPORT_UPLINK)
|
||||
profile = &uplink_rep_profile;
|
||||
else
|
||||
profile = &vf_rep_profile;
|
||||
|
Reference in New Issue
Block a user