From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52908C31E5B for ; Tue, 18 Jun 2019 15:20:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 288B7213F2 for ; Tue, 18 Jun 2019 15:20:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HhgTn3B5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729395AbfFRPUt (ORCPT ); Tue, 18 Jun 2019 11:20:49 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:33008 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729701AbfFRPUm (ORCPT ); Tue, 18 Jun 2019 11:20:42 -0400 Received: by mail-io1-f66.google.com with SMTP id u13so30820591iop.0 for ; Tue, 18 Jun 2019 08:20:41 -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=Gm6zrt3+jyOk79FjVLjqIif+2ZGmPF1/TjoosYPa/aY=; b=HhgTn3B5frcZ87brr7+01lN2WHNxic6G3R1o8OJlYQqfp1hc1M3WllIY/XNiGPHaCI Y49KrIQF61r5gxzA3PSinDixPJnXEsEXx6srKhi+lH5frsHNq772xLo9rU0uJRQ0ebi3 3w56DiGhe4EdCPahcmsF3c9JTDGkepUtjqCViyswiVcC0HxhoXjc78KopLoqO0ENMWUL AWvZTUtqNEkFjvosSqLLdX6t7RDLdskTguOS4heP41b4rfNadXsjMO1ltzxQBUjRiV9x 3lNj2/XsHUqF5UiCjHgOaLMMf59YVbkgLlt7NZqFdjvl3iv8Wi3VgT4dH65UXvzeg9f7 8obg== 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=Gm6zrt3+jyOk79FjVLjqIif+2ZGmPF1/TjoosYPa/aY=; b=XyeLsTAXeqfNRop8H2FKnxM0pRhOame+nllssLyRCHiteULqffcSV/+PKruO150gne p2WSAmFWj2ZYMVwjEGVgeLb0ApVWPXEDs4u/Yvwkrc0VsViEFeEgUveBt0FXC8GfKCRC cIJl31jvC9n2QwE9YYTzhl+VzuHtGcdPKUL1CNUBdWTxbfJ2eC5tumJo2WKj1MaVjn7G 5Qr5MxQ1WHHxgOcPi9wxBXSXRewwLg0HgaOGI90//HrcAQgVnTwhT0AMU4qQH9gzPd3l Cmo6TnOJma9RKzaO6yY8ufRzA4eXC2L3USqqNc6As2fKoqo1XqHfVZ2kBdYyH+IZybYQ CoDA== X-Gm-Message-State: APjAAAWV+fLHvh/HQ9kk600MA+9KcEWyeREeRsCgYeBJYP2TuIYfe4er YKuDuD//daH/ZhihoXL4mf8vXg== X-Google-Smtp-Source: APXvYqzN+CqWZh0iUp59ZmRZ1rXHigzZ346x42zx/+UeRjEIKpJjL/46ZcKoAoNJbjiPleDHtpFqWg== X-Received: by 2002:a5d:9d90:: with SMTP id 16mr1935330ion.132.1560871241374; Tue, 18 Jun 2019 08:20:41 -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 h18sm12796116iob.80.2019.06.18.08.20.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jun 2019 08:20:40 -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: <850eed1d-0fec-c396-6e91-b5f1f8440ded@linaro.org> Date: Tue, 18 Jun 2019 10:20:39 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On 6/17/19 7:25 AM, Johannes Berg wrote: > On Mon, 2019-06-17 at 13:42 +0200, Johannes Berg wrote: > >> But anyway, as I alluded to above, I had something like this in mind: > > I forgot to state this here, but this was *heavily* influenced by > discussions with Dan - many thanks to him. Thanks for getting even more concrete with this. Code is the most concise way of describing things, once the general ideas seem to be coming together. I'm not going to comment on the specific code bits, but I have some more general questions and comments on the design. Some of these are simply due to my lack of knowledge of how WWAN/modem interactions normally work. First, a few terms (correct or improve as you like): - WWAN device is a hardware device (like IPA) that presents a connection between AP and modem, and presents an interface that allows the use of that connection to be managed. - WWAN netdevice represents a Linux network interface, with its operations and queues, etc., but implements a standardized set of WWAN-specific operations. It represents a logical ' channel whose data is multiplexed over the WWAN device. - WWAN channel is a user space abstraction that corresponds with a WWAN netdevice (but I'm not clear on all the ways they differ or interact). - The WWAN core is kernel code that presents abstractions for WWAN devices and netdevices, so they can be managed in a generic way. It is for configuration and communication and is not at all involved in the data path. You're saying that the WWAN driver space calls wwan_add() to register itself as a new WWAN device. You're also saying that a WWAN device "attaches" a WWAN netdevice, which is basically notifying the WWAN core that the new netdev/channel is available for use. - I trust that a "tentative" attachement is necessary. But I'm not sure what makes it transition into becoming a "real" one, or how that event gets communicated. Some questions: - What causes a new channel to be created? Is it initiated by the WWAN device driver? Does the modem request that it get created? User space? Both? - What causes a created channel to be removed? - You distinguish between attaching a netdevice and (what I'll call) activating it. What causes activation? - How are the attributes of a WWAN device or channel set, or communicated? - Are there any attributes that are only optionally supported, and if so, how are the supported ones communicated? - Which WWAN channel attributes must be set *before* the channel is activated, and can't be changed? Are there any that can be changed dynamically? And while the whole point of this is to make things generic, it might be nice to have a way to implement a new feature before it can be "standardized". Thanks. -Alex PS I don't want to exclude anybody but we could probably start a different mail chain on this topic... >> driver_dev >> struct device *dev (USB, PCI, ...) >> net_device NA >> net_device NB >> tty TA >> ... >> . . .