Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp378126pxu; Fri, 11 Dec 2020 04:40:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxF2ipcreZOchslZqoU4n+ImeIRPZvOIVmH3huFv7EYGb9x1SHz6S+bmvpeeqTIZPA3D/mQ X-Received: by 2002:a50:fd10:: with SMTP id i16mr11683070eds.331.1607690432272; Fri, 11 Dec 2020 04:40:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607690432; cv=none; d=google.com; s=arc-20160816; b=X6KrnLLB95kGAFDCd0iEfpHPcBty+47moeOSE9XNRh3QojdvwaksrVYlukTB16Bypx ZgSv35osmb3pAkR1uq95lrRlTyLVWAya7FCKSPwf/f7KAjudk73sQSY9VWkB0NQldLt9 L+tUsnLXp5c6xXcmVw8x+EsiV0kKeRoOwHWjDrhBq2RDQWvWWoDQtLfR5WYdILa8tMlm GqZubReFxBKJq7Iy4W3qiM/N381FrOBx0tGcnFjZ4qnGRYr/kvxc8f+8gZ5XGB85ngUE WQFtTdXExi5yZHsrRWK3ZHrBGX5toXdcPB+R2n/yu62+WTunbBSfcDfPxHVBWagNyKZ7 IUqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=P2Z6Y0mUdQeKOQLOjiTLkiK3ZL1MPGjCu+/e0XcmQCM=; b=QaTiSoE3t7pONDE7XSj/osIzrbHI8sApZ1+BzT5uhuAhIrGwMTPZbhK2qrP7CvDQGB HSbIw1LgCKZaxwegm1FWfsWr49FPQqjMimeYMmsYwBDDfKfSLPjy+nu8/sA+HQfzkmee mcbAq/GP8rkG2lAReGgOyFMsaDzhQJX2aCPylicU2FjdTcAjRFVIZFaPeN7SCkbrFVyV B3b+N8uIodcLXZCRW6miAg30/hTkNXgjrre6lO8F7CH/+B7ZTwrXF4N/3VDFAdXU6OrZ 2A4bF6SxiqvN65SXC5ToDKrVVGcAXUj8twUXJVdJmtXuM7LuCzB3d4k/C0SmyUIHemWH 7peg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qtrNGKWE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id df7si5439701edb.44.2020.12.11.04.40.09; Fri, 11 Dec 2020 04:40:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qtrNGKWE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2437088AbgLKIpV (ORCPT + 99 others); Fri, 11 Dec 2020 03:45:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437026AbgLKIoy (ORCPT ); Fri, 11 Dec 2020 03:44:54 -0500 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3C87C061793 for ; Fri, 11 Dec 2020 00:44:13 -0800 (PST) Received: by mail-pj1-x1043.google.com with SMTP id h7so1513809pjk.1 for ; Fri, 11 Dec 2020 00:44:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=P2Z6Y0mUdQeKOQLOjiTLkiK3ZL1MPGjCu+/e0XcmQCM=; b=qtrNGKWEs0pS1HMrMSqaw+g7SDQLDMhb0dmAR0ftJz1Ngo0yhFyOTqBA7/78VkTrvY 3U/nmki1WTl1Bqtm2eQjYTF2CMyU8TgiO/3IEHZcQAWPnOXX2yYRVzp4w+k/qc0/1wCT Gb0LCDBabkcqYOnaql/GbeytRptw2inXyGdsF3liQBj9xlWTs7Zg/lwh9GZ07AzhQMQz FjWSV9hLYZmtKF+42zBfv4MnsmtBychbdjTVVDQbiKITJXe57Hsx7eXvZq5RX+p1EDo9 OR3uWFj439wOfLmtXro2VIusypKZUiBZwP+0CXgBZ9jp4TZtO/f7VWwpSe/bdrZsugaD 5Zow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=P2Z6Y0mUdQeKOQLOjiTLkiK3ZL1MPGjCu+/e0XcmQCM=; b=GZhqlRJP0Sppdfcmr1FpZg3UxoJN1x1AMfQy9CZm0EPZNksp3RChpSeDPj+B0uT24k +lkgF1ygCkMA17OVgRObwCB23/mD818cXrZsOToqMxAEYiKi7+++aY79d3O2Y6MIVMSV ooR5xZsxMFVPx1UF33To0OR2SeOqUz5uiYJiBzPxyq8AYWKqfpMf3Ww6WAwGVT8ZKsaf sqXTdIJoTG5zDlEuhiIb58q4pq+rLg4G3Mf11zVUTHFcNmQ819BTy7hpGQlfVSa6rldy 43EW3fYVkWV36m3o94LFzTBJw7gLITisj22kZy3AdlezMitDz3C+Ri3OlpPJKsJ98kfb wrTg== X-Gm-Message-State: AOAM532mVHbRKRKZKzs+0QgGrnlF36D0Xre5W/FXR+PjvH/QQ0B6gmGx Mbf3vFLkxsIO57M0JgyAjTb5 X-Received: by 2002:a17:90a:9d88:: with SMTP id k8mr12379074pjp.141.1607676253388; Fri, 11 Dec 2020 00:44:13 -0800 (PST) Received: from work ([103.59.133.81]) by smtp.gmail.com with ESMTPSA id 21sm9490160pfx.84.2020.12.11.00.44.10 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Dec 2020 00:44:12 -0800 (PST) Date: Fri, 11 Dec 2020 14:14:06 +0530 From: Manivannan Sadhasivam To: Greg KH Cc: Hemant Kumar , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, jhugo@codeaurora.org, bbhatt@codeaurora.org, loic.poulain@linaro.org, netdev@vger.kernel.org Subject: Re: [PATCH v17 3/3] bus: mhi: Add userspace client interface driver Message-ID: <20201211084406.GD4222@work> References: <1607670251-31733-1-git-send-email-hemantk@codeaurora.org> <1607670251-31733-4-git-send-email-hemantk@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg, On Fri, Dec 11, 2020 at 08:44:29AM +0100, Greg KH wrote: > On Thu, Dec 10, 2020 at 11:04:11PM -0800, Hemant Kumar wrote: > > This MHI client driver allows userspace clients to transfer > > raw data between MHI device and host using standard file operations. > > Driver instantiates UCI device object which is associated to device > > file node. UCI device object instantiates UCI channel object when device > > file node is opened. UCI channel object is used to manage MHI channels > > by calling MHI core APIs for read and write operations. MHI channels > > are started as part of device open(). MHI channels remain in start > > state until last release() is called on UCI device file node. Device > > file node is created with format > > > > /dev/ > > > > Currently it supports QMI channel. libqmi is userspace MHI client which > > communicates to a QMI service using QMI channel. libqmi is a glib-based > > library for talking to WWAN modems and devices which speaks QMI protocol. > > For more information about libqmi please refer > > https://www.freedesktop.org/wiki/Software/libqmi/ > > This says _what_ this is doing, but not _why_. > > Why do you want to circumvent the normal user/kernel apis for this type > of device and move the normal network handling logic out to userspace? > What does that help with? What does the current in-kernel api lack that > this userspace interface is going to solve, and why can't the in-kernel > api solve it instead? > Well, this driver is not moving the network handling logic out. Instead this driver just exposes a channel which can be used to configure the modem using the existing userspace library like libqmi. Then the networking logic is handled by a separate in kernel driver called mhi-net which is queued for v5.11. This is same for most of the Qualcomm USB modems as well. They expose a chardev node like /dev/cdc_wdm0 for configuration and once configured the networking logic is handled by usual network interface wwan0. The difference here is that the underlying physical layer is PCIe and there is this MHI bus which sits on top of it. > You are pushing a common user/kernel api out of the kernel here, to > become very device-specific, with no apparent justification as to why > this is happening. > > Also, because you are going around the existing network api, I will need > the networking maintainers to ack this type of patch. > No, this driver is not at all touching the networking part. As said, the networking logic is all handled by mhi-net driver. Thanks, Mani > thanks, > > greg k-h