summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
diff options
context:
space:
mode:
authorRoi Dayan2017-03-21 14:59:14 +0100
committerDavid S. Miller2017-03-22 20:11:12 +0100
commit375f51e2b5b7b9a42b3139aea519cbb1bfc5d6ef (patch)
tree26c87f5a286d8f6289ad158bae4f0955756de1a3 /drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
parentnet/mlx5e: Change the TC offload rule add/del code path to be per NIC or E-Sw... (diff)
downloadkernel-qcow2-linux-375f51e2b5b7b9a42b3139aea519cbb1bfc5d6ef.tar.gz
kernel-qcow2-linux-375f51e2b5b7b9a42b3139aea519cbb1bfc5d6ef.tar.xz
kernel-qcow2-linux-375f51e2b5b7b9a42b3139aea519cbb1bfc5d6ef.zip
net/mlx5: E-Switch, Don't allow changing inline mode when flows are configured
Changing the eswitch inline mode can potentially cause already configured flows not to match the policy. E.g. set policy L4, add some L4 rules, set policy to L2 --> bad! Hence we disallow it. Keep track of how many offloaded rules are now set and refuse inline mode changes if this isn't zero. Fixes: bffaa916588e ("net/mlx5: E-Switch, Add control for inline mode") Signed-off-by: Roi Dayan <roid@mellanox.com> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/eswitch.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/eswitch.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
index 9227a83a97e3..ad329b1680b4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
@@ -209,6 +209,7 @@ struct mlx5_esw_offload {
struct mlx5_eswitch_rep *vport_reps;
DECLARE_HASHTABLE(encap_tbl, 8);
u8 inline_mode;
+ u64 num_flows;
};
struct mlx5_eswitch {