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 21F8AA04BC; Sat, 10 Oct 2020 06:15:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E7D101D733; Sat, 10 Oct 2020 06:13:16 +0200 (CEST) Received: from mail-pg1-f227.google.com (mail-pg1-f227.google.com [209.85.215.227]) by dpdk.org (Postfix) with ESMTP id E9DCD1D6E2 for ; Sat, 10 Oct 2020 06:13:08 +0200 (CEST) Received: by mail-pg1-f227.google.com with SMTP id b193so7991291pga.6 for ; Fri, 09 Oct 2020 21:13:08 -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 :mime-version:content-transfer-encoding; bh=SzAVKN0SImsWoXOVqomdtylS0/uG1GL7YsKAf/iZqjY=; b=Mf2CQia2YfddJtkCp9MgI1UcpDD7IwB2OmC+2OB6B675FvCE+mu5jvYb1Ix/hxbp/6 gLoqglIjHRU0s9qRui68WbRk2U6ZF9d1ufc2f1kshRPvjueFPXl3DA/HxvRVLdY6/ok/ MWUIB833LyDOz/Wuxys8m19+Jd4vJFQ4mQREc= 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=SzAVKN0SImsWoXOVqomdtylS0/uG1GL7YsKAf/iZqjY=; b=B7BlfPZVzqi1akJCp+j3e2jieJD+4zGmSckuMh+pF+Qqcx/YEvhLzYBaiaNvIZ62ZU /caftzCCe2OWkIOvFvi0eXc4PZtNEryStNnKi+KmeyUKH47JDF7njFG3opw6rz0ZIcCS OidvGVPbzrQZxGX1O8i6mWZapjruESbROmhoWObe6pL3xbdx084Eu7fWPNeyUngdjcly /Z2AQaICrp/rOdNTq/6gac04xxJCBZ+T+R7SzbWNFDH92KTW8V17PUloFvwjaXZj4N0N 87VUZbrooZldrJt8PAvp/jRrM/8N7iw5hK0e8+PfJxGPnyZBQDhFcms6Hzbgc1SCXPWL WFtA== X-Gm-Message-State: AOAM532caIn5uXt6ocT+0/FROA3Q/ytXbYXRreQ1SYnTZWiI093ckCkE 0JOADGTfJz6vvB2nRzEByCII4O0pkzcJ2j5Lz/jw4eVjvOdBpkefMgJ+UUbr5ox+SEJbcTceXMW wVEciy5RG1ksYb54tad0Sld0zrJ8nOkMEZFqMWnokrU9T3J003SPhlQI/IxR8KGai8LgPyrMGCR EbmQ== X-Google-Smtp-Source: ABdhPJy5HRk0BsLB8z9SnKtuZazAXLCnVLJbP0xVBRux9hAtjgjsInUrDlwRxMMIOl96Qs6zGcBj9fAUlaMc X-Received: by 2002:a62:503:0:b029:13e:d13d:a0f9 with SMTP id 3-20020a6205030000b029013ed13da0f9mr15043227pff.21.1602303186925; Fri, 09 Oct 2020 21:13:06 -0700 (PDT) Received: from localhost.localdomain ([192.19.223.252]) by smtp-relay.gmail.com with ESMTPS id b4sm1597022pjn.3.2020.10.09.21.13.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Oct 2020 21:13:06 -0700 (PDT) X-Relaying-Domain: broadcom.com From: Ajit Khaparde To: dev@dpdk.org Cc: Venkat Duvvuru , stable@dpdk.org, Somnath Kotur Date: Fri, 9 Oct 2020 21:11:48 -0700 Message-Id: <20201010041153.63921-8-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20201010041153.63921-1-ajit.khaparde@broadcom.com> References: <20201009111130.10422-1-somnath.kotur@broadcom.com> <20201010041153.63921-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 07/12] net/bnxt: handle default vnic change async event 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, we are only registering to this event if the function is a trusted VF. This patch extends it for PFs as well. Fixes: 322bd6e70272 ("net/bnxt: add port representor infrastructure") Cc: stable@dpdk.org Signed-off-by: Venkat Duvvuru Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_cpr.c | 7 ++----- drivers/net/bnxt/bnxt_hwrm.c | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c index 54923948f..91d1ffe46 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) >> diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 8133afc74..eef282b69 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -938,7 +938,7 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp) req.async_event_fwd[1] |= rte_cpu_to_le_32(ASYNC_CMPL_EVENT_ID_DBG_NOTIFICATION); - if (BNXT_VF_IS_TRUSTED(bp)) + if (BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp)) req.async_event_fwd[1] |= rte_cpu_to_le_32(ASYNC_CMPL_EVENT_ID_DEFAULT_VNIC_CHANGE); -- 2.21.1 (Apple Git-122.3)