1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2020 Intel Corporation
13 #include <rte_debug.h>
14 #include <rte_ether.h>
15 #include <rte_ethdev_driver.h>
17 #include <rte_malloc.h>
18 #include <rte_eth_ctrl.h>
19 #include <rte_tailq.h>
20 #include <rte_flow_driver.h>
24 #include "iavf_generic_flow.h"
26 enum iavf_pattern_hint_type {
27 IAVF_PHINT_NONE = 0x00000000,
28 IAVF_PHINT_IPV4 = 0x00000001,
29 IAVF_PHINT_IPV4_UDP = 0x00000002,
30 IAVF_PHINT_IPV4_TCP = 0x00000004,
31 IAVF_PHINT_IPV4_SCTP = 0x00000008,
32 IAVF_PHINT_IPV6 = 0x00000010,
33 IAVF_PHINT_IPV6_UDP = 0x00000020,
34 IAVF_PHINT_IPV6_TCP = 0x00000040,
35 IAVF_PHINT_IPV6_SCTP = 0x00000080,
36 IAVF_PHINT_IPV4_GTPU_IP = 0x00000100,
37 IAVF_PHINT_IPV4_GTPU_EH = 0x00000200,
38 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK = 0x00000400,
39 IAVF_PHINT_IPV4_GTPU_EH_UPLINK = 0x00000800,
42 #define IAVF_GTPU_EH_DWNLINK 0
43 #define IAVF_GTPU_EH_UPLINK 1
45 struct iavf_pattern_match_type {
46 uint64_t pattern_hint;
49 struct iavf_hash_match_type {
51 struct virtchnl_proto_hdrs *proto_hdrs;
52 uint64_t pattern_hint;
55 struct iavf_rss_meta {
56 struct virtchnl_proto_hdrs *proto_hdrs;
57 enum virtchnl_rss_algorithm rss_algorithm;
60 struct iavf_hash_flow_cfg {
61 struct virtchnl_rss_cfg *rss_cfg;
66 iavf_hash_init(struct iavf_adapter *ad);
68 iavf_hash_create(struct iavf_adapter *ad, struct rte_flow *flow, void *meta,
69 struct rte_flow_error *error);
71 iavf_hash_destroy(struct iavf_adapter *ad, struct rte_flow *flow,
72 struct rte_flow_error *error);
74 iavf_hash_uninit(struct iavf_adapter *ad);
76 iavf_hash_free(struct rte_flow *flow);
78 iavf_hash_parse_pattern_action(struct iavf_adapter *ad,
79 struct iavf_pattern_match_item *array,
81 const struct rte_flow_item pattern[],
82 const struct rte_flow_action actions[],
84 struct rte_flow_error *error);
86 static struct iavf_pattern_match_type phint_empty = {
88 static struct iavf_pattern_match_type phint_eth_ipv4 = {
90 static struct iavf_pattern_match_type phint_eth_ipv4_udp = {
92 static struct iavf_pattern_match_type phint_eth_ipv4_tcp = {
94 static struct iavf_pattern_match_type phint_eth_ipv4_sctp = {
95 IAVF_PHINT_IPV4_SCTP};
96 static struct iavf_pattern_match_type phint_eth_ipv4_gtpu_ipv4 = {
98 static struct iavf_pattern_match_type phint_eth_ipv4_gtpu_eh_ipv4 = {
100 static struct iavf_pattern_match_type phint_eth_ipv4_gtpu_eh_ipv4_udp = {
101 IAVF_PHINT_IPV4_UDP};
102 static struct iavf_pattern_match_type phint_eth_ipv4_gtpu_eh_ipv4_tcp = {
103 IAVF_PHINT_IPV4_TCP};
104 static struct iavf_pattern_match_type phint_eth_ipv4_esp = {
106 static struct iavf_pattern_match_type phint_eth_ipv4_udp_esp = {
107 IAVF_PHINT_IPV4_UDP};
108 static struct iavf_pattern_match_type phint_eth_ipv4_ah = {
110 static struct iavf_pattern_match_type phint_eth_ipv4_l2tpv3 = {
112 static struct iavf_pattern_match_type phint_eth_ipv4_pfcp = {
113 IAVF_PHINT_IPV4_UDP};
114 static struct iavf_pattern_match_type phint_eth_vlan_ipv4 = {
116 static struct iavf_pattern_match_type phint_eth_vlan_ipv4_udp = {
117 IAVF_PHINT_IPV4_UDP};
118 static struct iavf_pattern_match_type phint_eth_vlan_ipv4_tcp = {
119 IAVF_PHINT_IPV4_TCP};
120 static struct iavf_pattern_match_type phint_eth_vlan_ipv4_sctp = {
121 IAVF_PHINT_IPV4_SCTP};
122 static struct iavf_pattern_match_type phint_eth_ipv6 = {
124 static struct iavf_pattern_match_type phint_eth_ipv6_udp = {
125 IAVF_PHINT_IPV6_UDP};
126 static struct iavf_pattern_match_type phint_eth_ipv6_tcp = {
127 IAVF_PHINT_IPV6_TCP};
128 static struct iavf_pattern_match_type phint_eth_ipv6_sctp = {
129 IAVF_PHINT_IPV6_SCTP};
130 static struct iavf_pattern_match_type phint_eth_ipv6_esp = {
132 static struct iavf_pattern_match_type phint_eth_ipv6_udp_esp = {
133 IAVF_PHINT_IPV6_UDP};
134 static struct iavf_pattern_match_type phint_eth_ipv6_ah = {
136 static struct iavf_pattern_match_type phint_eth_ipv6_l2tpv3 = {
138 static struct iavf_pattern_match_type phint_eth_ipv6_pfcp = {
139 IAVF_PHINT_IPV6_UDP};
140 static struct iavf_pattern_match_type phint_eth_vlan_ipv6 = {
142 static struct iavf_pattern_match_type phint_eth_vlan_ipv6_udp = {
143 IAVF_PHINT_IPV6_UDP};
144 static struct iavf_pattern_match_type phint_eth_vlan_ipv6_tcp = {
145 IAVF_PHINT_IPV6_TCP};
146 static struct iavf_pattern_match_type phint_eth_vlan_ipv6_sctp = {
147 IAVF_PHINT_IPV6_SCTP};
150 * Supported pattern for hash.
151 * The first member is pattern item type,
152 * the second member is input set mask,
153 * the third member is pattern hint for hash.
155 static struct iavf_pattern_match_item iavf_hash_pattern_list[] = {
156 {iavf_pattern_eth_ipv4, IAVF_INSET_NONE, &phint_eth_ipv4},
157 {iavf_pattern_eth_ipv4_udp, IAVF_INSET_NONE, &phint_eth_ipv4_udp},
158 {iavf_pattern_eth_ipv4_tcp, IAVF_INSET_NONE, &phint_eth_ipv4_tcp},
159 {iavf_pattern_eth_ipv4_sctp, IAVF_INSET_NONE, &phint_eth_ipv4_sctp},
160 {iavf_pattern_eth_ipv4_gtpu_ipv4, IAVF_INSET_NONE,
161 &phint_eth_ipv4_gtpu_ipv4},
162 {iavf_pattern_eth_ipv4_gtpu_eh_ipv4, IAVF_INSET_NONE,
163 &phint_eth_ipv4_gtpu_eh_ipv4},
164 {iavf_pattern_eth_ipv4_gtpu_eh_ipv4_udp, IAVF_INSET_NONE,
165 &phint_eth_ipv4_gtpu_eh_ipv4_udp},
166 {iavf_pattern_eth_ipv4_gtpu_eh_ipv4_tcp, IAVF_INSET_NONE,
167 &phint_eth_ipv4_gtpu_eh_ipv4_tcp},
168 {iavf_pattern_eth_ipv4_esp, IAVF_INSET_NONE, &phint_eth_ipv4_esp},
169 {iavf_pattern_eth_ipv4_udp_esp, IAVF_INSET_NONE,
170 &phint_eth_ipv4_udp_esp},
171 {iavf_pattern_eth_ipv4_ah, IAVF_INSET_NONE, &phint_eth_ipv4_ah},
172 {iavf_pattern_eth_ipv4_l2tpv3, IAVF_INSET_NONE,
173 &phint_eth_ipv4_l2tpv3},
174 {iavf_pattern_eth_ipv4_pfcp, IAVF_INSET_NONE, &phint_eth_ipv4_pfcp},
175 {iavf_pattern_eth_vlan_ipv4, IAVF_INSET_NONE, &phint_eth_vlan_ipv4},
176 {iavf_pattern_eth_vlan_ipv4_udp, IAVF_INSET_NONE,
177 &phint_eth_vlan_ipv4_udp},
178 {iavf_pattern_eth_vlan_ipv4_tcp, IAVF_INSET_NONE,
179 &phint_eth_vlan_ipv4_tcp},
180 {iavf_pattern_eth_vlan_ipv4_sctp, IAVF_INSET_NONE,
181 &phint_eth_vlan_ipv4_sctp},
182 {iavf_pattern_eth_ipv6, IAVF_INSET_NONE, &phint_eth_ipv6},
183 {iavf_pattern_eth_ipv6_udp, IAVF_INSET_NONE, &phint_eth_ipv6_udp},
184 {iavf_pattern_eth_ipv6_tcp, IAVF_INSET_NONE, &phint_eth_ipv6_tcp},
185 {iavf_pattern_eth_ipv6_sctp, IAVF_INSET_NONE, &phint_eth_ipv6_sctp},
186 {iavf_pattern_eth_ipv6_esp, IAVF_INSET_NONE, &phint_eth_ipv6_esp},
187 {iavf_pattern_eth_ipv6_udp_esp, IAVF_INSET_NONE,
188 &phint_eth_ipv6_udp_esp},
189 {iavf_pattern_eth_ipv6_ah, IAVF_INSET_NONE, &phint_eth_ipv6_ah},
190 {iavf_pattern_eth_ipv6_l2tpv3, IAVF_INSET_NONE,
191 &phint_eth_ipv6_l2tpv3},
192 {iavf_pattern_eth_ipv6_pfcp, IAVF_INSET_NONE, &phint_eth_ipv6_pfcp},
193 {iavf_pattern_eth_vlan_ipv6, IAVF_INSET_NONE, &phint_eth_vlan_ipv6},
194 {iavf_pattern_eth_vlan_ipv6_udp, IAVF_INSET_NONE,
195 &phint_eth_vlan_ipv6_udp},
196 {iavf_pattern_eth_vlan_ipv6_tcp, IAVF_INSET_NONE,
197 &phint_eth_vlan_ipv6_tcp},
198 {iavf_pattern_eth_vlan_ipv6_sctp, IAVF_INSET_NONE,
199 &phint_eth_vlan_ipv6_sctp},
200 {iavf_pattern_empty, IAVF_INSET_NONE, &phint_empty},
203 #define TUNNEL_LEVEL_OUTER 0
204 #define TUNNEL_LEVEL_FIRST_INNER 1
206 #define PROTO_COUNT_ONE 1
207 #define PROTO_COUNT_TWO 2
208 #define PROTO_COUNT_THREE 3
210 #define BUFF_NOUSED 0
211 #define FIELD_FOR_PROTO_ONLY 0
213 #define FIELD_SELECTOR(proto_hdr_field) \
214 (1UL << ((proto_hdr_field) & PROTO_HDR_FIELD_MASK))
216 #define proto_hint_eth_src { \
217 VIRTCHNL_PROTO_HDR_ETH, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_SRC), \
220 #define proto_hint_eth_dst { \
221 VIRTCHNL_PROTO_HDR_ETH, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_DST), \
224 #define proto_hint_eth_only { \
225 VIRTCHNL_PROTO_HDR_ETH, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
227 #define proto_hint_eth { \
228 VIRTCHNL_PROTO_HDR_ETH, \
229 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_SRC) | \
230 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ETH_DST), {BUFF_NOUSED } }
232 #define proto_hint_svlan { \
233 VIRTCHNL_PROTO_HDR_S_VLAN, \
234 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_S_VLAN_ID), {BUFF_NOUSED } }
236 #define proto_hint_cvlan { \
237 VIRTCHNL_PROTO_HDR_C_VLAN, \
238 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_C_VLAN_ID), {BUFF_NOUSED } }
240 #define proto_hint_ipv4_src { \
241 VIRTCHNL_PROTO_HDR_IPV4, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC), \
244 #define proto_hint_ipv4_dst { \
245 VIRTCHNL_PROTO_HDR_IPV4, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST), \
248 #define proto_hint_ipv4_only { \
249 VIRTCHNL_PROTO_HDR_IPV4, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
251 #define proto_hint_ipv4 { \
252 VIRTCHNL_PROTO_HDR_IPV4, \
253 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC) | \
254 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST), {BUFF_NOUSED } }
256 #define proto_hint_ipv4_src_prot { \
257 VIRTCHNL_PROTO_HDR_IPV4, \
258 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC) | \
259 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_PROT), \
262 #define proto_hint_ipv4_dst_prot { \
263 VIRTCHNL_PROTO_HDR_IPV4, \
264 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST) | \
265 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_PROT), \
268 #define proto_hint_ipv4_only_prot { \
269 VIRTCHNL_PROTO_HDR_IPV4, \
270 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_PROT), {BUFF_NOUSED } }
272 #define proto_hint_ipv4_prot { \
273 VIRTCHNL_PROTO_HDR_IPV4, \
274 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC) | \
275 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST) | \
276 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_PROT), {BUFF_NOUSED } }
278 #define proto_hint_udp_src_port { \
279 VIRTCHNL_PROTO_HDR_UDP, \
280 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_UDP_SRC_PORT), {BUFF_NOUSED } }
282 #define proto_hint_udp_dst_port { \
283 VIRTCHNL_PROTO_HDR_UDP, \
284 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_UDP_DST_PORT), {BUFF_NOUSED } }
286 #define proto_hint_udp_only { \
287 VIRTCHNL_PROTO_HDR_UDP, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
289 #define proto_hint_udp { \
290 VIRTCHNL_PROTO_HDR_UDP, \
291 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_UDP_SRC_PORT) | \
292 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_UDP_DST_PORT), {BUFF_NOUSED } }
294 #define proto_hint_tcp_src_port { \
295 VIRTCHNL_PROTO_HDR_TCP, \
296 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_TCP_SRC_PORT), {BUFF_NOUSED } }
298 #define proto_hint_tcp_dst_port { \
299 VIRTCHNL_PROTO_HDR_TCP, \
300 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_TCP_DST_PORT), {BUFF_NOUSED } }
302 #define proto_hint_tcp_only { \
303 VIRTCHNL_PROTO_HDR_TCP, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
305 #define proto_hint_tcp { \
306 VIRTCHNL_PROTO_HDR_TCP, \
307 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_TCP_SRC_PORT) | \
308 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_TCP_DST_PORT), {BUFF_NOUSED } }
310 #define proto_hint_sctp_src_port { \
311 VIRTCHNL_PROTO_HDR_SCTP, \
312 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT), {BUFF_NOUSED } }
314 #define proto_hint_sctp_dst_port { \
315 VIRTCHNL_PROTO_HDR_SCTP, \
316 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_SCTP_DST_PORT), {BUFF_NOUSED } }
318 #define proto_hint_sctp_only { \
319 VIRTCHNL_PROTO_HDR_SCTP, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
321 #define proto_hint_sctp { \
322 VIRTCHNL_PROTO_HDR_SCTP, \
323 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_SCTP_SRC_PORT) | \
324 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_SCTP_DST_PORT), {BUFF_NOUSED } }
326 #define proto_hint_ipv6_src { \
327 VIRTCHNL_PROTO_HDR_IPV6, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_SRC), \
330 #define proto_hint_ipv6_dst { \
331 VIRTCHNL_PROTO_HDR_IPV6, FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST), \
334 #define proto_hint_ipv6_only { \
335 VIRTCHNL_PROTO_HDR_IPV6, FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
337 #define proto_hint_ipv6 { \
338 VIRTCHNL_PROTO_HDR_IPV6, \
339 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_SRC) | \
340 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST), {BUFF_NOUSED } }
342 #define proto_hint_ipv6_src_prot { \
343 VIRTCHNL_PROTO_HDR_IPV6, \
344 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_SRC) | \
345 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_PROT), \
348 #define proto_hint_ipv6_dst_prot { \
349 VIRTCHNL_PROTO_HDR_IPV6, \
350 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST) | \
351 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_PROT), \
354 #define proto_hint_ipv6_only_prot { \
355 VIRTCHNL_PROTO_HDR_IPV6, \
356 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_PROT), {BUFF_NOUSED } }
358 #define proto_hint_ipv6_prot { \
359 VIRTCHNL_PROTO_HDR_IPV6, \
360 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_SRC) | \
361 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST) | \
362 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_PROT), {BUFF_NOUSED } }
364 #define proto_hint_gtpu_ip_teid { \
365 VIRTCHNL_PROTO_HDR_GTPU_IP, \
366 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_GTPU_IP_TEID), {BUFF_NOUSED } }
368 #define proto_hint_gtpu_eh_only { \
369 VIRTCHNL_PROTO_HDR_GTPU_EH, \
370 FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
372 #define proto_hint_gtpu_ip_only { \
373 VIRTCHNL_PROTO_HDR_GTPU_IP, \
374 FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
376 #define proto_hint_gtpu_up_only { \
377 VIRTCHNL_PROTO_HDR_GTPU_EH_PDU_UP, \
378 FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
380 #define proto_hint_gtpu_dwn_only { \
381 VIRTCHNL_PROTO_HDR_GTPU_EH_PDU_DWN, \
382 FIELD_FOR_PROTO_ONLY, {BUFF_NOUSED } }
384 #define proto_hint_esp { \
385 VIRTCHNL_PROTO_HDR_ESP, \
386 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_ESP_SPI), {BUFF_NOUSED } }
388 #define proto_hint_ah { \
389 VIRTCHNL_PROTO_HDR_AH, \
390 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_AH_SPI), {BUFF_NOUSED } }
392 #define proto_hint_l2tpv3 { \
393 VIRTCHNL_PROTO_HDR_L2TPV3, \
394 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_L2TPV3_SESS_ID), {BUFF_NOUSED } }
396 #define proto_hint_pfcp { \
397 VIRTCHNL_PROTO_HDR_PFCP, \
398 FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_PFCP_SEID), {BUFF_NOUSED } }
402 struct virtchnl_proto_hdrs hdrs_hint_eth_src_ipv4 = {
403 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_eth_src,
404 proto_hint_ipv4_only }
407 struct virtchnl_proto_hdrs hdrs_hint_eth_src_ipv4_udp = {
408 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth_src,
409 proto_hint_ipv4_only, proto_hint_udp_only }
412 struct virtchnl_proto_hdrs hdrs_hint_eth_src_ipv4_tcp = {
413 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth_src,
414 proto_hint_ipv4_only, proto_hint_tcp_only }
417 struct virtchnl_proto_hdrs hdrs_hint_eth_src_ipv4_sctp = {
418 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth_src,
419 proto_hint_ipv4_only, proto_hint_sctp_only }
422 struct virtchnl_proto_hdrs hdrs_hint_eth_dst_ipv4 = {
423 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_eth_dst,
424 proto_hint_ipv4_only }
427 struct virtchnl_proto_hdrs hdrs_hint_eth_dst_ipv4_udp = {
428 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth_dst,
429 proto_hint_ipv4_only, proto_hint_udp_only }
432 struct virtchnl_proto_hdrs hdrs_hint_eth_dst_ipv4_tcp = {
433 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth_dst,
434 proto_hint_ipv4_only, proto_hint_tcp_only }
437 struct virtchnl_proto_hdrs hdrs_hint_eth_dst_ipv4_sctp = {
438 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth_dst,
439 proto_hint_ipv4_only, proto_hint_sctp_only }
442 struct virtchnl_proto_hdrs hdrs_hint_eth_ipv4 = {
443 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_eth,
444 proto_hint_ipv4_only }
447 struct virtchnl_proto_hdrs hdrs_hint_eth_ipv4_udp = {
448 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth,
449 proto_hint_ipv4_only, proto_hint_udp_only }
452 struct virtchnl_proto_hdrs hdrs_hint_eth_ipv4_tcp = {
453 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth,
454 proto_hint_ipv4_only, proto_hint_tcp_only }
457 struct virtchnl_proto_hdrs hdrs_hint_eth_ipv4_sctp = {
458 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth,
459 proto_hint_ipv4_only, proto_hint_sctp_only }
462 struct virtchnl_proto_hdrs hdrs_hint_svlan_ipv4 = {
463 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_svlan,
464 proto_hint_ipv4_only}
467 struct virtchnl_proto_hdrs hdrs_hint_svlan_ipv4_udp = {
468 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_svlan,
469 proto_hint_ipv4_only, proto_hint_udp_only}
472 struct virtchnl_proto_hdrs hdrs_hint_svlan_ipv4_tcp = {
473 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_svlan,
474 proto_hint_ipv4_only, proto_hint_tcp_only}
477 struct virtchnl_proto_hdrs hdrs_hint_svlan_ipv4_sctp = {
478 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_svlan,
479 proto_hint_ipv4_only, proto_hint_sctp_only}
482 struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv4 = {
483 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_cvlan,
484 proto_hint_ipv4_only}
487 struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv4_udp = {
488 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_cvlan,
489 proto_hint_ipv4_only, proto_hint_udp_only}
492 struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv4_tcp = {
493 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_cvlan,
494 proto_hint_ipv4_only, proto_hint_tcp_only}
497 struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv4_sctp = {
498 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_cvlan,
499 proto_hint_ipv4_only, proto_hint_sctp_only}
502 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src = {
503 TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv4_src }
506 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst = {
507 TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv4_dst }
510 struct virtchnl_proto_hdrs hdrs_hint_ipv4 = {
511 TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv4 }
514 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_src_port = {
515 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src_prot,
516 proto_hint_udp_src_port }
519 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_dst_port = {
520 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src_prot,
521 proto_hint_udp_dst_port }
524 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_src_port = {
525 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst_prot,
526 proto_hint_udp_src_port }
529 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_dst_port = {
530 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst_prot,
531 proto_hint_udp_dst_port }
534 struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_src_port = {
535 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only_prot,
536 proto_hint_udp_src_port }
539 struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_dst_port = {
540 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only_prot,
541 proto_hint_udp_dst_port }
544 struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp = {
545 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_prot,
549 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_src_port = {
550 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src_prot,
551 proto_hint_tcp_src_port }
554 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_dst_port = {
555 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src_prot,
556 proto_hint_tcp_dst_port }
559 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_src_port = {
560 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst_prot,
561 proto_hint_tcp_src_port }
564 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_dst_port = {
565 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst_prot,
566 proto_hint_tcp_dst_port }
569 struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_src_port = {
570 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only_prot,
571 proto_hint_tcp_src_port }
574 struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_dst_port = {
575 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only_prot,
576 proto_hint_tcp_dst_port }
579 struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp = {
580 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_prot,
584 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_sctp_src_port = {
585 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src,
586 proto_hint_sctp_src_port }
589 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_sctp_dst_port = {
590 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_src,
591 proto_hint_sctp_dst_port }
594 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_sctp_src_port = {
595 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst,
596 proto_hint_sctp_src_port }
599 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_sctp_dst_port = {
600 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_dst,
601 proto_hint_sctp_dst_port }
604 struct virtchnl_proto_hdrs hdrs_hint_ipv4_sctp_src_port = {
605 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,
606 proto_hint_sctp_src_port }
609 struct virtchnl_proto_hdrs hdrs_hint_ipv4_sctp_dst_port = {
610 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,
611 proto_hint_sctp_dst_port }
614 struct virtchnl_proto_hdrs hdrs_hint_ipv4_sctp = {
615 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4,
619 struct virtchnl_proto_hdrs hdrs_hint_ipv4_esp = {
620 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,
624 struct virtchnl_proto_hdrs hdrs_hint_ipv4_ah = {
625 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,
629 struct virtchnl_proto_hdrs hdrs_hint_ipv4_l2tpv3 = {
630 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,
634 struct virtchnl_proto_hdrs hdrs_hint_ipv4_pfcp = {
635 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv4_only,
639 struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_esp = {
640 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv4_only,
641 proto_hint_udp_only, proto_hint_esp }
645 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_ip = {
646 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_ip_only,
647 proto_hint_ipv4_src }
650 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_ip = {
651 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_ip_only,
652 proto_hint_ipv4_dst }
655 struct virtchnl_proto_hdrs hdrs_hint_ipv4_gtpu_ip = {
656 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_ip_only,
660 struct virtchnl_proto_hdrs hdrs_hint_teid_gtpu_ip = {
661 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_ip_teid}
666 struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_src_gtpu_eh = {
667 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only,
668 proto_hint_ipv4_only_prot, proto_hint_udp_src_port}
671 struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_dst_gtpu_eh = {
672 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only,
673 proto_hint_ipv4_only_prot, proto_hint_udp_dst_port}
676 struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_src_gtpu_eh = {
677 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only,
678 proto_hint_ipv4_only_prot, proto_hint_tcp_src_port}
681 struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_dst_gtpu_eh = {
682 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only,
683 proto_hint_ipv4_only_prot, proto_hint_tcp_dst_port}
686 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_eh = {
687 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_eh_only,
688 proto_hint_ipv4_src }
691 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_src_gtpu_eh = {
692 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only,
693 proto_hint_ipv4_src_prot, proto_hint_udp_src_port}
696 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_dst_gtpu_eh = {
697 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only,
698 proto_hint_ipv4_src_prot, proto_hint_udp_dst_port}
701 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_src_gtpu_eh = {
702 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only,
703 proto_hint_ipv4_src_prot, proto_hint_tcp_src_port}
706 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_dst_gtpu_eh = {
707 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only,
708 proto_hint_ipv4_src_prot, proto_hint_tcp_dst_port}
711 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_eh = {
712 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_eh_only,
713 proto_hint_ipv4_dst }
716 struct virtchnl_proto_hdrs hdrs_hint_ipv4_gtpu_eh = {
717 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_eh_only,
721 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_src_gtpu_eh = {
722 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only,
723 proto_hint_ipv4_dst_prot, proto_hint_udp_src_port}
726 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_dst_gtpu_eh = {
727 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only,
728 proto_hint_ipv4_dst_prot, proto_hint_udp_dst_port}
731 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_src_gtpu_eh = {
732 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only,
733 proto_hint_ipv4_dst_prot, proto_hint_tcp_src_port}
736 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_dst_gtpu_eh = {
737 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only,
738 proto_hint_ipv4_dst_prot, proto_hint_tcp_dst_port}
741 struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_gtpu_eh = {
742 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only,
743 proto_hint_ipv4_prot, proto_hint_udp}
746 struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_gtpu_eh = {
747 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_eh_only,
748 proto_hint_ipv4_prot, proto_hint_tcp}
753 struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_src_gtpu_up = {
754 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only,
755 proto_hint_ipv4_only_prot, proto_hint_udp_src_port}
758 struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_dst_gtpu_up = {
759 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only,
760 proto_hint_ipv4_only_prot, proto_hint_udp_dst_port}
763 struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_src_gtpu_up = {
764 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only,
765 proto_hint_ipv4_only_prot, proto_hint_tcp_src_port}
768 struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_dst_gtpu_up = {
769 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only,
770 proto_hint_ipv4_only_prot, proto_hint_tcp_dst_port}
773 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_up = {
774 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_up_only,
775 proto_hint_ipv4_src }
778 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_src_gtpu_up = {
779 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only,
780 proto_hint_ipv4_src_prot, proto_hint_udp_src_port}
783 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_dst_gtpu_up = {
784 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only,
785 proto_hint_ipv4_src_prot, proto_hint_udp_dst_port}
788 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_src_gtpu_up = {
789 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only,
790 proto_hint_ipv4_src_prot, proto_hint_tcp_src_port}
793 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_dst_gtpu_up = {
794 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only,
795 proto_hint_ipv4_src_prot, proto_hint_tcp_dst_port}
798 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_up = {
799 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_up_only,
800 proto_hint_ipv4_dst }
803 struct virtchnl_proto_hdrs hdrs_hint_ipv4_gtpu_up = {
804 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_up_only,
808 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_src_gtpu_up = {
809 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only,
810 proto_hint_ipv4_dst_prot, proto_hint_udp_src_port}
813 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_dst_gtpu_up = {
814 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only,
815 proto_hint_ipv4_dst_prot, proto_hint_udp_dst_port}
818 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_src_gtpu_up = {
819 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only,
820 proto_hint_ipv4_dst_prot, proto_hint_tcp_src_port}
823 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_dst_gtpu_up = {
824 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only,
825 proto_hint_ipv4_dst_prot, proto_hint_tcp_dst_port}
828 struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_gtpu_up = {
829 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only,
830 proto_hint_ipv4_prot, proto_hint_udp}
833 struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_gtpu_up = {
834 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_up_only,
835 proto_hint_ipv4_prot, proto_hint_tcp}
840 struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_src_gtpu_dwn = {
841 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only,
842 proto_hint_ipv4_only_prot, proto_hint_udp_src_port}
845 struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_dst_gtpu_dwn = {
846 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only,
847 proto_hint_ipv4_only_prot, proto_hint_udp_dst_port}
850 struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_src_gtpu_dwn = {
851 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only,
852 proto_hint_ipv4_only_prot, proto_hint_tcp_src_port}
855 struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_dst_gtpu_dwn = {
856 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only,
857 proto_hint_ipv4_only_prot, proto_hint_tcp_dst_port}
860 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_gtpu_dwn = {
861 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_dwn_only,
862 proto_hint_ipv4_src }
865 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_src_gtpu_dwn = {
866 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only,
867 proto_hint_ipv4_src_prot, proto_hint_udp_src_port}
870 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_udp_dst_gtpu_dwn = {
871 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only,
872 proto_hint_ipv4_src_prot, proto_hint_udp_dst_port}
875 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_src_gtpu_dwn = {
876 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only,
877 proto_hint_ipv4_src_prot, proto_hint_tcp_src_port}
880 struct virtchnl_proto_hdrs hdrs_hint_ipv4_src_tcp_dst_gtpu_dwn = {
881 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only,
882 proto_hint_ipv4_src_prot, proto_hint_tcp_dst_port}
885 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_gtpu_dwn = {
886 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_dwn_only,
887 proto_hint_ipv4_dst }
890 struct virtchnl_proto_hdrs hdrs_hint_ipv4_gtpu_dwn = {
891 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_TWO, {proto_hint_gtpu_dwn_only,
895 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_src_gtpu_dwn = {
896 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only,
897 proto_hint_ipv4_dst_prot, proto_hint_udp_src_port}
900 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_udp_dst_gtpu_dwn = {
901 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only,
902 proto_hint_ipv4_dst_prot, proto_hint_udp_dst_port}
905 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_src_gtpu_dwn = {
906 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only,
907 proto_hint_ipv4_dst_prot, proto_hint_tcp_src_port}
910 struct virtchnl_proto_hdrs hdrs_hint_ipv4_dst_tcp_dst_gtpu_dwn = {
911 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only,
912 proto_hint_ipv4_dst_prot, proto_hint_tcp_dst_port}
915 struct virtchnl_proto_hdrs hdrs_hint_ipv4_udp_gtpu_dwn = {
916 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only,
917 proto_hint_ipv4_prot, proto_hint_udp}
920 struct virtchnl_proto_hdrs hdrs_hint_ipv4_tcp_gtpu_dwn = {
921 TUNNEL_LEVEL_FIRST_INNER, PROTO_COUNT_THREE, {proto_hint_gtpu_dwn_only,
922 proto_hint_ipv4_prot, proto_hint_tcp}
927 struct virtchnl_proto_hdrs hdrs_hint_eth_src_ipv6 = {
928 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_eth_src,
929 proto_hint_ipv6_only }
932 struct virtchnl_proto_hdrs hdrs_hint_eth_src_ipv6_udp = {
933 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth_src,
934 proto_hint_ipv6_only, proto_hint_udp_only }
937 struct virtchnl_proto_hdrs hdrs_hint_eth_src_ipv6_tcp = {
938 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth_src,
939 proto_hint_ipv6_only, proto_hint_tcp_only }
942 struct virtchnl_proto_hdrs hdrs_hint_eth_src_ipv6_sctp = {
943 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth_src,
944 proto_hint_ipv6_only, proto_hint_sctp_only }
947 struct virtchnl_proto_hdrs hdrs_hint_eth_dst_ipv6 = {
948 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_eth_dst,
949 proto_hint_ipv6_only }
952 struct virtchnl_proto_hdrs hdrs_hint_eth_dst_ipv6_udp = {
953 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth_dst,
954 proto_hint_ipv6_only, proto_hint_udp_only }
957 struct virtchnl_proto_hdrs hdrs_hint_eth_dst_ipv6_tcp = {
958 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth_dst,
959 proto_hint_ipv6_only, proto_hint_tcp_only }
962 struct virtchnl_proto_hdrs hdrs_hint_eth_dst_ipv6_sctp = {
963 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth_dst,
964 proto_hint_ipv6_only, proto_hint_sctp_only }
967 struct virtchnl_proto_hdrs hdrs_hint_eth_ipv6 = {
968 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_eth,
969 proto_hint_ipv6_only }
972 struct virtchnl_proto_hdrs hdrs_hint_eth_ipv6_udp = {
973 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth,
974 proto_hint_ipv6_only, proto_hint_udp_only }
977 struct virtchnl_proto_hdrs hdrs_hint_eth_ipv6_tcp = {
978 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth,
979 proto_hint_ipv6_only, proto_hint_tcp_only }
982 struct virtchnl_proto_hdrs hdrs_hint_eth_ipv6_sctp = {
983 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_eth,
984 proto_hint_ipv6_only, proto_hint_sctp_only }
987 struct virtchnl_proto_hdrs hdrs_hint_svlan_ipv6 = {
988 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_svlan,
989 proto_hint_ipv6_only}
992 struct virtchnl_proto_hdrs hdrs_hint_svlan_ipv6_udp = {
993 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_svlan,
994 proto_hint_ipv6_only, proto_hint_udp_only}
997 struct virtchnl_proto_hdrs hdrs_hint_svlan_ipv6_tcp = {
998 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_svlan,
999 proto_hint_ipv6_only, proto_hint_tcp_only}
1002 struct virtchnl_proto_hdrs hdrs_hint_svlan_ipv6_sctp = {
1003 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_svlan,
1004 proto_hint_ipv6_only, proto_hint_sctp_only}
1007 struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv6 = {
1008 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_cvlan,
1009 proto_hint_ipv6_only}
1012 struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv6_udp = {
1013 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_cvlan,
1014 proto_hint_ipv6_only, proto_hint_udp_only}
1017 struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv6_tcp = {
1018 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_cvlan,
1019 proto_hint_ipv6_only, proto_hint_tcp_only}
1022 struct virtchnl_proto_hdrs hdrs_hint_cvlan_ipv6_sctp = {
1023 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_cvlan,
1024 proto_hint_ipv6_only, proto_hint_sctp_only}
1027 struct virtchnl_proto_hdrs hdrs_hint_ipv6_src = {
1028 TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv6_src }
1031 struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst = {
1032 TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv6_dst }
1035 struct virtchnl_proto_hdrs hdrs_hint_ipv6 = {
1036 TUNNEL_LEVEL_OUTER, PROTO_COUNT_ONE, {proto_hint_ipv6 }
1039 struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_udp_src_port = {
1040 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src_prot,
1041 proto_hint_udp_src_port }
1044 struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_udp_dst_port = {
1045 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src_prot,
1046 proto_hint_udp_dst_port }
1049 struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_udp_src_port = {
1050 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst_prot,
1051 proto_hint_udp_src_port }
1054 struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_udp_dst_port = {
1055 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst_prot,
1056 proto_hint_udp_dst_port }
1059 struct virtchnl_proto_hdrs hdrs_hint_ipv6_udp_src_port = {
1060 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only_prot,
1061 proto_hint_udp_src_port }
1064 struct virtchnl_proto_hdrs hdrs_hint_ipv6_udp_dst_port = {
1065 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only_prot,
1066 proto_hint_udp_dst_port }
1069 struct virtchnl_proto_hdrs hdrs_hint_ipv6_udp = {
1070 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_prot,
1074 struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_tcp_src_port = {
1075 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src_prot,
1076 proto_hint_tcp_src_port }
1079 struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_tcp_dst_port = {
1080 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src_prot,
1081 proto_hint_tcp_dst_port }
1084 struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_tcp_src_port = {
1085 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst_prot,
1086 proto_hint_tcp_src_port }
1089 struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_tcp_dst_port = {
1090 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst_prot,
1091 proto_hint_tcp_dst_port }
1094 struct virtchnl_proto_hdrs hdrs_hint_ipv6_tcp_src_port = {
1095 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only_prot,
1096 proto_hint_tcp_src_port }
1099 struct virtchnl_proto_hdrs hdrs_hint_ipv6_tcp_dst_port = {
1100 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only_prot,
1101 proto_hint_tcp_dst_port }
1104 struct virtchnl_proto_hdrs hdrs_hint_ipv6_tcp = {
1105 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_prot,
1109 struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_sctp_src_port = {
1110 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src,
1111 proto_hint_sctp_src_port }
1114 struct virtchnl_proto_hdrs hdrs_hint_ipv6_src_sctp_dst_port = {
1115 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_src,
1116 proto_hint_sctp_dst_port }
1119 struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_sctp_src_port = {
1120 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst,
1121 proto_hint_sctp_src_port }
1124 struct virtchnl_proto_hdrs hdrs_hint_ipv6_dst_sctp_dst_port = {
1125 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_dst,
1126 proto_hint_sctp_dst_port }
1129 struct virtchnl_proto_hdrs hdrs_hint_ipv6_sctp_src_port = {
1130 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only,
1131 proto_hint_sctp_src_port }
1134 struct virtchnl_proto_hdrs hdrs_hint_ipv6_sctp_dst_port = {
1135 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only,
1136 proto_hint_sctp_dst_port }
1139 struct virtchnl_proto_hdrs hdrs_hint_ipv6_sctp = {
1140 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6,
1144 struct virtchnl_proto_hdrs hdrs_hint_ipv6_esp = {
1145 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only,
1149 struct virtchnl_proto_hdrs hdrs_hint_ipv6_ah = {
1150 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only,
1154 struct virtchnl_proto_hdrs hdrs_hint_ipv6_l2tpv3 = {
1155 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only,
1159 struct virtchnl_proto_hdrs hdrs_hint_ipv6_pfcp = {
1160 TUNNEL_LEVEL_OUTER, PROTO_COUNT_TWO, {proto_hint_ipv6_only,
1164 struct virtchnl_proto_hdrs hdrs_hint_ipv6_udp_esp = {
1165 TUNNEL_LEVEL_OUTER, PROTO_COUNT_THREE, {proto_hint_ipv6_only,
1166 proto_hint_udp_only, proto_hint_esp }
1169 struct iavf_hash_match_type iavf_hash_map_list[] = {
1171 {ETH_RSS_L2_SRC_ONLY,
1172 &hdrs_hint_eth_src_ipv4, IAVF_PHINT_IPV4},
1173 {ETH_RSS_L2_DST_ONLY,
1174 &hdrs_hint_eth_dst_ipv4, IAVF_PHINT_IPV4},
1176 &hdrs_hint_eth_ipv4, IAVF_PHINT_IPV4},
1177 {ETH_RSS_L3_SRC_ONLY,
1178 &hdrs_hint_ipv4_src, IAVF_PHINT_IPV4},
1179 {ETH_RSS_L3_DST_ONLY,
1180 &hdrs_hint_ipv4_dst, IAVF_PHINT_IPV4},
1181 {ETH_RSS_IPV4 | ETH_RSS_L3_SRC_ONLY,
1182 &hdrs_hint_ipv4_src, IAVF_PHINT_IPV4},
1183 {ETH_RSS_IPV4 | ETH_RSS_L3_DST_ONLY,
1184 &hdrs_hint_ipv4_dst, IAVF_PHINT_IPV4},
1186 &hdrs_hint_ipv4, IAVF_PHINT_IPV4},
1188 &hdrs_hint_ipv4_esp, IAVF_PHINT_IPV4},
1190 &hdrs_hint_ipv4_ah, IAVF_PHINT_IPV4},
1192 &hdrs_hint_ipv4_l2tpv3, IAVF_PHINT_IPV4},
1194 &hdrs_hint_svlan_ipv4, IAVF_PHINT_IPV4},
1196 &hdrs_hint_svlan_ipv4_udp, IAVF_PHINT_IPV4_UDP},
1198 &hdrs_hint_svlan_ipv4_tcp, IAVF_PHINT_IPV4_TCP},
1200 &hdrs_hint_svlan_ipv4_sctp, IAVF_PHINT_IPV4_SCTP},
1202 &hdrs_hint_cvlan_ipv4, IAVF_PHINT_IPV4},
1204 &hdrs_hint_cvlan_ipv4_udp, IAVF_PHINT_IPV4_UDP},
1206 &hdrs_hint_cvlan_ipv4_tcp, IAVF_PHINT_IPV4_TCP},
1208 &hdrs_hint_cvlan_ipv4_sctp, IAVF_PHINT_IPV4_SCTP},
1210 {ETH_RSS_L2_SRC_ONLY,
1211 &hdrs_hint_eth_src_ipv4_udp, IAVF_PHINT_IPV4_UDP},
1212 {ETH_RSS_L2_DST_ONLY,
1213 &hdrs_hint_eth_dst_ipv4_udp, IAVF_PHINT_IPV4_UDP},
1215 &hdrs_hint_eth_ipv4_udp, IAVF_PHINT_IPV4_UDP},
1216 {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1217 &hdrs_hint_ipv4_src_udp_src_port, IAVF_PHINT_IPV4_UDP},
1218 {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1219 &hdrs_hint_ipv4_src_udp_dst_port, IAVF_PHINT_IPV4_UDP},
1220 {ETH_RSS_L3_SRC_ONLY,
1221 &hdrs_hint_ipv4_src, IAVF_PHINT_IPV4_UDP},
1222 {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1223 &hdrs_hint_ipv4_dst_udp_src_port, IAVF_PHINT_IPV4_UDP},
1224 {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1225 &hdrs_hint_ipv4_dst_udp_dst_port, IAVF_PHINT_IPV4_UDP},
1226 {ETH_RSS_L3_DST_ONLY,
1227 &hdrs_hint_ipv4_dst, IAVF_PHINT_IPV4_UDP},
1228 {ETH_RSS_NONFRAG_IPV4_UDP |
1229 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1230 &hdrs_hint_ipv4_src_udp_src_port, IAVF_PHINT_IPV4_UDP},
1231 {ETH_RSS_NONFRAG_IPV4_UDP |
1232 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1233 &hdrs_hint_ipv4_src_udp_dst_port, IAVF_PHINT_IPV4_UDP},
1234 {ETH_RSS_NONFRAG_IPV4_UDP |
1235 ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src,
1236 IAVF_PHINT_IPV4_UDP},
1237 {ETH_RSS_NONFRAG_IPV4_UDP |
1238 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1239 &hdrs_hint_ipv4_dst_udp_src_port, IAVF_PHINT_IPV4_UDP},
1240 {ETH_RSS_NONFRAG_IPV4_UDP |
1241 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1242 &hdrs_hint_ipv4_dst_udp_dst_port, IAVF_PHINT_IPV4_UDP},
1243 {ETH_RSS_NONFRAG_IPV4_UDP |
1244 ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst,
1245 IAVF_PHINT_IPV4_UDP},
1246 {ETH_RSS_L4_SRC_ONLY,
1247 &hdrs_hint_ipv4_udp_src_port, IAVF_PHINT_IPV4_UDP},
1248 {ETH_RSS_L4_DST_ONLY,
1249 &hdrs_hint_ipv4_udp_dst_port, IAVF_PHINT_IPV4_UDP},
1250 {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_SRC_ONLY,
1251 &hdrs_hint_ipv4_udp_src_port, IAVF_PHINT_IPV4_UDP},
1252 {ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_L4_DST_ONLY,
1253 &hdrs_hint_ipv4_udp_dst_port, IAVF_PHINT_IPV4_UDP},
1255 &hdrs_hint_ipv4_pfcp, IAVF_PHINT_IPV4_UDP},
1257 &hdrs_hint_ipv4_udp_esp, IAVF_PHINT_IPV4_UDP},
1258 {ETH_RSS_NONFRAG_IPV4_UDP,
1259 &hdrs_hint_ipv4_udp, IAVF_PHINT_IPV4_UDP},
1261 {ETH_RSS_L2_SRC_ONLY,
1262 &hdrs_hint_eth_src_ipv4_tcp, IAVF_PHINT_IPV4_TCP},
1263 {ETH_RSS_L2_DST_ONLY,
1264 &hdrs_hint_eth_dst_ipv4_tcp, IAVF_PHINT_IPV4_TCP},
1266 &hdrs_hint_eth_ipv4_tcp, IAVF_PHINT_IPV4_TCP},
1267 {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1268 &hdrs_hint_ipv4_src_tcp_src_port, IAVF_PHINT_IPV4_TCP},
1269 {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1270 &hdrs_hint_ipv4_src_tcp_dst_port, IAVF_PHINT_IPV4_TCP},
1271 {ETH_RSS_L3_SRC_ONLY,
1272 &hdrs_hint_ipv4_src, IAVF_PHINT_IPV4_TCP},
1273 {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1274 &hdrs_hint_ipv4_dst_tcp_src_port, IAVF_PHINT_IPV4_TCP},
1275 {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1276 &hdrs_hint_ipv4_dst_tcp_dst_port, IAVF_PHINT_IPV4_TCP},
1277 {ETH_RSS_L3_DST_ONLY,
1278 &hdrs_hint_ipv4_dst, IAVF_PHINT_IPV4_TCP},
1279 {ETH_RSS_NONFRAG_IPV4_TCP |
1280 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1281 &hdrs_hint_ipv4_src_tcp_src_port, IAVF_PHINT_IPV4_TCP},
1282 {ETH_RSS_NONFRAG_IPV4_TCP |
1283 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1284 &hdrs_hint_ipv4_src_tcp_dst_port, IAVF_PHINT_IPV4_TCP},
1285 {ETH_RSS_NONFRAG_IPV4_TCP |
1286 ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src,
1287 IAVF_PHINT_IPV4_TCP},
1288 {ETH_RSS_NONFRAG_IPV4_TCP |
1289 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1290 &hdrs_hint_ipv4_dst_tcp_src_port, IAVF_PHINT_IPV4_TCP},
1291 {ETH_RSS_NONFRAG_IPV4_TCP |
1292 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1293 &hdrs_hint_ipv4_dst_tcp_dst_port, IAVF_PHINT_IPV4_TCP},
1294 {ETH_RSS_NONFRAG_IPV4_TCP |
1295 ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst,
1296 IAVF_PHINT_IPV4_TCP},
1297 {ETH_RSS_L4_SRC_ONLY,
1298 &hdrs_hint_ipv4_tcp_src_port, IAVF_PHINT_IPV4_TCP},
1299 {ETH_RSS_L4_DST_ONLY,
1300 &hdrs_hint_ipv4_tcp_dst_port, IAVF_PHINT_IPV4_TCP},
1301 {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_SRC_ONLY,
1302 &hdrs_hint_ipv4_tcp_src_port, IAVF_PHINT_IPV4_TCP},
1303 {ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L4_DST_ONLY,
1304 &hdrs_hint_ipv4_tcp_dst_port, IAVF_PHINT_IPV4_TCP},
1305 {ETH_RSS_NONFRAG_IPV4_TCP,
1306 &hdrs_hint_ipv4_tcp, IAVF_PHINT_IPV4_TCP},
1308 {ETH_RSS_L2_SRC_ONLY,
1309 &hdrs_hint_eth_src_ipv4_sctp, IAVF_PHINT_IPV4_SCTP},
1310 {ETH_RSS_L2_DST_ONLY,
1311 &hdrs_hint_eth_dst_ipv4_sctp, IAVF_PHINT_IPV4_SCTP},
1313 &hdrs_hint_eth_ipv4_sctp, IAVF_PHINT_IPV4_SCTP},
1314 {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1315 &hdrs_hint_ipv4_src_sctp_src_port, IAVF_PHINT_IPV4_SCTP},
1316 {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1317 &hdrs_hint_ipv4_src_sctp_dst_port, IAVF_PHINT_IPV4_SCTP},
1318 {ETH_RSS_L3_SRC_ONLY,
1319 &hdrs_hint_ipv4_src, IAVF_PHINT_IPV4_SCTP},
1320 {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1321 &hdrs_hint_ipv4_dst_sctp_src_port, IAVF_PHINT_IPV4_SCTP},
1322 {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1323 &hdrs_hint_ipv4_dst_sctp_dst_port, IAVF_PHINT_IPV4_SCTP},
1324 {ETH_RSS_L3_DST_ONLY,
1325 &hdrs_hint_ipv4_dst, IAVF_PHINT_IPV4_SCTP},
1326 {ETH_RSS_NONFRAG_IPV4_SCTP |
1327 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1328 &hdrs_hint_ipv4_src_sctp_src_port, IAVF_PHINT_IPV4_SCTP},
1329 {ETH_RSS_NONFRAG_IPV4_SCTP |
1330 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1331 &hdrs_hint_ipv4_src_sctp_dst_port, IAVF_PHINT_IPV4_SCTP},
1332 {ETH_RSS_NONFRAG_IPV4_SCTP |
1333 ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv4_src,
1334 IAVF_PHINT_IPV4_SCTP},
1335 {ETH_RSS_NONFRAG_IPV4_SCTP |
1336 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1337 &hdrs_hint_ipv4_dst_sctp_src_port, IAVF_PHINT_IPV4_SCTP},
1338 {ETH_RSS_NONFRAG_IPV4_SCTP |
1339 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1340 &hdrs_hint_ipv4_dst_sctp_dst_port, IAVF_PHINT_IPV4_SCTP},
1341 {ETH_RSS_NONFRAG_IPV4_SCTP |
1342 ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv4_dst,
1343 IAVF_PHINT_IPV4_SCTP},
1344 {ETH_RSS_L4_SRC_ONLY,
1345 &hdrs_hint_ipv4_sctp_src_port, IAVF_PHINT_IPV4_SCTP},
1346 {ETH_RSS_L4_DST_ONLY,
1347 &hdrs_hint_ipv4_sctp_dst_port, IAVF_PHINT_IPV4_SCTP},
1348 {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_SRC_ONLY,
1349 &hdrs_hint_ipv4_sctp_src_port, IAVF_PHINT_IPV4_SCTP},
1350 {ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_L4_DST_ONLY,
1351 &hdrs_hint_ipv4_sctp_dst_port, IAVF_PHINT_IPV4_SCTP},
1352 {ETH_RSS_NONFRAG_IPV4_SCTP,
1353 &hdrs_hint_ipv4_sctp, IAVF_PHINT_IPV4_SCTP},
1355 {ETH_RSS_L2_SRC_ONLY,
1356 &hdrs_hint_eth_src_ipv6, IAVF_PHINT_IPV6},
1357 {ETH_RSS_L2_DST_ONLY,
1358 &hdrs_hint_eth_dst_ipv6, IAVF_PHINT_IPV6},
1360 &hdrs_hint_eth_ipv6, IAVF_PHINT_IPV6},
1361 {ETH_RSS_L3_SRC_ONLY,
1362 &hdrs_hint_ipv6_src, IAVF_PHINT_IPV6},
1363 {ETH_RSS_L3_DST_ONLY,
1364 &hdrs_hint_ipv6_dst, IAVF_PHINT_IPV6},
1365 {ETH_RSS_IPV6 | ETH_RSS_L3_SRC_ONLY,
1366 &hdrs_hint_ipv6_src, IAVF_PHINT_IPV6},
1367 {ETH_RSS_IPV6 | ETH_RSS_L3_DST_ONLY,
1368 &hdrs_hint_ipv6_dst, IAVF_PHINT_IPV6},
1370 &hdrs_hint_ipv6, IAVF_PHINT_IPV6},
1372 &hdrs_hint_ipv6_esp, IAVF_PHINT_IPV6},
1374 &hdrs_hint_ipv6_ah, IAVF_PHINT_IPV6},
1376 &hdrs_hint_ipv6_l2tpv3, IAVF_PHINT_IPV6},
1378 {ETH_RSS_L2_SRC_ONLY,
1379 &hdrs_hint_eth_src_ipv6_udp, IAVF_PHINT_IPV6_UDP},
1380 {ETH_RSS_L2_DST_ONLY,
1381 &hdrs_hint_eth_dst_ipv6_udp, IAVF_PHINT_IPV6_UDP},
1383 &hdrs_hint_eth_ipv6_udp, IAVF_PHINT_IPV6_UDP},
1384 {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1385 &hdrs_hint_ipv6_src_udp_src_port, IAVF_PHINT_IPV6_UDP},
1386 {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1387 &hdrs_hint_ipv6_src_udp_dst_port, IAVF_PHINT_IPV6_UDP},
1388 {ETH_RSS_L3_SRC_ONLY,
1389 &hdrs_hint_ipv6_src, IAVF_PHINT_IPV6_UDP},
1390 {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1391 &hdrs_hint_ipv6_dst_udp_src_port, IAVF_PHINT_IPV6_UDP},
1392 {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1393 &hdrs_hint_ipv6_dst_udp_dst_port, IAVF_PHINT_IPV6_UDP},
1394 {ETH_RSS_L3_DST_ONLY,
1395 &hdrs_hint_ipv6_dst, IAVF_PHINT_IPV6_UDP},
1396 {ETH_RSS_NONFRAG_IPV6_UDP |
1397 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1398 &hdrs_hint_ipv6_src_udp_src_port, IAVF_PHINT_IPV6_UDP},
1399 {ETH_RSS_NONFRAG_IPV6_UDP |
1400 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1401 &hdrs_hint_ipv6_src_udp_dst_port, IAVF_PHINT_IPV6_UDP},
1402 {ETH_RSS_NONFRAG_IPV6_UDP |
1403 ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src,
1404 IAVF_PHINT_IPV6_UDP},
1405 {ETH_RSS_NONFRAG_IPV6_UDP |
1406 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1407 &hdrs_hint_ipv6_dst_udp_src_port, IAVF_PHINT_IPV6_UDP},
1408 {ETH_RSS_NONFRAG_IPV6_UDP |
1409 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1410 &hdrs_hint_ipv6_dst_udp_dst_port, IAVF_PHINT_IPV6_UDP},
1411 {ETH_RSS_NONFRAG_IPV6_UDP |
1412 ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst,
1413 IAVF_PHINT_IPV6_UDP},
1414 {ETH_RSS_L4_SRC_ONLY,
1415 &hdrs_hint_ipv6_udp_src_port, IAVF_PHINT_IPV6_UDP},
1416 {ETH_RSS_L4_DST_ONLY,
1417 &hdrs_hint_ipv6_udp_dst_port, IAVF_PHINT_IPV6_UDP},
1418 {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_SRC_ONLY,
1419 &hdrs_hint_ipv6_udp_src_port, IAVF_PHINT_IPV6_UDP},
1420 {ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_L4_DST_ONLY,
1421 &hdrs_hint_ipv6_udp_dst_port, IAVF_PHINT_IPV6_UDP},
1423 &hdrs_hint_ipv6_pfcp, IAVF_PHINT_IPV6_UDP},
1425 &hdrs_hint_ipv6_udp_esp, IAVF_PHINT_IPV6_UDP},
1426 {ETH_RSS_NONFRAG_IPV6_UDP,
1427 &hdrs_hint_ipv6_udp, IAVF_PHINT_IPV6_UDP},
1429 {ETH_RSS_L2_SRC_ONLY,
1430 &hdrs_hint_eth_src_ipv6_tcp, IAVF_PHINT_IPV6_TCP},
1431 {ETH_RSS_L2_DST_ONLY,
1432 &hdrs_hint_eth_dst_ipv6_tcp, IAVF_PHINT_IPV6_TCP},
1434 &hdrs_hint_eth_ipv6_tcp, IAVF_PHINT_IPV6_TCP},
1435 {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1436 &hdrs_hint_ipv6_src_tcp_src_port, IAVF_PHINT_IPV6_TCP},
1437 {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1438 &hdrs_hint_ipv6_src_tcp_dst_port, IAVF_PHINT_IPV6_TCP},
1439 {ETH_RSS_L3_SRC_ONLY,
1440 &hdrs_hint_ipv6_src, IAVF_PHINT_IPV6_TCP},
1441 {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1442 &hdrs_hint_ipv6_dst_tcp_src_port, IAVF_PHINT_IPV6_TCP},
1443 {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1444 &hdrs_hint_ipv6_dst_tcp_dst_port, IAVF_PHINT_IPV6_TCP},
1445 {ETH_RSS_L3_DST_ONLY,
1446 &hdrs_hint_ipv6_dst, IAVF_PHINT_IPV6_TCP},
1447 {ETH_RSS_NONFRAG_IPV6_TCP |
1448 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1449 &hdrs_hint_ipv6_src_tcp_src_port, IAVF_PHINT_IPV6_TCP},
1450 {ETH_RSS_NONFRAG_IPV6_TCP |
1451 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1452 &hdrs_hint_ipv6_src_tcp_dst_port, IAVF_PHINT_IPV6_TCP},
1453 {ETH_RSS_NONFRAG_IPV6_TCP |
1454 ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src,
1455 IAVF_PHINT_IPV6_TCP},
1456 {ETH_RSS_NONFRAG_IPV6_TCP |
1457 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1458 &hdrs_hint_ipv6_dst_tcp_src_port, IAVF_PHINT_IPV6_TCP},
1459 {ETH_RSS_NONFRAG_IPV6_TCP |
1460 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1461 &hdrs_hint_ipv6_dst_tcp_dst_port, IAVF_PHINT_IPV6_TCP},
1462 {ETH_RSS_NONFRAG_IPV6_TCP |
1463 ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst,
1464 IAVF_PHINT_IPV6_TCP},
1465 {ETH_RSS_L4_SRC_ONLY,
1466 &hdrs_hint_ipv6_tcp_src_port, IAVF_PHINT_IPV6_TCP},
1467 {ETH_RSS_L4_DST_ONLY,
1468 &hdrs_hint_ipv6_tcp_dst_port, IAVF_PHINT_IPV6_TCP},
1469 {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_SRC_ONLY,
1470 &hdrs_hint_ipv6_tcp_src_port, IAVF_PHINT_IPV6_TCP},
1471 {ETH_RSS_NONFRAG_IPV6_TCP | ETH_RSS_L4_DST_ONLY,
1472 &hdrs_hint_ipv6_tcp_dst_port, IAVF_PHINT_IPV6_TCP},
1473 {ETH_RSS_NONFRAG_IPV6_TCP,
1474 &hdrs_hint_ipv6_tcp, IAVF_PHINT_IPV6_TCP},
1476 {ETH_RSS_L2_SRC_ONLY,
1477 &hdrs_hint_eth_src_ipv6_sctp, IAVF_PHINT_IPV6_SCTP},
1478 {ETH_RSS_L2_DST_ONLY,
1479 &hdrs_hint_eth_dst_ipv6_sctp, IAVF_PHINT_IPV6_SCTP},
1481 &hdrs_hint_eth_ipv6_sctp, IAVF_PHINT_IPV6_SCTP},
1482 {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1483 &hdrs_hint_ipv6_src_sctp_src_port, IAVF_PHINT_IPV6_SCTP},
1484 {ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1485 &hdrs_hint_ipv6_src_sctp_dst_port, IAVF_PHINT_IPV6_SCTP},
1486 {ETH_RSS_L3_SRC_ONLY,
1487 &hdrs_hint_ipv6_src, IAVF_PHINT_IPV6_SCTP},
1488 {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1489 &hdrs_hint_ipv6_dst_sctp_src_port, IAVF_PHINT_IPV6_SCTP},
1490 {ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1491 &hdrs_hint_ipv6_dst_sctp_dst_port, IAVF_PHINT_IPV6_SCTP},
1492 {ETH_RSS_L3_DST_ONLY,
1493 &hdrs_hint_ipv6_dst, IAVF_PHINT_IPV6_SCTP},
1494 {ETH_RSS_NONFRAG_IPV6_SCTP |
1495 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1496 &hdrs_hint_ipv6_src_sctp_src_port, IAVF_PHINT_IPV6_SCTP},
1497 {ETH_RSS_NONFRAG_IPV6_SCTP |
1498 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1499 &hdrs_hint_ipv6_src_sctp_dst_port, IAVF_PHINT_IPV6_SCTP},
1500 {ETH_RSS_NONFRAG_IPV6_SCTP |
1501 ETH_RSS_L3_SRC_ONLY, &hdrs_hint_ipv6_src,
1502 IAVF_PHINT_IPV6_SCTP},
1503 {ETH_RSS_NONFRAG_IPV6_SCTP |
1504 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1505 &hdrs_hint_ipv6_dst_sctp_src_port, IAVF_PHINT_IPV6_SCTP},
1506 {ETH_RSS_NONFRAG_IPV6_SCTP |
1507 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1508 &hdrs_hint_ipv6_dst_sctp_dst_port, IAVF_PHINT_IPV6_SCTP},
1509 {ETH_RSS_NONFRAG_IPV6_SCTP |
1510 ETH_RSS_L3_DST_ONLY, &hdrs_hint_ipv6_dst,
1511 IAVF_PHINT_IPV6_SCTP},
1512 {ETH_RSS_L4_SRC_ONLY,
1513 &hdrs_hint_ipv6_sctp_src_port, IAVF_PHINT_IPV6_SCTP},
1514 {ETH_RSS_L4_DST_ONLY,
1515 &hdrs_hint_ipv6_sctp_dst_port, IAVF_PHINT_IPV6_SCTP},
1516 {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_SRC_ONLY,
1517 &hdrs_hint_ipv6_sctp_src_port, IAVF_PHINT_IPV6_SCTP},
1518 {ETH_RSS_NONFRAG_IPV6_SCTP | ETH_RSS_L4_DST_ONLY,
1519 &hdrs_hint_ipv6_sctp_dst_port, IAVF_PHINT_IPV6_SCTP},
1520 {ETH_RSS_NONFRAG_IPV6_SCTP,
1521 &hdrs_hint_ipv6_sctp, IAVF_PHINT_IPV6_SCTP},
1523 &hdrs_hint_svlan_ipv6, IAVF_PHINT_IPV6},
1525 &hdrs_hint_svlan_ipv6_udp, IAVF_PHINT_IPV6_UDP},
1527 &hdrs_hint_svlan_ipv6_tcp, IAVF_PHINT_IPV6_TCP},
1529 &hdrs_hint_svlan_ipv6_sctp, IAVF_PHINT_IPV6_SCTP},
1531 &hdrs_hint_cvlan_ipv6, IAVF_PHINT_IPV6},
1533 &hdrs_hint_cvlan_ipv6_udp, IAVF_PHINT_IPV6_UDP},
1535 &hdrs_hint_cvlan_ipv6_tcp, IAVF_PHINT_IPV6_TCP},
1537 &hdrs_hint_cvlan_ipv6_sctp, IAVF_PHINT_IPV6_SCTP},
1540 struct iavf_hash_match_type iavf_gtpu_hash_map_list[] = {
1544 {ETH_RSS_L3_SRC_ONLY,
1545 &hdrs_hint_ipv4_src_gtpu_ip,
1546 IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4},
1547 {ETH_RSS_L3_DST_ONLY,
1548 &hdrs_hint_ipv4_dst_gtpu_ip,
1549 IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4},
1551 ETH_RSS_L3_SRC_ONLY,
1552 &hdrs_hint_ipv4_src_gtpu_ip,
1553 IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4},
1555 ETH_RSS_L3_DST_ONLY,
1556 &hdrs_hint_ipv4_dst_gtpu_ip,
1557 IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4},
1559 &hdrs_hint_ipv4_gtpu_ip,
1560 IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4},
1562 &hdrs_hint_teid_gtpu_ip,
1563 IAVF_PHINT_IPV4_GTPU_IP | IAVF_PHINT_IPV4},
1566 {ETH_RSS_L3_SRC_ONLY,
1567 &hdrs_hint_ipv4_src_gtpu_eh,
1568 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4},
1569 {ETH_RSS_L3_DST_ONLY,
1570 &hdrs_hint_ipv4_dst_gtpu_eh,
1571 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4},
1573 ETH_RSS_L3_SRC_ONLY,
1574 &hdrs_hint_ipv4_src_gtpu_eh,
1575 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4},
1577 ETH_RSS_L3_DST_ONLY,
1578 &hdrs_hint_ipv4_dst_gtpu_eh,
1579 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4},
1581 &hdrs_hint_ipv4_gtpu_eh,
1582 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4},
1583 /* Inner IPV4->UDP */
1584 {ETH_RSS_L3_SRC_ONLY |
1585 ETH_RSS_L4_SRC_ONLY,
1586 &hdrs_hint_ipv4_src_udp_src_gtpu_eh,
1587 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1588 {ETH_RSS_L3_SRC_ONLY |
1589 ETH_RSS_L4_DST_ONLY,
1590 &hdrs_hint_ipv4_src_udp_dst_gtpu_eh,
1591 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1592 {ETH_RSS_L3_SRC_ONLY,
1593 &hdrs_hint_ipv4_src_gtpu_eh,
1594 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1595 {ETH_RSS_L4_SRC_ONLY,
1596 &hdrs_hint_ipv4_udp_src_gtpu_eh,
1597 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1598 {ETH_RSS_L3_DST_ONLY |
1599 ETH_RSS_L4_SRC_ONLY,
1600 &hdrs_hint_ipv4_dst_udp_src_gtpu_eh,
1601 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1602 {ETH_RSS_L3_DST_ONLY |
1603 ETH_RSS_L4_DST_ONLY,
1604 &hdrs_hint_ipv4_dst_udp_dst_gtpu_eh,
1605 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1606 {ETH_RSS_L3_DST_ONLY,
1607 &hdrs_hint_ipv4_dst_gtpu_eh,
1608 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1609 {ETH_RSS_L4_DST_ONLY,
1610 &hdrs_hint_ipv4_udp_dst_gtpu_eh,
1611 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1612 {ETH_RSS_NONFRAG_IPV4_UDP |
1613 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1614 &hdrs_hint_ipv4_src_udp_src_gtpu_eh,
1615 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1616 {ETH_RSS_NONFRAG_IPV4_UDP |
1617 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1618 &hdrs_hint_ipv4_src_udp_dst_gtpu_eh,
1619 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1620 {ETH_RSS_NONFRAG_IPV4_UDP |
1621 ETH_RSS_L3_SRC_ONLY,
1622 &hdrs_hint_ipv4_src_gtpu_eh,
1623 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1624 {ETH_RSS_NONFRAG_IPV4_UDP |
1625 ETH_RSS_L4_SRC_ONLY,
1626 &hdrs_hint_ipv4_udp_src_gtpu_eh,
1627 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1628 {ETH_RSS_NONFRAG_IPV4_UDP |
1629 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1630 &hdrs_hint_ipv4_dst_udp_src_gtpu_eh,
1631 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1632 {ETH_RSS_NONFRAG_IPV4_UDP |
1633 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1634 &hdrs_hint_ipv4_dst_udp_dst_gtpu_eh,
1635 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1636 {ETH_RSS_NONFRAG_IPV4_UDP |
1637 ETH_RSS_L3_DST_ONLY,
1638 &hdrs_hint_ipv4_dst_gtpu_eh,
1639 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1640 {ETH_RSS_NONFRAG_IPV4_UDP |
1641 ETH_RSS_L4_DST_ONLY,
1642 &hdrs_hint_ipv4_udp_dst_gtpu_eh,
1643 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1644 {ETH_RSS_NONFRAG_IPV4_UDP,
1645 &hdrs_hint_ipv4_udp_gtpu_eh,
1646 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_UDP},
1647 /* Inner IPV4->TCP */
1648 {ETH_RSS_L3_SRC_ONLY |
1649 ETH_RSS_L4_SRC_ONLY,
1650 &hdrs_hint_ipv4_src_tcp_src_gtpu_eh,
1651 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1652 {ETH_RSS_L3_SRC_ONLY |
1653 ETH_RSS_L4_DST_ONLY,
1654 &hdrs_hint_ipv4_src_tcp_dst_gtpu_eh,
1655 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1656 {ETH_RSS_L3_SRC_ONLY,
1657 &hdrs_hint_ipv4_src_gtpu_eh,
1658 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1659 {ETH_RSS_L4_SRC_ONLY,
1660 &hdrs_hint_ipv4_tcp_src_gtpu_eh,
1661 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1662 {ETH_RSS_L3_DST_ONLY |
1663 ETH_RSS_L4_SRC_ONLY,
1664 &hdrs_hint_ipv4_dst_tcp_src_gtpu_eh,
1665 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1666 {ETH_RSS_L3_DST_ONLY |
1667 ETH_RSS_L4_DST_ONLY,
1668 &hdrs_hint_ipv4_dst_tcp_dst_gtpu_eh,
1669 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1670 {ETH_RSS_L3_DST_ONLY,
1671 &hdrs_hint_ipv4_dst_gtpu_eh,
1672 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1673 {ETH_RSS_L4_DST_ONLY,
1674 &hdrs_hint_ipv4_tcp_dst_gtpu_eh,
1675 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1676 {ETH_RSS_NONFRAG_IPV4_TCP |
1677 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1678 &hdrs_hint_ipv4_src_tcp_src_gtpu_eh,
1679 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1680 {ETH_RSS_NONFRAG_IPV4_TCP |
1681 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1682 &hdrs_hint_ipv4_src_tcp_dst_gtpu_eh,
1683 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1684 {ETH_RSS_NONFRAG_IPV4_TCP |
1685 ETH_RSS_L3_SRC_ONLY,
1686 &hdrs_hint_ipv4_src_gtpu_eh,
1687 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1688 {ETH_RSS_NONFRAG_IPV4_TCP |
1689 ETH_RSS_L4_SRC_ONLY,
1690 &hdrs_hint_ipv4_tcp_src_gtpu_eh,
1691 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1692 {ETH_RSS_NONFRAG_IPV4_TCP |
1693 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1694 &hdrs_hint_ipv4_dst_tcp_src_gtpu_eh,
1695 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1696 {ETH_RSS_NONFRAG_IPV4_TCP |
1697 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1698 &hdrs_hint_ipv4_dst_tcp_dst_gtpu_eh,
1699 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1700 {ETH_RSS_NONFRAG_IPV4_TCP |
1701 ETH_RSS_L3_DST_ONLY,
1702 &hdrs_hint_ipv4_dst_gtpu_eh,
1703 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1704 {ETH_RSS_NONFRAG_IPV4_TCP |
1705 ETH_RSS_L4_DST_ONLY,
1706 &hdrs_hint_ipv4_tcp_dst_gtpu_eh,
1707 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1708 {ETH_RSS_NONFRAG_IPV4_TCP,
1709 &hdrs_hint_ipv4_tcp_gtpu_eh,
1710 IAVF_PHINT_IPV4_GTPU_EH | IAVF_PHINT_IPV4_TCP},
1713 {ETH_RSS_L3_SRC_ONLY,
1714 &hdrs_hint_ipv4_src_gtpu_up,
1715 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4},
1716 {ETH_RSS_L3_DST_ONLY,
1717 &hdrs_hint_ipv4_dst_gtpu_up,
1718 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4},
1720 ETH_RSS_L3_SRC_ONLY,
1721 &hdrs_hint_ipv4_src_gtpu_up,
1722 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4},
1724 ETH_RSS_L3_DST_ONLY,
1725 &hdrs_hint_ipv4_dst_gtpu_up,
1726 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4},
1728 &hdrs_hint_ipv4_gtpu_up,
1729 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4},
1730 /* Inner IPV4->UDP */
1731 {ETH_RSS_L3_SRC_ONLY |
1732 ETH_RSS_L4_SRC_ONLY,
1733 &hdrs_hint_ipv4_src_udp_src_gtpu_up,
1734 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1735 {ETH_RSS_L3_SRC_ONLY |
1736 ETH_RSS_L4_DST_ONLY,
1737 &hdrs_hint_ipv4_src_udp_dst_gtpu_up,
1738 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1739 {ETH_RSS_L3_SRC_ONLY,
1740 &hdrs_hint_ipv4_src_gtpu_up,
1741 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1742 {ETH_RSS_L4_SRC_ONLY,
1743 &hdrs_hint_ipv4_udp_src_gtpu_up,
1744 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1745 {ETH_RSS_L3_DST_ONLY |
1746 ETH_RSS_L4_SRC_ONLY,
1747 &hdrs_hint_ipv4_dst_udp_src_gtpu_up,
1748 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1749 {ETH_RSS_L3_DST_ONLY |
1750 ETH_RSS_L4_DST_ONLY,
1751 &hdrs_hint_ipv4_dst_udp_dst_gtpu_up,
1752 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1753 {ETH_RSS_L3_DST_ONLY,
1754 &hdrs_hint_ipv4_dst_gtpu_up,
1755 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1756 {ETH_RSS_L4_DST_ONLY,
1757 &hdrs_hint_ipv4_udp_dst_gtpu_up,
1758 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1759 {ETH_RSS_NONFRAG_IPV4_UDP |
1760 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1761 &hdrs_hint_ipv4_src_udp_src_gtpu_up,
1762 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1763 {ETH_RSS_NONFRAG_IPV4_UDP |
1764 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1765 &hdrs_hint_ipv4_src_udp_dst_gtpu_up,
1766 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1767 {ETH_RSS_NONFRAG_IPV4_UDP |
1768 ETH_RSS_L3_SRC_ONLY,
1769 &hdrs_hint_ipv4_src_gtpu_up,
1770 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1771 {ETH_RSS_NONFRAG_IPV4_UDP |
1772 ETH_RSS_L4_SRC_ONLY,
1773 &hdrs_hint_ipv4_udp_src_gtpu_up,
1774 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1775 {ETH_RSS_NONFRAG_IPV4_UDP |
1776 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1777 &hdrs_hint_ipv4_dst_udp_src_gtpu_up,
1778 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1779 {ETH_RSS_NONFRAG_IPV4_UDP |
1780 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1781 &hdrs_hint_ipv4_dst_udp_dst_gtpu_up,
1782 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1783 {ETH_RSS_NONFRAG_IPV4_UDP |
1784 ETH_RSS_L3_DST_ONLY,
1785 &hdrs_hint_ipv4_dst_gtpu_up,
1786 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1787 {ETH_RSS_NONFRAG_IPV4_UDP |
1788 ETH_RSS_L4_DST_ONLY,
1789 &hdrs_hint_ipv4_udp_dst_gtpu_up,
1790 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1791 {ETH_RSS_NONFRAG_IPV4_UDP,
1792 &hdrs_hint_ipv4_udp_gtpu_up,
1793 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_UDP},
1794 /* Inner IPV4->TCP */
1795 {ETH_RSS_L3_SRC_ONLY |
1796 ETH_RSS_L4_SRC_ONLY,
1797 &hdrs_hint_ipv4_src_tcp_src_gtpu_up,
1798 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1799 {ETH_RSS_L3_SRC_ONLY |
1800 ETH_RSS_L4_DST_ONLY,
1801 &hdrs_hint_ipv4_src_tcp_dst_gtpu_up,
1802 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1803 {ETH_RSS_L3_SRC_ONLY,
1804 &hdrs_hint_ipv4_src_gtpu_up,
1805 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1806 {ETH_RSS_L4_SRC_ONLY,
1807 &hdrs_hint_ipv4_tcp_src_gtpu_up,
1808 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1809 {ETH_RSS_L3_DST_ONLY |
1810 ETH_RSS_L4_SRC_ONLY,
1811 &hdrs_hint_ipv4_dst_tcp_src_gtpu_up,
1812 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1813 {ETH_RSS_L3_DST_ONLY |
1814 ETH_RSS_L4_DST_ONLY,
1815 &hdrs_hint_ipv4_dst_tcp_dst_gtpu_up,
1816 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1817 {ETH_RSS_L3_DST_ONLY,
1818 &hdrs_hint_ipv4_dst_gtpu_up,
1819 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1820 {ETH_RSS_L4_DST_ONLY,
1821 &hdrs_hint_ipv4_tcp_dst_gtpu_up,
1822 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1823 {ETH_RSS_NONFRAG_IPV4_TCP |
1824 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1825 &hdrs_hint_ipv4_src_tcp_src_gtpu_up,
1826 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1827 {ETH_RSS_NONFRAG_IPV4_TCP |
1828 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1829 &hdrs_hint_ipv4_src_tcp_dst_gtpu_up,
1830 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1831 {ETH_RSS_NONFRAG_IPV4_TCP |
1832 ETH_RSS_L3_SRC_ONLY,
1833 &hdrs_hint_ipv4_src_gtpu_up,
1834 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1835 {ETH_RSS_NONFRAG_IPV4_TCP |
1836 ETH_RSS_L4_SRC_ONLY,
1837 &hdrs_hint_ipv4_tcp_src_gtpu_up,
1838 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1839 {ETH_RSS_NONFRAG_IPV4_TCP |
1840 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1841 &hdrs_hint_ipv4_dst_tcp_src_gtpu_up,
1842 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1843 {ETH_RSS_NONFRAG_IPV4_TCP |
1844 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1845 &hdrs_hint_ipv4_dst_tcp_dst_gtpu_up,
1846 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1847 {ETH_RSS_NONFRAG_IPV4_TCP |
1848 ETH_RSS_L3_DST_ONLY,
1849 &hdrs_hint_ipv4_dst_gtpu_up,
1850 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1851 {ETH_RSS_NONFRAG_IPV4_TCP |
1852 ETH_RSS_L4_DST_ONLY,
1853 &hdrs_hint_ipv4_tcp_dst_gtpu_up,
1854 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1855 {ETH_RSS_NONFRAG_IPV4_TCP,
1856 &hdrs_hint_ipv4_tcp_gtpu_up,
1857 IAVF_PHINT_IPV4_GTPU_EH_UPLINK | IAVF_PHINT_IPV4_TCP},
1860 {ETH_RSS_L3_SRC_ONLY,
1861 &hdrs_hint_ipv4_src_gtpu_dwn,
1862 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4},
1863 {ETH_RSS_L3_DST_ONLY,
1864 &hdrs_hint_ipv4_dst_gtpu_dwn,
1865 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4},
1867 ETH_RSS_L3_SRC_ONLY,
1868 &hdrs_hint_ipv4_src_gtpu_dwn,
1869 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4},
1871 ETH_RSS_L3_DST_ONLY,
1872 &hdrs_hint_ipv4_dst_gtpu_dwn,
1873 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4},
1875 &hdrs_hint_ipv4_gtpu_dwn,
1876 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4},
1877 /* Inner IPV4->UDP */
1878 {ETH_RSS_L3_SRC_ONLY |
1879 ETH_RSS_L4_SRC_ONLY,
1880 &hdrs_hint_ipv4_src_udp_src_gtpu_dwn,
1881 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1882 {ETH_RSS_L3_SRC_ONLY |
1883 ETH_RSS_L4_DST_ONLY,
1884 &hdrs_hint_ipv4_src_udp_dst_gtpu_dwn,
1885 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1886 {ETH_RSS_L3_SRC_ONLY,
1887 &hdrs_hint_ipv4_src_gtpu_dwn,
1888 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1889 {ETH_RSS_L4_SRC_ONLY,
1890 &hdrs_hint_ipv4_udp_src_gtpu_dwn,
1891 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1892 {ETH_RSS_L3_DST_ONLY |
1893 ETH_RSS_L4_SRC_ONLY,
1894 &hdrs_hint_ipv4_dst_udp_src_gtpu_dwn,
1895 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1896 {ETH_RSS_L3_DST_ONLY |
1897 ETH_RSS_L4_DST_ONLY,
1898 &hdrs_hint_ipv4_dst_udp_dst_gtpu_dwn,
1899 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1900 {ETH_RSS_L3_DST_ONLY,
1901 &hdrs_hint_ipv4_dst_gtpu_dwn,
1902 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1903 {ETH_RSS_L4_DST_ONLY,
1904 &hdrs_hint_ipv4_udp_dst_gtpu_dwn,
1905 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1906 {ETH_RSS_NONFRAG_IPV4_UDP |
1907 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1908 &hdrs_hint_ipv4_src_udp_src_gtpu_dwn,
1909 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1910 {ETH_RSS_NONFRAG_IPV4_UDP |
1911 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1912 &hdrs_hint_ipv4_src_udp_dst_gtpu_dwn,
1913 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1914 {ETH_RSS_NONFRAG_IPV4_UDP |
1915 ETH_RSS_L3_SRC_ONLY,
1916 &hdrs_hint_ipv4_src_gtpu_dwn,
1917 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1918 {ETH_RSS_NONFRAG_IPV4_UDP |
1919 ETH_RSS_L4_SRC_ONLY,
1920 &hdrs_hint_ipv4_udp_src_gtpu_dwn,
1921 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1922 {ETH_RSS_NONFRAG_IPV4_UDP |
1923 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1924 &hdrs_hint_ipv4_dst_udp_src_gtpu_dwn,
1925 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1926 {ETH_RSS_NONFRAG_IPV4_UDP |
1927 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1928 &hdrs_hint_ipv4_dst_udp_dst_gtpu_dwn,
1929 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1930 {ETH_RSS_NONFRAG_IPV4_UDP |
1931 ETH_RSS_L3_DST_ONLY,
1932 &hdrs_hint_ipv4_dst_gtpu_dwn,
1933 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1934 {ETH_RSS_NONFRAG_IPV4_UDP |
1935 ETH_RSS_L4_DST_ONLY,
1936 &hdrs_hint_ipv4_udp_dst_gtpu_dwn,
1937 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1938 {ETH_RSS_NONFRAG_IPV4_UDP,
1939 &hdrs_hint_ipv4_udp_gtpu_dwn,
1940 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_UDP},
1941 /* Inner IPV4->TCP */
1942 {ETH_RSS_L3_SRC_ONLY |
1943 ETH_RSS_L4_SRC_ONLY,
1944 &hdrs_hint_ipv4_src_tcp_src_gtpu_dwn,
1945 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
1946 {ETH_RSS_L3_SRC_ONLY |
1947 ETH_RSS_L4_DST_ONLY,
1948 &hdrs_hint_ipv4_src_tcp_dst_gtpu_dwn,
1949 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
1950 {ETH_RSS_L3_SRC_ONLY,
1951 &hdrs_hint_ipv4_src_gtpu_dwn,
1952 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
1953 {ETH_RSS_L4_SRC_ONLY,
1954 &hdrs_hint_ipv4_tcp_src_gtpu_dwn,
1955 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
1956 {ETH_RSS_L3_DST_ONLY |
1957 ETH_RSS_L4_SRC_ONLY,
1958 &hdrs_hint_ipv4_dst_tcp_src_gtpu_dwn,
1959 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
1960 {ETH_RSS_L3_DST_ONLY |
1961 ETH_RSS_L4_DST_ONLY,
1962 &hdrs_hint_ipv4_dst_tcp_dst_gtpu_dwn,
1963 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
1964 {ETH_RSS_L3_DST_ONLY,
1965 &hdrs_hint_ipv4_dst_gtpu_dwn,
1966 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
1967 {ETH_RSS_L4_DST_ONLY,
1968 &hdrs_hint_ipv4_tcp_dst_gtpu_dwn,
1969 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
1970 {ETH_RSS_NONFRAG_IPV4_TCP |
1971 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_SRC_ONLY,
1972 &hdrs_hint_ipv4_src_tcp_src_gtpu_dwn,
1973 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
1974 {ETH_RSS_NONFRAG_IPV4_TCP |
1975 ETH_RSS_L3_SRC_ONLY | ETH_RSS_L4_DST_ONLY,
1976 &hdrs_hint_ipv4_src_tcp_dst_gtpu_dwn,
1977 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
1978 {ETH_RSS_NONFRAG_IPV4_TCP |
1979 ETH_RSS_L3_SRC_ONLY,
1980 &hdrs_hint_ipv4_src_gtpu_dwn,
1981 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
1982 {ETH_RSS_NONFRAG_IPV4_TCP |
1983 ETH_RSS_L4_SRC_ONLY,
1984 &hdrs_hint_ipv4_tcp_src_gtpu_dwn,
1985 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
1986 {ETH_RSS_NONFRAG_IPV4_TCP |
1987 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_SRC_ONLY,
1988 &hdrs_hint_ipv4_dst_tcp_src_gtpu_dwn,
1989 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
1990 {ETH_RSS_NONFRAG_IPV4_TCP |
1991 ETH_RSS_L3_DST_ONLY | ETH_RSS_L4_DST_ONLY,
1992 &hdrs_hint_ipv4_dst_tcp_dst_gtpu_dwn,
1993 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
1994 {ETH_RSS_NONFRAG_IPV4_TCP |
1995 ETH_RSS_L3_DST_ONLY,
1996 &hdrs_hint_ipv4_dst_gtpu_dwn,
1997 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
1998 {ETH_RSS_NONFRAG_IPV4_TCP |
1999 ETH_RSS_L4_DST_ONLY,
2000 &hdrs_hint_ipv4_tcp_dst_gtpu_dwn,
2001 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
2002 {ETH_RSS_NONFRAG_IPV4_TCP,
2003 &hdrs_hint_ipv4_tcp_gtpu_dwn,
2004 IAVF_PHINT_IPV4_GTPU_EH_DWNLINK | IAVF_PHINT_IPV4_TCP},
2007 struct virtchnl_proto_hdrs *iavf_hash_default_hdrs[] = {
2009 &hdrs_hint_ipv4_udp,
2010 &hdrs_hint_ipv4_tcp,
2011 &hdrs_hint_ipv4_sctp,
2013 &hdrs_hint_ipv6_udp,
2014 &hdrs_hint_ipv6_tcp,
2015 &hdrs_hint_ipv6_sctp,
2018 static struct iavf_flow_engine iavf_hash_engine = {
2019 .init = iavf_hash_init,
2020 .create = iavf_hash_create,
2021 .destroy = iavf_hash_destroy,
2022 .uninit = iavf_hash_uninit,
2023 .free = iavf_hash_free,
2024 .type = IAVF_FLOW_ENGINE_HASH,
2027 /* Register parser for comms package. */
2028 static struct iavf_flow_parser iavf_hash_parser = {
2029 .engine = &iavf_hash_engine,
2030 .array = iavf_hash_pattern_list,
2031 .array_len = RTE_DIM(iavf_hash_pattern_list),
2032 .parse_pattern_action = iavf_hash_parse_pattern_action,
2033 .stage = IAVF_FLOW_STAGE_RSS,
2037 iavf_hash_default_set(struct iavf_adapter *ad, bool add)
2039 struct virtchnl_rss_cfg *rss_cfg;
2043 rss_cfg = rte_zmalloc("iavf rss rule",
2044 sizeof(struct virtchnl_rss_cfg), 0);
2048 for (i = 0; i < RTE_DIM(iavf_hash_default_hdrs); i++) {
2049 rss_cfg->proto_hdrs = *iavf_hash_default_hdrs[i];
2050 rss_cfg->rss_algorithm = VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC;
2052 ret = iavf_add_del_rss_cfg(ad, rss_cfg, add);
2054 PMD_DRV_LOG(ERR, "fail to %s RSS configure",
2055 add ? "add" : "delete");
2064 RTE_INIT(iavf_hash_engine_init)
2066 struct iavf_flow_engine *engine = &iavf_hash_engine;
2068 iavf_register_flow_engine(engine);
2072 iavf_hash_init(struct iavf_adapter *ad)
2074 struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad);
2075 struct iavf_flow_parser *parser;
2081 if (!(vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF))
2084 parser = &iavf_hash_parser;
2086 ret = iavf_register_parser(parser, ad);
2088 PMD_DRV_LOG(ERR, "fail to register hash parser");
2092 ret = iavf_hash_default_set(ad, true);
2094 PMD_DRV_LOG(ERR, "fail to set default RSS");
2095 iavf_unregister_parser(parser, ad);
2102 iavf_hash_parse_pattern(struct iavf_pattern_match_item *pattern_match_item,
2103 const struct rte_flow_item pattern[], uint64_t *phint,
2104 struct rte_flow_error *error)
2106 const struct rte_flow_item *item = pattern;
2107 const struct rte_flow_item_gtp_psc *psc;
2109 for (item = pattern; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
2111 rte_flow_error_set(error, EINVAL,
2112 RTE_FLOW_ERROR_TYPE_ITEM, item,
2113 "Not support range");
2117 switch (item->type) {
2118 case RTE_FLOW_ITEM_TYPE_GTPU:
2119 *phint |= IAVF_PHINT_IPV4_GTPU_IP;
2121 case RTE_FLOW_ITEM_TYPE_GTP_PSC:
2123 *phint &= ~IAVF_PHINT_IPV4_GTPU_IP;
2125 *phint |= IAVF_PHINT_IPV4_GTPU_EH;
2126 else if (psc->pdu_type == IAVF_GTPU_EH_UPLINK)
2127 *phint |= IAVF_PHINT_IPV4_GTPU_EH_UPLINK;
2128 else if (psc->pdu_type == IAVF_GTPU_EH_DWNLINK)
2129 *phint |= IAVF_PHINT_IPV4_GTPU_EH_DWNLINK;
2136 /* update and restore pattern hint */
2137 *phint |= ((struct iavf_pattern_match_type *)
2138 (pattern_match_item->meta))->pattern_hint;
2144 iavf_hash_parse_action(const struct rte_flow_action actions[],
2145 uint64_t pattern_hint, void **meta,
2146 struct rte_flow_error *error)
2148 struct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)*meta;
2149 struct iavf_hash_match_type *hash_map_list;
2150 enum rte_flow_action_type action_type;
2151 const struct rte_flow_action_rss *rss;
2152 const struct rte_flow_action *action;
2154 bool item_found = false;
2158 /* Supported action is RSS. */
2159 for (action = actions; action->type !=
2160 RTE_FLOW_ACTION_TYPE_END; action++) {
2161 action_type = action->type;
2162 switch (action_type) {
2163 case RTE_FLOW_ACTION_TYPE_RSS:
2165 rss_type = rss->types;
2168 RTE_ETH_HASH_FUNCTION_SIMPLE_XOR){
2169 rss_meta->rss_algorithm =
2170 VIRTCHNL_RSS_ALG_XOR_ASYMMETRIC;
2171 } else if (rss->func ==
2172 RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) {
2173 rss_meta->rss_algorithm =
2174 VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC;
2176 rss_meta->rss_algorithm =
2177 VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC;
2181 return rte_flow_error_set(error, ENOTSUP,
2182 RTE_FLOW_ERROR_TYPE_ACTION, action,
2183 "a nonzero RSS encapsulation level is not supported");
2186 return rte_flow_error_set(error, ENOTSUP,
2187 RTE_FLOW_ERROR_TYPE_ACTION, action,
2188 "a nonzero RSS key_len is not supported");
2191 return rte_flow_error_set(error, ENOTSUP,
2192 RTE_FLOW_ERROR_TYPE_ACTION, action,
2193 "a non-NULL RSS queue is not supported");
2196 * Check simultaneous use of SRC_ONLY and DST_ONLY
2197 * of the same level.
2199 rss_type = rte_eth_rss_hf_refine(rss_type);
2201 if ((pattern_hint & IAVF_PHINT_IPV4_GTPU_IP) ||
2202 (pattern_hint & IAVF_PHINT_IPV4_GTPU_EH) ||
2203 (pattern_hint & IAVF_PHINT_IPV4_GTPU_EH_UPLINK) ||
2204 (pattern_hint & IAVF_PHINT_IPV4_GTPU_EH_DWNLINK)) {
2205 hash_map_list = iavf_gtpu_hash_map_list;
2206 mlist_len = RTE_DIM(iavf_gtpu_hash_map_list);
2208 hash_map_list = iavf_hash_map_list;
2209 mlist_len = RTE_DIM(iavf_hash_map_list);
2212 /* Find matched proto hdrs according to hash type. */
2213 for (i = 0; i < mlist_len; i++) {
2214 struct iavf_hash_match_type *ht_map =
2216 if (rss_type == ht_map->hash_type &&
2217 pattern_hint == ht_map->pattern_hint) {
2218 rss_meta->proto_hdrs =
2226 return rte_flow_error_set(error, ENOTSUP,
2227 RTE_FLOW_ERROR_TYPE_ACTION, action,
2228 "Not supported flow");
2231 case RTE_FLOW_ACTION_TYPE_END:
2235 rte_flow_error_set(error, EINVAL,
2236 RTE_FLOW_ERROR_TYPE_ACTION, action,
2246 iavf_hash_parse_pattern_action(__rte_unused struct iavf_adapter *ad,
2247 struct iavf_pattern_match_item *array,
2249 const struct rte_flow_item pattern[],
2250 const struct rte_flow_action actions[],
2252 struct rte_flow_error *error)
2254 struct iavf_pattern_match_item *pattern_match_item;
2255 struct iavf_rss_meta *rss_meta_ptr;
2256 uint64_t phint = IAVF_PHINT_NONE;
2259 rss_meta_ptr = rte_zmalloc(NULL, sizeof(*rss_meta_ptr), 0);
2260 if (!rss_meta_ptr) {
2261 rte_flow_error_set(error, EINVAL,
2262 RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
2263 "No memory for rss_meta_ptr");
2267 /* Check rss supported pattern and find matched pattern. */
2268 pattern_match_item =
2269 iavf_search_pattern_match_item(pattern, array, array_len,
2271 if (!pattern_match_item) {
2276 ret = iavf_hash_parse_pattern(pattern_match_item, pattern, &phint,
2281 ret = iavf_hash_parse_action(actions, phint,
2282 (void **)&rss_meta_ptr, error);
2286 *meta = rss_meta_ptr;
2288 rte_free(rss_meta_ptr);
2290 rte_free(pattern_match_item);
2296 iavf_hash_create(__rte_unused struct iavf_adapter *ad,
2297 __rte_unused struct rte_flow *flow, void *meta,
2298 __rte_unused struct rte_flow_error *error)
2300 struct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)meta;
2301 struct virtchnl_rss_cfg *rss_cfg;
2304 rss_cfg = rte_zmalloc("iavf rss rule",
2305 sizeof(struct virtchnl_rss_cfg), 0);
2307 rte_flow_error_set(error, EINVAL,
2308 RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
2309 "No memory for rss rule");
2313 rss_cfg->proto_hdrs = *rss_meta->proto_hdrs;
2314 rss_cfg->rss_algorithm = rss_meta->rss_algorithm;
2316 ret = iavf_add_del_rss_cfg(ad, rss_cfg, true);
2318 flow->rule = rss_cfg;
2320 PMD_DRV_LOG(ERR, "fail to add RSS configure");
2321 rte_flow_error_set(error, -ret,
2322 RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
2323 "Failed to add rss rule.");
2334 iavf_hash_destroy(__rte_unused struct iavf_adapter *ad,
2335 struct rte_flow *flow,
2336 __rte_unused struct rte_flow_error *error)
2338 struct virtchnl_rss_cfg *rss_cfg;
2341 rss_cfg = (struct virtchnl_rss_cfg *)flow->rule;
2343 ret = iavf_add_del_rss_cfg(ad, rss_cfg, false);
2345 PMD_DRV_LOG(ERR, "fail to del RSS configure");
2346 rte_flow_error_set(error, -ret,
2347 RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
2348 "Failed to delete rss rule.");
2355 iavf_hash_uninit(struct iavf_adapter *ad)
2357 if (iavf_hash_default_set(ad, false))
2358 PMD_DRV_LOG(ERR, "fail to delete default RSS");
2360 iavf_unregister_parser(&iavf_hash_parser, ad);
2364 iavf_hash_free(struct rte_flow *flow)
2366 rte_free(flow->rule);