summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
diff options
context:
space:
mode:
authorMohamad Haj Yahia2016-05-03 16:14:03 +0200
committerDavid S. Miller2016-05-04 20:04:48 +0200
commita35f71f27a614aff106cc89b86168962bce2725f (patch)
treeb111d4eaa0e442f4b18f18e0e0b58a2443e5ac90 /drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
parentnet/mlx5: E-Switch, Add promiscuous and allmulti FDB flowtable groups (diff)
downloadkernel-qcow2-linux-a35f71f27a614aff106cc89b86168962bce2725f.tar.gz
kernel-qcow2-linux-a35f71f27a614aff106cc89b86168962bce2725f.tar.xz
kernel-qcow2-linux-a35f71f27a614aff106cc89b86168962bce2725f.zip
net/mlx5: E-Switch, Implement promiscuous rx modes vf request handling
Add promisc_change as a trigger to vport context change event. Add set vport promisc/allmulti functions to add vport to promiscuous flowtable rules. Upon promisc/allmulti rx mode vf request add the vport to the relevant promiscuous group (Allmulti/Promisc group) so the relevant traffic will be forwarded to it. Upon allmulti vf request add the vport to each existing multicast fdb rule. Upon adding/removing mcast address from a vport, update all other allmulti vports. Signed-off-by: Mohamad Haj Yahia <mohamad@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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
index 36e87cbad5fb..a39f18e3bd18 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
@@ -111,6 +111,8 @@ struct mlx5_vport {
int vport;
struct hlist_head uc_list[MLX5_L2_ADDR_HASH_SIZE];
struct hlist_head mc_list[MLX5_L2_ADDR_HASH_SIZE];
+ struct mlx5_flow_rule *promisc_rule;
+ struct mlx5_flow_rule *allmulti_rule;
struct work_struct vport_change_handler;
struct vport_ingress ingress;
@@ -119,6 +121,7 @@ struct mlx5_vport {
u16 vlan;
u8 qos;
bool spoofchk;
+ bool trusted;
bool enabled;
u16 enabled_events;
};
@@ -149,6 +152,7 @@ struct mlx5_eswitch {
* and async SRIOV admin state changes
*/
struct mutex state_lock;
+ struct esw_mc_addr *mc_promisc;
};
/* E-Switch API */