- input_set |= ICE_INSET_DMAC;
- rte_memcpy(&filter->input.ext_data.dst_mac,
- ð_spec->dst,
- RTE_ETHER_ADDR_LEN);
+ /* Ignore this field except for ICE_FLTR_PTYPE_NON_IP_L2 */
+ if (eth_mask->type == RTE_BE16(0xffff) &&
+ next_type == RTE_FLOW_ITEM_TYPE_END) {
+ input_set |= ICE_INSET_ETHERTYPE;
+ ether_type = rte_be_to_cpu_16(eth_spec->type);
+
+ if (ether_type == RTE_ETHER_TYPE_IPV4 ||
+ ether_type == RTE_ETHER_TYPE_IPV6) {
+ rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM,
+ item,
+ "Unsupported ether_type.");
+ return -rte_errno;
+ }
+
+ rte_memcpy(&filter->input.ext_data.ether_type,
+ ð_spec->type,
+ sizeof(eth_spec->type));
+ flow_type = ICE_FLTR_PTYPE_NON_IP_L2;
+ }