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 9C34FA0471 for ; Mon, 15 Jul 2019 11:33:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9660E2C6A; Mon, 15 Jul 2019 11:33:41 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 1E6722BF5 for ; Mon, 15 Jul 2019 11:33:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jul 2019 02:33:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,493,1557212400"; d="scan'208";a="187083500" Received: from dpdk6.bj.intel.com ([172.16.182.192]) by fmsmga001.fm.intel.com with ESMTP; 15 Jul 2019 02:33:36 -0700 From: Wei Zhao To: dev@dpdk.org Cc: qi.z.zhang@intel.com, wei zhao Date: Mon, 15 Jul 2019 17:02:42 +0800 Message-Id: <1563181362-29513-1-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.7.5 Subject: [dpdk-dev] [PATCH] 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. 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; -- 2.7.5