[dpdk-dev] [PATCH] net/ice: fix item number when pattern has ETH

Wei Zhao wei.zhao1 at intel.com
Mon Jul 15 11:02:42 CEST 2019


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 <wei.zhao1 at intel.com>
---
 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



More information about the dev mailing list