From patchwork Sun Oct 11 10:22:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 288613 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=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_HEADER_CTYPE_ONLY, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, T_TVD_MIME_NO_HEADERS, URIBL_BLOCKED, 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 13916C433DF for ; Sun, 11 Oct 2020 10:23:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C0B08207F7 for ; Sun, 11 Oct 2020 10:23:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="eC+RW0Wp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729639AbgJKKX3 (ORCPT ); Sun, 11 Oct 2020 06:23:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729173AbgJKKXX (ORCPT ); Sun, 11 Oct 2020 06:23:23 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A93DCC0613D0 for ; Sun, 11 Oct 2020 03:23:22 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id x16so11249945pgj.3 for ; Sun, 11 Oct 2020 03:23:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=czSQteC+aSKObBiN/Iuimr/HumGMamHufzyKfeyiMrs=; b=eC+RW0WpSCPSd/HowETmut7zWw6Ejs2DfPs0QtkVUC1zBmy0SjEBY5mOPiWfbDUxXE TJQ0R41VpSkHLwh4Mytd8Bw8VZxDy4Hl0FRovkgY64IL0CiVikZm5tcgchOv1cp6Ifd9 Zo2IiqhU+GevDKPMaZhx2qQIh3wCh3/fnWeIQ= 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; bh=czSQteC+aSKObBiN/Iuimr/HumGMamHufzyKfeyiMrs=; b=fHXiLxwikMS8kqemc/5PK9mBlBnpLmDrWOipUg6mgEUFzigXIMHhC4cHVmpYN8fEeL v+Yo+S/iunx+7+1Blm1EHysJZiIu4bLAdzNaDaRXuce74XGkvF0CnkJ0qznA9evYdJxT UbvXAQB66fwDpkZ/KAaI2fxy8OxFs9vGZhYCpTlGtHhC9Ugi729k/bBf7PX3A0nJc0ru NuuTuJhmQoIpBGj/Nf3aELkZlIfzHq73UegRQkq/jNNShVkhJws+Rsqd7D/76ztlYViK h/0ArV1bFh/FHPNEwN6RhTRFECZ3FI/ZRnHmPfzRxGUb7xPclXTykXKYIKXDi2IIIGID jOzw== X-Gm-Message-State: AOAM532Nfkvw8ToxrmAvDeD2sCWRPFv0l1h5JTBxi/SlisFvIgPFMbfL 79iBWMCl7KmPE93KlfKPWuaRk1Q7nX4Y0Q== X-Google-Smtp-Source: ABdhPJxtFe7ls8zvQKEwVdMNAQTKABitto1shq0FZvWPzYGc2cE+Hv7LuPItGKXXBUxUuUGI6bAkmg== X-Received: by 2002:a62:520e:0:b029:142:2501:3979 with SMTP id g14-20020a62520e0000b029014225013979mr19636417pfb.62.1602411802007; Sun, 11 Oct 2020 03:23:22 -0700 (PDT) Received: from localhost.swdvt.lab.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id i1sm20155057pjh.52.2020.10.11.03.23.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Oct 2020 03:23:21 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, kuba@kernel.org, gospo@broadcom.com, Vasundhara Volam Subject: [PATCH net-next 2/9] bnxt_en: Enable online self tests for multi-host/NPAR mode. Date: Sun, 11 Oct 2020 06:22:54 -0400 Message-Id: <1602411781-6012-3-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1602411781-6012-1-git-send-email-michael.chan@broadcom.com> References: <1602411781-6012-1-git-send-email-michael.chan@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vasundhara Volam Online self tests are not disruptive and can be run in NPAR mode and in multi-host NIC as well. Reviewed-by: Edwin Peer Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 52b4ea6ef8c9..dcbb7b70d60a 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -3298,7 +3298,7 @@ static void bnxt_self_test(struct net_device *dev, struct ethtool_test *etest, u8 test_mask = 0; int rc = 0, i; - if (!bp->num_tests || !BNXT_SINGLE_PF(bp)) + if (!bp->num_tests || !BNXT_PF(bp)) return; memset(buf, 0, sizeof(u64) * bp->num_tests); if (!netif_running(dev)) { @@ -3311,9 +3311,9 @@ static void bnxt_self_test(struct net_device *dev, struct ethtool_test *etest, do_ext_lpbk = true; if (etest->flags & ETH_TEST_FL_OFFLINE) { - if (bp->pf.active_vfs) { + if (bp->pf.active_vfs || !BNXT_SINGLE_PF(bp)) { etest->flags |= ETH_TEST_FL_FAILED; - netdev_warn(dev, "Offline tests cannot be run with active VFs\n"); + netdev_warn(dev, "Offline tests cannot be run with active VFs or on shared PF\n"); return; } offline = true; @@ -3829,7 +3829,7 @@ void bnxt_ethtool_init(struct bnxt *bp) bnxt_get_pkgver(dev); bp->num_tests = 0; - if (bp->hwrm_spec_code < 0x10704 || !BNXT_SINGLE_PF(bp)) + if (bp->hwrm_spec_code < 0x10704 || !BNXT_PF(bp)) return; bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_SELFTEST_QLIST, -1, -1);