net/mlx5e: Allow relaxed ordering over VFs
authorAya Levin <ayal@nvidia.com>
Mon, 11 Apr 2022 06:27:39 +0000 (09:27 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 18 May 2022 06:41:47 +0000 (23:41 -0700)
By PCI spec, the config space of the VF always report relaxed ordering
not supported while it inherits this property from its PF. Hence using
pcie_relaxed_ordering_enable(), always disables the relaxed ordering on
all VFs. Remove this check and rely on the firmware which queries the
config space of the PF and set the capability bit accordingly.

Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Marina Varshaver <marinav@nvidia.com>
Reviewed-by: Gal Shalom <galshalom@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/params.c
drivers/net/ethernet/mellanox/mlx5/core/en_common.c

index 3c1edfa33aa79642e693c37b4eaeaa2ed4929210..68364484a435470f69338f551f5f144e3eb9d820 100644 (file)
@@ -565,8 +565,7 @@ static void mlx5e_build_rx_cq_param(struct mlx5_core_dev *mdev,
 static u8 rq_end_pad_mode(struct mlx5_core_dev *mdev, struct mlx5e_params *params)
 {
        bool lro_en = params->packet_merge.type == MLX5E_PACKET_MERGE_LRO;
-       bool ro = pcie_relaxed_ordering_enabled(mdev->pdev) &&
-               MLX5_CAP_GEN(mdev, relaxed_ordering_write);
+       bool ro = MLX5_CAP_GEN(mdev, relaxed_ordering_write);
 
        return ro && lro_en ?
                MLX5_WQ_END_PAD_MODE_NONE : MLX5_WQ_END_PAD_MODE_ALIGN;
index c0f409c195bf8dc20a9b7433469af8397f110b1a..43a536cb81db3e9539553870bb68316d154f7e6e 100644 (file)
 
 void mlx5e_mkey_set_relaxed_ordering(struct mlx5_core_dev *mdev, void *mkc)
 {
-       bool ro_pci_enable = pcie_relaxed_ordering_enabled(mdev->pdev);
        bool ro_write = MLX5_CAP_GEN(mdev, relaxed_ordering_write);
        bool ro_read = MLX5_CAP_GEN(mdev, relaxed_ordering_read);
 
-       MLX5_SET(mkc, mkc, relaxed_ordering_read, ro_pci_enable && ro_read);
-       MLX5_SET(mkc, mkc, relaxed_ordering_write, ro_pci_enable && ro_write);
+       MLX5_SET(mkc, mkc, relaxed_ordering_read, ro_read);
+       MLX5_SET(mkc, mkc, relaxed_ordering_write, ro_write);
 }
 
 static int mlx5e_create_mkey(struct mlx5_core_dev *mdev, u32 pdn,