Skip to content

Commit 90b669d

Browse files
Yinjun Zhangdavem330
authored andcommitted
nfp: devlink: initialize the devlink port attribute "lanes"
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: a21cf0a ("devlink: Add a new devlink port lanes attribute and pass to netlink") Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com> Signed-off-by: Louis Peens <louis.peens@corigine.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 542c409 commit 90b669d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/netronome/nfp/nfp_devlink.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ int nfp_devlink_port_register(struct nfp_app *app, struct nfp_port *port)
364364

365365
attrs.split = eth_port.is_split;
366366
attrs.splittable = !attrs.split;
367+
attrs.lanes = eth_port.port_lanes;
367368
attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL;
368369
attrs.phys.port_number = eth_port.label_port;
369370
attrs.phys.split_subport_number = eth_port.label_subport;

0 commit comments

Comments
 (0)