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, Maxim Mikityanskiy <maximmi@nvidia.com>,
Tariq Toukan <tariqt@nvidia.com>,
Saeed Mahameed <saeedm@nvidia.com>
Subject: [net 6/7] net/mlx5e: Update netdev features after changing XDP state
Date: Tue, 31 May 2022 13:54:46 -0700 [thread overview]
Message-ID: <20220531205447.99236-7-saeed@kernel.org> (raw)
In-Reply-To: <20220531205447.99236-1-saeed@kernel.org>
From: Maxim Mikityanskiy <maximmi@nvidia.com>
Some features (LRO, HW GRO) conflict with XDP. If there is an attempt to
enable such features while XDP is active, they will be set to `off
[requested on]`. In order to activate these features after XDP is turned
off, the driver needs to call netdev_update_features(). This commit adds
this missing call after XDP state changes.
Fixes: cf6e34c8c22f ("net/mlx5e: Properly block LRO when XDP is enabled")
Fixes: b0617e7b3500 ("net/mlx5e: Properly block HW GRO when XDP is enabled")
Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 930a5402c817..087952b84ccb 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -4569,6 +4569,11 @@ static int mlx5e_xdp_set(struct net_device *netdev, struct bpf_prog *prog)
unlock:
mutex_unlock(&priv->state_lock);
+
+ /* Need to fix some features. */
+ if (!err)
+ netdev_update_features(netdev);
+
return err;
}
--
2.36.1
next prev parent reply other threads:[~2022-05-31 20:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-31 20:54 [pull request][net 0/7] mlx5 fixes 2022-05-31 Saeed Mahameed
2022-05-31 20:54 ` [net 1/7] net/mlx5: Don't use already freed action pointer Saeed Mahameed
2022-06-02 1:20 ` patchwork-bot+netdevbpf
2022-05-31 20:54 ` [net 2/7] net/mlx5e: TC NIC mode, fix tc chains miss table Saeed Mahameed
2022-05-31 20:54 ` [net 3/7] net/mlx5: CT: Fix header-rewrite re-use for tupels Saeed Mahameed
2022-05-31 20:54 ` [net 4/7] net/mlx5e: Disable softirq in mlx5e_activate_rq to avoid race condition Saeed Mahameed
2022-05-31 20:54 ` [net 5/7] net/mlx5: correct ECE offset in query qp output Saeed Mahameed
2022-05-31 20:54 ` Saeed Mahameed [this message]
2022-05-31 20:54 ` [net 7/7] net/mlx5: Fix mlx5_get_next_dev() peer device matching 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=20220531205447.99236-7-saeed@kernel.org \
--to=saeed@kernel.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=maximmi@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).