Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp402929pxj; Wed, 2 Jun 2021 01:59:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMSUu5iNHvGZaeW+j0md2P0t5R3wxx26RXfi6YSX/rqnnp7yzFnwzmJacGnqx7QO2Q8Ruk X-Received: by 2002:a05:6402:2789:: with SMTP id b9mr37518857ede.122.1622624371433; Wed, 02 Jun 2021 01:59:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622624371; cv=none; d=google.com; s=arc-20160816; b=nImZR/qsnkeGS7n0/WNu6dKZDVrvxJHZRj+svJeOF5B8BiFU1pRMVJClgW1P6jUhIc w9oxYf6yWWm2qQ9M4LSOGusWFWDpQp+y78yC/IeeEs6UF9yhddOesg7cR1NTvIyCviD8 QXxlH2OwChH6W3Is+EuY+qPPWLTytTfqXp5owiMeIc6qtmEA+NzrIBImqQ1UWyDZppBU ZCIpeY74wGcJdRk6Sk742xRFEVH1rf49yCgRBEYxZkCTHK2CwObKTJQ4zlVP6lRo0WrT 9pQxCTXkvYyEex5pkZq2KruuWL9Bo+xhOvS4Y5iZ2+3K1U7AMzzWGarQbQikPm7ChBYy Iz6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=DSR/DgYTsInBeomQ3/muO7rZ8XJKzcHIy7pLtyLgQ4s=; b=HY0NnZv4AoD/V+2G1bPVvcJqrhh7vLlAD/4ibk15/tXOBS1Yche+wKe7q+Ghz9Q3Es Y5hec8jqWsX+ARNU2UN7wDBnhAWMj0fqmnftqVyPdPKs/YFHbR9ibXVF/8o+7Q3H2/6h weoHg+dqhbLfp2DpHHyICTeJ19u1YCuMH4jXY5SeGcEqAP4kEwKyqXKEwxDoqZZDgho4 Kfj2qor7kqB+cWbxDIwGRAUlDwMz+oJdnXswchUf2edlDy/PfInmSUIwPmCyejD1ffXQ eRM4KCUEqQ2H+hsFvcfbq1oMJpxA2RheTwB2OH1BcFQvb50T1dmxYjw1WuokBoe33jHR Xh7w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r15si1500313edw.110.2021.06.02.01.59.03; Wed, 02 Jun 2021 01:59:31 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231784AbhFBHkG (ORCPT + 99 others); Wed, 2 Jun 2021 03:40:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231775AbhFBHkE (ORCPT ); Wed, 2 Jun 2021 03:40:04 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4662DC061574; Wed, 2 Jun 2021 00:38:22 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1loLSC-000x3I-97; Wed, 02 Jun 2021 09:38:16 +0200 Message-ID: <15e467334b2162728de22d393860d7c01e26ea97.camel@sipsolutions.net> Subject: Re: [RFC 3/4] wwan: add interface creation support From: Johannes Berg To: Sergey Ryazanov , Loic Poulain Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, m.chetan.kumar@intel.com Date: Wed, 02 Jun 2021 09:38:15 +0200 In-Reply-To: (sfid-20210602_034254_098035_0151122C) References: <20210601080538.71036-1-johannes@sipsolutions.net> <20210601100320.7d39e9c33a18.I0474861dad426152ac7e7afddfd7fe3ce70870e4@changeid> (sfid-20210602_034254_098035_0151122C) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Sergey, > Wow, this is a perfect solution! I just could not help but praise this > proposal :) Heh. > When researching the latest WWAN device drivers and related > discussions, I began to assume that implementing the netdev management > API without the dummy (no-op) netdev is only possible using genetlink. > But this usage of a regular device specified by its name as a parent > for netdev creation is so natural and clear that I believe in RTNL > again. > > Let me place my 2 cents. Maybe the parent device attribute should be > made generic? E.g. call it IFLA_PARENT_DEV_NAME, with usage semantics > similar to the IFLA_LINK attribute for VLAN interfaces. The case when > a user needs to create a netdev on behalf of a regular device is not > WWAN specific, IMHO. So, other drivers could benefit from such > attribute too. To be honest, I can not recall any driver that could > immediately start using such attribute, but the situation with the > need for such attribute seems to be quite common. That's a good question/thought. I mean, in principle this is trivial, right? Just add a IFLA_PARENT_DEV_NAME like you say, and use it instead of IFLA_WWAN_DEV_NAME. It'd come out of tb[] instead of data[] and in this case would remove the need to add the additional data[] argument to rtnl_create_link() in my patch, since it's in tb[] then. 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? johannes