From patchwork Thu Feb 21 17:46:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 1046334 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=netronome.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="ZHYReq6T"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 4452360yKKz9s70 for ; Fri, 22 Feb 2019 04:46:42 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728641AbfBURqk (ORCPT ); Thu, 21 Feb 2019 12:46:40 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:38411 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727859AbfBURqk (ORCPT ); Thu, 21 Feb 2019 12:46:40 -0500 Received: by mail-qk1-f194.google.com with SMTP id p15so4776251qkl.5 for ; Thu, 21 Feb 2019 09:46:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=a+ft6EEB97bxf2GSi4M/7hllD0e2pedql4EBE5ajvQw=; b=ZHYReq6TYzqbhS2IXjiZaSzkNSsWiaE06Br4g50dHjAiRMJJKaGQL8GnGgRYdgB84l jksUgE1+iqJX3ogPQZFCoqyFE6niAT+MAUX9de7AssjdAjtZYdvVNycUhcigdyHEvjeF UN6uvcEUdgnjlXo0USGfXn4tssz8Yg5R4M1QjdrohXD3BakuM+S52SurZjfobjJrKtj3 dPmTtbnPe4/lED11GDCvxm95BQuq/5fEGmtsx5PHg/lN6jpeR0+p8HDLbNzrxWm/Kkz8 8o75kkzOFLf1cWVvwXQiL+x3pdD5dTuabk4uNaFMTeZARvbovr8ase+og/4s29Nsn9VS NiUw== 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:mime-version :content-transfer-encoding; bh=a+ft6EEB97bxf2GSi4M/7hllD0e2pedql4EBE5ajvQw=; b=nf+2lVknFx1yLGfQ44ru4b/2Z0mDlqpqggVJ2Eh8qlzlHCR8e952Yd+M+IFPxswDIE 5vYkMrl5YHGEdOGGRYlXfal/5MGfqt8jg9oyalxt/M4aYvEzQ+MreZxyPex3bc7jqVCz tx6TRpSe0vzH6UTyWNzrclpsnELl+0DGfjP0C2o6vLNPFCQlnJO5IlaoEe9czCK+ArT/ f8BJ5B3hMFZ/adwMClpYNNzfMPeM2jjoYoBAmATnf/yKgOZ5XfAJt7AAlczqSaYP/tDm Nq3PrmFnb5nqh2XyDomecFm1tcwPUqZYygf5IWlPaXK0jT16lzVjMV7RU8cwHAQvTw7m +mhw== X-Gm-Message-State: AHQUAuaXSLzdKzlg6fxpPYCBCmxYox5J44/aoI+ZyD9P+Gcp5hYlA6jv 4mrlRWduP3qxleLQfsdOJRmfNQ== X-Google-Smtp-Source: AHgI3IaMrtAQVbJI0UtUtEfvkGxl3D0llv2lHN4pIAIBI7sXqwkdXIy9Gp1SrPwet2dKupVGHI4kKA== X-Received: by 2002:a37:de19:: with SMTP id h25mr3737438qkj.146.1550771199384; Thu, 21 Feb 2019 09:46:39 -0800 (PST) Received: from jkicinski-Precision-T1700.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id y17sm12976352qtc.33.2019.02.21.09.46.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 09:46:38 -0800 (PST) From: Jakub Kicinski To: davem@davemloft.net, jiri@resnulli.us Cc: mkubecek@suse.cz, andrew@lunn.ch, f.fainelli@gmail.com, netdev@vger.kernel.org, oss-drivers@netronome.com, Jakub Kicinski Subject: [PATCH net-next 0/5] devlink: make ethtool compat reliable Date: Thu, 21 Feb 2019 09:46:15 -0800 Message-Id: <20190221174620.12144-1-jakub.kicinski@netronome.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi! This is a follow up to the series which added device flash updates via devlink. I went with the approach of adding a new NDO in the end. It seems to end up looking cleaner (the port favour patches are coming regardless ;)). First patch removes the option to build devlink as a module. Users can still decide to not build it, but the module option ends up not being worth the maintenance cost. Second patch fixes a potential issue with ethtool code, which will become even more problematic as the NDO introduced by the third patch does not hold RTNL. The new NDO allows the core to get the devlink instance based on a netdev pointer. Next the NDO is implemented in the NFP, and ethtool flashing ops removed. Jakub Kicinski (5): net: devlink: turn devlink into a built-in ethtool: hold a reference to the netdevice around devlink compat devlink: create a special NDO for getting the devlink instance nfp: add .ndo_get_devlink nfp: remove ethtool flashing fallback drivers/infiniband/hw/bnxt_re/Kconfig | 1 - drivers/infiniband/hw/mlx4/Kconfig | 1 - drivers/net/Kconfig | 1 - drivers/net/ethernet/broadcom/Kconfig | 1 - drivers/net/ethernet/cavium/Kconfig | 1 - drivers/net/ethernet/mellanox/mlx4/Kconfig | 1 - .../net/ethernet/mellanox/mlx5/core/Kconfig | 1 - drivers/net/ethernet/mellanox/mlxsw/Kconfig | 1 - drivers/net/ethernet/netronome/Kconfig | 1 - drivers/net/ethernet/netronome/nfp/nfp_app.h | 2 + .../net/ethernet/netronome/nfp/nfp_devlink.c | 11 +++ .../ethernet/netronome/nfp/nfp_net_common.c | 1 + .../ethernet/netronome/nfp/nfp_net_ethtool.c | 24 ------ .../net/ethernet/netronome/nfp/nfp_net_repr.c | 1 + include/linux/netdevice.h | 6 ++ include/net/devlink.h | 10 +-- net/Kconfig | 11 +-- net/core/devlink.c | 77 ++++++------------- net/core/ethtool.c | 11 ++- net/dsa/Kconfig | 2 +- 20 files changed, 57 insertions(+), 108 deletions(-)