From: Andrew Lunn <andrew@lunn.ch>
To: Razvan Stefanescu <razvan.stefanescu@nxp.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
gregkh <gregkh@linuxfoundation.org>,
Laurentiu Tudor <laurentiu.tudor@nxp.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Stuart Yoder <stuyoder@gmail.com>,
Ruxandra Ioana Ciocoi Radulescu <ruxandra.radulescu@nxp.com>,
Roy Pledge <roy.pledge@nxp.com>,
Networking <netdev@vger.kernel.org>,
Ioana Ciornei <ioana.ciornei@nxp.com>
Subject: Re: [PATCH v3 2/4] bus: fsl-mc: add restool userspace support
Date: Tue, 3 Apr 2018 15:04:01 +0200 [thread overview]
Message-ID: <20180403130401.GB31740@lunn.ch> (raw)
In-Reply-To: <AM3PR04MB07439B79DD857CD2F8033623E6A50@AM3PR04MB0743.eurprd04.prod.outlook.com>
On Tue, Apr 03, 2018 at 11:12:52AM +0000, Razvan Stefanescu wrote:
> DPAA2 offers several object-based abstractions for modeling network
> related devices (interfaces, L2 Ethernet switch) or accelerators
> (DPSECI - crypto and DPDCEI - compression), the latter not up-streamed yet.
> They are modeled using various low-level resources (e.g. queues,
> classification tables, physical ports) and have multiple configuration and
> interconnectivity options, managed by the Management Complex.
> Resources are limited and they are only used when needed by the objects,
> to accommodate more configurations and usage scenarios.
>
> Some of the objects have a 1-to-1 correspondence to physical resources
> (e.g. DPMACs to physical ports), while others (like DPNIs and DPSW)
> can be seen as a collection of the mentioned resources. The types and
> number of such objects are not predetermined.
>
> When the board boots up, none of them exist yet. Restool allows a user to
> define the system topology, by providing a way to dynamically create, destroy
> and interconnect these objects.
Hi Razvan
The core concept with Linux networking and offload is that the
hardware is there to accelerate what Linux can already do. Since Linux
can already do it, i don't need any additional tools.
You have new hardware. It might offer features which we currently
don't have offload support for. But all the means is you need to
extend the core networking code which implements the software version
of that feature to offload to the hardware.
The board knows how many physical ports it has. switchdev can then
setup the plumbing to create the objects needed to represent the
ports. Restool is not needed for that.
> In the latter case, the two DPNIs will not be connected to any physical
> port, but can be used as a point-to-point connection between two virtual
> machines for instance.
Can Linux already do this? Isn't that what PCI Virtual Functions are
all about? You need to find the current Linux concept for this, and
extend it to offload the functionality to hardware. If Linux can do
it, it already has the tools to configure it. Restool is not needed
for that.
> So, it is not possible to connect a DPNI to a DPSW after it was
> connected to a DPMAC. The DPNI-DPMAC pair would have to be
> disconnected and DPMAC will be reconnected to the switch. DPNI
> interface that is no longer connected to a DPMAC will be destroyed
> and any new addition/deletion of a DPNI/DPMAC interface to the
> switch port will trigger the entire switch re-configuration.
Switches and ports connected to switches are dynamic. They come and
go. You don't expect it to happen very often, but Linux has no
restrictions on this. You need to figure out how best to offload this
to your hardware. Maybe when you create the switch object you make a
guess as to how many ports you need. Leave some of the ports not
connected to anything. You can then add ports to the switch using the
free ports. If you run out of ports, you have no choice but to destroy
the switch object and create a new one. Hopefully that does not take
too long. Restool is not needed for this, it all happens within the
switchdev driver.
Andrew
next prev parent reply other threads:[~2018-04-03 13:04 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-23 15:38 [PATCH v3 0/4] bus: fsl-mc: enhance Management Complex " Ioana Ciornei
2018-03-23 15:38 ` [PATCH v3 1/4] bus: fsl-mc: move fsl_mc_command struct in a uapi header Ioana Ciornei
2018-03-24 20:12 ` kbuild test robot
2018-03-23 15:38 ` [PATCH v3 2/4] bus: fsl-mc: add restool userspace support Ioana Ciornei
2018-03-23 15:46 ` Greg KH
2018-03-23 15:56 ` Ioana Ciornei
2018-03-23 16:09 ` Greg KH
2018-03-23 20:13 ` Ioana Ciornei
2018-03-24 7:51 ` Arnd Bergmann
2018-03-28 14:27 ` Ioana Ciornei
2018-03-28 15:43 ` Arnd Bergmann
2018-03-28 16:28 ` Andrew Lunn
2018-04-02 13:24 ` Ioana Ciornei
2018-04-02 13:44 ` Andrew Lunn
2018-04-03 11:12 ` Razvan Stefanescu
2018-04-03 13:04 ` Andrew Lunn [this message]
2018-04-03 23:57 ` Stuart Yoder
2018-04-04 1:05 ` Andrew Lunn
2018-04-04 3:22 ` Stuart Yoder
2018-04-04 12:42 ` Andrew Lunn
2018-04-05 4:24 ` Stuart Yoder
2018-04-05 10:30 ` Laurentiu Tudor
2018-04-05 11:47 ` Andrew Lunn
2018-04-05 12:16 ` Laurentiu Tudor
2018-04-05 12:48 ` Andrew Lunn
2018-04-05 14:43 ` Laurentiu Tudor
2018-04-05 15:23 ` Andrew Lunn
2018-04-05 15:35 ` Ruxandra Ioana Ciocoi Radulescu
2018-04-05 16:12 ` gregkh
2018-04-05 16:56 ` Andrew Lunn
2018-04-05 12:30 ` gregkh
2018-04-05 14:09 ` Laurentiu Tudor
2018-04-05 14:19 ` gregkh
2018-03-23 15:38 ` [PATCH v3 3/4] bus: fsl-mc: add root dprc rescan attribute Ioana Ciornei
2018-03-23 15:48 ` Greg KH
2018-03-23 16:00 ` Ioana Ciornei
2018-03-23 15:38 ` [PATCH v3 4/4] bus: fsl-mc: add bus " Ioana Ciornei
2018-03-23 15:49 ` Greg KH
2018-04-02 13:46 ` Ioana Ciornei
2018-04-03 7:04 ` Greg KH
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=20180403130401.GB31740@lunn.ch \
--to=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=ioana.ciornei@nxp.com \
--cc=laurentiu.tudor@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=razvan.stefanescu@nxp.com \
--cc=roy.pledge@nxp.com \
--cc=ruxandra.radulescu@nxp.com \
--cc=stuyoder@gmail.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
all inboxes | Powered by JetHome®