All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, Aya Levin <ayal@nvidia.com>,
	Gal Pressman <gal@nvidia.com>,
	Marina Varshaver <marinav@nvidia.com>,
	Gal Shalom <galshalom@nvidia.com>,
	Saeed Mahameed <saeedm@nvidia.com>
Subject: [net-next 10/16] net/mlx5e: Allow relaxed ordering over VFs
Date: Tue, 17 May 2022 23:49:32 -0700	[thread overview]
Message-ID: <20220518064938.128220-11-saeed@kernel.org> (raw)
In-Reply-To: <20220518064938.128220-1-saeed@kernel.org>

From: Aya Levin <ayal@nvidia.com>

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 | 3 +--
 drivers/net/ethernet/mellanox/mlx5/core/en_common.c | 5 ++---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
index 3c1edfa33aa7..68364484a435 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
@@ -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;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_common.c b/drivers/net/ethernet/mellanox/mlx5/core/en_common.c
index c0f409c195bf..43a536cb81db 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_common.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_common.c
@@ -38,12 +38,11 @@
 
 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,
-- 
2.36.1


  parent reply	other threads:[~2022-05-18  6:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18  6:49 [pull request][net-next 00/16] mlx5 updates 2022-05-17 Saeed Mahameed
2022-05-18  6:49 ` [net-next 01/16] net/mlx5: sparse: error: context imbalance in 'mlx5_vf_get_core_dev' Saeed Mahameed
2022-05-18 11:10   ` patchwork-bot+netdevbpf
2022-05-18  6:49 ` [net-next 02/16] net/mlx5: Add last command failure syndrome to debugfs Saeed Mahameed
2022-05-18  6:49 ` [net-next 03/16] net/mlx5: Inline db alloc API function Saeed Mahameed
2022-05-18  6:49 ` [net-next 04/16] net/mlx5: Allocate virtually contiguous memory in vport.c Saeed Mahameed
2022-05-18  6:49 ` [net-next 05/16] net/mlx5: Allocate virtually contiguous memory in pci_irq.c Saeed Mahameed
2022-05-18  6:49 ` [net-next 06/16] net/mlx5e: Allocate virtually contiguous memory for VLANs list Saeed Mahameed
2022-05-18  6:49 ` [net-next 07/16] net/mlx5e: Allocate virtually contiguous memory for reps structures Saeed Mahameed
2022-05-18  6:49 ` [net-next 08/16] net/mlx5e: IPoIB, Improve ethtool rxnfc callback structure in IPoIB Saeed Mahameed
2022-05-18  6:49 ` [net-next 09/16] net/mlx5e: Support partial GSO for tunnels over vlans Saeed Mahameed
2022-05-18  6:49 ` Saeed Mahameed [this message]
2022-05-18  6:49 ` [net-next 11/16] net/mlx5e: CT: Add ct driver counters Saeed Mahameed
2022-05-18  6:49 ` [net-next 12/16] net/mlx5e: Correct the calculation of max channels for rep Saeed Mahameed
2022-05-18  6:49 ` [net-next 13/16] net/mlx5e: Add XDP SQs to uplink representors steering tables Saeed Mahameed
2022-05-18  6:49 ` [net-next 14/16] net/mlx5: Lag, refactor lag state machine Saeed Mahameed
2022-05-18  6:49 ` [net-next 15/16] net/mlx5: Remove unused argument Saeed Mahameed
2022-05-18  6:49 ` [net-next 16/16] net/mlx5: Support multiport eswitch mode Saeed Mahameed
2022-05-19  0:21   ` Jakub Kicinski
2022-05-19  4:26     ` Saeed Mahameed
2022-05-19  4:36       ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220518064938.128220-11-saeed@kernel.org \
    --to=saeed@kernel.org \
    --cc=ayal@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=gal@nvidia.com \
    --cc=galshalom@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=marinav@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.