1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2019, Intel Corporation. */
3 
4 #ifndef _ICE_FLEX_TYPE_H_
5 #define _ICE_FLEX_TYPE_H_
6 
7 #define ICE_FV_OFFSET_INVAL	0x1FF
8 
9 /* Extraction Sequence (Field Vector) Table */
10 struct ice_fv_word {
11 	u8 prot_id;
12 	u16 off;		/* Offset within the protocol header */
13 	u8 resvrd;
14 } __packed;
15 
16 #define ICE_MAX_NUM_PROFILES 256
17 
18 #define ICE_MAX_FV_WORDS 48
19 struct ice_fv {
20 	struct ice_fv_word ew[ICE_MAX_FV_WORDS];
21 };
22 
23 /* Package and segment headers and tables */
24 struct ice_pkg_hdr {
25 	struct ice_pkg_ver pkg_format_ver;
26 	__le32 seg_count;
27 	__le32 seg_offset[];
28 };
29 
30 /* generic segment */
31 struct ice_generic_seg_hdr {
32 #define SEGMENT_TYPE_METADATA	0x00000001
33 #define SEGMENT_TYPE_ICE	0x00000010
34 	__le32 seg_type;
35 	struct ice_pkg_ver seg_format_ver;
36 	__le32 seg_size;
37 	char seg_id[ICE_PKG_NAME_SIZE];
38 };
39 
40 /* ice specific segment */
41 
42 union ice_device_id {
43 	struct {
44 		__le16 device_id;
45 		__le16 vendor_id;
46 	} dev_vend_id;
47 	__le32 id;
48 };
49 
50 struct ice_device_id_entry {
51 	union ice_device_id device;
52 	union ice_device_id sub_device;
53 };
54 
55 struct ice_seg {
56 	struct ice_generic_seg_hdr hdr;
57 	__le32 device_table_count;
58 	struct ice_device_id_entry device_table[];
59 };
60 
61 struct ice_nvm_table {
62 	__le32 table_count;
63 	__le32 vers[];
64 };
65 
66 struct ice_buf {
67 #define ICE_PKG_BUF_SIZE	4096
68 	u8 buf[ICE_PKG_BUF_SIZE];
69 };
70 
71 struct ice_buf_table {
72 	__le32 buf_count;
73 	struct ice_buf buf_array[];
74 };
75 
76 /* global metadata specific segment */
77 struct ice_global_metadata_seg {
78 	struct ice_generic_seg_hdr hdr;
79 	struct ice_pkg_ver pkg_ver;
80 	__le32 rsvd;
81 	char pkg_name[ICE_PKG_NAME_SIZE];
82 };
83 
84 #define ICE_MIN_S_OFF		12
85 #define ICE_MAX_S_OFF		4095
86 #define ICE_MIN_S_SZ		1
87 #define ICE_MAX_S_SZ		4084
88 
89 /* section information */
90 struct ice_section_entry {
91 	__le32 type;
92 	__le16 offset;
93 	__le16 size;
94 };
95 
96 #define ICE_MIN_S_COUNT		1
97 #define ICE_MAX_S_COUNT		511
98 #define ICE_MIN_S_DATA_END	12
99 #define ICE_MAX_S_DATA_END	4096
100 
101 #define ICE_METADATA_BUF	0x80000000
102 
103 struct ice_buf_hdr {
104 	__le16 section_count;
105 	__le16 data_end;
106 	struct ice_section_entry section_entry[];
107 };
108 
109 #define ICE_MAX_ENTRIES_IN_BUF(hd_sz, ent_sz) ((ICE_PKG_BUF_SIZE - \
110 	struct_size((struct ice_buf_hdr *)0, section_entry, 1) - (hd_sz)) /\
111 	(ent_sz))
112 
113 /* ice package section IDs */
114 #define ICE_SID_METADATA		1
115 #define ICE_SID_XLT0_SW			10
116 #define ICE_SID_XLT_KEY_BUILDER_SW	11
117 #define ICE_SID_XLT1_SW			12
118 #define ICE_SID_XLT2_SW			13
119 #define ICE_SID_PROFID_TCAM_SW		14
120 #define ICE_SID_PROFID_REDIR_SW		15
121 #define ICE_SID_FLD_VEC_SW		16
122 #define ICE_SID_CDID_KEY_BUILDER_SW	17
123 
124 struct ice_meta_sect {
125 	struct ice_pkg_ver ver;
126 #define ICE_META_SECT_NAME_SIZE	28
127 	char name[ICE_META_SECT_NAME_SIZE];
128 	__le32 track_id;
129 };
130 
131 #define ICE_SID_CDID_REDIR_SW		18
132 
133 #define ICE_SID_XLT0_ACL		20
134 #define ICE_SID_XLT_KEY_BUILDER_ACL	21
135 #define ICE_SID_XLT1_ACL		22
136 #define ICE_SID_XLT2_ACL		23
137 #define ICE_SID_PROFID_TCAM_ACL		24
138 #define ICE_SID_PROFID_REDIR_ACL	25
139 #define ICE_SID_FLD_VEC_ACL		26
140 #define ICE_SID_CDID_KEY_BUILDER_ACL	27
141 #define ICE_SID_CDID_REDIR_ACL		28
142 
143 #define ICE_SID_XLT0_FD			30
144 #define ICE_SID_XLT_KEY_BUILDER_FD	31
145 #define ICE_SID_XLT1_FD			32
146 #define ICE_SID_XLT2_FD			33
147 #define ICE_SID_PROFID_TCAM_FD		34
148 #define ICE_SID_PROFID_REDIR_FD		35
149 #define ICE_SID_FLD_VEC_FD		36
150 #define ICE_SID_CDID_KEY_BUILDER_FD	37
151 #define ICE_SID_CDID_REDIR_FD		38
152 
153 #define ICE_SID_XLT0_RSS		40
154 #define ICE_SID_XLT_KEY_BUILDER_RSS	41
155 #define ICE_SID_XLT1_RSS		42
156 #define ICE_SID_XLT2_RSS		43
157 #define ICE_SID_PROFID_TCAM_RSS		44
158 #define ICE_SID_PROFID_REDIR_RSS	45
159 #define ICE_SID_FLD_VEC_RSS		46
160 #define ICE_SID_CDID_KEY_BUILDER_RSS	47
161 #define ICE_SID_CDID_REDIR_RSS		48
162 
163 #define ICE_SID_RXPARSER_MARKER_PTYPE	55
164 #define ICE_SID_RXPARSER_BOOST_TCAM	56
165 #define ICE_SID_TXPARSER_BOOST_TCAM	66
166 
167 #define ICE_SID_XLT0_PE			80
168 #define ICE_SID_XLT_KEY_BUILDER_PE	81
169 #define ICE_SID_XLT1_PE			82
170 #define ICE_SID_XLT2_PE			83
171 #define ICE_SID_PROFID_TCAM_PE		84
172 #define ICE_SID_PROFID_REDIR_PE		85
173 #define ICE_SID_FLD_VEC_PE		86
174 #define ICE_SID_CDID_KEY_BUILDER_PE	87
175 #define ICE_SID_CDID_REDIR_PE		88
176 
177 /* Label Metadata section IDs */
178 #define ICE_SID_LBL_FIRST		0x80000010
179 #define ICE_SID_LBL_RXPARSER_TMEM	0x80000018
180 /* The following define MUST be updated to reflect the last label section ID */
181 #define ICE_SID_LBL_LAST		0x80000038
182 
183 enum ice_block {
184 	ICE_BLK_SW = 0,
185 	ICE_BLK_ACL,
186 	ICE_BLK_FD,
187 	ICE_BLK_RSS,
188 	ICE_BLK_PE,
189 	ICE_BLK_COUNT
190 };
191 
192 enum ice_sect {
193 	ICE_XLT0 = 0,
194 	ICE_XLT_KB,
195 	ICE_XLT1,
196 	ICE_XLT2,
197 	ICE_PROF_TCAM,
198 	ICE_PROF_REDIR,
199 	ICE_VEC_TBL,
200 	ICE_CDID_KB,
201 	ICE_CDID_REDIR,
202 	ICE_SECT_COUNT
203 };
204 
205 /* Packet Type (PTYPE) values */
206 #define ICE_PTYPE_MAC_PAY		1
207 #define ICE_PTYPE_IPV4_PAY		23
208 #define ICE_PTYPE_IPV4_UDP_PAY		24
209 #define ICE_PTYPE_IPV4_TCP_PAY		26
210 #define ICE_PTYPE_IPV4_SCTP_PAY		27
211 #define ICE_PTYPE_IPV6_PAY		89
212 #define ICE_PTYPE_IPV6_UDP_PAY		90
213 #define ICE_PTYPE_IPV6_TCP_PAY		92
214 #define ICE_PTYPE_IPV6_SCTP_PAY		93
215 #define ICE_MAC_IPV4_ESP		160
216 #define ICE_MAC_IPV6_ESP		161
217 #define ICE_MAC_IPV4_AH			162
218 #define ICE_MAC_IPV6_AH			163
219 #define ICE_MAC_IPV4_NAT_T_ESP		164
220 #define ICE_MAC_IPV6_NAT_T_ESP		165
221 #define ICE_MAC_IPV4_GTPU		329
222 #define ICE_MAC_IPV6_GTPU		330
223 #define ICE_MAC_IPV4_GTPU_IPV4_FRAG	331
224 #define ICE_MAC_IPV4_GTPU_IPV4_PAY	332
225 #define ICE_MAC_IPV4_GTPU_IPV4_UDP_PAY	333
226 #define ICE_MAC_IPV4_GTPU_IPV4_TCP	334
227 #define ICE_MAC_IPV4_GTPU_IPV4_ICMP	335
228 #define ICE_MAC_IPV6_GTPU_IPV4_FRAG	336
229 #define ICE_MAC_IPV6_GTPU_IPV4_PAY	337
230 #define ICE_MAC_IPV6_GTPU_IPV4_UDP_PAY	338
231 #define ICE_MAC_IPV6_GTPU_IPV4_TCP	339
232 #define ICE_MAC_IPV6_GTPU_IPV4_ICMP	340
233 #define ICE_MAC_IPV4_GTPU_IPV6_FRAG	341
234 #define ICE_MAC_IPV4_GTPU_IPV6_PAY	342
235 #define ICE_MAC_IPV4_GTPU_IPV6_UDP_PAY	343
236 #define ICE_MAC_IPV4_GTPU_IPV6_TCP	344
237 #define ICE_MAC_IPV4_GTPU_IPV6_ICMPV6	345
238 #define ICE_MAC_IPV6_GTPU_IPV6_FRAG	346
239 #define ICE_MAC_IPV6_GTPU_IPV6_PAY	347
240 #define ICE_MAC_IPV6_GTPU_IPV6_UDP_PAY	348
241 #define ICE_MAC_IPV6_GTPU_IPV6_TCP	349
242 #define ICE_MAC_IPV6_GTPU_IPV6_ICMPV6	350
243 #define ICE_MAC_IPV4_PFCP_SESSION	352
244 #define ICE_MAC_IPV6_PFCP_SESSION	354
245 #define ICE_MAC_IPV4_L2TPV3		360
246 #define ICE_MAC_IPV6_L2TPV3		361
247 
248 /* Attributes that can modify PTYPE definitions.
249  *
250  * These values will represent special attributes for PTYPEs, which will
251  * resolve into metadata packet flags definitions that can be used in the TCAM
252  * for identifying a PTYPE with specific characteristics.
253  */
254 enum ice_ptype_attrib_type {
255 	/* GTP PTYPEs */
256 	ICE_PTYPE_ATTR_GTP_PDU_EH,
257 	ICE_PTYPE_ATTR_GTP_SESSION,
258 	ICE_PTYPE_ATTR_GTP_DOWNLINK,
259 	ICE_PTYPE_ATTR_GTP_UPLINK,
260 };
261 
262 struct ice_ptype_attrib_info {
263 	u16 flags;
264 	u16 mask;
265 };
266 
267 /* TCAM flag definitions */
268 #define ICE_GTP_PDU			BIT(14)
269 #define ICE_GTP_PDU_LINK		BIT(13)
270 
271 /* GTP attributes */
272 #define ICE_GTP_PDU_FLAG_MASK		(ICE_GTP_PDU)
273 #define ICE_GTP_PDU_EH			ICE_GTP_PDU
274 
275 #define ICE_GTP_FLAGS_MASK		(ICE_GTP_PDU | ICE_GTP_PDU_LINK)
276 #define ICE_GTP_SESSION			0
277 #define ICE_GTP_DOWNLINK		ICE_GTP_PDU
278 #define ICE_GTP_UPLINK			(ICE_GTP_PDU | ICE_GTP_PDU_LINK)
279 
280 struct ice_ptype_attributes {
281 	u16 ptype;
282 	enum ice_ptype_attrib_type attrib;
283 };
284 
285 /* package labels */
286 struct ice_label {
287 	__le16 value;
288 #define ICE_PKG_LABEL_SIZE	64
289 	char name[ICE_PKG_LABEL_SIZE];
290 };
291 
292 struct ice_label_section {
293 	__le16 count;
294 	struct ice_label label[];
295 };
296 
297 #define ICE_MAX_LABELS_IN_BUF ICE_MAX_ENTRIES_IN_BUF( \
298 	struct_size((struct ice_label_section *)0, label, 1) - \
299 	sizeof(struct ice_label), sizeof(struct ice_label))
300 
301 struct ice_sw_fv_section {
302 	__le16 count;
303 	__le16 base_offset;
304 	struct ice_fv fv[];
305 };
306 
307 struct ice_sw_fv_list_entry {
308 	struct list_head list_entry;
309 	u32 profile_id;
310 	struct ice_fv *fv_ptr;
311 };
312 
313 /* The BOOST TCAM stores the match packet header in reverse order, meaning
314  * the fields are reversed; in addition, this means that the normally big endian
315  * fields of the packet are now little endian.
316  */
317 struct ice_boost_key_value {
318 #define ICE_BOOST_REMAINING_HV_KEY	15
319 	u8 remaining_hv_key[ICE_BOOST_REMAINING_HV_KEY];
320 	__le16 hv_dst_port_key;
321 	__le16 hv_src_port_key;
322 	u8 tcam_search_key;
323 } __packed;
324 
325 struct ice_boost_key {
326 	struct ice_boost_key_value key;
327 	struct ice_boost_key_value key2;
328 };
329 
330 /* package Boost TCAM entry */
331 struct ice_boost_tcam_entry {
332 	__le16 addr;
333 	__le16 reserved;
334 	/* break up the 40 bytes of key into different fields */
335 	struct ice_boost_key key;
336 	u8 boost_hit_index_group;
337 	/* The following contains bitfields which are not on byte boundaries.
338 	 * These fields are currently unused by driver software.
339 	 */
340 #define ICE_BOOST_BIT_FIELDS		43
341 	u8 bit_fields[ICE_BOOST_BIT_FIELDS];
342 };
343 
344 struct ice_boost_tcam_section {
345 	__le16 count;
346 	__le16 reserved;
347 	struct ice_boost_tcam_entry tcam[];
348 };
349 
350 #define ICE_MAX_BST_TCAMS_IN_BUF ICE_MAX_ENTRIES_IN_BUF( \
351 	struct_size((struct ice_boost_tcam_section *)0, tcam, 1) - \
352 	sizeof(struct ice_boost_tcam_entry), \
353 	sizeof(struct ice_boost_tcam_entry))
354 
355 /* package Marker Ptype TCAM entry */
356 struct ice_marker_ptype_tcam_entry {
357 #define ICE_MARKER_PTYPE_TCAM_ADDR_MAX	1024
358 	__le16 addr;
359 	__le16 ptype;
360 	u8 keys[20];
361 };
362 
363 struct ice_marker_ptype_tcam_section {
364 	__le16 count;
365 	__le16 reserved;
366 	struct ice_marker_ptype_tcam_entry tcam[];
367 };
368 
369 #define ICE_MAX_MARKER_PTYPE_TCAMS_IN_BUF	\
370 	ICE_MAX_ENTRIES_IN_BUF(struct_size((struct ice_marker_ptype_tcam_section *)0, tcam, 1) - \
371 	sizeof(struct ice_marker_ptype_tcam_entry), \
372 	sizeof(struct ice_marker_ptype_tcam_entry))
373 
374 struct ice_xlt1_section {
375 	__le16 count;
376 	__le16 offset;
377 	u8 value[];
378 };
379 
380 struct ice_xlt2_section {
381 	__le16 count;
382 	__le16 offset;
383 	__le16 value[];
384 };
385 
386 struct ice_prof_redir_section {
387 	__le16 count;
388 	__le16 offset;
389 	u8 redir_value[];
390 };
391 
392 /* package buffer building */
393 
394 struct ice_buf_build {
395 	struct ice_buf buf;
396 	u16 reserved_section_table_entries;
397 };
398 
399 struct ice_pkg_enum {
400 	struct ice_buf_table *buf_table;
401 	u32 buf_idx;
402 
403 	u32 type;
404 	struct ice_buf_hdr *buf;
405 	u32 sect_idx;
406 	void *sect;
407 	u32 sect_type;
408 
409 	u32 entry_idx;
410 	void *(*handler)(u32 sect_type, void *section, u32 index, u32 *offset);
411 };
412 
413 /* Tunnel enabling */
414 
415 enum ice_tunnel_type {
416 	TNL_VXLAN = 0,
417 	TNL_GENEVE,
418 	TNL_GRETAP,
419 	__TNL_TYPE_CNT,
420 	TNL_LAST = 0xFF,
421 	TNL_ALL = 0xFF,
422 };
423 
424 struct ice_tunnel_type_scan {
425 	enum ice_tunnel_type type;
426 	const char *label_prefix;
427 };
428 
429 struct ice_tunnel_entry {
430 	enum ice_tunnel_type type;
431 	u16 boost_addr;
432 	u16 port;
433 	struct ice_boost_tcam_entry *boost_entry;
434 	u8 valid;
435 };
436 
437 #define ICE_TUNNEL_MAX_ENTRIES	16
438 
439 struct ice_tunnel_table {
440 	struct ice_tunnel_entry tbl[ICE_TUNNEL_MAX_ENTRIES];
441 	u16 count;
442 	u16 valid_count[__TNL_TYPE_CNT];
443 };
444 
445 struct ice_pkg_es {
446 	__le16 count;
447 	__le16 offset;
448 	struct ice_fv_word es[];
449 };
450 
451 struct ice_es {
452 	u32 sid;
453 	u16 count;
454 	u16 fvw;
455 	u16 *ref_count;
456 	u32 *mask_ena;
457 	struct list_head prof_map;
458 	struct ice_fv_word *t;
459 	struct mutex prof_map_lock;	/* protect access to profiles list */
460 	u8 *written;
461 	u8 reverse; /* set to true to reverse FV order */
462 };
463 
464 /* PTYPE Group management */
465 
466 /* Note: XLT1 table takes 13-bit as input, and results in an 8-bit packet type
467  * group (PTG) ID as output.
468  *
469  * Note: PTG 0 is the default packet type group and it is assumed that all PTYPE
470  * are a part of this group until moved to a new PTG.
471  */
472 #define ICE_DEFAULT_PTG	0
473 
474 struct ice_ptg_entry {
475 	struct ice_ptg_ptype *first_ptype;
476 	u8 in_use;
477 };
478 
479 struct ice_ptg_ptype {
480 	struct ice_ptg_ptype *next_ptype;
481 	u8 ptg;
482 };
483 
484 #define ICE_MAX_TCAM_PER_PROFILE	32
485 #define ICE_MAX_PTG_PER_PROFILE		32
486 
487 struct ice_prof_map {
488 	struct list_head list;
489 	u64 profile_cookie;
490 	u64 context;
491 	u8 prof_id;
492 	u8 ptg_cnt;
493 	u8 ptg[ICE_MAX_PTG_PER_PROFILE];
494 	struct ice_ptype_attrib_info attr[ICE_MAX_PTG_PER_PROFILE];
495 };
496 
497 #define ICE_INVALID_TCAM	0xFFFF
498 
499 struct ice_tcam_inf {
500 	u16 tcam_idx;
501 	struct ice_ptype_attrib_info attr;
502 	u8 ptg;
503 	u8 prof_id;
504 	u8 in_use;
505 };
506 
507 struct ice_vsig_prof {
508 	struct list_head list;
509 	u64 profile_cookie;
510 	u8 prof_id;
511 	u8 tcam_count;
512 	struct ice_tcam_inf tcam[ICE_MAX_TCAM_PER_PROFILE];
513 };
514 
515 struct ice_vsig_entry {
516 	struct list_head prop_lst;
517 	struct ice_vsig_vsi *first_vsi;
518 	u8 in_use;
519 };
520 
521 struct ice_vsig_vsi {
522 	struct ice_vsig_vsi *next_vsi;
523 	u32 prop_mask;
524 	u16 changed;
525 	u16 vsig;
526 };
527 
528 #define ICE_XLT1_CNT	1024
529 #define ICE_MAX_PTGS	256
530 
531 /* XLT1 Table */
532 struct ice_xlt1 {
533 	struct ice_ptg_entry *ptg_tbl;
534 	struct ice_ptg_ptype *ptypes;
535 	u8 *t;
536 	u32 sid;
537 	u16 count;
538 };
539 
540 #define ICE_XLT2_CNT	768
541 #define ICE_MAX_VSIGS	768
542 
543 /* VSIG bit layout:
544  * [0:12]: incremental VSIG index 1 to ICE_MAX_VSIGS
545  * [13:15]: PF number of device
546  */
547 #define ICE_VSIG_IDX_M	(0x1FFF)
548 #define ICE_PF_NUM_S	13
549 #define ICE_PF_NUM_M	(0x07 << ICE_PF_NUM_S)
550 #define ICE_VSIG_VALUE(vsig, pf_id) \
551 	((u16)((((u16)(vsig)) & ICE_VSIG_IDX_M) | \
552 	       (((u16)(pf_id) << ICE_PF_NUM_S) & ICE_PF_NUM_M)))
553 #define ICE_DEFAULT_VSIG	0
554 
555 /* XLT2 Table */
556 struct ice_xlt2 {
557 	struct ice_vsig_entry *vsig_tbl;
558 	struct ice_vsig_vsi *vsis;
559 	u16 *t;
560 	u32 sid;
561 	u16 count;
562 };
563 
564 /* Profile ID Management */
565 struct ice_prof_id_key {
566 	__le16 flags;
567 	u8 xlt1;
568 	__le16 xlt2_cdid;
569 } __packed;
570 
571 /* Keys are made up of two values, each one-half the size of the key.
572  * For TCAM, the entire key is 80 bits wide (or 2, 40-bit wide values)
573  */
574 #define ICE_TCAM_KEY_VAL_SZ	5
575 #define ICE_TCAM_KEY_SZ		(2 * ICE_TCAM_KEY_VAL_SZ)
576 
577 struct ice_prof_tcam_entry {
578 	__le16 addr;
579 	u8 key[ICE_TCAM_KEY_SZ];
580 	u8 prof_id;
581 } __packed;
582 
583 struct ice_prof_id_section {
584 	__le16 count;
585 	struct ice_prof_tcam_entry entry[];
586 };
587 
588 struct ice_prof_tcam {
589 	u32 sid;
590 	u16 count;
591 	u16 max_prof_id;
592 	struct ice_prof_tcam_entry *t;
593 	u8 cdid_bits; /* # CDID bits to use in key, 0, 2, 4, or 8 */
594 };
595 
596 struct ice_prof_redir {
597 	u8 *t;
598 	u32 sid;
599 	u16 count;
600 };
601 
602 struct ice_mask {
603 	u16 mask;	/* 16-bit mask */
604 	u16 idx;	/* index */
605 	u16 ref;	/* reference count */
606 	u8 in_use;	/* non-zero if used */
607 };
608 
609 struct ice_masks {
610 	struct mutex lock; /* lock to protect this structure */
611 	u16 first;	/* first mask owned by the PF */
612 	u16 count;	/* number of masks owned by the PF */
613 #define ICE_PROF_MASK_COUNT 32
614 	struct ice_mask masks[ICE_PROF_MASK_COUNT];
615 };
616 
617 /* Tables per block */
618 struct ice_blk_info {
619 	struct ice_xlt1 xlt1;
620 	struct ice_xlt2 xlt2;
621 	struct ice_prof_tcam prof;
622 	struct ice_prof_redir prof_redir;
623 	struct ice_es es;
624 	struct ice_masks masks;
625 	u8 overwrite; /* set to true to allow overwrite of table entries */
626 	u8 is_list_init;
627 };
628 
629 enum ice_chg_type {
630 	ICE_TCAM_NONE = 0,
631 	ICE_PTG_ES_ADD,
632 	ICE_TCAM_ADD,
633 	ICE_VSIG_ADD,
634 	ICE_VSIG_REM,
635 	ICE_VSI_MOVE,
636 };
637 
638 struct ice_chs_chg {
639 	struct list_head list_entry;
640 	enum ice_chg_type type;
641 
642 	u8 add_ptg;
643 	u8 add_vsig;
644 	u8 add_tcam_idx;
645 	u8 add_prof;
646 	u16 ptype;
647 	u8 ptg;
648 	u8 prof_id;
649 	u16 vsi;
650 	u16 vsig;
651 	u16 orig_vsig;
652 	u16 tcam_idx;
653 	struct ice_ptype_attrib_info attr;
654 };
655 
656 #define ICE_FLOW_PTYPE_MAX		ICE_XLT1_CNT
657 
658 enum ice_prof_type {
659 	ICE_PROF_NON_TUN = 0x1,
660 	ICE_PROF_TUN_UDP = 0x2,
661 	ICE_PROF_TUN_GRE = 0x4,
662 	ICE_PROF_TUN_ALL = 0x6,
663 	ICE_PROF_ALL = 0xFF,
664 };
665 #endif /* _ICE_FLEX_TYPE_H_ */
666