Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp677076pxj; Wed, 2 Jun 2021 08:41:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0w+BXmwg6DrtJFliWtQMntUyPK3wTFm53mAMmUlO++kmWJOD92MdouHE2RmxuMT1s6FF5 X-Received: by 2002:aa7:dc4f:: with SMTP id g15mr20600079edu.277.1622648496205; Wed, 02 Jun 2021 08:41:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622648496; cv=none; d=google.com; s=arc-20160816; b=QKOXuu0RkAos9KeRRvsBwoDgjV4tDhnOo64kw3uapWlMHZDbryEKrYA9KlrMWFoQxD 09osFwrmFfAPv4wZuEKYzzSCAR51bCPqxrrOEr3smvBLpeTKzdjWHcxQu48ZZVGW3kHN xcOgZ8RSYfT8Pg+wqQeA4tA96Kemz5IwLEz6eLKP2X4dUKNuvxEI7R+U6hN0yaaPPnsc TvZ5sYE9sMM3DklcURWrWKblB4OKt5B0+kqM5VfL3ngiQgpcv9f02UK4a+OU5b7RGOIO mD+0+eebs7NvPJjqgxAjD9p0QC20NrB4ZGyW7Cmsf62MeF6GekesxUr/FpzYPaueG8sY HZyQ== 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=RspDkee90yUUBxRu5qM7EKFWbFArMFdC6jUFJ1rxZY4=; b=X3FIszSE3UUzDPVRyx9RDv718hO0eWpjTcO3SQ0E8SxRUk07R3MbJ+oZyzhtbUvMQi CDsm2hZVHF49fALxBu5rz9g6QyCheWA3usIz00zRjXueecRCHlHY3jgLD+98L+suCfEt b9cfDbxdutqp2cneIxqdEP5F2F70otyeJ/RHDeWyBSqoiSyxbCm+hy1hZDcn7GpCw6GJ l7CYFtpEEyTyqJKCVFmyJFr+BparvB8/Tal3T/hoQ5phVBmd72KrULosaBbpMjd2IzdD tIa/kyQ8oesQbfg/i13CTV77QJ9YjkuvZvi/tZajINDmQG+E9awfkQ9S3m4AS4Uu5V2p OuEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=roEjTXLG; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bo20si168495edb.524.2021.06.02.08.41.11; Wed, 02 Jun 2021 08:41:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@gmail.com header.s=20161025 header.b=roEjTXLG; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231204AbhFBPkp (ORCPT + 99 others); Wed, 2 Jun 2021 11:40:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231415AbhFBPko (ORCPT ); Wed, 2 Jun 2021 11:40:44 -0400 Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05671C061574; Wed, 2 Jun 2021 08:39:01 -0700 (PDT) Received: by mail-ot1-x330.google.com with SMTP id i12-20020a05683033ecb02903346fa0f74dso2775656otu.10; Wed, 02 Jun 2021 08:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RspDkee90yUUBxRu5qM7EKFWbFArMFdC6jUFJ1rxZY4=; b=roEjTXLG72sH1Wu0DdDEvcvn+Wo/eRNO80rtIe0VjfIUcONGD0ie8YhM9ijfsZMSYh q1UoONM9qKk74syckh8BIgYtVUrZB6gcCZ0r3HBGdU4BmPkdh4PPWBqd7ncISUzFQ4Lv H03XY03lC0c5YBSdhgcOID2Wz+9b86HTVQkMghyW76XZENlZj785ZK5ALxUXTsPVbCjF OJmA3j0tNkyIqFHXXmidyegjmU4XG4HQk4ouVDLJjfxwsBAys2wnFs9N6P31jtjQnQIy QAnmwvaqUaMbEVry/t5KuQnxr5/UCgQ9JjG1wm9HkE/khFMsmP9mZ5MzAjytHVwpdpT5 K/9w== 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=RspDkee90yUUBxRu5qM7EKFWbFArMFdC6jUFJ1rxZY4=; b=kOWf+tj4e23vwIE5o0qiW1pPyNpoSV+/hB4fIVLT3xtytwKk3wYZdcE/OZ1+rgD/o8 ebXSLNLvhtecYcF2AK4egYHkblCZ8NENN/9igDXvVL+WkMEcg9WyIuHlsfDLZ3VoQEqR +nCs8kTo2r+pFOR8FvIsKe7r4COV0wXqkcDhyBWOo1eTNcmfDjYW4zYniFF9M0d5BusZ A69Rnqu6UQEtpuhZ+TBlCeW9hD7O6vqZFcrbipboqdFK0nWWet0AN1P9OqbzGjHUIGi8 TVWmBamrGMyFxFr0/jANSt8BQGXs5/u6RK9rmTKYUzHbotLhvXDNM8xy5RBfW9u46Oo9 NiHQ== X-Gm-Message-State: AOAM531Z8RCOpdeQzWzUB1mcHizE7Q/0mZbDKhkqNGIuV3I0d4ecpUAa GHTAsFdUeeJpjShcKAFkRWAgyMftjRTQoilJKaY= X-Received: by 2002:a9d:7a5:: with SMTP id 34mr2406484oto.371.1622648340438; Wed, 02 Jun 2021 08:39:00 -0700 (PDT) MIME-Version: 1.0 References: <20210601080538.71036-1-johannes@sipsolutions.net> <20210601100320.7d39e9c33a18.I0474861dad426152ac7e7afddfd7fe3ce70870e4@changeid> <15e467334b2162728de22d393860d7c01e26ea97.camel@sipsolutions.net> <2dbf474b0a0358627d12b1949ff98b9022943d76.camel@sipsolutions.net> In-Reply-To: <2dbf474b0a0358627d12b1949ff98b9022943d76.camel@sipsolutions.net> From: Sergey Ryazanov Date: Wed, 2 Jun 2021 18:38:49 +0300 Message-ID: Subject: Re: [RFC 3/4] wwan: add interface creation support To: Johannes Berg Cc: Loic Poulain , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, m.chetan.kumar@intel.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, Jun 2, 2021 at 3:56 PM Johannes Berg wrote: >>> The only thing I'd be worried about is that different implementations >>> use it for different meanings, but I guess that's not that big a deal? >> >> The spectrum of sane use of the IFLA_PARENT_DEV_NAME attribute by >> various subsystems and (or) drivers will be quite narrow. It should do >> exactly what its name says - identify a parent device. > > Sure, I was more worried there could be multiple interpretations as to > what "a parent device" is, since userspace does nothing but pass a > string in. But we can say it should be a 'struct device' in the kernel. > >> We can not handle the attribute in the common rtnetlink code since >> rtnetlink does not know the HW configuration details. That is why >> IFLA_PARENT_DEV_NAME should be handled by the RTNL ->newlink() >> callback. But after all the processing, the device that is identified >> by the IFLA_PARENT_DEV_NAME attribute should appear in the >> netdev->dev.parent field with help of SET_NETDEV_DEV(). Eventually >> RTNL will be able to fill IFLA_PARENT_DEV_NAME during the netdevs dump >> on its own, taking data from netdev->dev.parent. > > I didn't do that second part, but I guess that makes sense. > > Want to send a follow-up patch to my other patch? I guess you should've > gotten it, but if not the new series is here: > > https://lore.kernel.org/netdev/20210602082840.85828-1-johannes@sipsolutions.net/T/#t Yes, I saw the second version of your RFC and even attempted to provide a full picture of why this attribute should be generic. I will send a follow-up series tonight with parent device exporting support and with some usage examples. >> I assume that IFLA_PARENT_DEV_NAME could replace the IFLA_LINK >> attribute usage in such drivers as MBIM and RMNET. But the best way to >> evolve these drivers is to make them WWAN-subsystem-aware using the >> WWAN interface configuration API from your proposal, IMHO. > > Right. -- Sergey