On Tue, Jan 19, 2021 at 12:56:10PM +0100, Jiri Pirko wrote: > Thu, Jan 14, 2021 at 03:07:18AM CET, and...@lunn.ch wrote: > >> $ devlink lc provision netdevsim/netdevsim10 lc 0 type card4ports > >> $ devlink lc > >> netdevsim/netdevsim10: > >> lc 0 state provisioned type card4ports > >> supported_types: > >> card1port card2ports card4ports > >> lc 1 state unprovisioned > >> supported_types: > >> card1port card2ports card4ports > > > >Hi Jiri > > > >> # Now activate the line card using debugfs. That emulates plug-in event > >> # on real hardware: > >> $ echo "Y"> /sys/kernel/debug/netdevsim/netdevsim10/linecards/0/active > >> $ ip link show eni10nl0p1 > >> 165: eni10nl0p1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue > >> state UP mode DEFAULT group default qlen 1000 > >> link/ether 7e:2d:05:93:d3:d1 brd ff:ff:ff:ff:ff:ff > >> # The carrier is UP now. > > > >What is missing from the devlink lc view is what line card is actually > >in the slot. Say if i provision for a card4port, but actually insert a > >card2port. It would be nice to have something like: > > I checked, our hw does not support that. Only provides info that > linecard activation was/wasn't successful.
Hi Jiri Is this a firmware limitation? There is no API to extract the information from the firmware to the host? The firmware itself knows there is a mismatch and refuses to configure the line card, and prevents the MAC going up? Even if you cannot do this now, it seems likely in future firmware versions you will be able to, so maybe at least define the netlink attributes now? As well as attributes indicating activation was successful. Andrew