@@ -51,10 +51,11 @@ static const u8 ice_fdir_udp4_vxlan_pkt[] = {
0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
- 0x45, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x40, 0x00,
+ 0x45, 0x00, 0x00, 0x28, 0x00, 0x00, 0x40, 0x00,
0x40, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x50, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
};
static const u8 ice_fdir_ipv4_gtpu4_pkt[] = {
@@ -1573,6 +1574,9 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
input->ip.v4.dst_port);
ice_pkt_insert_u8(loc, ICE_IPV4_TOS_OFFSET, input->ip.v4.tos);
ice_pkt_insert_u8(loc, ICE_IPV4_TTL_OFFSET, input->ip.v4.ttl);
+ if (input->ip.v4.proto)
+ ice_pkt_insert_u8(loc, ICE_IPV4_PROTO_OFFSET,
+ input->ip.v4.proto);
ice_pkt_insert_mac_addr(loc, input->ext_data.dst_mac);
ice_pkt_insert_mac_addr(loc + ETH_ALEN, input->ext_data.src_mac);
break;
@@ -956,8 +956,7 @@ ice_fdir_input_set_hdrs(enum ice_fltr_ptype flow, struct ice_flow_seg_info *seg)
ICE_FLOW_SEG_HDR_IPV_OTHER);
break;
case ICE_FLTR_PTYPE_NONF_IPV4_UDP_VXLAN:
- ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_UDP |
- ICE_FLOW_SEG_HDR_IPV4 |
+ ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_IPV4 |
ICE_FLOW_SEG_HDR_VXLAN |
ICE_FLOW_SEG_HDR_IPV_OTHER);
break;
@@ -1815,10 +1814,12 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
assert(p_v4);
p_v4->dst_port = tcp_spec->hdr.dst_port;
p_v4->src_port = tcp_spec->hdr.src_port;
+ p_v4->proto = ICE_IP_PROTO_TCP;
} else if (l3 == RTE_FLOW_ITEM_TYPE_IPV6) {
assert(p_v6);
p_v6->dst_port = tcp_spec->hdr.dst_port;
p_v6->src_port = tcp_spec->hdr.src_port;
+ p_v6->proto = ICE_IP_PROTO_TCP;
}
break;
case RTE_FLOW_ITEM_TYPE_UDP:
@@ -1853,10 +1854,12 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
assert(p_v4);
p_v4->dst_port = udp_spec->hdr.dst_port;
p_v4->src_port = udp_spec->hdr.src_port;
+ p_v4->proto = ICE_IP_PROTO_UDP;
} else if (l3 == RTE_FLOW_ITEM_TYPE_IPV6) {
assert(p_v6);
p_v6->src_port = udp_spec->hdr.src_port;
p_v6->dst_port = udp_spec->hdr.dst_port;
+ p_v6->proto = ICE_IP_PROTO_UDP;
}
break;
case RTE_FLOW_ITEM_TYPE_SCTP:
@@ -1890,10 +1893,12 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
assert(p_v4);
p_v4->dst_port = sctp_spec->hdr.dst_port;
p_v4->src_port = sctp_spec->hdr.src_port;
+ p_v4->proto = ICE_IP_PROTO_SCTP;
} else if (l3 == RTE_FLOW_ITEM_TYPE_IPV6) {
assert(p_v6);
p_v6->dst_port = sctp_spec->hdr.dst_port;
p_v6->src_port = sctp_spec->hdr.src_port;
+ p_v6->proto = ICE_IP_PROTO_SCTP;
}
break;
case RTE_FLOW_ITEM_TYPE_VOID: