From: Andrew Lunn <andrew@lunn.ch>
To: "Damien Riégel" <damien.riegel@silabs.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Silicon Labs Kernel Team <linux-devel@silabs.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Johan Hovold <johan@kernel.org>,
Alex Elder <elder@kernel.org>,
greybus-dev@lists.linaro.org
Subject: Re: [RFC net-next 00/15] Add support for Silicon Labs CPC
Date: Tue, 20 May 2025 15:04:16 +0200 [thread overview]
Message-ID: <5bc03f50-498e-42c8-9a14-ca15243213bd@lunn.ch> (raw)
In-Reply-To: <DA0LEHFCVRDC.2NXIZKLBP7QCJ@silabs.com>
On Mon, May 19, 2025 at 09:21:52PM -0400, Damien Riégel wrote:
> On Sun May 18, 2025 at 11:23 AM EDT, Andrew Lunn wrote:
> > This also comes back to my point of there being at least four vendors
> > of devices like yours. Linux does not want four or more
> > implementations of this, each 90% the same, just a different way of
> > converting this structure of operations into messages over a transport
> > bus.
> >
> > You have to define the protocol. Mainline needs that so when the next
> > vendor comes along, we can point at your protocol and say that is how
> > it has to be implemented in Mainline. Make your firmware on the SoC
> > understand it. You have the advantage that you are here first, you
> > get to define that protocol, but you do need to clearly define it.
>
> I understand that this is the preferred way and I'll push internally for
> going that direction. That being said, Greybus seems to offer the
> capability to have a custom driver for a given PID/VID, if a module
> doesn't implement a Greybus-standardized protocol. Would a custom
> Greybus driver for, just as an example, our Wifi stack be an acceptable
> option?
It is not clear to me why a custom driver would be needed. You need to
implement a Linux WiFi driver. That API is well defined, although you
might only need a subset. What do you need in addition to that?
> > So long as you are doing your memory management correctly, i don't see
> > why you cannot implement double buffering in the transport driver.
> >
> > I also don't see why you cannot extend the Greybus upper API and add a
> > true gb_operation_unidirectional_async() call.
>
> Just because touching a well established subsystem is scary, but I
> understand that we're allowed to make changes that make sense.
There are developers here to help review such changes. And extending
existing Linux subsystems is how Linux has become the dominant OS. You
are getting it for free, building on the work of others, so it is not
too unreasonable to contribute a little bit back by making it even
better.
>
> > You also said that lots of small transfers are inefficient, and you
> > wanted to combine small high level messages into one big transport
> > layer message. This is something you frequently see with USB Ethernet
> > dongles. The Ethernet driver puts a number of small Ethernet packets
> > into one USB URB. The USB layer itself has no idea this is going on. I
> > don't see why the same cannot be done here, greybus itself does not
> > need to be aware of the packet consolidation.
>
> Yeah, so in this design, CPC would really be limited to the transport
> bus (SPI for now), to do packet consolidation and managing RCP available
> buffers. I think at this point, the next step is to come up with a proof
> of concept of Greybus over CPC and see if that works or not.
You need to keep the lower level generic. I would not expect anything
Silabs specific in how you transport Greybus over SPI or SDIO. As part
of gb_operation_unidirectional_async() you need to think about flow
control, you need some generic mechanism to indicate receive buffer
availability in the device, and when to pause a while to let the
device catch up, but there is no reason TI, Microchip, Nordic, etc
should not be able to use the same encapsulation scheme.
Andrew
next prev parent reply other threads:[~2025-05-20 13:04 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 1:27 Damien Riégel
2025-05-12 1:27 ` [RFC net-next 01/15] net: cpc: add base skeleton driver Damien Riégel
2025-05-12 2:13 ` Andrew Lunn
2025-05-12 1:27 ` [RFC net-next 02/15] net: cpc: add endpoint infrastructure Damien Riégel
2025-05-12 2:28 ` Andrew Lunn
2025-05-12 1:27 ` [RFC net-next 03/15] net: cpc: introduce CPC driver and bus Damien Riégel
2025-05-12 1:27 ` [RFC net-next 04/15] net: cpc: add protocol header structure and API Damien Riégel
2025-05-12 2:41 ` Andrew Lunn
2025-05-12 1:27 ` [RFC net-next 05/15] net: cpc: implement basic transmit path Damien Riégel
2025-05-12 1:27 ` [RFC net-next 06/15] net: cpc: implement basic receive path Damien Riégel
2025-05-12 1:27 ` [RFC net-next 07/15] net: cpc: implement sequencing and ack Damien Riégel
2025-05-12 1:27 ` [RFC net-next 08/15] net: cpc: add support for connecting endpoints Damien Riégel
2025-05-12 1:27 ` [RFC net-next 09/15] net: cpc: add support for RST frames Damien Riégel
2025-05-12 1:27 ` [RFC net-next 10/15] net: cpc: make disconnect blocking Damien Riégel
2025-05-12 1:27 ` [RFC net-next 11/15] net: cpc: add system endpoint Damien Riégel
2025-05-12 1:27 ` [RFC net-next 12/15] net: cpc: create system endpoint with a new interface Damien Riégel
2025-05-12 1:27 ` [RFC net-next 13/15] dt-bindings: net: cpc: add silabs,cpc-spi.yaml Damien Riégel
2025-05-14 21:38 ` Rob Herring
2025-05-12 1:27 ` [RFC net-next 14/15] net: cpc: add SPI interface driver Damien Riégel
2025-05-12 2:47 ` Andrew Lunn
2025-05-12 1:27 ` [RFC net-next 15/15] net: cpc: add Bluetooth HCI driver Damien Riégel
2025-05-12 17:07 ` [RFC net-next 00/15] Add support for Silicon Labs CPC Andrew Lunn
2025-05-13 21:15 ` Damien Riégel
2025-05-13 21:53 ` Andrew Lunn
2025-05-14 22:52 ` Damien Riégel
2025-05-15 7:49 ` Greg Kroah-Hartman
2025-05-15 15:00 ` Damien Riégel
2025-05-16 7:51 ` Greg Kroah-Hartman
2025-05-16 16:25 ` Damien Riégel
2025-05-18 15:23 ` Andrew Lunn
2025-05-20 1:21 ` Damien Riégel
2025-05-20 13:04 ` Andrew Lunn [this message]
2025-05-22 2:46 ` Alex Elder
2025-05-22 2:46 ` Alex Elder
2025-05-22 18:11 ` Andrew Lunn
2025-05-22 2:46 ` Alex Elder
2025-05-23 19:49 ` Damien Riégel
2025-05-23 20:06 ` Andrew Lunn
2025-05-23 20:38 ` Damien Riégel
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=5bc03f50-498e-42c8-9a14-ca15243213bd@lunn.ch \
--to=andrew@lunn.ch \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=damien.riegel@silabs.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-devel@silabs.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@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
all inboxes | Powered by JetHome®