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  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]
Date:   Thu, 26 Oct 2017 17:36:11 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel@...oirfairelinux.com,
        "David S. Miller" <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>,
        Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH net-next 7/9] net: dsa: define port types

Thu, Oct 26, 2017 at 05:22:57PM CEST, vivien.didelot@...oirfairelinux.com wrote:
>Introduce an enumerated type for ports, which will be way more explicit
>to identify a port type instead of digging into switch port masks.
>
>A port can be of type CPU, DSA, user, or unused by default. This is a
>static parsed information that cannot be changed at runtime.
>
>Signed-off-by: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
>---
> include/net/dsa.h | 7 +++++++
> net/dsa/dsa2.c    | 3 +++
> net/dsa/legacy.c  | 6 ++++++
> 3 files changed, 16 insertions(+)
>
>diff --git a/include/net/dsa.h b/include/net/dsa.h
>index dc7728062396..8da20c4a6552 100644
>--- a/include/net/dsa.h
>+++ b/include/net/dsa.h
>@@ -180,6 +180,13 @@ struct dsa_port {
> 	struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev,
> 			       struct packet_type *pt);
> 
>+	enum {
>+		DSA_PORT_TYPE_UNUSED = 0,
>+		DSA_PORT_TYPE_CPU,
>+		DSA_PORT_TYPE_DSA,
>+		DSA_PORT_TYPE_USER,

Do you plan to expose this to userspace? How?

Powered by blists - more mailing lists