Skip to contentSkip to conversation

net/mlx5e: Allow setting MAC address of representors

PATCH Applied Tariq Toukan 3 participants 3 messages May 22, 2025 – May 27, 2025

Subsystems (5)
lore
Share & tools
lore

Tariq Toukan

author maintainer
#0 lore raw

PATCH 1/1 net/mlx5e: Allow setting MAC address of representors

From: Mark Bloch <[email protected]>

A representor netdev does not correspond to real hardware that needs to be updated when setting the MAC address. The default eth_mac_addr() is sufficient for simply updating the netdev's MAC address with validation.

---
 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +1 -0
index 2abab241f03b..79c6427433e3 100644
@@ -803,6 +803,7 @@ static const struct net_device_ops mlx5e_netdev_ops_rep = {
 	.ndo_stop                = mlx5e_rep_close,
 	.ndo_start_xmit          = mlx5e_xmit,
 	.ndo_setup_tc            = mlx5e_rep_setup_tc,
+	.ndo_set_mac_address	 = eth_mac_addr,
 	.ndo_get_stats64         = mlx5e_rep_get_stats,
 	.ndo_has_offload_stats	 = mlx5e_rep_has_offload_stats,
 	.ndo_get_offload_stats	 = mlx5e_rep_get_offload_stats,

base-commit: 3da895b23901964fcf23450f10b529d45069f333

Signature · 1 line
2.31.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Tariq Toukan

From: Mark Bloch <[email protected]>

A representor netdev does not correspond to real hardware that needs to be updated when setting the MAC address. The default eth_mac_addr() is sufficient for simply updating the netdev's MAC address with validation.

Thanks.

I note that this is consistent with at least nfp_repr_netdev_ops.

#2 lore raw
In reply to Tariq Toukan
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Quoted 11 lines · On Thu, 22 May 2025 10:13:56 +0300 you wrote:

From: Mark Bloch <[email protected]>

A representor netdev does not correspond to real hardware that needs to be updated when setting the MAC address. The default eth_mac_addr() is sufficient for simply updating the netdev's MAC address with validation.

[...]

Here is the summary with links:
- [net-next] net/mlx5e: Allow setting MAC address of representors

    https://git.kernel.org/netdev/net-next/c/f95633adc177

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html