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: <20210917100051.254mzlfxwvaromcn@skbuf>
Date:   Fri, 17 Sep 2021 13:00:51 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Rafał Miłecki <zajec5@...il.com>
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        bcm-kernel-feedback-list@...adcom.com,
        Rafał Miłecki <rafal@...ecki.pl>
Subject: Re: [PATCH net-next 0/4] net: dsa: b53: Clean up CPU/IMP ports

On Fri, Sep 17, 2021 at 12:19:02AM +0200, Rafał Miłecki wrote:
> On 16.09.2021 23:46, Florian Fainelli wrote:
> > On 9/16/21 9:23 AM, Florian Fainelli wrote:
> > > On 9/16/21 5:03 AM, Rafał Miłecki wrote:
> > > > From: Rafał Miłecki <rafal@...ecki.pl>
> > > > 
> > > > This has been tested on:
> > > > 
> > > > 1. Luxul XBR-4500 with used CPU port 5
> > > > [    8.361438] b53-srab-switch 18007000.ethernet-switch: found switch: BCM53012, rev 0
> > > > 
> > > > 2. Netgear R8000 with used CPU port 8
> > > > [    4.453858] b53-srab-switch 18007000.ethernet-switch: found switch: BCM53012, rev 5
> > > 
> > > These look good at first glance, let me give them a try on 7445 and 7278
> > > at least before responding with Reviewed-by/Tested-by tags, thanks!
> > > 
> > Found some issues on 7445 and 7278 while moving to the latest net-next
> > which I will be addressing but this worked nicely.
> > 
> > What do you think about removing dev->enabled_ports and
> > b53_for_each_port entirely and using a DSA helper that iterates over the
> > switch's port list? Now that we have dev->num_ports accurately reflect
> > the number of ports it should be equivalent.
> 
> The limitation I see in DSA is skipping unavailable ports. E.g. BCM5301x
> switches that don't have port 6. The closest match for such case I found
> is DSA_PORT_TYPE_UNUSED but I'm not sure if it's enough to handle those
> cases.
> 
> That DSA_PORT_TYPE_UNUSED would probably require investigating DSA & b53
> behaviour *and* discussing it with DSA maintainer to make sure we don't
> abuse that.

How absent are these ports in hardware? For DSA_PORT_TYPE_UNUSED we do
register a devlink port, but if those ports are really not present in
hardware, I'm thinking maybe the easiest way would be to supply a
ds->disabled_port_mask before dsa_register_switch(), and DSA will simply
skip those ports when allocating the dp, the devlink_port etc. So you
will literally have nothing for them.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ