From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2A717A0508; Thu, 7 Apr 2022 05:00:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3B5C428C0; Thu, 7 Apr 2022 04:59:33 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 1D22E4288A for ; Thu, 7 Apr 2022 04:59:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649300373; x=1680836373; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BJzPDb+/JZ76wsmqp3JOt77KnsMx6yCP+dtPXHhf/s0=; b=FXRrABIm6NZ30IG86TV2IuQ4CC+qytA2xuh0SLEsU8nltEMo9Q54m0Sd pyW3SSzprpHfpazpufRWA0gNnloIL+sZu3mFCmbDRsDvpTZjQ7P9JuM0R wZaXv6+13KsfUIKGI3EzleeAumInppxlSiyfduK74eqp0CDEvoLkYGPsH c+vNwwhHQap7EneThuJJT0XI0KE29XvOziL70enJGQd8nCTNJ/Cz1N18L GaeLiMTNTmYjdKkwptjpMrlIycgNNXbIT32xH6rWbjux8HaVVvYK6ZmHB uc6tjBa2sHjWcmFpg7Eo56FW9CC9eCvTSBs97p2CUfofw/Vk6WQJR2skB A==; X-IronPort-AV: E=McAfee;i="6200,9189,10309"; a="248738448" X-IronPort-AV: E=Sophos;i="5.90,241,1643702400"; d="scan'208";a="248738448" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 19:59:32 -0700 X-IronPort-AV: E=Sophos;i="5.90,241,1643702400"; d="scan'208";a="570850750" Received: from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 19:59:30 -0700 From: Kevin Liu To: dev@dpdk.org Cc: qiming.yang@intel.com, qi.z.zhang@intel.com, stevex.yang@intel.com, Kevin Liu , Steven Zou , Alvin Zhang Subject: [PATCH 27/39] net/ice: disable ACL function for MDCF instance Date: Thu, 7 Apr 2022 10:56:54 +0000 Message-Id: <20220407105706.18889-28-kevinx.liu@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220407105706.18889-1-kevinx.liu@intel.com> References: <20220407105706.18889-1-kevinx.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 MDCF instance does not support ACL, so disable it. Signed-off-by: Steven Zou Signed-off-by: Alvin Zhang Signed-off-by: Kevin Liu --- drivers/net/ice/ice_acl_filter.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_acl_filter.c b/drivers/net/ice/ice_acl_filter.c index 8fe6f5aeb0..61bb016395 100644 --- a/drivers/net/ice/ice_acl_filter.c +++ b/drivers/net/ice/ice_acl_filter.c @@ -25,6 +25,7 @@ #include "ice_ethdev.h" #include "ice_generic_flow.h" #include "base/ice_flow.h" +#include "ice_dcf_ethdev.h" #define MAX_ACL_SLOTS_ID 2048 @@ -994,8 +995,11 @@ ice_acl_init(struct ice_adapter *ad) struct ice_pf *pf = &ad->pf; struct ice_hw *hw = ICE_PF_TO_HW(pf); struct ice_flow_parser *parser = &ice_acl_parser; + struct rte_eth_dev *eth_dev = &rte_eth_devices[ad->pf.dev_data->port_id]; + struct ice_dcf_adapter *dcf_adapter = eth_dev->data->dev_private; + struct ice_dcf_hw *dcf_hw = &dcf_adapter->real_hw; - if (!ad->hw.dcf_enabled) + if (!ad->hw.dcf_enabled || dcf_hw->multi_inst) return 0; ret = ice_acl_prof_alloc(hw); @@ -1041,8 +1045,11 @@ ice_acl_uninit(struct ice_adapter *ad) struct ice_pf *pf = &ad->pf; struct ice_hw *hw = ICE_PF_TO_HW(pf); struct ice_flow_parser *parser = &ice_acl_parser; + struct rte_eth_dev *eth_dev = &rte_eth_devices[ad->pf.dev_data->port_id]; + struct ice_dcf_adapter *dcf_adapter = eth_dev->data->dev_private; + struct ice_dcf_hw *dcf_hw = &dcf_adapter->real_hw; - if (ad->hw.dcf_enabled) { + if (ad->hw.dcf_enabled && !dcf_hw->multi_inst) { ice_unregister_parser(parser, ad); ice_deinit_acl(pf); ice_acl_prof_free(hw); -- 2.33.1