linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Arınç ÜNAL" <arinc.unal@arinc9.com>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, erkin.bozoglu@xeront.com
Subject: Re: Aw: Re: Re: [PATCH v3 0/5] arm: dts: mt7623: relocate gmacs, mt7530 switch, and add port@5
Date: Sat, 18 Feb 2023 20:02:11 +0300	[thread overview]
Message-ID: <2dc2fc39-b0d5-c872-36bf-fde851debe4b@arinc9.com> (raw)
In-Reply-To: <trinity-dd260791-3637-4193-8f93-a9fcdb013dcb-1676722705920@3c-app-gmx-bap53>

On 18.02.2023 15:18, Frank Wunderlich wrote:
> Hi,
> 
>> Gesendet: Samstag, 18. Februar 2023 um 11:49 Uhr
>> Von: "Arınç ÜNAL" <arinc.unal@arinc9.com>
>> An: "Frank Wunderlich" <frank-w@public-files.de>
> 
>> On 18.02.2023 13:24, Frank Wunderlich wrote:
>>> Hi,
>>>
>>> finally get some time to bootup with this series on my r2.
>>>
>>> I see that inserting the port@5 as cpu-port maps this as default-cpu because dsa-core uses first found cpu-port as
>>> default (dsa_tree_setup_cpu_ports in dsa.c) and because of lower bandwidth (rgmii instead of trgmii) not the best choice.
>>>
>>> But it look worse...network is currently broken (set both gmacs up).
>>> I see arp-packets reaching remote side, but reponse is not received by r2
>>>
>>> I have tested it on 6.2-rc8 (wan-port), maybe additional patches are needed?...userspace setup should be right.
>>>
>>> so i added series on top of net-next (no additional patches except some basic like build-script,defconfig and such)...same result...
>>>
>>> i'm not sure if i change the mapping from userspace back to eth0, so disabled port@5 in switch, now port6 is
>>> cpu-port again and it works...so something is wrong with port5 of switch or gmac1.
>>
>> That's a driver issue and will be fixed once an accepted version of
>> these patches [0] [1] [2] are applied to net-next. You should have them
>> on your inbox, I specifically told Richard to CC you.
> 
> yes, i've got them, but not applied when starting these tests. Not thought, that this change is necessary
> as we use both gmac on mt7531/bpi-r3 with out problems.
> 
> with these 3 Patches network-connection works, but only at ~624 Mbit/s in TX-Mode (started iperf3-client on r2 without -R) and massive retransmitts on first run, other direction is clean.

Ok, so according to your tests, traffic through gmac1 is not very good. 
gmac0 should be the default DSA master.

By the way, did you make a bug report of this, by sending a mail to 
netdev mailing list or some other way?

> 
> and these Patches need to be applied first (when fixed up) else network is broken.

That's true.

> 
>> This is devicetree bindings. We're here to describe the hardware. The
>> way a driver works should not affect describing the hardware.
> 
> thats right, but it should not break/change behaviour like now all ports have only ~600Mbit because of
> moving them all to the other gmac which has obvious issues.

Makes sense.

> 
>> To address the lower bandwidth situation you mentioned, a devicetree
>> property to designate a CPU port as the default CPU port could be
>> introduced. I'm not aware of a similar conversation so I'll send a mail
>> to netdev to discuss this. Will CC you.
> 
> isn't there a way to leave ports by default on the the better gmac (gmac0=trgmii)?
> maybe moving port5 below port6...not nice, but then port6 is the first cpu found.

This could be done but it comes off as an improper way to me.

> or maybe defined the default cpu in driver which gets picked up by core (define port6 if available as default).
> 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.
> 
> I'm not sure how the multi-cpu support in dsa-core ended and how you use the other gmac not used by dsa-core
> 
> set master in userspace-config? i remember you've sent a patch adding callback for it.

You can change the DSA master using iproute2-6.1.0 and above with this 
patch which should be in your inbox as well.

https://lore.kernel.org/netdev/20230211184101.651462-1-richard@routerhints.com/

> 
> imho dts change should be applied if these points are cleared...

The only issue I see here is that, with this patch series, port5 becomes 
the default CPU port which is not preferred for the reasons you explained.

So once we can have port6 to be the default CPU port of the DSA slaves, 
there's no issues left.

Arınç


  reply	other threads:[~2023-02-18 17:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10 18:25 [PATCH v3 0/5] arm: dts: mt7623: relocate gmacs, mt7530 switch, and add port@5 arinc9.unal
2023-02-10 18:25 ` [PATCH v3 1/5] arm: dts: mt7623: add gmacs to mt7623.dtsi arinc9.unal
2023-02-10 18:25 ` [PATCH v3 2/5] arm: dts: mt7623: add mt7530 switch to mt7623a.dtsi arinc9.unal
2023-02-10 18:25 ` [PATCH v3 3/5] arm: dts: mt7623: change mt7530 switch address arinc9.unal
2023-02-10 18:25 ` [PATCH v3 4/5] arm: dts: mt7623: enable flow control on port@6 arinc9.unal
2023-02-10 18:25 ` [PATCH v3 5/5] arm: dts: mt7623: add port@5 as CPU port arinc9.unal
2023-02-18  7:00 ` [PATCH v3 0/5] arm: dts: mt7623: relocate gmacs, mt7530 switch, and add port@5 Arınç ÜNAL
2023-02-18 10:24   ` Aw: " Frank Wunderlich
2023-02-18 10:49     ` Arınç ÜNAL
2023-02-18 12:18       ` Aw: " Frank Wunderlich
2023-02-18 17:02         ` Arınç ÜNAL [this message]
2023-02-18 19:11           ` Frank Wunderlich
2023-02-18 19:34             ` Arınç ÜNAL
2023-02-19 13:52               ` Aw: " Frank Wunderlich
2023-04-12 12:49                 ` Frank Wunderlich
2023-04-12 14:31                   ` Arınç ÜNAL
2023-04-12 15:11                     ` Aw: " Frank Wunderlich
2023-04-12 16:21                       ` Arınç ÜNAL
2023-04-12 16:53                         ` Aw: " Frank Wunderlich
2023-04-12 17:06                           ` Arınç ÜNAL
2023-05-29 13:40                             ` Matthias Brugger
2023-06-03 10:48                               ` Arınç ÜNAL

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2dc2fc39-b0d5-c872-36bf-fde851debe4b@arinc9.com \
    --to=arinc.unal@arinc9.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=erkin.bozoglu@xeront.com \
    --cc=frank-w@public-files.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).