Skip to contentSkip to conversation

nfp: devlink: initialize the devlink port attribute "lanes"

PATCH Applied Simon Horman 2 participants 2 messages Apr 21, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfp: devlink: initialize the devlink port attribute "lanes"

From: Yinjun Zhang <[email protected]>

The number of lanes of devlink port should be correctly initialized when registering the port, so that the input check when running "devlink port split <port> count <N>" can pass.

Fixes a21cf0a8330b ("devlink: Add a new devlink port lanes attribute and pass to netlink")
---
 drivers/net/ethernet/netronome/nfp/nfp_devlink.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/netronome/nfp/nfp_devlink.c +1 -0
index 713ee3041d49..bea978df7713 100644
@@ -364,6 +364,7 @@ int nfp_devlink_port_register(struct nfp_app *app, struct nfp_port *port)
 
 	attrs.split = eth_port.is_split;
 	attrs.splittable = !attrs.split;
+	attrs.lanes = eth_port.port_lanes;
 	attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL;
 	attrs.phys.port_number = eth_port.label_port;
 	attrs.phys.split_subport_number = eth_port.label_subport;
Signature · 1 line
2.20.1
#1 lore raw
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 6 lines · On Wed, 21 Apr 2021 11:24:15 +0200 you wrote:

From: Yinjun Zhang <[email protected]>

The number of lanes of devlink port should be correctly initialized when registering the port, so that the input check when running "devlink port split <port> count <N>" can pass.

Quoted 6 lines
Fixes a21cf0a8330b ("devlink: Add a new devlink port lanes attribute and pass to netlink")

[...]

Here is the summary with links:
- [net] nfp: devlink: initialize the devlink port attribute "lanes"

    https://git.kernel.org/netdev/net/c/90b669d65d99

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html