aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
diff options
context:
space:
mode:
authorMark Bloch <markb@mellanox.com>2017-08-25 12:13:59 +0000
committerSaeed Mahameed <saeedm@mellanox.com>2017-12-28 12:36:33 +0200
commit4c66df01f5a46b191df0d036fc76cc9350280bc3 (patch)
tree9545bf17ce68766ab8af5009f6557f6cc748190a /drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
parentnet/mlx5: E-Switch, Refactor load/unload of representors (diff)
downloadlinux-dev-4c66df01f5a46b191df0d036fc76cc9350280bc3.tar.xz
linux-dev-4c66df01f5a46b191df0d036fc76cc9350280bc3.zip
net/mlx5: E-Switch, Simplify representor load/unload callback API
In the load() callback for loading representors we don't really need struct mlx5_eswitch but struct mlx5_core_dev, pass it directly. In the unload() callback for unloading representors we don't need the struct mlx5_eswitch argument, remove it. Signed-off-by: Mark Bloch <markb@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/eswitch_offloads.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index 26fbc50ddc6d..aa20f51c0a99 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -777,7 +777,7 @@ static void esw_offloads_unload_reps(struct mlx5_eswitch *esw, int nvports)
if (!rep->valid)
continue;
- rep->unload(esw, rep);
+ rep->unload(rep);
}
}
@@ -792,7 +792,7 @@ static int esw_offloads_load_reps(struct mlx5_eswitch *esw, int nvports)
if (!rep->valid)
continue;
- err = rep->load(esw, rep);
+ err = rep->load(esw->dev, rep);
if (err)
goto err_reps;
}
@@ -1193,7 +1193,7 @@ void mlx5_eswitch_unregister_vport_rep(struct mlx5_eswitch *esw,
rep = &offloads->vport_reps[vport_index];
if (esw->mode == SRIOV_OFFLOADS && esw->vports[vport_index].enabled)
- rep->unload(esw, rep);
+ rep->unload(rep);
rep->valid = false;
}