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

From: Jakub Kicinski <[email-masked]>
Date: Tue, 28 Nov 2023 12:58:08 -0800

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...

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.