Skip to content

Commit f05ec8d

Browse files
ayalevinSaeed Mahameed
authored andcommitted
net/mlx5e: Allow relaxed ordering over VFs
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 <[email protected]> Reviewed-by: Gal Pressman <[email protected]> Reviewed-by: Marina Varshaver <[email protected]> Reviewed-by: Gal Shalom <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 682adfa commit f05ec8d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/params.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,7 @@ static void mlx5e_build_rx_cq_param(struct mlx5_core_dev *mdev,
565565
static u8 rq_end_pad_mode(struct mlx5_core_dev *mdev, struct mlx5e_params *params)
566566
{
567567
bool lro_en = params->packet_merge.type == MLX5E_PACKET_MERGE_LRO;
568-
bool ro = pcie_relaxed_ordering_enabled(mdev->pdev) &&
569-
MLX5_CAP_GEN(mdev, relaxed_ordering_write);
568+
bool ro = MLX5_CAP_GEN(mdev, relaxed_ordering_write);
570569

571570
return ro && lro_en ?
572571
MLX5_WQ_END_PAD_MODE_NONE : MLX5_WQ_END_PAD_MODE_ALIGN;

drivers/net/ethernet/mellanox/mlx5/core/en_common.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@
3838

3939
void mlx5e_mkey_set_relaxed_ordering(struct mlx5_core_dev *mdev, void *mkc)
4040
{
41-
bool ro_pci_enable = pcie_relaxed_ordering_enabled(mdev->pdev);
4241
bool ro_write = MLX5_CAP_GEN(mdev, relaxed_ordering_write);
4342
bool ro_read = MLX5_CAP_GEN(mdev, relaxed_ordering_read);
4443

45-
MLX5_SET(mkc, mkc, relaxed_ordering_read, ro_pci_enable && ro_read);
46-
MLX5_SET(mkc, mkc, relaxed_ordering_write, ro_pci_enable && ro_write);
44+
MLX5_SET(mkc, mkc, relaxed_ordering_read, ro_read);
45+
MLX5_SET(mkc, mkc, relaxed_ordering_write, ro_write);
4746
}
4847

4948
static int mlx5e_create_mkey(struct mlx5_core_dev *mdev, u32 pdn,

0 commit comments

Comments
 (0)