lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon,  1 Apr 2019 11:40:26 +0200
From:   Jiri Pirko <>
Subject: [patch net-next v2 12/12] net: devlink: add warning for ndo_get_port_parent_id set when not needed

From: Jiri Pirko <>

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 <>
- new patch
 net/core/devlink.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/core/devlink.c b/net/core/devlink.c
index d9fbf94ea2a3..7b9eb14d4ea9 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -5376,6 +5376,7 @@ void devlink_port_type_eth_set(struct devlink_port *devlink_port,
 		err = ops->ndo_get_phys_port_name(netdev, name, sizeof(name));
+	WARN_ON(netdev->netdev_ops->ndo_get_port_parent_id);
 	__devlink_port_type_set(devlink_port, DEVLINK_PORT_TYPE_ETH, netdev);

Powered by blists - more mailing lists