2023-06-06 12:44:11

by Manivannan Sadhasivam

[permalink] [raw]
Subject: [PATCH 0/3] Add MHI Endpoint network driver

Hi,

This series adds a network driver for the Modem Host Interface (MHI) endpoint
devices that provides network interfaces to the PCIe based Qualcomm endpoint
devices supporting MHI bus (like Modems). This driver allows the MHI endpoint
devices to establish IP communication with the host machines (x86, ARM64) over
MHI bus.

On the host side, the existing mhi_net driver provides the network connectivity
to the host.

- Mani

Manivannan Sadhasivam (3):
net: Add MHI Endpoint network driver
MAINTAINERS: Add entry for MHI networking drivers under MHI bus
net: mhi: Increase the default MTU from 16K to 32K

MAINTAINERS | 1 +
drivers/net/Kconfig | 9 ++
drivers/net/Makefile | 1 +
drivers/net/mhi_ep_net.c | 331 +++++++++++++++++++++++++++++++++++++++
drivers/net/mhi_net.c | 2 +-
5 files changed, 343 insertions(+), 1 deletion(-)
create mode 100644 drivers/net/mhi_ep_net.c


base-commit: ae91f7e436f8b631c47e244b892ecac62a4d9430
--
2.25.1



2023-06-06 13:23:04

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH 0/3] Add MHI Endpoint network driver

On Tue, Jun 06, 2023 at 06:01:16PM +0530, Manivannan Sadhasivam wrote:
> Hi,
>
> This series adds a network driver for the Modem Host Interface (MHI) endpoint
> devices that provides network interfaces to the PCIe based Qualcomm endpoint
> devices supporting MHI bus (like Modems). This driver allows the MHI endpoint
> devices to establish IP communication with the host machines (x86, ARM64) over
> MHI bus.
>
> On the host side, the existing mhi_net driver provides the network connectivity
> to the host.
>
> - Mani
>
> Manivannan Sadhasivam (3):
> net: Add MHI Endpoint network driver
> MAINTAINERS: Add entry for MHI networking drivers under MHI bus
> net: mhi: Increase the default MTU from 16K to 32K
>
> MAINTAINERS | 1 +
> drivers/net/Kconfig | 9 ++
> drivers/net/Makefile | 1 +
> drivers/net/mhi_ep_net.c | 331 +++++++++++++++++++++++++++++++++++++++
> drivers/net/mhi_net.c | 2 +-

Should we add a drivers/net/modem directory? Maybe modem is too
generic, we want something which represents GSM, LTE, UMTS, 3G, 4G,
5G, ... XG etc.

Andrew

2023-06-06 21:55:51

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH 0/3] Add MHI Endpoint network driver

On Tue, 6 Jun 2023 18:01:16 +0530 Manivannan Sadhasivam wrote:
> This series adds a network driver for the Modem Host Interface (MHI) endpoint
> devices that provides network interfaces to the PCIe based Qualcomm endpoint
> devices supporting MHI bus (like Modems). This driver allows the MHI endpoint
> devices to establish IP communication with the host machines (x86, ARM64) over
> MHI bus.
>
> On the host side, the existing mhi_net driver provides the network connectivity
> to the host.

So the host can talk to the firmware over IP?

2023-06-07 07:23:13

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH 0/3] Add MHI Endpoint network driver

On Tue, Jun 06, 2023 at 02:22:27PM -0700, Jakub Kicinski wrote:
> On Tue, 6 Jun 2023 18:01:16 +0530 Manivannan Sadhasivam wrote:
> > This series adds a network driver for the Modem Host Interface (MHI) endpoint
> > devices that provides network interfaces to the PCIe based Qualcomm endpoint
> > devices supporting MHI bus (like Modems). This driver allows the MHI endpoint
> > devices to establish IP communication with the host machines (x86, ARM64) over
> > MHI bus.
> >
> > On the host side, the existing mhi_net driver provides the network connectivity
> > to the host.
>
> So the host can talk to the firmware over IP?

That's the typical usecase of these PCIe based modems. On the host, mhi_net
driver creates the network interface that communicates with the endpoint over
MHI host stack. On the endpoint, mhi_ep_net driver creates the network interface
that communicates with the host over MHI endpoint stack.

These drivers work on top of MHI channels like IP_SW0, IP_HW0 etc... IP_SW0
channel represents the IP communication between host and modem CPUs while IP_HW0
represents IP communication between host and modem DSP.

- Mani

--
மணிவண்ணன் சதாசிவம்

2023-06-07 07:23:53

by Loic Poulain

[permalink] [raw]
Subject: Re: [PATCH 0/3] Add MHI Endpoint network driver

On Wed, 7 Jun 2023 at 08:56, Manivannan Sadhasivam
<[email protected]> wrote:
>
> On Tue, Jun 06, 2023 at 02:59:00PM +0200, Andrew Lunn wrote:
> > On Tue, Jun 06, 2023 at 06:01:16PM +0530, Manivannan Sadhasivam wrote:
> > > Hi,
> > >
> > > This series adds a network driver for the Modem Host Interface (MHI) endpoint
> > > devices that provides network interfaces to the PCIe based Qualcomm endpoint
> > > devices supporting MHI bus (like Modems). This driver allows the MHI endpoint
> > > devices to establish IP communication with the host machines (x86, ARM64) over
> > > MHI bus.
> > >
> > > On the host side, the existing mhi_net driver provides the network connectivity
> > > to the host.
> > >
> > > - Mani
> > >
> > > Manivannan Sadhasivam (3):
> > > net: Add MHI Endpoint network driver
> > > MAINTAINERS: Add entry for MHI networking drivers under MHI bus
> > > net: mhi: Increase the default MTU from 16K to 32K
> > >
> > > MAINTAINERS | 1 +
> > > drivers/net/Kconfig | 9 ++
> > > drivers/net/Makefile | 1 +
> > > drivers/net/mhi_ep_net.c | 331 +++++++++++++++++++++++++++++++++++++++
> > > drivers/net/mhi_net.c | 2 +-
> >
> > Should we add a drivers/net/modem directory? Maybe modem is too
> > generic, we want something which represents GSM, LTE, UMTS, 3G, 4G,
> > 5G, ... XG etc.
> >
>
> The generic modem hierarchy sounds good to me because most of the times a
> single driver handles multiple technologies. The existing drivers supporting
> modems are already under different hierarchy like usb, wwan etc... So unifying
> them makes sense. But someone from networking community should take a call.


Yes, so there is already a drivers/net/wwan directory for this, in
which there are drivers for control and data path, that together
represent a given 'wwan' (modem) entity. So the generic mhi_net could
be moved there, but the point is AFAIU, that MHI, despite his name, is
not (more) used only for modem, but as a generic memory sharing based
transport protocol, such as virtio. It would then not be necessarily
true that a peripheral exposing MHI net channel is actually a modem?

Regards,
Loic

2023-06-07 07:24:07

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH 0/3] Add MHI Endpoint network driver

On Tue, Jun 06, 2023 at 02:59:00PM +0200, Andrew Lunn wrote:
> On Tue, Jun 06, 2023 at 06:01:16PM +0530, Manivannan Sadhasivam wrote:
> > Hi,
> >
> > This series adds a network driver for the Modem Host Interface (MHI) endpoint
> > devices that provides network interfaces to the PCIe based Qualcomm endpoint
> > devices supporting MHI bus (like Modems). This driver allows the MHI endpoint
> > devices to establish IP communication with the host machines (x86, ARM64) over
> > MHI bus.
> >
> > On the host side, the existing mhi_net driver provides the network connectivity
> > to the host.
> >
> > - Mani
> >
> > Manivannan Sadhasivam (3):
> > net: Add MHI Endpoint network driver
> > MAINTAINERS: Add entry for MHI networking drivers under MHI bus
> > net: mhi: Increase the default MTU from 16K to 32K
> >
> > MAINTAINERS | 1 +
> > drivers/net/Kconfig | 9 ++
> > drivers/net/Makefile | 1 +
> > drivers/net/mhi_ep_net.c | 331 +++++++++++++++++++++++++++++++++++++++
> > drivers/net/mhi_net.c | 2 +-
>
> Should we add a drivers/net/modem directory? Maybe modem is too
> generic, we want something which represents GSM, LTE, UMTS, 3G, 4G,
> 5G, ... XG etc.
>

The generic modem hierarchy sounds good to me because most of the times a
single driver handles multiple technologies. The existing drivers supporting
modems are already under different hierarchy like usb, wwan etc... So unifying
them makes sense. But someone from networking community should take a call.

- Mani

> Andrew

--
மணிவண்ணன் சதாசிவம்

2023-06-07 07:53:55

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH 0/3] Add MHI Endpoint network driver

On Wed, Jun 07, 2023 at 09:12:00AM +0200, Loic Poulain wrote:
> On Wed, 7 Jun 2023 at 08:56, Manivannan Sadhasivam
> <[email protected]> wrote:
> >
> > On Tue, Jun 06, 2023 at 02:59:00PM +0200, Andrew Lunn wrote:
> > > On Tue, Jun 06, 2023 at 06:01:16PM +0530, Manivannan Sadhasivam wrote:
> > > > Hi,
> > > >
> > > > This series adds a network driver for the Modem Host Interface (MHI) endpoint
> > > > devices that provides network interfaces to the PCIe based Qualcomm endpoint
> > > > devices supporting MHI bus (like Modems). This driver allows the MHI endpoint
> > > > devices to establish IP communication with the host machines (x86, ARM64) over
> > > > MHI bus.
> > > >
> > > > On the host side, the existing mhi_net driver provides the network connectivity
> > > > to the host.
> > > >
> > > > - Mani
> > > >
> > > > Manivannan Sadhasivam (3):
> > > > net: Add MHI Endpoint network driver
> > > > MAINTAINERS: Add entry for MHI networking drivers under MHI bus
> > > > net: mhi: Increase the default MTU from 16K to 32K
> > > >
> > > > MAINTAINERS | 1 +
> > > > drivers/net/Kconfig | 9 ++
> > > > drivers/net/Makefile | 1 +
> > > > drivers/net/mhi_ep_net.c | 331 +++++++++++++++++++++++++++++++++++++++
> > > > drivers/net/mhi_net.c | 2 +-
> > >
> > > Should we add a drivers/net/modem directory? Maybe modem is too
> > > generic, we want something which represents GSM, LTE, UMTS, 3G, 4G,
> > > 5G, ... XG etc.
> > >
> >
> > The generic modem hierarchy sounds good to me because most of the times a
> > single driver handles multiple technologies. The existing drivers supporting
> > modems are already under different hierarchy like usb, wwan etc... So unifying
> > them makes sense. But someone from networking community should take a call.
>
>
> Yes, so there is already a drivers/net/wwan directory for this, in
> which there are drivers for control and data path, that together
> represent a given 'wwan' (modem) entity. So the generic mhi_net could
> be moved there, but the point is AFAIU, that MHI, despite his name, is
> not (more) used only for modem, but as a generic memory sharing based
> transport protocol, such as virtio. It would then not be necessarily
> true that a peripheral exposing MHI net channel is actually a modem?
>

Agree, mhi_*_net drivers can be used by non-modem devices too as long as they
support MHI protocol.

- Mani

> Regards,
> Loic

--
மணிவண்ணன் சதாசிவம்

2023-06-07 12:48:35

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH 0/3] Add MHI Endpoint network driver

> > Yes, so there is already a drivers/net/wwan directory for this, in
> > which there are drivers for control and data path, that together
> > represent a given 'wwan' (modem) entity. So the generic mhi_net could
> > be moved there, but the point is AFAIU, that MHI, despite his name, is
> > not (more) used only for modem, but as a generic memory sharing based
> > transport protocol, such as virtio. It would then not be necessarily
> > true that a peripheral exposing MHI net channel is actually a modem?
> >
>
> Agree, mhi_*_net drivers can be used by non-modem devices too as long as they
> support MHI protocol.

O.K. I was just trying to avoid cluttering up the directory. But if
this is shared code, not actual drivers, this is fine.

Are there more features yet to be implemented? Would it make sense to
create a mhi directory?

Andrew

2023-06-07 14:56:41

by Jeffrey Hugo

[permalink] [raw]
Subject: Re: [PATCH 0/3] Add MHI Endpoint network driver

On 6/7/2023 1:41 AM, Manivannan Sadhasivam wrote:
> On Wed, Jun 07, 2023 at 09:12:00AM +0200, Loic Poulain wrote:
>> On Wed, 7 Jun 2023 at 08:56, Manivannan Sadhasivam
>> <[email protected]> wrote:
>>>
>>> On Tue, Jun 06, 2023 at 02:59:00PM +0200, Andrew Lunn wrote:
>>>> On Tue, Jun 06, 2023 at 06:01:16PM +0530, Manivannan Sadhasivam wrote:
>>>>> Hi,
>>>>>
>>>>> This series adds a network driver for the Modem Host Interface (MHI) endpoint
>>>>> devices that provides network interfaces to the PCIe based Qualcomm endpoint
>>>>> devices supporting MHI bus (like Modems). This driver allows the MHI endpoint
>>>>> devices to establish IP communication with the host machines (x86, ARM64) over
>>>>> MHI bus.
>>>>>
>>>>> On the host side, the existing mhi_net driver provides the network connectivity
>>>>> to the host.
>>>>>
>>>>> - Mani
>>>>>
>>>>> Manivannan Sadhasivam (3):
>>>>> net: Add MHI Endpoint network driver
>>>>> MAINTAINERS: Add entry for MHI networking drivers under MHI bus
>>>>> net: mhi: Increase the default MTU from 16K to 32K
>>>>>
>>>>> MAINTAINERS | 1 +
>>>>> drivers/net/Kconfig | 9 ++
>>>>> drivers/net/Makefile | 1 +
>>>>> drivers/net/mhi_ep_net.c | 331 +++++++++++++++++++++++++++++++++++++++
>>>>> drivers/net/mhi_net.c | 2 +-
>>>>
>>>> Should we add a drivers/net/modem directory? Maybe modem is too
>>>> generic, we want something which represents GSM, LTE, UMTS, 3G, 4G,
>>>> 5G, ... XG etc.
>>>>
>>>
>>> The generic modem hierarchy sounds good to me because most of the times a
>>> single driver handles multiple technologies. The existing drivers supporting
>>> modems are already under different hierarchy like usb, wwan etc... So unifying
>>> them makes sense. But someone from networking community should take a call.
>>
>>
>> Yes, so there is already a drivers/net/wwan directory for this, in
>> which there are drivers for control and data path, that together
>> represent a given 'wwan' (modem) entity. So the generic mhi_net could
>> be moved there, but the point is AFAIU, that MHI, despite his name, is
>> not (more) used only for modem, but as a generic memory sharing based
>> transport protocol, such as virtio. It would then not be necessarily
>> true that a peripheral exposing MHI net channel is actually a modem?
>>
>
> Agree, mhi_*_net drivers can be used by non-modem devices too as long as they
> support MHI protocol.

I know of at-least 1 non-modem product in development that would benefit
from these drivers.