From: Saeed Mahameed <saeed@kernel•org>
To: "David S. Miller" <davem@davemloft•net>,
Jakub Kicinski <kuba@kernel•org>
Cc: netdev@vger•kernel.org, Tariq Toukan <tariqt@nvidia•com>,
Aya Levin <ayal@nvidia•com>, Moshe Shemesh <moshe@nvidia•com>,
Saeed Mahameed <saeedm@nvidia•com>
Subject: [net 7/8] net/mlx5e: Fix conflict with HW TS and CQE compression
Date: Tue, 1 Jun 2021 18:37:22 -0700 [thread overview]
Message-ID: <20210602013723.1142650-8-saeed@kernel.org> (raw)
In-Reply-To: <20210602013723.1142650-1-saeed@kernel.org>
From: Aya Levin <ayal@nvidia•com>
When a driver's profile doesn't support a dedicated PTP-RQ,
configuration of CQE compression while HW TS is configured should fail.
Fixes: 885b8cfb161e ("net/mlx5e: Update ethtool setting of CQE compression")
Signed-off-by: Aya Levin <ayal@nvidia•com>
Reviewed-by: Moshe Shemesh <moshe@nvidia•com>
Reviewed-by: Tariq Toukan <tariqt@nvidia•com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia•com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index c4724742eef1..d6513aef5cd4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -1894,6 +1894,13 @@ int mlx5e_modify_rx_cqe_compression_locked(struct mlx5e_priv *priv, bool new_val
if (curr_val == new_val)
return 0;
+ if (new_val && !priv->profile->rx_ptp_support &&
+ priv->tstamp.rx_filter != HWTSTAMP_FILTER_NONE) {
+ netdev_err(priv->netdev,
+ "Profile doesn't support enabling of CQE compression while hardware time-stamping is enabled.\n");
+ return -EINVAL;
+ }
+
new_params = priv->channels.params;
MLX5E_SET_PFLAG(&new_params, MLX5E_PFLAG_RX_CQE_COMPRESS, new_val);
if (priv->tstamp.rx_filter != HWTSTAMP_FILTER_NONE)
--
2.31.1
next prev parent reply other threads:[~2021-06-02 1:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 1:37 [pull request][net 0/8] mlx5 fixes 2021-06-01 Saeed Mahameed
2021-06-02 1:37 ` [net 1/8] net/mlx5e: Fix incompatible casting Saeed Mahameed
2021-06-02 17:10 ` Jakub Kicinski
2021-06-02 20:30 ` patchwork-bot+netdevbpf
2021-06-03 21:02 ` David Laight
2021-06-02 1:37 ` [net 2/8] net/mlx5e: Disable TLS offload for uplink representor Saeed Mahameed
2021-06-02 1:37 ` [net 3/8] net/mlx5: Check firmware sync reset requested is set before trying to abort it Saeed Mahameed
2021-06-02 1:37 ` [net 4/8] net/mlx5e: Check for needed capability for cvlan matching Saeed Mahameed
2021-06-02 1:37 ` [net 5/8] net/mlx5e: Fix adding encap rules to slow path Saeed Mahameed
2021-06-02 1:37 ` [net 6/8] net/mlx5e: Fix HW TS with CQE compression according to profile Saeed Mahameed
2021-06-02 1:37 ` Saeed Mahameed [this message]
2021-06-02 1:37 ` [net 8/8] net/mlx5: DR, Create multi-destination flow table with level less than 64 Saeed Mahameed
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=20210602013723.1142650-8-saeed@kernel.org \
--to=saeed@kernel$(echo .)org \
--cc=ayal@nvidia$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=kuba@kernel$(echo .)org \
--cc=moshe@nvidia$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=saeedm@nvidia$(echo .)com \
--cc=tariqt@nvidia$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox