Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2984151pxb; Sun, 3 Oct 2021 11:14:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuxSGapertCE8sXEJRrjaDr4ISiyH4mkkusPaQsqrzBz7a0LoY30373s83jVOVvXdgNbGm X-Received: by 2002:a50:a2a5:: with SMTP id 34mr13064213edm.207.1633284845160; Sun, 03 Oct 2021 11:14:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633284845; cv=none; d=google.com; s=arc-20160816; b=yiu5TAb0ygs7Ztwf/zLfp5AtNMrTsuyKllfj21iiXC8o5rglN6iNcymyHjIIl6mQKi ePGqcaUHD+4Jm+GDJ619iGX2jaMZEASw0aaip7mUYEy9Q0GKjrzxOZXdZcUB7HIubnbZ Ci9mKu99rfS7Oz9NwG3ePPTeGvCrNgqn7g66YKdbx+TZR6HnZAZbtpeYO5iqWsS0Fhyl 1zBeL4E5fCMgjdya0C4Q9jbeRktINMG6QJCLKzcaUwksd+WlEFoBMsx8XS4Q68FY0iWR p/XU74l3baz/yA8GBsemk7NxGDTdgdzAQDIgcQCWM71QEZ3reoibqlPHJHLvIXG8uagT vi3g== 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=0pGvnOM8T1Uhv9CNkPJXpc5l44IawbdlKYQJCO1jAPs=; b=u8XjYeEctgqtSgWs5ox4JVHKiQcIuuM+d90D70Ts/4sUt5Tfais7hUOCooued3g+Ee V5CtPU58hU+jzcdjmjUyUG7jKnNvN6i8OZmjTd28SESrTsRrspGjwcbqlqdcQz7TmhYY on9EkhRlsf8tduecd/1TD3Fiwz9Mizmvn22rjR2vblGn3C6W8ueEIUNJucJeO4spdjC5 4dj6T5QlTp7rZ+YDfwno9qjVE/qeKY0h7D7xMqE2l8K8gJoQqyTX9YOoIvvnVO19uaVO cenXyluijq98p4wSBRAd3NF0IuLbTeFzKszyxJ119ArLkHPr2ZoxUXCzKn0KkganHGm+ KrZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RpA1OUpd; 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 ds3si19610377ejc.302.2021.10.03.11.13.36; Sun, 03 Oct 2021 11:14:05 -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=RpA1OUpd; 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 S231368AbhJCSOA (ORCPT + 99 others); Sun, 3 Oct 2021 14:14:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:45776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231252AbhJCSN7 (ORCPT ); Sun, 3 Oct 2021 14:13:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 856166134F; Sun, 3 Oct 2021 18:12:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633284731; bh=D7jN9jM4hAeJc0S/qDp+zVB+ygDS5UpyUHMHuwrUDEQ=; h=From:To:Cc:Subject:Date:From; b=RpA1OUpduNud0tnpQ1qaxlkiGaPFsw3S/evVoQaZmH1Ps7cQt6lmmddvcizmsCRfX RVcmhqUnctSQmmG+yPe3uu4fqETun+pvkAoBeq7VjRZdBAgkj5Dt5rGfdrcD0aza2e Bkn1TvsvLAZcpJTllYPv/29NBMhBORBYNgjqIoR5OjUdITkglj4mMm9c3jSPbkX8d9 PP6Mlupu1U2LKE2XZitQz4hyNo30zvgwvAkznwkFC+J9L2D1Ay6GZJTLLcHGIGS8lK 3fu5wAExXvASBJD4ULww1DynSIV/g1prpUevze7AFf5M1Y2e11kgt5moRDXx97pMpj vmV5Q95zkQgGg== 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 v2 0/5] devlink reload simplification Date: Sun, 3 Oct 2021 21:12:01 +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: v2: * 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 specific ops callbacks dynamically net/mlx5: Register separate reload devlink ops for multiport device devlink: Delete reload enable/disable interface .../hisilicon/hns3/hns3pf/hclge_devlink.c | 3 - .../hisilicon/hns3/hns3vf/hclgevf_devlink.c | 3 - drivers/net/ethernet/mellanox/mlx4/main.c | 2 - .../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 | 10 +- drivers/net/netdevsim/dev.c | 3 - include/net/devlink.h | 57 +-- include/trace/events/devlink.h | 72 ++-- net/core/devlink.c | 390 ++++++++++++------ 12 files changed, 317 insertions(+), 246 deletions(-) -- 2.31.1