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]
Message-ID: <25e9b8fb-5d60-93c7-4a15-64d5ff62aacd@gmail.com>
Date:   Tue, 15 Aug 2017 10:41:30 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
        netdev@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, kernel@...oirfairelinux.com,
        "David S. Miller" <davem@...emloft.net>,
        Andrew Lunn <andrew@...n.ch>,
        Egil Hjelmeland <privat@...l-hjelmeland.no>,
        John Crispin <john@...ozen.org>,
        Woojung Huh <Woojung.Huh@...rochip.com>,
        Sean Wang <sean.wang@...iatek.com>,
        Volodymyr Bendiuga <volodymyr.bendiuga@...il.com>,
        Nikita Yushchenko <nikita.yoush@...entembedded.com>,
        Maxime Hadjinlian <maxime@...ialet.com>,
        Chris Healy <cphealy@...il.com>,
        Maxim Uvarov <muvarov@...il.com>,
        Stefan Eichenberger <eichest@...il.com>,
        Jason Cobham <jcobham@...stertangent.com>,
        Juergen Borleis <jbe@...gutronix.de>,
        Tobias Waldekranz <tobias@...dekranz.com>
Subject: Re: [PATCH net-next 11/11] net: dsa: debugfs: add port vlan



On 08/14/2017 03:22 PM, Vivien Didelot wrote:
> Add a debug filesystem "vlan" entry to query a port's hardware VLAN
> entries through the .port_vlan_dump switch operation.
> 
> This is really convenient to query directly the hardware or inspect DSA
> or CPU links, since these ports are not exposed to userspace.
> 
> Here are the VLAN entries for a CPU port:
> 
>     # cat port5/vlan
>     vid 1
>     vid 42  pvid
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
> ---
>  net/dsa/debugfs.c | 33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
> 
> diff --git a/net/dsa/debugfs.c b/net/dsa/debugfs.c
> index 98c5068d20da..b00942368d29 100644
> --- a/net/dsa/debugfs.c
> +++ b/net/dsa/debugfs.c
> @@ -286,6 +286,34 @@ static const struct dsa_debugfs_ops dsa_debugfs_tree_ops = {
>  	.read = dsa_debugfs_tree_read,
>  };
>  
> +static int dsa_debugfs_vlan_dump_cb(u16 vid, bool pvid, bool untagged,
> +				    void *data)
> +{
> +	struct seq_file *seq = data;
> +
> +	seq_printf(seq, "vid %d", vid);
> +	if (pvid)
> +		seq_puts(seq, "  pvid");
> +	if (untagged)
> +		seq_puts(seq, "  untagged");

Personal preference: could we just specify something like:

vid 1 (t)
vid 42 (u) pvid

to clearly show which VLAN is tagged/untagged?

Other than that:

Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ