Re: [PATCH v2 0/2] Add MHI Endpoint network driver

From: Dmitry Baryshkov
Date: Mon Dec 04 2023 - 07:12:27 EST


On Tue, 28 Nov 2023 at 22:58, Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Tue, 28 Nov 2023 22:35:50 +0200 Dmitry Baryshkov wrote:
> > Also, please excuse me if this was already answered, just for my understanding:
> > - If we limit functionality to just networking channels which are used
> > to pass IP data between host and EP, will that be accepted?
>
> That's too hard to enforce. We have 200+ drivers, we can't carefully
> review every single line of code to make sure you stick to the "just
> networking" promise you make us. Plus the next guy will come and tell
> us "but you let the company X do it".
>
> > - If we were to implement the PCIe networking card running Linux (e.g.
> > using Freescale PowerQUICC or Cavium Octeon chips), would you also be
> > opposed to implementing the EP side of the link as the netdev?
>
> Yes.
>
> It's very tempting to reuse existing code, written for traffic to build
> a control channel. This becomes painful because:
> - the lifetime rules for interfaces to configure vs to pass traffic
> are different, which inevitably leads to bugs in common code,
> - the use cases are different, which leads to hacks / abuse,
> and then it's a lot harder for us to refactor and optimize core
> code / data structures,
> - IDK how "channel to talk to FW" fits with the normal IP stack...

Ok, here you are talking about the control path. I can then assume
that you consider it to be fine to use netdev for the EP data path, if
the control path is kept separate and those two can not be mixed. Does
that sound correct?

>
> The "FW channel netdevs" exist for decades now, and are very popular
> with middle box SDKs, I know. Your choices are:
> - keep the code out of tree,
> - use a generic interface with a strong standard definition, like
> virtio, and expect that no customizations will be allowed.

--
With best wishes
Dmitry