From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D0089A3160 for ; Thu, 10 Oct 2019 03:42:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0FBD51E895; Thu, 10 Oct 2019 03:42:17 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id DD7741DFEB; Thu, 10 Oct 2019 03:42:01 +0200 (CEST) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id AD85730C14C; Wed, 9 Oct 2019 18:40:25 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com AD85730C14C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1570671625; bh=XllOqTyxk109YLKckHdbLracSH2PowYcqXSVFAXy+EM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B95sk0MGRZLTZiTGZybIKwX8fxOWQ2eckohp8q5rZW9h+FwqJ9ggghx18lGPQwArB c56eAouCXxCSrx82J90GJDVBTojrm8S62KmCOIKMX/bcX2/ZMouPzsLWdpzJ0KhSSU mpL8VntXR4K5oRXvAFh7AsGYl7JGchtoWypNX7NA= Received: from localhost.localdomain (unknown [10.230.30.225]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 0330D140069; Wed, 9 Oct 2019 18:41:57 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, stable@dpdk.org, Somnath Kotur Date: Wed, 9 Oct 2019 18:41:46 -0700 Message-Id: <20191010014153.64908-6-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20191010014153.64908-1-ajit.khaparde@broadcom.com> References: <167a2652-7ad6-e02a-8a02-01f828bcba8c@intel.com> <20191010014153.64908-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 05/12] net/bnxt: update trusted VF status only when it changes X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" We are currently logging trusted VF information everytime a VF config change is indicated by the async message. Update it only when new setting is different from the current setting. Fixes: b42c15c83e88 ("net/bnxt: support trusted VF") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_hwrm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index f78beff711..a40197e929 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -2873,10 +2873,13 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp, uint16_t *mtu) if (BNXT_PF(bp) && (flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_MULTI_HOST)) bp->flags |= BNXT_FLAG_MULTI_HOST; - if (BNXT_VF(bp) && (flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_TRUSTED_VF)) { + if (BNXT_VF(bp) && + !BNXT_VF_IS_TRUSTED(bp) && + (flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_TRUSTED_VF)) { bp->flags |= BNXT_FLAG_TRUSTED_VF_EN; PMD_DRV_LOG(INFO, "Trusted VF cap enabled\n"); } else if (BNXT_VF(bp) && + BNXT_VF_IS_TRUSTED(bp) && !(flags & HWRM_FUNC_QCFG_OUTPUT_FLAGS_TRUSTED_VF)) { bp->flags &= ~BNXT_FLAG_TRUSTED_VF_EN; PMD_DRV_LOG(INFO, "Trusted VF cap disabled\n"); -- 2.20.1 (Apple Git-117)