Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3873812pxv; Mon, 19 Jul 2021 10:49:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyX6PTUT9mflQUyFfb111BtLzkFeulJpvh75m7r8XQTokikPQxY1RRqbdMZR/NW2t2tyUSe X-Received: by 2002:a17:906:4103:: with SMTP id j3mr28102794ejk.526.1626716966045; Mon, 19 Jul 2021 10:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626716966; cv=none; d=google.com; s=arc-20160816; b=1Kv/EDVF0m3nQ9gCYsuxBy1NdFclfOTQVdF0+b7RrlyR+WUPVDBpzFUkxaT5GqnGeO ERIrEFVA+UNRR7tbciTQpb1ptY0WbuD+iQZDjPGCc4UgW6tkgHXh3JFqjHtRTmkNPGC0 UJEhRfsReZNQzSkap8odCOOdK2uIJ5ivg8l/vr95FbMGFu5Q3xayeT68alXPyZ2gJ0W0 17xTQVCI0Pv2BeTvClPStDC5NQfYnLX65AbxgPeNGEp8OWJV7jVsYB1hn9RXBNqATfzd oi8U2PRwRggyBA7X2TVUZpTmmxvfs1h872a70qQWNQ3LNQvdsAk9/esrdTA0GYJSN/Gn Qcnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=MkKhttHk1f1NxvEjszFkNPRaTR2uQK8NNQrR3I9+ckM=; b=Tng7/f0BCm9cDm+cViY611NMdgrh8gaRd581OVXt8a9ZR7LW9FnDjqMCiDbJuUn6Fq is4t71oAdOyiWvc+Fqh4GCrFxrCskKzAV0Zu8u2Lpse0V3q41Gx4OYcGam2GnRPoRqqz QtAghIIr4pGpz5WeJlmYEhcUMDol9iAMvr1rAJ7qptyyroF6JTlRx+VWeQZTGtELuI7m ku0bMYhn50icZ5kKBj+demZjLRv4akANBjh2Hj5tOOvMQAJXYJFpgE9eAH1QOjgo3WR0 A8xVmjbR2013Z+WBvHMbo9lCb7aR4jkwaB0KQTQgO7aDNtqDY+D264RvRtSulSiUewTH W34g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lMJZcOx6; 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 a9si21636101edx.29.2021.07.19.10.49.02; Mon, 19 Jul 2021 10:49:26 -0700 (PDT) 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=lMJZcOx6; 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 S1353607AbhGSREO (ORCPT + 99 others); Mon, 19 Jul 2021 13:04:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348906AbhGSPff (ORCPT ); Mon, 19 Jul 2021 11:35:35 -0400 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7E82C0A88CD for ; Mon, 19 Jul 2021 08:24:50 -0700 (PDT) Received: by mail-pg1-x52f.google.com with SMTP id k20so19404377pgg.7 for ; Mon, 19 Jul 2021 08:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MkKhttHk1f1NxvEjszFkNPRaTR2uQK8NNQrR3I9+ckM=; b=lMJZcOx6oA7r1fitEX6eCxK880OIlVRr2rH/LT49CPkL3ITNjZ/NPY6N6YmEwBHwT3 FvHe3PgnV5SmlS1oG+8cBvE4+Ow59gFX5xochDQ0tRZVdhxPkXYAGcvV+V2yUQ9RJ0mn rYE0k/MGE6B7F8wRUS0zf/CmcLnsn058kUgZ9piS6aoX9r9HqLAdmLXb+CJFcpkHJbB+ 92gVu13ylQzRpowsNN5al1KOXpfCMNxK01aZYtS/LArebMSTZuAuxu4kgMY2mbJsQ3oG 2nw2HqhJ3AOly/2NQwRte8o2k+GcV3HlcpyrAZpCRq+GS5E5VtevVrYO6A+Y6Y9FVGPf B2yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MkKhttHk1f1NxvEjszFkNPRaTR2uQK8NNQrR3I9+ckM=; b=E71lglemd0D5vF2BKjHQsdmNG5Rr6BTF4W93PRtrH7E5bVuMtIyQGghxQVErs21/W/ xnsA+L+w7t+W68kS0bsw8K7A2iT7rKb9r5enkABYGqGBLzGAryXkmk9pALa9z1la522c WGFaPHe5v0n5zZflrv3IchaaOCEH93HgB+/igfwviNOhD6J+2iiNWPbla+2NBTKxRi1H IDF0EH/+3Su3Ff1JEV2nfN7um3EpESUwwxD68bWb9RwoNRzwZea6UDxj3Opphs0IO2Je YYbAaR9MrVOUDS/125mjgLAgXfiLs7zJUqWNCK5Px0kk/1Gbr+GYclZo4+HgTC09M+tT U5jw== X-Gm-Message-State: AOAM5325ZOMKqExNbxnMvghJozjcpmD9K4AtnPG2B7XZRYmKYI419Fj4 gtUoTi+52Yfv3QcA8Hs/i28TBl1duoiZ0PBGPMAQkA== X-Received: by 2002:a63:3107:: with SMTP id x7mr17715236pgx.303.1626709896370; Mon, 19 Jul 2021 08:51:36 -0700 (PDT) MIME-Version: 1.0 References: <20210719145317.79692-1-stephan@gerhold.net> <20210719145317.79692-5-stephan@gerhold.net> In-Reply-To: <20210719145317.79692-5-stephan@gerhold.net> From: Loic Poulain Date: Mon, 19 Jul 2021 18:01:33 +0200 Message-ID: Subject: Re: [RFC PATCH net-next 4/4] net: wwan: Add Qualcomm BAM-DMUX WWAN network driver To: Stephan Gerhold Cc: "David S. Miller" , Jakub Kicinski , Sergey Ryazanov , Johannes Berg , Bjorn Andersson , Andy Gross , Vinod Koul , Rob Herring , Aleksander Morgado , Network Development , linux-arm-msm , dmaengine@vger.kernel.org, devicetree , open list , phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Jeffrey Hugo Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stephan, On Mon, 19 Jul 2021 at 17:01, Stephan Gerhold wrote: > > I'm not sure how to integrate the driver with the WWAN subsystem yet. > At the moment the driver creates network interfaces for all channels > announced by the modem, it does not make use of the WWAN link management > yet. Unfortunately, this is a bit complicated: > > Both QMAP and the built-in multiplexing layer might be needed at some point. > There are firmware versions that do not support QMAP and the other way around > (the built-in multiplexing was disabled on very recent firmware versions). > Only userspace can check if QMAP is supported in the firmware (via QMI). > > I could ignore QMAP completely for now but I think someone will show up > who will need this eventually. And if there is going to be common code for > QMAP/rmnet link management it would be nice if BAM-DMUX could also make > use of it. I have this on my TODO list for mhi-net QMAP. > But the question is, how could this look like? How do we know if we should > create a link for QMAP or a BAM-DMUX channel? Does it even make sense > to manage the 1-8 channels via the WWAN link management? Couldn't it be specified via dts (property or different compatible string)? would it make sense to have two drivers (with common core) to manage either the multi-bam channel or newer QMAP based single bam-channel modems. > > Another problem is that the WWAN subsystem currently creates all network > interfaces below the common WWAN device. This means that userspace like > ModemManager has no way to check which driver provides them. This is > necessary though to decide how to set it up via QMI (ModemManager uses it). Well, I have quite a similar concern since I'm currently porting mhi-net mbim to wwan framework, and I was thinking about not making wwan device parent of the network link/netdev (in the same way as wlan0 is not child of ieee80211 device), but not sure if it's a good idea or not since we can not really consider driver name part of the uapi. The way links are created is normally abstracted, so if you know which bam variant you have from wwan network driver side (e.g. via dts), you should have nothing to check on the user side, except the session id. Regards, Loic