From patchwork Wed May 26 10:45:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 12281237 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75C57C2B9F7 for ; Wed, 26 May 2021 10:45:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 54ECC613D3 for ; Wed, 26 May 2021 10:45:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234140AbhEZKq6 (ORCPT ); Wed, 26 May 2021 06:46:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234143AbhEZKqp (ORCPT ); Wed, 26 May 2021 06:46:45 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2EB3C061756 for ; Wed, 26 May 2021 03:45:12 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id f75-20020a1c1f4e0000b0290171001e7329so235885wmf.1 for ; Wed, 26 May 2021 03:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qx6PS7vv9BdHEZk2SlW5DW9gwzNfpE0BrouErYikb44=; b=TwIZKUD9ySANv+nClIf/hOWOllt41xd7aj5y64toEY5X2ARjXlwFCjSWmXTghIsjWo IYzrJMzxDAhOqYQLClHWOmHJRqVomzYDGaqbcJVXpaWCNYcns5ko1COA9vX46le6Wlo0 04Mnrzxxtlf80PbkzAUppF5XOkVDhcXVqOc4UAivpNqmUG4pDveYceASpTHEtPFh95d+ BAHg4DsC3Aynw4JRXD/ZVJXUSALYhkhFHOSnQIFd83z/laByU0bDuYfMfX6LJcJV1be+ etAeclGDRnaQj3SCBvF/oIYjfyoRGzWo/csH0jud44VvseYWqUb7m9/rv8s9YPvVPFxs LGZg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=qx6PS7vv9BdHEZk2SlW5DW9gwzNfpE0BrouErYikb44=; b=cB/7T9ISS6KMW3WwzDkIYtTy4/m/KNMW9occ+cAdzuAPvkhMrQHRgTW1JaXaSzOfCO JR+WZxmGLgnk8Kzvvhhz+rFOLpxGCsT5LHpM/+Kzm3sgqTSQ4pD4WAE4zDNqq5BUZgnN dstuhBRHWYLwAnc0g0hd2mqaAjk8ZruOzn6/Qt9rOPyQsj0dKoAfFNMG12mgSX7ZP3ka W3Oj0V4+Kl7e2w1CQUHAtwh+nkY4sLQZO1EpdggfQyATyBIvAJi5O5QJr8TA/SuBJK87 KoqzcP0ljgPfhTY4zQz1K3Tik+Er49V0VV6cQYiCivHzO8q0fok14sZPn3w0BJT3WVP6 Xi8Q== X-Gm-Message-State: AOAM530i3tayqiFu7aIYsCGp1w1XPPwzL/tTI1T9vpnhqrzI96e60ECc VRA9uHmq0t0yHs6alfTJ9tpb0djzDE0fhV4de6o= X-Google-Smtp-Source: ABdhPJyHqACko8Jwde+17YtGOJXTSgQMNkHiQ8rMbItYxB0gjD9uiV4fOQqn/uoz4fJBS8ttMnothQ== X-Received: by 2002:a1c:6644:: with SMTP id a65mr27427799wmc.103.1622025911606; Wed, 26 May 2021 03:45:11 -0700 (PDT) Received: from localhost (mail.chocen-mesto.cz. [85.163.43.2]) by smtp.gmail.com with ESMTPSA id z6sm14472360wml.29.2021.05.26.03.45.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 03:45:11 -0700 (PDT) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, mlxsw@nvidia.com, idosch@nvidia.com Subject: [patch net-next 1/3] net/mlx5: Expose FW version over defined keyword Date: Wed, 26 May 2021 12:45:07 +0200 Message-Id: <20210526104509.761807-2-jiri@resnulli.us> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210526104509.761807-1-jiri@resnulli.us> References: <20210526104509.761807-1-jiri@resnulli.us> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Jiri Pirko To be aligned with the rest of the drivers, expose FW version under "fw" keyword in devlink dev info, in addition to the existing "fw.version", which is currently Mellanox-specific. Signed-off-by: Jiri Pirko Acked-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c index 44c458443428..d791d351b489 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c @@ -63,6 +63,11 @@ mlx5_devlink_info_get(struct devlink *devlink, struct devlink_info_req *req, err = devlink_info_version_running_put(req, "fw.version", version_str); if (err) return err; + err = devlink_info_version_running_put(req, + DEVLINK_INFO_VERSION_GENERIC_FW, + version_str); + if (err) + return err; /* no pending version, return running (stored) version */ if (stored_fw == 0) @@ -74,8 +79,9 @@ mlx5_devlink_info_get(struct devlink *devlink, struct devlink_info_req *req, err = devlink_info_version_stored_put(req, "fw.version", version_str); if (err) return err; - - return 0; + return devlink_info_version_stored_put(req, + DEVLINK_INFO_VERSION_GENERIC_FW, + version_str); } static int mlx5_devlink_reload_fw_activate(struct devlink *devlink, struct netlink_ext_ack *extack) From patchwork Wed May 26 10:45:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 12281239 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24175C2B9F7 for ; Wed, 26 May 2021 10:46:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC89B613D4 for ; Wed, 26 May 2021 10:46:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234183AbhEZKrc (ORCPT ); Wed, 26 May 2021 06:47:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234174AbhEZKqy (ORCPT ); Wed, 26 May 2021 06:46:54 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31095C061574 for ; Wed, 26 May 2021 03:45:14 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id l11-20020a05600c4f0bb029017a7cd488f5so256895wmq.0 for ; Wed, 26 May 2021 03:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EvjdRq40i76fBOz4jsz7yVECNUjizAa9DOIRQy20y2o=; b=gKocqMWjuJMNUisgE+Sh5hPNxRxOVPp+e7n2Oufp0H05vSqqaZZfZrtUcktLE2ygO6 gaLrYeR+wCYfAkNlUp+Wy5sKdZBSj/sbEKr5YVEE2KVfdPLo1FUtB4JEUUuDDCTrEK1/ Og+w0IBO3doTeMGTC7uXXnQhb3UGzBrcSYcArZfp3V/6iWJFV/EQaK0wb/Kco4gYSvq6 McH5BhPlyguTIR4HqI5cxoUYUVWWrSKIY72S0aobuZlyIth5UK/6uNAamRkf8oILfFXt +NZzhVi2omkNbG22X76wfnwtyr1mUtHsLKuf0xp+st27Y34mXd7SjW9BUIXEhBSpLwGF w8FQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=EvjdRq40i76fBOz4jsz7yVECNUjizAa9DOIRQy20y2o=; b=jztraKyEMA9UXWV3o7waERXHYybcmodNf3ziD+pK0I7MIOx8wHAGb8SxoxTFiYswWV wgFc9WWSa8POi1xmAC0/jPM66QTGbMoZ/95JPyt37vcwwn4jkK/QLaAa1jjPSGYeBz9F WcPbVyhg5mcKaf0hZSg1kNrNbcATpKvb09yobtVrueFM9NLuDV/fHkF4OTdi9IcmYdMd lKAG8XAEtHRZIv6vwIjUVkf7uJAPBPrwt5TQGvjzpuqTCFX/5IgN6L9Oag0+58F62sh0 SKBIW5/NfI+04xjm0gv3blLRaN5/E3UCLaa8XS2g4OhZ7sJXC2bzDC5uBQ0nrvStVAry AFlA== X-Gm-Message-State: AOAM532rKQz0DlF9KFqc+GKoyFF4vD+70QyrwXtb/Bf1MA0rgacBYiSw 1bsqH+h6rs26iE7adsIiQluBCobLg+4aX1erecM= X-Google-Smtp-Source: ABdhPJzvuDxECIsA6kBfghyG9iaMVuc57hx3Mmu4h6Gyj+gWu6AFE/4jD2Ud+4z3BroytnRZ8lZiHQ== X-Received: by 2002:a1c:7c0e:: with SMTP id x14mr2719472wmc.41.1622025912827; Wed, 26 May 2021 03:45:12 -0700 (PDT) Received: from localhost (mail.chocen-mesto.cz. [85.163.43.2]) by smtp.gmail.com with ESMTPSA id t14sm3330420wra.60.2021.05.26.03.45.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 03:45:12 -0700 (PDT) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, mlxsw@nvidia.com, idosch@nvidia.com Subject: [patch net-next 2/3] mlxsw: core: Expose FW version over defined keyword Date: Wed, 26 May 2021 12:45:08 +0200 Message-Id: <20210526104509.761807-3-jiri@resnulli.us> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210526104509.761807-1-jiri@resnulli.us> References: <20210526104509.761807-1-jiri@resnulli.us> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Jiri Pirko To be aligned with the rest of the drivers, expose FW version under "fw" keyword in devlink dev info, in addition to the existing "fw.version", which is currently Mellanox-specific. devlink output before: running: fw.version 30.2008.2018 after: running: fw.version 30.2008.2018 fw 30.2008.2018 Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.c b/drivers/net/ethernet/mellanox/mlxsw/core.c index ad93e01b2cda..b543d4e87951 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core.c @@ -1453,7 +1453,9 @@ mlxsw_devlink_info_get(struct devlink *devlink, struct devlink_info_req *req, if (err) return err; - return 0; + return devlink_info_version_running_put(req, + DEVLINK_INFO_VERSION_GENERIC_FW, + buf); } static int From patchwork Wed May 26 10:45:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 12281241 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A809BC47088 for ; Wed, 26 May 2021 10:46:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 90210613D4 for ; Wed, 26 May 2021 10:46:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234190AbhEZKre (ORCPT ); Wed, 26 May 2021 06:47:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234068AbhEZKqz (ORCPT ); Wed, 26 May 2021 06:46:55 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78C4EC06175F for ; Wed, 26 May 2021 03:45:15 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id b191so448487wmd.1 for ; Wed, 26 May 2021 03:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UO8qXeTI5vIof7LVbrpbl2mgOXFAY5ipdpSrVB5EOpc=; b=J4d0oFgj7hxAogPyfcoDW0q2lCGwbNKgBBe8TQtVmbqT4pXn/iMqFmEO3Ht/AVm7JO KwXFVqTbQuPH5jfEbZ0pqIk/V6JRSWpqjwLs6eljA3gniHBSGwL2Vf40P7z/+ilIlfq3 tfTrX4PK+FQVBwUf/yuqw3olvUaZYs2yWl3blpPd8lKhpi27zqb/c0DYZTdQg8ZIuuys TrAhZ1rDgdRV495Qggiq5jvTmR3k79uFHeyLXwPnKjcntoVBmlP4cdyFTWZJCwKPBRrf GMgQqzJcg1AAhQ/BnuBNirPyq2DZyeWWgMj+AEENtzbBICYkm9Dvja0z/5oVfMSGejnD FPHA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=UO8qXeTI5vIof7LVbrpbl2mgOXFAY5ipdpSrVB5EOpc=; b=S1n9096vM2NMARM6Zj8wFVYk2liRPPaw1ks4R4E9FF8s6X5bvgJUz+ugqwAb8bYC79 jlsNBCD4WOSY8q4H9H6VctCBEz2S5Vgok42EXMzMiuzW6FUtU5xE+dnaqNEn/079AcUm nYXYIqXHXgZZHrceky4f0Afe9yhtZlujf6m7+Fan9Y+9uZfcJWLUHHbiqrkRhIBq8Af/ DGAH3BLAgTQIulFGe415fD2Z4GsmSMJzu6SgnSDdsWj0iu5ijuIHhSsoQv/x5AwhYfd+ pnhRFNvXG1c7sdG1kZyl3TkVMxegCMBCkva/yWcf9u7VLrOA6PZ1Ntqmbe+JzUmq9HJd SDbg== X-Gm-Message-State: AOAM5317ZTt1dK1wueS1KUSTl+ssXJybm/d71g2RHHA3OFOqjHkFURAS 9o/hUqqyLutnWvObfYlJDQoFfuM/m6/FSbMAwp8= X-Google-Smtp-Source: ABdhPJwysX/kCczr3vlpyAVQF0+SlnH3E6YJIJxWafQDFcAGo8GvkCe3Ghu52mipb4nQ8okrNVWvtw== X-Received: by 2002:a05:600c:2dd7:: with SMTP id e23mr2762968wmh.186.1622025914135; Wed, 26 May 2021 03:45:14 -0700 (PDT) Received: from localhost (mail.chocen-mesto.cz. [85.163.43.2]) by smtp.gmail.com with ESMTPSA id z12sm19376883wrv.68.2021.05.26.03.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 03:45:13 -0700 (PDT) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, mlxsw@nvidia.com, idosch@nvidia.com Subject: [patch net-next 3/3] mlxsw: core: use PSID string define in devlink info Date: Wed, 26 May 2021 12:45:09 +0200 Message-Id: <20210526104509.761807-4-jiri@resnulli.us> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210526104509.761807-1-jiri@resnulli.us> References: <20210526104509.761807-1-jiri@resnulli.us> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Jiri Pirko Instead of having the string spelled out in the driver, use the global define with the same value. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.c b/drivers/net/ethernet/mellanox/mlxsw/core.c index b543d4e87951..e775f08fb464 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core.c @@ -1444,7 +1444,9 @@ mlxsw_devlink_info_get(struct devlink *devlink, struct devlink_info_req *req, if (err) return err; - err = devlink_info_version_fixed_put(req, "fw.psid", fw_info_psid); + err = devlink_info_version_fixed_put(req, + DEVLINK_INFO_VERSION_GENERIC_FW_PSID, + fw_info_psid); if (err) return err;