net/mlx5e: E-Switch, Check device is PF when stopping esw offloads
authorRoi Dayan <roid@nvidia.com>
Sun, 23 Apr 2023 07:53:18 +0000 (10:53 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 19 May 2023 17:50:30 +0000 (10:50 -0700)
commitbea416c7e970399b438b801a9f3ffa24c4ddf855
tree40e66288aebd58160c41b7051b7f00f81ad15501
parent6cb9318a2534b7081eb9f375a720972f811665f6
net/mlx5e: E-Switch, Check device is PF when stopping esw offloads

Checking sriov is done on the pci device so it can return true
on other devices like SF but nothing should be done in this case.
Add a check that the device is PF.

Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c