From: Larry Chiu <larry.chiu@realtek.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Justin Lai <justinlai0215@realtek.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"jiri@resnulli.us" <jiri@resnulli.us>,
"horms@kernel.org" <horms@kernel.org>,
Ping-Ke Shih <pkshih@realtek.com>
Subject: RE: [PATCH net-next v19 01/13] rtase: Add pci table supported in this module
Date: Thu, 23 May 2024 06:29:55 +0000 [thread overview]
Message-ID: <48072595c9c344fea9c268fd81e4d06e@realtek.com> (raw)
In-Reply-To: <0ec88b78-a9d3-4934-96cb-083b2abf7e2b@lunn.ch>
> > Thank you very much for your clear reply.
> >
> > As I mentioned, it works like a NIC connected to an Ethernet Switch, not a
> > Management port.
> > The packets from this GMAC are routed according to switch rules such as
> > ACL, L2, .... and it does not control packet forwarding through any special
> > header or descriptor. In this case, we have our switch tool which is used
> > for provisioning these rules in advance. Once the switch boots up, the
> > rules will be configured into the switch after the initialization. With this
> > driver and the provisioning by our switch tool, it can make switch forward
> > the frame as what you want. So it's not a DSA like device.
>
> How does spanning tree work? You need to send bridge PDUs out specific
> ports. Or do you not support STP and your network must never have
> loops otherwise it dies in a broadcast storm? That does not sound very
> reliable.
>
> There are other protocols which require sending packets out specific
> ports. Are they simply not supported?
>
This port is not a CPU port, nor a management port, and therefore does not
manage any protocols of the switch. These protocols are implemented by the
CPU inside the Ethernet switch core.
> > In another case, we do have other function which is used for controlling
> > the switch registers instead of sending packets from the switch ports.
> > At the meanwhile, we are investigating how to implement the function to
> > Integrate into switchdev.
>
> In general, we don't support configuration of hardware from user
> space, which is what your switch tool sounds like. We will want to see
> a switchdev driver of some form.
>
> It might be you need to use VLAN overlays, using
> net/dsa/tag_8021q.c. Each port of the switch is given a dedicated
> VLAN, and the switch needs to add/strip the VLAN header. Its not
> great, but it does allow 'simple' switches to have basic functionality
> if they are missing header/dma descriptor support for selecting ports.
>
> Andrew
Typically, a NIC connected to the network may go through a switch, as show
below. Our design saves the two PHYs in the middle and connects to the Host
through PCIe.
This driver just service the transmit/receive packets for one port in the RTL90xx
with PCIe interface. Other programs that the switch needs to execute are
managed by the CPU inside the switch core.
* *************************
* * *
* * PC/Host *
* * *
* * +-------------+ *
* * | NIC | *
* ***********++************
* | PHY |
* ||
* | PHY |
* +-------------++----------------+
* | | MAC | |
* | +-----+ |
* | |
* | Ethernet Switch Core |
* | |
* | +-----+ +-----+ |
* | | MAC |...........| MAC | |
* +---+-----+-----------+-----+---+
* | PHY |...........| PHY |
|
|
|
V
* *************************
* * *
* * PC/Host *
* * *
* * +-------------+ *
* * | NIC | *
* ***********++************
* ||
* +-------------++----------------+
* | | MAC | |
* | +-----+ |
* | |
* | Ethernet Switch Core |
* | |
* | +-----+ +-----+ |
* | | MAC |...........| MAC | |
* +---+-----+-----------+-----+---+
* | PHY |...........| PHY |
next prev parent reply other threads:[~2024-05-23 6:30 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-17 7:52 [PATCH net-next v19 00/13] Add Realtek automotive PCIe driver Justin Lai
2024-05-17 7:52 ` [PATCH net-next v19 01/13] rtase: Add pci table supported in this module Justin Lai
2024-05-17 13:49 ` Andrew Lunn
2024-05-21 6:20 ` Larry Chiu
2024-05-21 12:47 ` Andrew Lunn
2024-05-22 4:43 ` Larry Chiu
2024-05-22 12:37 ` Andrew Lunn
2024-05-22 14:47 ` Larry Chiu
2024-05-22 15:53 ` Andrew Lunn
2024-05-23 6:29 ` Larry Chiu [this message]
2024-05-23 13:19 ` Andrew Lunn
2024-05-24 3:03 ` Larry Chiu
2024-05-25 22:44 ` Andrew Lunn
2024-05-17 7:52 ` [PATCH net-next v19 02/13] rtase: Implement the .ndo_open function Justin Lai
2024-05-17 7:52 ` [PATCH net-next v19 03/13] rtase: Implement the rtase_down function Justin Lai
2024-05-17 7:52 ` [PATCH net-next v19 04/13] rtase: Implement the interrupt routine and rtase_poll Justin Lai
2024-05-17 7:52 ` [PATCH net-next v19 05/13] rtase: Implement hardware configuration function Justin Lai
2024-05-17 7:52 ` [PATCH net-next v19 06/13] rtase: Implement .ndo_start_xmit function Justin Lai
2024-05-17 7:52 ` [PATCH net-next v19 07/13] rtase: Implement a function to receive packets Justin Lai
2024-05-17 7:52 ` [PATCH net-next v19 08/13] rtase: Implement net_device_ops Justin Lai
2024-05-17 7:52 ` [PATCH net-next v19 09/13] rtase: Implement pci_driver suspend and resume function Justin Lai
2024-05-17 7:52 ` [PATCH net-next v19 10/13] rtase: Implement ethtool function Justin Lai
2024-05-17 13:32 ` Andrew Lunn
2024-05-17 7:53 ` [PATCH net-next v19 11/13] rtase: Add a Makefile in the rtase folder Justin Lai
2024-05-17 13:33 ` Andrew Lunn
2024-05-17 7:53 ` [PATCH net-next v19 12/13] realtek: Update the Makefile and Kconfig in the realtek folder Justin Lai
2024-05-17 13:34 ` Andrew Lunn
2024-05-17 7:53 ` [PATCH net-next v19 13/13] MAINTAINERS: Add the rtase ethernet driver entry Justin Lai
2024-05-17 13:40 ` Andrew Lunn
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=48072595c9c344fea9c268fd81e4d06e@realtek.com \
--to=larry.chiu@realtek.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=justinlai0215@realtek.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pkshih@realtek.com \
/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