On Fri May 23, 2025 at 4:06 PM EDT, Andrew Lunn wrote:
I don't really know about UniPro and I'm learning about it as the discussion goes, but one of the point listed on Wikipedia is "reliability - data errors detected and correctable via retransmission"
This is where CPC could come in, probably with a different name and a reduced scope, as a way to implement reliable transmission over UART, SPI, SDIO, by ensuring data errors are detected and packets retransmitted if necessary, and be limited to that.
You mentioned HDLC in the past. What is interesting is that HDLC is actually used in Greybus:
https://elixir.bootlin.com/linux/v6.15-rc7/source/drivers/greybus/gb-beaglep...
I've no idea if its just for framing, or if there is also retries on errors, S-frames with flow and error control etc. There might be code you can reuse here.
Yeah I've seen it when looking at Greybus, from what I could see it's only framing. There is a CRC check though, frames received that don't pass that check are not passed to Greybus layer.
Another aspect we would like to support is buffer management. In our implementation, each endpoint has its dedicated pool of RX buffers and the number of available buffers is advertised to the remote, so the Linux driver can delay transmission of packets if endpoints are out of RX buffers.
We decide to implement that mostly because that would get us the best throughtput possible. Sending a packet to an endpoint that doesn't have room for it means the packet will be dropped and we have to wait for a retransmission to occur, which degrades performance.