Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2810680ybd; Mon, 24 Jun 2019 13:07:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHQWnxX8cHJZ0bXkqPBfZxg4jKmtQMAKTNv6R6sGUOeyIxXAbcMAI8dOXjG6yagltb42h1 X-Received: by 2002:a17:902:8eca:: with SMTP id x10mr36347731plo.266.1561406844536; Mon, 24 Jun 2019 13:07:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561406844; cv=none; d=google.com; s=arc-20160816; b=mib3DI/EPsSBRQE6ss7TqFhdVIuLitELGN4GloOcbRNMvKUnnk1MDZG01zQ7i81g2Q 0pu37nvwcGLL71kgJF2NiOt2nTmLbY9wtsfGbGUkMd7apzTQmDn2T0J+6GIPQpqfR2tX G1NPB/tNmiQ5QOnfdTvCz5Xmp6hvqln7awsAJlIhJ43baWGMgWrheR93T+Se3/CLo+pu VO03Kx0PtDqR+yXVAIkDo7zFZtoy+dm9O+JonkTglPbzo3mt/GJdvoyqp5nEZGba1Ozd KKPu0oCPfIGfKyaKCc00xS8LneJazgVA9CKvgS64xLVGzqGg0+zims8gfHSvmNufic2q lb1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=xBoAtxtjQiOSLd1WpAbjDP8j6XulfDrLmE862OfreeA=; b=aEuKoldurEOYqFeU6MDSfX6ld6VDux0ctTWyPILYbpe+O2Dk/QzLMuiVeqPYR6cJVO eh+ruv/923qVn8sAREvi+BsGZuf4YlqTLRUJxtZmrQZ9lcQEyd37ZEf3W+Yy+oq2J7Eu /+xaB84c8Jlgqiod7MbEOOEnKg32SH5j8FKea+7wJT47FDweBj7ayFaRbap45kfda9KO Ryl1RarRYD1eolfldLwBGeQY3VQVWw1f/yiKfq00soikBJmQnbcLRre845y2Jbi/Bp3g UZvXfd1DxzLngw/oPlGKDVIO6iNnDydMzJiXs4DZSCKd0gonDEb30Q5CWNQIs6UPZ4Fr t9Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fYYcVU3Y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id v126si5729631pgb.150.2019.06.24.13.07.08; Mon, 24 Jun 2019 13:07:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fYYcVU3Y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1731972AbfFXQVl (ORCPT + 99 others); Mon, 24 Jun 2019 12:21:41 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:45372 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732017AbfFXQVk (ORCPT ); Mon, 24 Jun 2019 12:21:40 -0400 Received: by mail-io1-f67.google.com with SMTP id e3so100165ioc.12 for ; Mon, 24 Jun 2019 09:21:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=xBoAtxtjQiOSLd1WpAbjDP8j6XulfDrLmE862OfreeA=; b=fYYcVU3Y8B8N6WXkcacNkyYkt7leH5k7EMS3TQEAguupNHpoSAXW8cR4JoS5rXAVOZ daQIFAS9sj7BRg7+I3p0mNhO2ntN/ltIdIDMpSE8gjMw/9zJC2hqefo50TTKdQakcx3w iX7btK+oJjzhx1Fobjh/tt2szvDxnOocdGFcXS1ZdxReOQZxKy1/wWcU1O+oT9sd6rH/ 4UwP1knRJXnqXCF0HTgh2jUCcRt7UyK4kp4wvDo9zRZhgn1VBHT74mskDslvHCDrDfp6 S+uP2hLcyFaVg0QW3iu4gjQhYl/5RmO3IBnjM6nS9KhsGvAxh5f5qG3D45pxvLI/9DO8 MJhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xBoAtxtjQiOSLd1WpAbjDP8j6XulfDrLmE862OfreeA=; b=WznavfOkzGFDKFcnrQ40V1iE8SBYQKi+YrOiC2C1UyH7b15ngwqEUoCl4sZYWzDw/6 0lDv7y4bB+4bjxSzrZaR267KK148TsQt9u29XugtX2a6+YLYbDflmMM95voSkdXAmfH+ FK3bA6exkeLGutJW0YFX+V7IeafN/e5jK4loyxziNJoi+1TJcDBMO5c1feqgfiMmJdEx thPtgMbDsXOlbGl/r2jTPteOYgCQgpaWvud853BEyqWxalXH8AxGX3U6jRj7R+FlWY58 x+RlkywhkxCLhmxsltBO2KyQHDgvF2nr83H9TqKcUEK2dQEt5AK6ge1LRsOWK/wt/0uI k/Jg== X-Gm-Message-State: APjAAAXSZKcjbtN3TcNdPshPvyWunmb7H2Udt52fg2/ljl+h1uFOokbn Ghwsgl8GSmOOX+9dMKyR1ukNVg== X-Received: by 2002:a6b:7d49:: with SMTP id d9mr93389ioq.50.1561393299179; Mon, 24 Jun 2019 09:21:39 -0700 (PDT) Received: from [172.22.22.26] (c-71-195-29-92.hsd1.mn.comcast.net. [71.195.29.92]) by smtp.googlemail.com with ESMTPSA id b8sm15046010ioj.16.2019.06.24.09.21.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jun 2019 09:21:38 -0700 (PDT) Subject: Re: [PATCH v2 00/17] net: introduce Qualcomm IPA driver To: Johannes Berg , Arnd Bergmann , Dan Williams Cc: Subash Abhinov Kasiviswanathan , abhishek.esse@gmail.com, Ben Chan , Bjorn Andersson , cpratapa@codeaurora.org, David Miller , DTML , Eric Caruso , evgreen@chromium.org, Ilias Apalodimas , Linux ARM , linux-arm-msm@vger.kernel.org, Linux Kernel Mailing List , linux-soc@vger.kernel.org, Networking , syadagir@codeaurora.org References: <380a6185-7ad1-6be0-060b-e6e5d4126917@linaro.org> <36bca57c999f611353fd9741c55bb2a7@codeaurora.org> <153fafb91267147cf22e2bf102dd822933ec823a.camel@redhat.com> From: Alex Elder Message-ID: Date: Mon, 24 Jun 2019 11:21:37 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/18/19 2:03 PM, Johannes Berg wrote: > On Tue, 2019-06-18 at 08:45 -0500, Alex Elder wrote: > >> If it had a well-defined way of creating new channels to be >> multiplexed over the connection to the modem, the IPA driver >> (rather than the rmnet driver) could present network interfaces >> for each and perform the multiplexing. > > Right. That's what I was thinking of. . . . >> But I think the IPA driver would register with the WWAN core as >> a "provider," and then the WWAN core would subsequently request >> that it instantiate netdevices to represent channels on demand >> (rather than registering them). > > Yeah, I guess you could call it that way. > > Really there are two possible ways (and they intersect to some extent). > > One is the whole multi-function device, where a single WWAN device is > composed of channels offered by actually different drivers, e.g. for a > typical USB device you might have something like cdc_ether and the > usb_wwan TTY driver. In this way, we need to "compose" the WWAN device > similarly, e.g. by using the underlying USB device "struct device" > pointer to tie it together. I *think* this model makes the most sense. But at this point it would take very little to convince me otherwise... (And then I saw Arnd's message advocating the other one, unfortunately...) > The other is something like IPA or the Intel modem driver, where the > device is actually a single (e.g. PCIe) device and just has a single > driver, but that single driver offers different channels. What I don't like about this is that it's more monolithic. It seems better to have the low-level IPA or Intel modem driver (or any other driver that can support communication between the AP and WWAN device) present communication paths that other function- specific drivers can attach to and use. > Now, it's not clear to me where IPA actually falls, because so far we've > been talking about the IPA driver only as providing *netdevs*, not any > control channels, so I'm not actually sure where the control channel is. There is user space code that handles all of this, and as far as I can tell, parts of it will always remain proprietary. > For the Intel device, however, the control channel is definitely > provided by exactly the same driver as the data channels (netdevs). I do see the need for a control interface. But I suspect it would *overlap* with what you describe and might need to be more general and/or extensible. Are there control channels specific to use for a modem--like a "modem control interface" or something? Is there something broader, like "this WWAN device supports functions A, and B with protocols X, Y; please open a connection to A with protocol X." Do both exist? I'm just trying to contain whatever a "control channel" really represents, and what it would be associated with. > "provider" is a good word, and in fact the Intel driver would also be a > provider for a GNSS channel (TBD how to represent, a tty?), one or > multiple debug/tracing channels, data channels (netdevs), AT command > channels (mbim, ...?) (again tbd how to represent, ttys?), etc. Yes, this is much clearer to me now. > What I showed in the header files I posted so far was the provider only > having "data channel" ops (create/remove a netdev) but for each channel > type we either want a new method there, or we just change the method to > be something like > > int (*create_channel)(..., enum wwan_chan_type chan_type, ...); > > and simply require that the channel is attached to the wwan device with > the representation-specific call (wwan_attach_netdev, wwan_attach_tty, > ...). Or maybe have the WWAN device present interfaces with attributes, and have drivers that are appropriate for each interface attach to only the ones they recognize they support. -Alex > This is a bit less comfortable because then it's difficult to know what > was actually created upon the request, so it's probably better to have > different methods for the different types of representations (like I had > - add_netdev, add_tty, ...). > > Note also that I said "representation-specific", while passing a > "channel type", so for this we'd actually need a convention on what > channel type has what kind of representation, which again gets awkward. > Better to make it explicit. > > (And even then, we might be able to let userspace have some control, > e.g. the driver might be able to create a debug channel as both a TTY or > something else) > > johannes >