Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1085459pxb; Wed, 6 Oct 2021 23:57:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOLobKkTjpwdAnYNmlBryhtaIgoOeAzQ8tn2ueqAKHY7zIQF/JwhQMt/unGSQ9E/OXj/Z/ X-Received: by 2002:a17:906:2f16:: with SMTP id v22mr3415026eji.126.1633589838676; Wed, 06 Oct 2021 23:57:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633589838; cv=none; d=google.com; s=arc-20160816; b=ZPLGy7Cx0nB7Ff0sj8curfvx9MiPQJDVO836cqQtrHUFEBFRl60qNipkzTJvHEM48A ESy10PMZckD8YWPMHTo0Y168jlCIcLKwj/ao38tZgwQU6cLwAKHtsUKM8OM3mXsRLdUI FsTInfSvOH/X7cD58MabDu1r9IcK5pOIkKaadqzwcij8GCAsu1daY1oAivcf/27DaVHG /JXhUPk2SUSEJauNEzC1/A/Pi/LgqjMns1WfPOxekl69OgLw1Bud4k5lD3UTehy3YIUA CUnDdDvjtZH+Due75SV6V5R/xQn8MlfP1hYLModhRYNtSDNv61Zj9OVk/d//Svcr24Lm 516A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=N+tBfdj0PLEbWQwquk9yOOpMjHy+/awLlIOWwKitRBc=; b=T1mHY+bbZmgs9Qt8fBbH2jRXqBa06BgmNaWQyJyz+ibsdCHnUZp8NjP241ol/etCZ4 S050WmycmGg9/XZTSFo9PojG4LX+IeyRCfhfi1sjQGgKm0ypLu4JJr17SzrTmfnbdscR sFEZ9qgpPN5yn0F7rF0+amowr5bpzrVrZCUK8J8thnMWqGc9mVVY+HSNBNtHlFn22W+k TZeWdQtJPRDB4vg4upvFZUqGkSTDt+bGf8tKhBPCCvHgltwJ4/U/jR3EiV/b+oOl4jAD nlLRWHP7lDlFTh+TyU+0FWUArB2mWNCVq+XevQEz0xvnzGqagOvwlzaT/NHp+JlcpeJ/ Tjew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DgWzoc93; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s10si2362301edd.43.2021.10.06.23.56.55; Wed, 06 Oct 2021 23:57:18 -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=@kernel.org header.s=k20201202 header.b=DgWzoc93; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240248AbhJGG5U (ORCPT + 99 others); Thu, 7 Oct 2021 02:57:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:35528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240233AbhJGG5R (ORCPT ); Thu, 7 Oct 2021 02:57:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C455361245; Thu, 7 Oct 2021 06:55:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633589724; bh=H7TOUe6A7T7LiBmoEChxjG23mV1sfS3VhuwtUlXJPxw=; h=From:To:Cc:Subject:Date:From; b=DgWzoc93M3NoV2N66cXqwyfRo52yjZlOL9ay2WlX1YVN5mi89PLEq1nWnWGUoDNrR Af43AQ8v/L+687s41V471CFzx4TMysoeL0J2IWsl/jhIWyzbYekxFYy1It3YDrpp0A JRLaPojUE1UGHBsjVuEVnwoyAABFo7lQbIWkJaB03Y25Nc/v3+xVnOBVlV74vSazRe Ik+RRVlGmwawopbeJ0TCp8u7PFgUbH1Qvi5AsmzoUIdms1Ol5bzE14F99ZUaGOVcfb yvxCCZSyg6W9U7WPEFpT6KtwPHiO+e4166L3kMHc4nza8VodhwXuIypq6sygxsPDV+ RxFjkgwJxENiQ== From: Leon Romanovsky To: "David S . Miller" , Jakub Kicinski Cc: Leon Romanovsky , Ido Schimmel , Ingo Molnar , Jiri Pirko , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, mlxsw@nvidia.com, Moshe Shemesh , netdev@vger.kernel.org, Saeed Mahameed , Salil Mehta , Shay Drory , Steven Rostedt , Tariq Toukan , Yisen Zhuang Subject: [PATCH net-next v3 0/5] devlink reload simplification Date: Thu, 7 Oct 2021 09:55:14 +0300 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky Changelog: v3: * Rewrote third patch to keep static const nature of ops. This is done by extracting reload ops to separate ops structure. * Changed commit message in last patch as was suggested by Ido. v2: https://lore.kernel.org/all/cover.1633284302.git.leonro@nvidia.com * Dropped const removal patch * Added new patch to hide struct devlink * Added new patch to annotate devlink API * Implemented copy of all callback in devlink ops v1: https://lore.kernel.org/all/cover.1632916329.git.leonro@nvidia.com * Missed removal of extra WARN_ON * Added "ops parameter to macro as Dan suggested. v0: https://lore.kernel.org/all/cover.1632909221.git.leonro@nvidia.com ------------------------------------------------------------------- Hi, This series fixes the bug with mlx5 device, which in some configurations doesn't support devlink reload and shouldn't have any reload statistics like any other net device. Unfortunately, it is not the case in the current implementation of devlink reload. This fix is done by simplification of internal API. Thanks Leon Romanovsky (5): devlink: Reduce struct devlink exposure devlink: Annotate devlink API calls devlink: Allow set reload ops callbacks separately net/mlx5: Separate reload devlink ops for multiport device devlink: Delete reload enable/disable interface .../hisilicon/hns3/hns3pf/hclge_devlink.c | 7 +- .../hisilicon/hns3/hns3vf/hclgevf_devlink.c | 7 +- drivers/net/ethernet/mellanox/mlx4/main.c | 10 +- .../net/ethernet/mellanox/mlx5/core/devlink.c | 13 +- .../net/ethernet/mellanox/mlx5/core/main.c | 3 - .../mellanox/mlx5/core/sf/dev/driver.c | 5 +- drivers/net/ethernet/mellanox/mlxfw/mlxfw.h | 2 +- drivers/net/ethernet/mellanox/mlxsw/core.c | 19 +- drivers/net/netdevsim/dev.c | 13 +- include/net/devlink.h | 79 ++------ include/trace/events/devlink.h | 72 ++++---- net/core/devlink.c | 170 ++++++++++++------ 12 files changed, 216 insertions(+), 184 deletions(-) -- 2.31.1