diff options
author | Konstantin Taranov <kotaranov@microsoft.com> | 2024-07-11 06:37:57 -0700 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2024-07-14 10:49:53 +0300 |
commit | 1df03a4b44146c4f720d793915747272c7773a3e (patch) | |
tree | ffcfbab88d9ac8259a1db66b13fdb0afc047dee9 /include/net | |
parent | 95b087f87b780daafad1dbb2c84e81b729d5d33f (diff) |
RDMA/mana_ib: Set correct device into ib
Add mana_get_primary_netdev_rcu helper to get a primary
netdevice for a given port. When mana is used with
netvsc, the VF netdev is controlled by an upper netvsc
device. In a baremetal case, the VF netdev is the
primary device.
Use the mana_get_primary_netdev_rcu() helper in the mana_ib
to get the correct device for querying network states.
Fixes: 8b184e4f1c32 ("RDMA/mana_ib: Enable RoCE on port 1")
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Link: https://lore.kernel.org/r/1720705077-322-1-git-send-email-kotaranov@linux.microsoft.com
Reviewed-by: Long Li <longli@microsoft.com>
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/mana/mana.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/mana/mana.h b/include/net/mana/mana.h index 59823901b74f..f9b4b0dcb69f 100644 --- a/include/net/mana/mana.h +++ b/include/net/mana/mana.h @@ -797,4 +797,6 @@ void mana_destroy_wq_obj(struct mana_port_context *apc, u32 wq_type, int mana_cfg_vport(struct mana_port_context *apc, u32 protection_dom_id, u32 doorbell_pg_id); void mana_uncfg_vport(struct mana_port_context *apc); + +struct net_device *mana_get_primary_netdev_rcu(struct mana_context *ac, u32 port_index); #endif /* _MANA_H */ |