Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp700174imm; Wed, 4 Jul 2018 04:33:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeo9n3V3vM5BK/UtPpopIc42dmAgUXQM2TSH5DtXtzy4en644qO8fB40cIhIlndpcfozRqh X-Received: by 2002:a17:902:5501:: with SMTP id f1-v6mr1757799pli.108.1530703996526; Wed, 04 Jul 2018 04:33:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530703996; cv=none; d=google.com; s=arc-20160816; b=qgJwucO/XCqUdCy0cXmDR7Zszvxirju6Wv9XBB/5Z7KZw/YXUIrp6reLjoAJGcN/1B m09oCEoIkI+bm4I3L7Ho83k5PLtaEVlAKjaNoL3eRLGpgos7peK4jEj8gRNL41twZ7zl YbYQIZFQlirAw0zCTZBWs3VU5WMWpHDBRmPwXxJ8vBwuLJupsvRTWuv+BBfildI5yXYW 0JsiqrijLKXUnGUY/RbLTOF6pPzosQMljJ1MGY5d7DgSctc19VjAYVgHnJFlabnc8XCJ +RIv9R8vehD/4h1ezwz9kgik7JrvTYiuMlQZdAwzIC4yxvExMrixm2ISbpJl70QWlAAs //Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=uh373hvlthrz/hpnWbOy/bZTao9O8dOGfHnmCUVqYns=; b=EMY5/T5Ibq6CzuyNPb5LCepT00s8VeajOThlj3mX5qkOEM6M/T5wvyqoyvBPgYG8wi fZm/r9frSI79yeRrqXeGrsUtiDMys9hZp2baZrLPUXgCZqFHMT5PZ7z8ZAQL+cx2GqpS sUXnjEgutCn0SU5s4AgsE/FXW0BWMpxHZiBbK2rgasYsxArTFW8o81oEK9aZRdzaYU4V hohaygXrN3wpPuyGxgPODE+Hb3u94oK5RgrOLXOybdVD2zfVXKd77AIo9TTUCfKJ519Q ERznkKfwCMv/DB5B7YoYg+rPvChhNs/Kf7yEMY7WXbn9kXljrGmd/M+0n4t9mfvRRpfu fvtA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q23-v6si3253766pls.101.2018.07.04.04.33.02; Wed, 04 Jul 2018 04:33:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933937AbeGDLbF (ORCPT + 99 others); Wed, 4 Jul 2018 07:31:05 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:45794 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932594AbeGDLbD (ORCPT ); Wed, 4 Jul 2018 07:31:03 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from moshe@mellanox.com) with ESMTPS (AES256-SHA encrypted); 4 Jul 2018 14:33:47 +0300 Received: from dev-l-vrt-136.mtl.labs.mlnx (dev-l-vrt-136.mtl.labs.mlnx [10.134.136.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w64BUvsj030705; Wed, 4 Jul 2018 14:30:57 +0300 Received: from dev-l-vrt-136.mtl.labs.mlnx (localhost [127.0.0.1]) by dev-l-vrt-136.mtl.labs.mlnx (8.14.7/8.14.7) with ESMTP id w64BUvdw024626; Wed, 4 Jul 2018 14:30:57 +0300 Received: (from moshe@localhost) by dev-l-vrt-136.mtl.labs.mlnx (8.14.7/8.14.7/Submit) id w64BUtQ3024623; Wed, 4 Jul 2018 14:30:55 +0300 From: Moshe Shemesh To: "David S. Miller" Cc: Vasundhara Volam , Jiri Pirko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Moshe Shemesh Subject: [PATCH net-next 00/10] Add configuration parameters support Date: Wed, 4 Jul 2018 14:30:27 +0300 Message-Id: <1530703837-24563-1-git-send-email-moshe@mellanox.com> X-Mailer: git-send-email 1.8.4.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add configuration parameters setting through devlink. Each device registers supported configuration parameters table. Each parameter can be either generic or driver specific. The user can retrieve data on these parameters by "devlink param show" command and can set new value to a parameter by "devlink param set" command. The parameters can be set in different configuration modes: runtime - set while driver is running, no reset required. driverinit - applied while driver initializes, requires restart driver by devlink reload command. permanent - written to device's non-volatile memory, hard reset required. The patches at the end of the patchset introduce few params that are using the introduced infrastructure on mlx4 and bnxt. Command examples and output: # devlink dev param show pci/0000:81:00.0: name internal_error_reset type generic values: cmode runtime value true cmode driverinit value true name max_macs type generic values: cmode driverinit value 128 name enable_64b_cqe_eqe type driver-specific values: cmode driverinit value true name enable_4k_uar type driver-specific values: cmode driverinit value false # devlink dev param set pci/0000:81:00.0 name internal_error_reset cmode runtime value false # devlink dev param show pci/0000:81:00.0 name internal_error_reset pci/0000:81:00.0: name internal_error_reset type generic values: cmode runtime value false cmode driverinit value true Moshe Shemesh (8): devlink: Add devlink_param register and unregister devlink: Add param get command devlink: Add param set command devlink: Add support for get/set driverinit value devlink: Add devlink notifications support for params devlink: Add generic parameters internal_err_reset and max_macs mlx4: Add mlx4 initial parameters table and register it mlx4: Add support for devlink reload and load driverinit values Vasundhara Volam (2): devlink: Add enable_sriov boolean generic parameter bnxt_en: Add bnxt_en initial params table and register it. drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 121 +++- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h | 15 + drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 13 + drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 9 +- drivers/net/ethernet/mellanox/mlx4/catas.c | 2 +- drivers/net/ethernet/mellanox/mlx4/main.c | 161 +++++- drivers/net/ethernet/mellanox/mlx4/mlx4.h | 3 +- include/net/devlink.h | 149 +++++ include/uapi/linux/devlink.h | 24 + net/core/devlink.c | 675 ++++++++++++++++++++++ 10 files changed, 1156 insertions(+), 16 deletions(-) -- 1.8.3.1