On 8/7/19 7:07 AM, Jiri Pirko wrote: > > Yeah. I believe it was a mistake to add it in the first place. Abuses > netdevsim for something it is not. I'm fine to use devlink the way you > want to after we conclude 2), but outside netdevsim. > > Again, netdevsim is there for config api testing purposes. If things > got broken, it is not that bit deal. I broke the way it is > instantiated significantly for example (iplink->sysfs). >
netdevsim was created as a way of testing hardware focused kernel APIs and code paths without hardware. yes? The devlink api was added to netdevsim to test fib notifiers failing by handlers. The notifiers were added for mlxsw - a hardware driver - as a way to get notifications of fib changes. The easiest way to test the error paths was to code limits to fib entries very similar to what mlxsw implements with its 'devlink resource' implementation. ie., to implement 'devlink resource' for a software emulated device. netdevsim was the most logical place for it. See the commit logs starting at: commit b349e0b5ec5d7be57ac243fb08ae8b994c928165 Merge: 6e2135ce54b7 37923ed6b8ce Author: David S. Miller <da...@davemloft.net> Date: Thu Mar 29 14:10:31 2018 -0400 Merge branch 'net-Allow-FIB-notifiers-to-fail-add-and-replace' David Ahern says: ==================== net: Allow FIB notifiers to fail add and replace Everything about that implementation is using the s/w device to test code paths targeted at hardware offloads.