When pattern has ETH, it may contain two kinds of lookup
parameters, MAC and ethertype.
So increasing item number for memory malloc in order
to reserve one more memory slot for ETH which may
consume 2 lookup items.
Fixes:
57c4f2693588 ("net/ice: enable switch filter")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
tun_type = ICE_SW_TUN_VXLAN;
if (item->type == RTE_FLOW_ITEM_TYPE_NVGRE)
tun_type = ICE_SW_TUN_NVGRE;
+ /* reserve one more memory slot for ETH which may
+ * consume 2 lookup items.
+ */
+ if (item->type == RTE_FLOW_ITEM_TYPE_ETH)
+ item_num++;
}
rule_info.tun_type = tun_type;