Message ID | 20230606123119.57499-1-manivannan.sadhasivam@linaro.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3360479vqr; Tue, 6 Jun 2023 05:36:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4IXE+fJLc/LoNWgVadqHHSykrlEHH4ec7w5RhoJacci+vqYT5r+6X+uJa0X/6FgpnirntM X-Received: by 2002:a05:6214:411e:b0:5d5:fd1d:6ef5 with SMTP id kc30-20020a056214411e00b005d5fd1d6ef5mr1889057qvb.12.1686054970837; Tue, 06 Jun 2023 05:36:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686054970; cv=none; d=google.com; s=arc-20160816; b=pL12cl071CFhIf5llKflWijYPON9fc6elTEt40ChSoabtmLampG0a5/rP99a30LNty 3MvE8Oo8cWL3hMsbdCERMoRDozWkN6eGkAxNMFwbOpJ+oldkPGBqjI8Yo54//20jZZQo uo0KzwFc/gGPPiSsShkCOqtZj+yL79KNQAdJB96QFpOZ2Xy+H0lda7ThVb3bRSjx3p+/ t75vSo25eA2xdMptyn5HYVY53WoBvZCOchq1ZhzA6714VGn+4ltlJJZX6k4mr313UpnX VcbPiXVnovlwte3KU1AMLj8MzprpwkJW/G4g633/OssA8Isgsv774cijc8BbKOzVAozG dFeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=tnSMPv17DxTIc0EApfFv62sMiPCzQPBGurL8DNcMIjg=; b=bIiFOTmY2ybvq08cWUwFmJGCij+GEoOnGSonuMCd5Ni4FRmRjq/h+CBsMTmcxZ8AoH FGt0IcXlGKh1EN9FZ57+mXTPbD5ZFbWqkiFYqYWoBleIcQ0Vt5fM+nMgauRoBrvjg9Bp cA9UDBdS+85oll6TcY28LjaSQdSNng4LWDL8yx/HpqHjxSZQlRe5uuAMfl6U731ISBX2 KOiM3s6oOmz5uSKScudILOmQmI5Bka7R6rzMSamkB1xAi367wjIXs3VV74OvSVJrTzDA rAws+3Fn4Ig9No81d0OJh0MJ3dShW8AfsqQVyx77QXDpvxIAXzJn0fxoqz3HAL0rGxdX +7Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ED5wHJmn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p11-20020a05621421eb00b006257beb90dcsi6247716qvj.419.2023.06.06.05.35.55; Tue, 06 Jun 2023 05:36:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ED5wHJmn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236715AbjFFMba (ORCPT <rfc822;xxoosimple@gmail.com> + 99 others); Tue, 6 Jun 2023 08:31:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231320AbjFFMb3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 6 Jun 2023 08:31:29 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A43E10CA for <linux-kernel@vger.kernel.org>; Tue, 6 Jun 2023 05:31:27 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1b026657a6fso52440425ad.0 for <linux-kernel@vger.kernel.org>; Tue, 06 Jun 2023 05:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686054686; x=1688646686; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=tnSMPv17DxTIc0EApfFv62sMiPCzQPBGurL8DNcMIjg=; b=ED5wHJmn8ZLA4iS49IErYUL2x+RV79G+ND9qTHeNJbgfhZx7HbbumKO2Om+e9nia4V yLaa3ju2IQyNwjbRagoYWRS8/l4YVdjaaw6ihstAhHGdELxqy6r+TLRL2ywnhZciz3KV GnAEUMWUEEL21U3AJweaap5Ejp07h7T8TlbdcFl6CRQX7Wm+mscilpdpQLlPOBqMlPo2 MriRTlfdFH7X8ZHh1SrhCrNNIG5XlOO7DgaBK4BKLkHnI6MIfD5pNEhzYAvNO3ANhGE6 DtvXj5S0QGMn1naH/1ZH9yW9pz5Ug+gFXZ/hzfvymwHBZWUwoCGvIUxnaDAe+7MtLYqL JSAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686054686; x=1688646686; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tnSMPv17DxTIc0EApfFv62sMiPCzQPBGurL8DNcMIjg=; b=UPorIUpcd/mlUGvwVUBE8KGGYbp2hTNHYxW11OJaerrnvrtXY4hxNfX03WvKChMO+Y rYt0cjc6PweFqeS8bs63wfCVLi2ySk/YZ0Z3JlENj0802gd58fYbT+qKgDxyARangH1j 54AWIdiDU8FKK+UBbSSYDtCgvUMaEOn2HYAujxHeNz/2PvYnDGgQ6IHJKmSTfWkJirtd JTA9OXI09LzwIW4jhO3WaeAzO0RDuPlpuPIEdRNAwUEqmkqgdEKoEU44kM2NbT/4OKV8 yFCEJc679ZOcHVeH0Amx1R2iJ6BLggYUyzGAp0oek2WlyBF2EUkc9++MA3FU9XgQc89F 9Htg== X-Gm-Message-State: AC+VfDwHUAxbjNwK+Q3t13Gc/y7RLrs1xjrxtqp6HGFmiZgPXCBe94Ed D5XJS+HDPPMDUm1oSL/oziZE X-Received: by 2002:a17:903:22c3:b0:1b0:3df1:c293 with SMTP id y3-20020a17090322c300b001b03df1c293mr2206016plg.45.1686054686649; Tue, 06 Jun 2023 05:31:26 -0700 (PDT) Received: from localhost.localdomain ([117.202.186.178]) by smtp.gmail.com with ESMTPSA id q5-20020a170902c74500b001ae59169f05sm8446431plq.182.2023.06.06.05.31.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 05:31:26 -0700 (PDT) From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: mhi@lists.linux.dev, linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, loic.poulain@linaro.org, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Subject: [PATCH 0/3] Add MHI Endpoint network driver Date: Tue, 6 Jun 2023 18:01:16 +0530 Message-Id: <20230606123119.57499-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767956776707801354?= X-GMAIL-MSGID: =?utf-8?q?1767956776707801354?= |
Series | Add MHI Endpoint network driver | |
Message
Manivannan Sadhasivam
June 6, 2023, 12:31 p.m. UTC
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
Comments
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
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?
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
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
On Wed, 7 Jun 2023 at 08:56, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> 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
On Wed, Jun 07, 2023 at 09:12:00AM +0200, Loic Poulain wrote: > On Wed, 7 Jun 2023 at 08:56, Manivannan Sadhasivam > <manivannan.sadhasivam@linaro.org> 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
> > 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
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 >> <manivannan.sadhasivam@linaro.org> 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.