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: <74F2678E-F8FF-42CE-A76B-9AB759EAC836@public-files.de>
Date:   Sat, 18 Feb 2023 21:17:15 +0100
From:   Frank Wunderlich <frank-w@...lic-files.de>
To:     Arınç ÜNAL <arinc.unal@...nc9.com>,
        Vladimir Oltean <olteanv@...il.com>
CC:     netdev <netdev@...r.kernel.org>, erkin.bozoglu@...ont.com
Subject: Re: Choose a default DSA CPU port

Am 18. Februar 2023 18:07:53 MEZ schrieb "Arınç ÜNAL" <arinc.unal@...nc9.com>:
>Hey there folks,
>
>The problem is this. Frank and I have got a Bananapi BPI-R2 with MT7623 SoC. The port5 of MT7530 switch is wired to gmac1 of the SoC. Port6 is wired to gmac0. Since DSA sets the first CPU port it finds on the devicetree, port5 becomes the CPU port for all DSA slaves.
>
>But we'd prefer port6 since it uses trgmii while port5 uses rgmii. There are also some performance issues with the port5 - gmac1 link.
>
>Now we could change it manually on userspace if the DSA subdriver supported changing the DSA master.
>
>I'd like to find a solution which would work for the cases of; the driver not supporting changing the DSA master, or saving the effort of manually changing it on userspace.
>
>The solution that came to my mind:
>
>Introduce a DT property to designate a CPU port as the default CPU port.
>If this property exists on a CPU port, that port becomes the CPU port for all DSA slaves.
>If it doesn't exist, fallback to the first-found-cpu-port method.

If adding such property i see it on switch level not port level so that it can be defined only once to point to 1 port via phandle or index.

>Frank doesn't like this idea:
>
>> maybe define the default cpu in driver which gets picked up by core (define port6 as default if available).
>> Imho additional dts-propperty is wrong approch...it should be handled by driver. But cpu-port-selection is currently done in dsa-core which makes it a bit difficult.

My first idea was putting port 5 below port 6 in dts so that port6 is the first cpu-port picked up by dsa core as default.

If the 5-below-6 way is not the right one i would prefer a driver solution, e.g. let driver choose the best cpu based on fixed value (constant via define) or on highest throughput (trgmii > rgmii),but last may fail if both cpu-ports have same speed like mt7531. I have no idea how to set the cpu-port in mt7530 driver as it is set in dsa core. Should we override the cpu-port set by core? I think no,maybe adding a callback which is used by core if defined else proceed as currently done.

These are the possible solutions i see atm. Maybe dsa people can share their opinion.

>What are your thoughts?
>
>Arınç

Hi

Just my thoughts about this...
regards Frank

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ