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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190708144401.GL2201@nanopsycho>
Date:   Mon, 8 Jul 2019 16:44:01 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     Parav Pandit <parav@...lanox.com>
Cc:     netdev@...r.kernel.org, jiri@...lanox.com, saeedm@...lanox.com,
        jakub.kicinski@...ronome.com
Subject: Re: [PATCH net-next v5 1/5] devlink: Refactor physical port
 attributes

Mon, Jul 08, 2019 at 06:15:45AM CEST, parav@...lanox.com wrote:
>To support additional devlink port flavours and to support few common
>and few different port attributes, move physical port attributes to a
>different structure.
>
>Signed-off-by: Parav Pandit <parav@...lanox.com>
>---
>Changelog:
>v4->v5:
> - Addressed comments from Jiri.
> - Moved check for physical port flavours check to separate patch.
>v3->v4:
> - Addressed comments from Jiri.
> - Renamed phys_port to physical to be consistent with pci_pf.
> - Removed port_number from __devlink_port_attrs_set and moved
>   assigment to caller function.
> - Used capital letter while moving old comment to new structure.
> - Removed helper function is_devlink_phy_port_num_supported().
>v2->v3:
> - Address comments from Jakub.
> - Made port_number and split_port_number applicable only to
>   physical port flavours by having in union.
>v1->v2:
> - Limited port_num attribute to physical ports
> - Updated PCI PF attribute set API to not have port_number
>---
> include/net/devlink.h | 13 ++++++++--
> net/core/devlink.c    | 59 ++++++++++++++++++++++++++++---------------
> 2 files changed, 50 insertions(+), 22 deletions(-)
>
>diff --git a/include/net/devlink.h b/include/net/devlink.h
>index 6625ea068d5e..c79a1370867a 100644
>--- a/include/net/devlink.h
>+++ b/include/net/devlink.h
>@@ -38,14 +38,23 @@ struct devlink {
> 	char priv[0] __aligned(NETDEV_ALIGN);
> };
> 
>+struct devlink_port_phys_attrs {
>+	u32 port_number; /* Same value as "split group".
>+			  * A physical port which is visible to the user
>+			  * for a given port flavour.
>+			  */
>+	u32 split_subport_number;
>+};
>+
> struct devlink_port_attrs {
> 	u8 set:1,
> 	   split:1,
> 	   switch_port:1;
> 	enum devlink_port_flavour flavour;
>-	u32 port_number; /* same value as "split group" */
>-	u32 split_subport_number;
> 	struct netdev_phys_item_id switch_id;
>+	union {
>+		struct devlink_port_phys_attrs physical;

You can shorten this to just "phys". Would be better.
With that
Acked-by: Jiri Pirko <jiri@...lanox.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ