Commit a35f71f2 authored by Mohamad Haj Yahia's avatar Mohamad Haj Yahia Committed by David S. Miller

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: default avatarMohamad Haj Yahia <mohamad@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 78a9199b
...@@ -111,6 +111,8 @@ struct mlx5_vport { ...@@ -111,6 +111,8 @@ struct mlx5_vport {
int vport; int vport;
struct hlist_head uc_list[MLX5_L2_ADDR_HASH_SIZE]; struct hlist_head uc_list[MLX5_L2_ADDR_HASH_SIZE];
struct hlist_head mc_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 work_struct vport_change_handler;
struct vport_ingress ingress; struct vport_ingress ingress;
...@@ -119,6 +121,7 @@ struct mlx5_vport { ...@@ -119,6 +121,7 @@ struct mlx5_vport {
u16 vlan; u16 vlan;
u8 qos; u8 qos;
bool spoofchk; bool spoofchk;
bool trusted;
bool enabled; bool enabled;
u16 enabled_events; u16 enabled_events;
}; };
...@@ -149,6 +152,7 @@ struct mlx5_eswitch { ...@@ -149,6 +152,7 @@ struct mlx5_eswitch {
* and async SRIOV admin state changes * and async SRIOV admin state changes
*/ */
struct mutex state_lock; struct mutex state_lock;
struct esw_mc_addr *mc_promisc;
}; };
/* E-Switch API */ /* E-Switch API */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment