From patchwork Fri Oct 9 11:11:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Somnath Kotur X-Patchwork-Id: 80144 X-Patchwork-Delegate: ajit.khaparde@broadcom.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7ED4CA04C0; Fri, 9 Oct 2020 13:24:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A58101D55B; Fri, 9 Oct 2020 13:19:15 +0200 (CEST) Received: from relay.smtp-ext.broadcom.com (saphodev.broadcom.com [192.19.232.172]) by dpdk.org (Postfix) with ESMTP id 388B21D524; Fri, 9 Oct 2020 13:19:13 +0200 (CEST) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (bgccx-dev-host-lnx35.bec.broadcom.net [10.123.153.55]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by relay.smtp-ext.broadcom.com (Postfix) with ESMTPS id 2FC26829A; Fri, 9 Oct 2020 04:19:09 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 2FC26829A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1602242351; bh=PGkQOJYIsrQSMlQy9DhxLnEDN7o/6EmqhFdQTF/91xU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oYuRzHhTxmayGniC61G5mBS4m7acVVo/UulP0SwcgkotaPshNvYukHnEMkv+Pw8t8 i5DyFr0HM3lq416Ts7DmoJmxQPCGOq/oMJZj1XrcJpRU5jlY3y6G4sCtQDmt+IypUL AzMqFdMWGCr+ZIy1gNgTmxabkN46zWTpSb5GtG7c= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Venkat Duvvuru , stable@dpdk.org, Somnath Kotur Date: Fri, 9 Oct 2020 16:41:30 +0530 Message-Id: <20201009111130.10422-14-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.28.0.450.g3a238e5 In-Reply-To: <20201009111130.10422-1-somnath.kotur@broadcom.com> References: <20201009111130.10422-1-somnath.kotur@broadcom.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 13/13] net/bnxt: remove parent fid validation in vnic change event processing 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" From: Venkat Duvvuru Currently, when default vnic change async event is received, the async event handler will try to validate whether the parent fid that is coming as part of the event data is of the control channel's fid. This validation will fail in case of SR device because the parent function of the vnic and the control channel function (Foster parent) are different. This patch fixes the problem by removing this parent fid validation as it is not really needed in case of Wh+ also. Fixes: 322bd6e70272 ("net/bnxt: add port representor infrastructure") Cc: stable@dpdk.org Signed-off-by: Venkat Duvvuru Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_cpr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c index 5492394..91d1ffe 100644 --- a/drivers/net/bnxt/bnxt_cpr.c +++ b/drivers/net/bnxt/bnxt_cpr.c @@ -50,7 +50,7 @@ static void bnxt_process_default_vnic_change(struct bnxt *bp, struct hwrm_async_event_cmpl *async_cmp) { - uint16_t fid, vnic_state, parent_id, vf_fid, vf_id; + uint16_t vnic_state, vf_fid, vf_id; struct bnxt_representor *vf_rep_bp; struct rte_eth_dev *eth_dev; bool vfr_found = false; @@ -67,10 +67,7 @@ bnxt_process_default_vnic_change(struct bnxt *bp, if (vnic_state != BNXT_DEFAULT_VNIC_ALLOC) return; - parent_id = (event_data & BNXT_DEFAULT_VNIC_CHANGE_PF_ID_MASK) >> - BNXT_DEFAULT_VNIC_CHANGE_PF_ID_SFT; - fid = BNXT_PF(bp) ? bp->fw_fid : bp->parent->fid; - if (parent_id != fid || !bp->rep_info) + if (!bp->rep_info) return; vf_fid = (event_data & BNXT_DEFAULT_VNIC_CHANGE_VF_ID_MASK) >>