From mboxrd@z Thu Jan 1 00:00:00 1970 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, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,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 555FFC432BE for ; Tue, 31 Aug 2021 06:55:02 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id DF17B60F9E for ; Tue, 31 Aug 2021 06:55:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DF17B60F9E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F7994068A; Tue, 31 Aug 2021 08:55:01 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 4D79040687; Tue, 31 Aug 2021 08:54:58 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10092"; a="240664193" X-IronPort-AV: E=Sophos;i="5.84,365,1620716400"; d="scan'208";a="240664193" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2021 23:54:47 -0700 X-IronPort-AV: E=Sophos;i="5.84,365,1620716400"; d="scan'208";a="530975583" Received: from unknown (HELO localhost.localdomain) ([10.240.183.93]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2021 23:54:45 -0700 From: dapengx.yu@intel.com To: Qiming Yang , Qi Zhang Cc: dev@dpdk.org, haiyue.wang@intel.com, Dapeng Yu , stable@dpdk.org Date: Tue, 31 Aug 2021 14:54:17 +0800 Message-Id: <20210831065417.545339-1-dapengx.yu@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210818083226.795256-1-dapengx.yu@intel.com> References: <20210818083226.795256-1-dapengx.yu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] net/ice/base: get PF ID of VF's parent X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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: Dapeng Yu In original implementation, if DCF is created on PF1, the PF ID is still 0, but not 1. Without the right PF ID, the ACL will not work. This patch makes VF to get its parent's physical function ID. Fixes: 0b02c9519432 ("net/ice: handle PF initialization by DCF") CC: stable@dpdk.org Signed-off-by: Dapeng Yu --- V2: * Simplify the code and commit message of V1 --- drivers/net/ice/base/ice_switch.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 9179f66c20..4afd1e80c1 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -3483,6 +3483,9 @@ enum ice_status ice_get_initial_sw_cfg(struct ice_hw *hw) pf_vf_num, is_vf); j++; break; + case ICE_AQC_GET_SW_CONF_RESP_VSI: + if (hw->dcf_enabled && !is_vf) + hw->pf_id = pf_vf_num; default: break; } -- 2.27.0