lists.openwall.net   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:   Wed, 26 Jul 2017 07:48:40 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc:     netdev@...r.kernel.org, Jiri Pirko <jiri@...lanox.com>,
        Or Gerlitz <ogerlitz@...lanox.com>,
        Michael Chan <michael.chan@...adcom.com>,
        Sathya Perla <sathya.perla@...adcom.com>,
        simon.horman@...ronome.com, davem@...emloft.net
Subject: Re: [RFC] switchdev: clarify ndo_get_phys_port_name() formats

Tue, Jul 25, 2017 at 07:13:44AM CEST, jakub.kicinski@...ronome.com wrote:
>We are still in position where we can suggest uniform naming
>convention for ndo_get_phys_port_name().  switchdev.txt file
>already contained a suggestion of how to name external ports.
>Since the use of switchdev for SR-IOV NIC's eswitches is growing,
>establish a format for ports of those devices as well.
>
>Signed-off-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
>---
> Documentation/networking/switchdev.txt | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
>diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt
>index 3e7b946dea27..7c4b6025fb4b 100644
>--- a/Documentation/networking/switchdev.txt
>+++ b/Documentation/networking/switchdev.txt
>@@ -119,9 +119,17 @@ into 4 10G ports, resulting in 4 port netdevs, the device can give a unique
> SUBSYSTEM=="net", ACTION=="add", ATTR{phys_switch_id}=="<phys_switch_id>", \
> 	ATTR{phys_port_name}!="", NAME="swX$attr{phys_port_name}"
> 
>-Suggested naming convention is "swXpYsZ", where X is the switch name or ID, Y
>-is the port name or ID, and Z is the sub-port name or ID.  For example, sw1p1s0
>-would be sub-port 0 on port 1 on switch 1.
>+Suggested formats of the port name returned by ndo_get_phys_port_name are:
>+ - pA     for external ports;
>+ - pAsB   for split external ports;
>+ - pfC    for PF ports (so called PF representors);
>+ - pfCvfD for VF ports (so called VF representors).

I think it would make sense if the driver would just fill-up a struct in
the ndo call and core would generate the string.


>+Where A is the port name or ID; B is the sub-port name or ID; C is PCIe
>+Physical Function name or ID and D is PCIe Virtual Function name or ID.
>+
>+Suggested naming convention for switches is "swX", where X is the switch name
>+or ID, plus the port name.  For example, sw1p1s0 would be sub-port 0 on port 1
>+on switch 1.
> 
> Port Features
> ^^^^^^^^^^^^^
>-- 
>2.11.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ