netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Angelo Dureghello <angelo@kernel-space.org>
Cc: Andrew Lunn <andrew@lunn.ch>, netdev@vger.kernel.org
Subject: Re: mv88e6321, dual cpu port
Date: Tue, 24 Jan 2023 13:41:56 +0200	[thread overview]
Message-ID: <20230124114156.ua4koty3xvu5xsfx@skbuf> (raw)
In-Reply-To: <7dd335e4-55ec-9276-37c2-0ecebba986b9@kernel-space.org>

On Tue, Jan 24, 2023 at 08:21:35AM +0100, Angelo Dureghello wrote:
> What i need is something as
> 
>         eth0 ->  vlan1 -> port5(rmii)  ->  port 0,1,2
>         eth1 ->  vlan2 -> port6(rgmii) ->  port 3,4
> 
> The custom board i have here is already designed in this way
> (2 fixed-link mac-to-mac connecitons) and trying my best to have
> the above layout working.
> 
> If you have any suggestion on how to proceed, really appreciated.

The way this would have traditionally worked prior to having UAPI for
fine-grained user port to CPU port assignment was to declare in the
device tree that port6(rgmii) is a user port. This makes eth1 see
DSA-untagged traffic. Then you put port6 in a bridge with the other
ports, and isolate just ports 6, 3 and 4 in the VLAN that you desire,
and eth1's packets will be forwarded just to ports 3 and 4. Control
packts (STP, PTP) received over ports 3 and 4 are still trapped to the
CPU port (port5).

For some use cases, on LS1028A we still need to declare one of the CPU
ports as a user port. To achieve that, we take the existing upstream
device tree (which declares both CPU ports as CPU ports) and remove the
"ethernet" property from one of them, dynamically, from the U-Boot shell:

=> tftp $fdt_addr_r fsl-ls1028a-rdb.dtb
=> fdt addr $fdt_addr_r
=> fdt rm /soc/pcie@1f0000000/ethernet-switch@0,5/ports/port@4 ethernet
=> tftp $kernel_addr_r uImage
=> bootm $kernel_addr_r - $fdt_addr_r

  reply	other threads:[~2023-01-24 11:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09 20:40 mv88e6321, dual cpu port Angelo Dureghello
2023-01-09 21:33 ` Andrew Lunn
2023-01-10 10:23   ` Angelo Dureghello
2023-01-10 22:22     ` Vladimir Oltean
2023-01-10 23:02       ` Andrew Lunn
2023-01-23  8:52         ` Angelo Dureghello
2023-01-23 11:28           ` Vladimir Oltean
2023-01-23 13:26             ` Angelo Dureghello
2023-01-23 19:18               ` Vladimir Oltean
2023-01-23 20:08                 ` Andrew Lunn
2023-01-24  7:21                   ` Angelo Dureghello
2023-01-24 11:41                     ` Vladimir Oltean [this message]
2023-01-24 13:57                     ` Andrew Lunn
2023-01-25  9:04                       ` Angelo Dureghello
2023-02-06 10:43                       ` Angelo Dureghello
2023-02-06 13:24                         ` Andrew Lunn
2023-02-16 11:20                       ` Angelo Dureghello
2023-02-16 12:50                         ` Vladimir Oltean
2023-02-16 12:59                           ` Andrew Lunn
2023-02-16 15:31                             ` Vladimir Oltean
2023-02-16 18:39                               ` Angelo Dureghello
2023-02-18 13:30                                 ` Vladimir Oltean
2023-02-18 13:56                                   ` Russell King (Oracle)
2023-02-16 14:24                           ` Angelo Dureghello

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=20230124114156.ua4koty3xvu5xsfx@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=angelo@kernel-space.org \
    --cc=netdev@vger.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).