net: mana: Handle vport sharing between devices
authorLong Li <longli@microsoft.com>
Thu, 3 Nov 2022 19:16:21 +0000 (12:16 -0700)
committerLeon Romanovsky <leonro@nvidia.com>
Thu, 10 Nov 2022 05:57:26 +0000 (07:57 +0200)
commitb5c1c9855be3b5b978fde975a63df3cabc273faa
treef673c892156316e3085d390133d135e20fac9b97
parentf3dc096246091048677c45cfc0e24ad512927b52
net: mana: Handle vport sharing between devices

For outgoing packets, the PF requires the VF to configure the vport with
corresponding protection domain and doorbell ID for the kernel or user
context. The vport can't be shared between different contexts.

Implement the logic to exclusively take over the vport by either the
Ethernet device or RDMA device.

Reviewed-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Long Li <longli@microsoft.com>
Link: https://lore.kernel.org/r/1667502990-2559-4-git-send-email-longli@linuxonhyperv.com
Acked-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
drivers/net/ethernet/microsoft/mana/mana.h
drivers/net/ethernet/microsoft/mana/mana_en.c