The current check relies on function BDF addresses and can get us wrong e.g when two VFs are assigned into a VM and the PCI v-address is set by the hypervisor.
Unified · Split
| @@ -1970,15 +1970,15 @@ static bool actions_match_supported(struct mlx5e_priv *priv, · 1969 unmodified lines | |||
| 1970 | static bool same_hw_devs(struct mlx5e_priv *priv, struct mlx5e_priv *peer_priv) | 1970 | static bool same_hw_devs(struct mlx5e_priv *priv, struct mlx5e_priv *peer_priv) |
| 1971 | { | 1971 | { |
| 1972 | struct mlx5_core_dev *fmdev, *pmdev; | 1972 | struct mlx5_core_dev *fmdev, *pmdev; |
| 1973 | u16 func_id, peer_id; | 1973 | u64 fsystem_guid, psystem_guid; |
| 1974 | 1974 | ||
| 1975 | fmdev = priv->mdev; | 1975 | fmdev = priv->mdev; |
| 1976 | pmdev = peer_priv->mdev; | 1976 | pmdev = peer_priv->mdev; |
| 1977 | 1977 | ||
| 1978 | func_id = (u16)((fmdev->pdev->bus->number << 8) | PCI_SLOT(fmdev->pdev->devfn)); | 1978 | mlx5_query_nic_vport_system_image_guid(fmdev, &fsystem_guid); |
| 1979 | peer_id = (u16)((pmdev->pdev->bus->number << 8) | PCI_SLOT(pmdev->pdev->devfn)); | 1979 | mlx5_query_nic_vport_system_image_guid(pmdev, &psystem_guid); |
| 1980 | 1980 | ||
| 1981 | return (func_id == peer_id); | 1981 | return (fsystem_guid == psystem_guid); |
| 1982 | } | 1982 | } |
| 1983 | 1983 | ||
| 1984 | static int parse_tc_nic_actions(struct mlx5e_priv *priv, struct tcf_exts *exts, | 1984 | static int parse_tc_nic_actions(struct mlx5e_priv *priv, struct tcf_exts *exts, |