mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
net/mlx5: Separate between E-Switch and MPFS
Multi-Physical Function Switch (MPFs) is required for when multi-PF configuration is enabled to allow passing user configured unicast MAC addresses to the requesting PF. Before this patch eswitch.c used to manage the HW MPFS l2 table, E-Switch always (regardless of sriov) enabled vport(0) (NIC PF) vport's contexts update on unicast mac address list changes, to populate the PF's MPFS L2 table accordingly. In downstream patch we would like to allow compiling the driver without E-Switch functionalities, for that we move MPFS l2 table logic out of eswitch.c into its own file, and provide Kconfig flag (MLX5_MPFS) to allow compiling out MPFS for those who don't want Multi-PF support. NIC PF netdevice will now directly update MPFS l2 table via the new MPFS API. VF netdevice has no access to MPFS L2 table, so E-Switch will remain responsible of updating its MPFS l2 table on behalf of its VFs. Due to this change we also don't require enabling vport(0) (PF vport) unicast mac changes events anymore, for when SRIOV is not enabled. Which means E-Switch is now activated only on SRIOV activation, and not required otherwise. Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Cc: Jes Sorensen <jsorensen@fb.com> Cc: kernel-team@fb.com
This commit is contained in:
parent
a9f7705ffd
commit
eeb66cdb68
9 changed files with 377 additions and 221 deletions
|
@ -550,6 +550,7 @@ struct mlx5_fc_stats {
|
|||
unsigned long sampling_interval; /* jiffies */
|
||||
};
|
||||
|
||||
struct mlx5_mpfs;
|
||||
struct mlx5_eswitch;
|
||||
struct mlx5_lag;
|
||||
struct mlx5_pagefault;
|
||||
|
@ -647,6 +648,7 @@ struct mlx5_priv {
|
|||
spinlock_t ctx_lock;
|
||||
|
||||
struct mlx5_flow_steering *steering;
|
||||
struct mlx5_mpfs *mpfs;
|
||||
struct mlx5_eswitch *eswitch;
|
||||
struct mlx5_core_sriov sriov;
|
||||
struct mlx5_lag *lag;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue