Hi, PO LIU <po....@nxp.com> writes:
> This patch provids netlink method to configure the TSN protocols hardwares. > TSN guaranteed packet transport with bounded low latency, low packet delay > variation, and low packet loss by hardware and software methods. I don't think having another way to configure TSN features is a good idea. We already have the CBS/ETF/taprio family of qdiscs, that provide (or will in the near future, more on this later) a way to configure the hardware. A little background on the choice of qdiscs as an interface (and why we came to believe they are a good abstraction), they already provide a way to map packets into traffic classes (it isn't clear in our proposal how you do that, but I think you are using something like mqprio), they provide a neat way to "compose" (by installing one under another), they already have a user facing API with various counters, and very importantly for TSN they have mecanisms to offload some of their work to the hardware. I suggest is for you to take a look at how CBS offloading was implemented for the Intel i210: https://patchwork.ozlabs.org/cover/824626/ Patches 4 and 5 should be the interesting ones. I think you can use them as inspiration for enabling CBS offload in your driver. If you did take a look at those patches (and the current work that has been upstreamed), my question then becomes, what are the reasons that it might not work for your use cases? > > The three basic components of TSN are: > > 1. Time synchronization: This was implement by 8021AS which base on the > IEEE1588 precision Time Protocol. This is configured by the other way > in kernel. > 8021AS not included in this patch. > > 2. Scheduling and traffic shaping and per-stream filter policing: > This patch support Qbv/Qci. I am working on a proposal for the API for Qbv (and Qbu) offloading using taprio. I should send it soon-ish. Your feedback would be very welcome. Also, how to expose in the qdiscs the per-stream filtering and policing parts (Qci) is something that I don't know how to do right now, any suggestions would be nice. In short, take a look at what's there and see what's missing for the stuff that you care about, then we can work on that. > > 3. Selection of communication paths: > This patch not support the pure software only TSN protocols(like Qcc) > but hardware related configuration. > > TSN Protocols supports by this patch: Qbv/Qci/Qbu/Credit-base Shaper(Qav). > This patch verified on NXP ls1028ardb board. > > Will add more protocols in the future. > > Signed-off-by: Po Liu <po....@nxp.com> Cheers, -- Vinicius