nfp: devlink: initialize the devlink port attribute "lanes"
[ Upstream commit90b669d65d] 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:a21cf0a833("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e606073b77
commit
64753ac1e4
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue