From patchwork Sat Jun 12 08:20:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 459153 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp1612479jae; Sat, 12 Jun 2021 01:13:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrHqGoW593vKxyzNMizc59K6QOc+rfPT135vAlYgsnuNjYxoeW/EQHFeupG3yLKFBHq2Dj X-Received: by 2002:aa7:d158:: with SMTP id r24mr7440508edo.171.1623485588396; Sat, 12 Jun 2021 01:13:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623485588; cv=none; d=google.com; s=arc-20160816; b=WaMpadrc0xpxBh3nJSPJS1EURdbHsrYcO9FrxYmC8jjs7NWhFsbGwhXk7VXQlf2lIG OmO8WD94DbxMngpS0SPwZaSalOnQ4z/kY1YtXxKQWEu7lPdt6y40JQYKxVgn+sUb5GnO bKjGX78ZO8O0jDDz6pLy62SfjdpCDhFS5gp+S8JZ8CAYopiRNzHqhRV7tsCxDx051IPS x88eeuAf66qOHsuSF/pqw5t8r/gZv7gpAB9ABcgkA8VaQLs6XAsEVL4A9xS6MWkFH0n/ eocy0pXWvOi43A0fgXEQkwh+2x98Jhin4+PLYaR0yixJPy8cye5gbOGTw72inDbYCV0S BTdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=PjfXwsPcghDr/hl25l9T5SqKcmdJcn7DVb5D0lG+L2k=; b=RydFnvO2sWDWZF9PcHmTXPlp7e6jiJmU8r+1+t3Sxugo48jNii1HeHscvJEsD1yruX +Hjlj6cvEh4K0J8PEvd4/QRdrPtV2ioBErcOaBieGt0F0phkIh9dZHtetWL4oB4cIc0p Ubk52cK8b2BhUcjjCrF5kjRUyND6lKmGs4Ui4ikca+q3iz3P8fOtl2xr7HqPn9g2+FLl M5A1LJTg8unjTEYiUdnnJbQM4yf1gOcVET+rc++YdMFVKWwlwWwTkFJQtuawCPpLYSnG BiMdLKeQ2lae5wiUrKGz3EJYr+68T/cTiOywKUMIwBQ8z/UFD8gNZd77sJMH9AlRs7n9 cXPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K83mv9kB; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 h1si6728008ejo.462.2021.06.12.01.13.08; Sat, 12 Jun 2021 01:13:08 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-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=K83mv9kB; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 S231161AbhFLIOd (ORCPT + 8 others); Sat, 12 Jun 2021 04:14:33 -0400 Received: from mail-wm1-f43.google.com ([209.85.128.43]:43587 "EHLO mail-wm1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229584AbhFLIOc (ORCPT ); Sat, 12 Jun 2021 04:14:32 -0400 Received: by mail-wm1-f43.google.com with SMTP id 3-20020a05600c0243b029019f2f9b2b8aso9904911wmj.2 for ; Sat, 12 Jun 2021 01:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=PjfXwsPcghDr/hl25l9T5SqKcmdJcn7DVb5D0lG+L2k=; b=K83mv9kBveJx0y6g5THgQNZ/GY3TW8+W5q3A0ky+WF+QUzHFUyFmYtZDLQRP5NkEps 7xJSyQiA0UETnRjpVu7utq/5vtaXS79SQPavTXlj1Eca0kw+gnd05LsSuOefk+JPSWbd HsPad/Jal+xcpzRNG6Fc1aZeEy666LChll78sACwyvXTA+8/lsZt5d/OITPVUytLAExT Lfda1WtV2KfWDQOuFQeIjnbaDaIaQZ48Vky9c5lLW2Me/Xc2/2FfW+04JmrZxcgF4YaE ObommooqjF0E3U+6BuMoNzgyZw/na6OSp9CeHiedL5Ii5drFM0I7xtrQA0TT1j31qhTA Tt9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PjfXwsPcghDr/hl25l9T5SqKcmdJcn7DVb5D0lG+L2k=; b=Plyzoa4lEEI1OTSyBm7eIWmtmJQObxF2plyf6yehOx+hIqY7Acwvzb5vjbuJDqCo/i qUijdCWIa3VBcvWpB5YUz7AAEfcOeVCGqU5CRnjlne3WMgDsaALHKtfqwGEEZ/FFt1Es E7c/DZNBJqotsfg7Bkf/O7b1vJXxHPVfjkj53471a6r88nTScHVN+bZdrAy54ikwSsJB x8g1hS9p5p975RNySpLGu9wvj0dTsvCdEqUQCcEVgLmodToBBXSVlriV/R/VjUV5aXA2 h9caqgGhjXarm2j2NiSDaG8/ZA32/QEkkbeK70y0QR4ki2O1I9I3kdyQktTsblfkRChH cu1Q== X-Gm-Message-State: AOAM5327lPNBswM4aJI6PYJ5hRjcXWzgk93xwEOSVOKHgmYZihGTunmp mmmTlbWNW0tBZOsaA64Kdx+NHQ== X-Received: by 2002:a7b:c10b:: with SMTP id w11mr23810742wmi.186.1623485479049; Sat, 12 Jun 2021 01:11:19 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:82c:5f0:85ed:406e:1bc4:a268]) by smtp.gmail.com with ESMTPSA id w13sm10619313wrc.31.2021.06.12.01.11.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jun 2021 01:11:18 -0700 (PDT) From: Loic Poulain To: kuba@kernel.org, davem@davemloft.net Cc: netdev@vger.kernel.org, m.chetan.kumar@intel.com, johannes.berg@intel.com, leon@kernel.org, ryazanov.s.a@gmail.com, parav@nvidia.com, Loic Poulain Subject: [PATCH net-next v3 0/4] net: Add WWAN link creation support Date: Sat, 12 Jun 2021 10:20:53 +0200 Message-Id: <1623486057-13075-1-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Most of the modern WWAN modems are able to support multiple network contexts, allowing user to connect to different APNs (e.g. Internet, MMS, etc...). These contexts are usually dynamically configured via a control channel such as MBIM, QMI or AT. Each context is naturally represented as a network link/device, and the muxing of these links is usually vendor/bus specific (QMAP, MBIM, intel iosm...). Today some drivers create a static collection of netdevs at init time, some relies on VLAN link for associating a context (cdc-mbim), some exposes sysfs attribute for dynamically creating additional netdev (qmi_wwan add_mux attr) or relies on vendor specific link type (rmnet) for performing the muxing... so there is no generic way to handle WWAN links, making user side integration painful. This series introduces a generic WWAN link management interface to the WWAN framework, allowing user to dynamically create and remove WWAN links through rtnetlink ('wwan' type). The underlying 'muxing' vendor implementation is completely abstracted. The idea is to use this interface for upcoming WWAN drivers (intel iosm) and to progressively integrate support into existing ones (qmi_wwan, cdc-mbim, mhi_net, etc...). v2: - Squashed Johannes and Sergey changes - Added IFLA_PARENT_DEV_BUS_NAME attribute - reworded commit message + introduce Sergey's comment v3: - Added basic new interface user to this series (mhi_net) - Moved IFLA_PARENT_DEV_NAME nla_policy introduction to right patch - Added cover letter - moved kdoc to .c file Johannes Berg (3): rtnetlink: add alloc() method to rtnl_link_ops rtnetlink: add IFLA_PARENT_[DEV|DEV_BUS]_NAME wwan: add interface creation support Loic Poulain (1): net: mhi_net: Register wwan_ops for link creation drivers/net/Kconfig | 1 + drivers/net/mhi/net.c | 123 ++++++++++++++++++---- drivers/net/wwan/wwan_core.c | 245 +++++++++++++++++++++++++++++++++++++++++-- include/linux/wwan.h | 24 +++++ include/net/rtnetlink.h | 8 ++ include/uapi/linux/if_link.h | 7 ++ include/uapi/linux/wwan.h | 16 +++ net/core/rtnetlink.c | 30 +++++- 8 files changed, 419 insertions(+), 35 deletions(-) create mode 100644 include/uapi/linux/wwan.h -- 2.7.4