OSDN Git Service

net: devlink: add warning for ndo_get_port_parent_id set when not needed
authorJiri Pirko <jiri@mellanox.com>
Wed, 3 Apr 2019 12:24:27 +0000 (14:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Apr 2019 00:42:36 +0000 (17:42 -0700)
commit119c0b5721da9d97f95202c4ad1be2919dac64b0
tree4ed514e63ea3eecef324d74d6fd6a32214285a6e
parent15b04aceeb83086ea3109c331cb7d8c2767fa0c6
net: devlink: add warning for ndo_get_port_parent_id set when not needed

Currently if the driver registers devlink port instance, he should set
the devlink port attributes as well. Then the devlink core is able to
obtain switch id itself, no need for driver to implement the ndo.
Once all drivers will implement devlink port registration, this ndo
should be removed. This warning guides new drivers to do things as
they should be done.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/devlink.c