From patchwork Tue Jul 16 02:08:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao1, Wei" X-Patchwork-Id: 56465 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4516E2BF5; Tue, 16 Jul 2019 04:39:29 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 14CA82082 for ; Tue, 16 Jul 2019 04:39:26 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jul 2019 19:39:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,496,1557212400"; d="scan'208";a="169794005" Received: from dpdk6.bj.intel.com ([172.16.182.192]) by orsmga003.jf.intel.com with ESMTP; 15 Jul 2019 19:39:24 -0700 From: Wei Zhao To: dev@dpdk.org Cc: qi.z.zhang@intel.com, wei zhao Date: Tue, 16 Jul 2019 10:08:29 +0800 Message-Id: <1563242909-62810-1-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1563181362-29513-1-git-send-email-wei.zhao1@intel.com> References: <1563181362-29513-1-git-send-email-wei.zhao1@intel.com> Subject: [dpdk-dev] [PATCH v2] net/ice: fix item number when pattern has ETH 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" When pattern has ETH, maybe it will contain MAC and ethertype two kinds of lookup parameters, so add more item number for memory malloc in order to reserve one more memory slot for ETH which may consume 2 lookup items. Fixes: 24dc00c30907 ("net/ice: enable switch filter") Signed-off-by: wei zhao --- drivers/net/ice/ice_switch_filter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index 5424223..6ec50fb 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -435,6 +435,8 @@ ice_create_switch_filter(struct ice_pf *pf, tun_type = ICE_SW_TUN_VXLAN; if (item->type == RTE_FLOW_ITEM_TYPE_NVGRE) tun_type = ICE_SW_TUN_NVGRE; + if (item->type == RTE_FLOW_ITEM_TYPE_ETH) + item_num++; } rule_info.tun_type = tun_type;