* [PATCH net-next] net/mlx5e: Rename state_destroy to rx_mode_active in flow steering
@ 2026-10-11 9:31 Tariq Toukan
2026-10-12 18:39 ` Joe Damato
0 siblings, 1 reply; 2+ messages in thread
From: Tariq Toukan @ 2026-10-11 9:31 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
netdev, Paolo Abeni
Cc: Aleksandr Loktionov, Alexei Lazar, Cosmin Ratiu, Dragos Tatulea,
Gal Pressman, Leon Romanovsky, open list, linux-rdma, Mark Bloch,
Saeed Mahameed, Shahar Shitrit, Stanislav Fomichev,
Stanislav Fomichev, Tariq Toukan
From: Alexei Lazar <alazar@nvidia.com>
This flag controls the enablement of RX mode handling (promisc,
allmulti, broadcast, netdev addr sync). It acts as a safeguard
that prevents new FS (flow steering) operations during device
teardown. When the device is in destroying state it is set to
false to indicate RX mode operations are not allowed.
Its name is misleading, as it suggests a destroy-state flag
rather than RX mode activity. Rename it for clarity.
No functional change.
Signed-off-by: Alexei Lazar <alazar@nvidia.com>
Reviewed-by: Shahar Shitrit <shshitrit@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/fs.h | 5 +++--
drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 17 +++++++++--------
.../net/ethernet/mellanox/mlx5/core/en_main.c | 15 +++++++++------
3 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/fs.h b/drivers/net/ethernet/mellanox/mlx5/core/en/fs.h
index 4973fb473ff0..aa370227b7bc 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/fs.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/fs.h
@@ -158,7 +158,7 @@ void mlx5e_destroy_flow_steering(struct mlx5e_flow_steering *fs, bool ntuple,
struct mlx5e_flow_steering *mlx5e_fs_init(const struct mlx5e_profile *profile,
struct mlx5_core_dev *mdev,
- bool state_destroy,
+ bool rx_mode_active,
struct dentry *dfs_root);
void mlx5e_fs_cleanup(struct mlx5e_flow_steering *fs);
struct mlx5e_vlan_table *mlx5e_fs_get_vlan(struct mlx5e_flow_steering *fs);
@@ -198,7 +198,8 @@ void mlx5e_fs_set_udp(struct mlx5e_flow_steering *fs, struct mlx5e_fs_udp *udp);
struct mlx5e_accel_fs_tcp *mlx5e_fs_get_accel_tcp(struct mlx5e_flow_steering *fs);
void mlx5e_fs_set_accel_tcp(struct mlx5e_flow_steering *fs, struct mlx5e_accel_fs_tcp *accel_tcp);
#endif
-void mlx5e_fs_set_state_destroy(struct mlx5e_flow_steering *fs, bool state_destroy);
+void mlx5e_fs_set_rx_mode_active(struct mlx5e_flow_steering *fs,
+ bool rx_mode_active);
void mlx5e_fs_set_vlan_strip_disable(struct mlx5e_flow_steering *fs, bool vlan_strip_disable);
struct mlx5_core_dev *mlx5e_fs_get_mdev(struct mlx5e_flow_steering *fs);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
index 12492c4a5d41..c19238bc821f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
@@ -44,7 +44,7 @@
struct mlx5e_flow_steering {
struct work_struct set_rx_mode_work;
- bool state_destroy;
+ bool rx_mode_active;
bool vlan_strip_disable;
struct mlx5_core_dev *mdev;
struct mlx5_flow_namespace *ns;
@@ -560,7 +560,7 @@ static void mlx5e_del_vlan_rules(struct mlx5e_flow_steering *fs)
for_each_set_bit(i, fs->vlan->active_svlans, VLAN_N_VID)
mlx5e_fs_del_vlan_rule(fs, MLX5E_VLAN_RULE_TYPE_MATCH_STAG_VID, i);
- WARN_ON_ONCE(fs->state_destroy);
+ WARN_ON_ONCE(fs->rx_mode_active);
mlx5e_remove_vlan_trap(fs);
@@ -743,7 +743,7 @@ static void mlx5e_handle_netdev_addr(struct mlx5e_flow_steering *fs,
mlx5e_for_each_hash_node(hn, tmp, fs->l2.netdev_mc, i)
hn->action = MLX5E_ACTION_DEL;
- if (fs->state_destroy)
+ if (fs->rx_mode_active)
mlx5e_sync_netdev_addr(fs, netdev, uc, mc);
mlx5e_apply_netdev_addr(fs);
@@ -840,7 +840,7 @@ void mlx5e_fs_set_rx_mode_work(struct mlx5e_flow_steering *fs,
goto update_vport_context;
}
- bool rx_mode_enable = fs->state_destroy;
+ bool rx_mode_enable = fs->rx_mode_active;
bool promisc_enabled = rx_mode_enable && (netdev->flags & IFF_PROMISC);
bool allmulti_enabled = rx_mode_enable && (netdev->flags & IFF_ALLMULTI);
bool broadcast_enabled = rx_mode_enable;
@@ -1479,7 +1479,7 @@ static void mlx5e_fs_debugfs_init(struct mlx5e_flow_steering *fs,
struct mlx5e_flow_steering *mlx5e_fs_init(const struct mlx5e_profile *profile,
struct mlx5_core_dev *mdev,
- bool state_destroy,
+ bool rx_mode_active,
struct dentry *dfs_root)
{
struct mlx5e_flow_steering *fs;
@@ -1490,7 +1490,7 @@ struct mlx5e_flow_steering *mlx5e_fs_init(const struct mlx5e_profile *profile,
goto err;
fs->mdev = mdev;
- fs->state_destroy = state_destroy;
+ fs->rx_mode_active = rx_mode_active;
if (mlx5e_profile_feature_cap(profile, FS_VLAN)) {
err = mlx5e_fs_vlan_alloc(fs);
if (err)
@@ -1606,9 +1606,10 @@ void mlx5e_fs_set_accel_tcp(struct mlx5e_flow_steering *fs, struct mlx5e_accel_f
}
#endif
-void mlx5e_fs_set_state_destroy(struct mlx5e_flow_steering *fs, bool state_destroy)
+void mlx5e_fs_set_rx_mode_active(struct mlx5e_flow_steering *fs,
+ bool rx_mode_active)
{
- fs->state_destroy = state_destroy;
+ fs->rx_mode_active = rx_mode_active;
}
void mlx5e_fs_set_vlan_strip_disable(struct mlx5e_flow_steering *fs,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index f90b5a34e097..478b5956044b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -6557,8 +6557,9 @@ int mlx5e_attach_netdev(struct mlx5e_priv *priv)
clear_bit(MLX5E_STATE_DESTROYING, &priv->state);
if (priv->fs)
- mlx5e_fs_set_state_destroy(priv->fs,
- !test_bit(MLX5E_STATE_DESTROYING, &priv->state));
+ mlx5e_fs_set_rx_mode_active(priv->fs,
+ !test_bit(MLX5E_STATE_DESTROYING,
+ &priv->state));
/* Validate the max_wqe_size_sq capability. */
if (WARN_ON_ONCE(mlx5e_get_max_sq_wqebbs(priv->mdev) < MLX5E_MAX_TX_WQEBBS)) {
@@ -6638,8 +6639,9 @@ int mlx5e_attach_netdev(struct mlx5e_priv *priv)
mlx5e_reset_channels(priv->netdev);
set_bit(MLX5E_STATE_DESTROYING, &priv->state);
if (priv->fs)
- mlx5e_fs_set_state_destroy(priv->fs,
- !test_bit(MLX5E_STATE_DESTROYING, &priv->state));
+ mlx5e_fs_set_rx_mode_active(priv->fs,
+ !test_bit(MLX5E_STATE_DESTROYING,
+ &priv->state));
cancel_work_sync(&priv->update_stats_work);
return err;
}
@@ -6650,8 +6652,9 @@ void mlx5e_detach_netdev(struct mlx5e_priv *priv)
set_bit(MLX5E_STATE_DESTROYING, &priv->state);
if (priv->fs)
- mlx5e_fs_set_state_destroy(priv->fs,
- !test_bit(MLX5E_STATE_DESTROYING, &priv->state));
+ mlx5e_fs_set_rx_mode_active(priv->fs,
+ !test_bit(MLX5E_STATE_DESTROYING,
+ &priv->state));
if (profile->disable)
profile->disable(priv);
base-commit: d8674294aefef02266c4d47ad10131f1bffbe534
--
2.44.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH net-next] net/mlx5e: Rename state_destroy to rx_mode_active in flow steering
2026-10-11 9:31 [PATCH net-next] net/mlx5e: Rename state_destroy to rx_mode_active in flow steering Tariq Toukan
@ 2026-10-12 18:39 ` Joe Damato
0 siblings, 0 replies; 2+ messages in thread
From: Joe Damato @ 2026-10-12 18:39 UTC (permalink / raw)
To: Tariq Toukan
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
netdev, Paolo Abeni, Aleksandr Loktionov, Alexei Lazar,
Cosmin Ratiu, Dragos Tatulea, Gal Pressman, Leon Romanovsky,
open list, linux-rdma, Mark Bloch, Saeed Mahameed,
Shahar Shitrit, Stanislav Fomichev, Stanislav Fomichev
On Sun, Oct 11, 2026 at 12:31:00PM +0300, Tariq Toukan wrote:
> From: Alexei Lazar <alazar@nvidia.com>
>
> This flag controls the enablement of RX mode handling (promisc,
> allmulti, broadcast, netdev addr sync). It acts as a safeguard
> that prevents new FS (flow steering) operations during device
> teardown. When the device is in destroying state it is set to
> false to indicate RX mode operations are not allowed.
> Its name is misleading, as it suggests a destroy-state flag
> rather than RX mode activity. Rename it for clarity.
>
> No functional change.
>
> Signed-off-by: Alexei Lazar <alazar@nvidia.com>
> Reviewed-by: Shahar Shitrit <shshitrit@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en/fs.h | 5 +++--
> drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 17 +++++++++--------
> .../net/ethernet/mellanox/mlx5/core/en_main.c | 15 +++++++++------
> 3 files changed, 21 insertions(+), 16 deletions(-)
Reviewed-by: Joe Damato <joe@dama.to>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-12 18:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-11 9:31 [PATCH net-next] net/mlx5e: Rename state_destroy to rx_mode_active in flow steering Tariq Toukan
2026-10-12 18:39 ` Joe Damato
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®