bc471fef9b9674a47466b9bea39cfe225b237ef0
[dpdk.git] / drivers / net / bnxt / tf_ulp / ulp_template_db_act.c
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2014-2020 Broadcom
3  * All rights reserved.
4  */
5
6 #include "ulp_template_db_enum.h"
7 #include "ulp_template_db_field.h"
8 #include "ulp_template_struct.h"
9 #include "ulp_rte_parser.h"
10
11 uint16_t ulp_act_sig_tbl[BNXT_ULP_ACT_SIG_TBL_MAX_SZ] = {
12         [BNXT_ULP_ACT_HID_00a1] = 1,
13         [BNXT_ULP_ACT_HID_0040] = 2,
14         [BNXT_ULP_ACT_HID_0029] = 3
15 };
16
17 struct bnxt_ulp_act_match_info ulp_act_match_list[] = {
18         [1] = {
19         .act_hid = BNXT_ULP_ACT_HID_00a1,
20         .act_sig = { .bits =
21                 BNXT_ULP_ACTION_BIT_VXLAN_DECAP |
22                 BNXT_ULP_ACTION_BIT_MARK |
23                 BNXT_ULP_ACTION_BIT_VNIC |
24                 BNXT_ULP_FLOW_DIR_BITMASK_ING },
25         .act_tid = 0
26         },
27         [2] = {
28         .act_hid = BNXT_ULP_ACT_HID_0040,
29         .act_sig = { .bits =
30                 BNXT_ULP_ACTION_BIT_VPORT |
31                 BNXT_ULP_ACTION_BIT_VXLAN_ENCAP |
32                 BNXT_ULP_FLOW_DIR_BITMASK_EGR },
33         .act_tid = 1
34         },
35         [3] = {
36         .act_hid = BNXT_ULP_ACT_HID_0029,
37         .act_sig = { .bits =
38                 BNXT_ULP_ACTION_BIT_MARK |
39                 BNXT_ULP_ACTION_BIT_RSS |
40                 BNXT_ULP_ACTION_BIT_VNIC |
41                 BNXT_ULP_FLOW_DIR_BITMASK_ING },
42         .act_tid = 2
43         }
44 };
45
46 struct bnxt_ulp_mapper_tbl_list_info ulp_act_tmpl_list[] = {
47         [((0 << BNXT_ULP_LOG2_MAX_NUM_DEV) |
48                 BNXT_ULP_DEVICE_ID_WH_PLUS)] = {
49         .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
50         .num_tbls = 1,
51         .start_tbl_idx = 0
52         },
53         [((1 << BNXT_ULP_LOG2_MAX_NUM_DEV) |
54                 BNXT_ULP_DEVICE_ID_WH_PLUS)] = {
55         .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
56         .num_tbls = 1,
57         .start_tbl_idx = 1
58         },
59         [((2 << BNXT_ULP_LOG2_MAX_NUM_DEV) |
60                 BNXT_ULP_DEVICE_ID_WH_PLUS)] = {
61         .device_name = BNXT_ULP_DEVICE_ID_WH_PLUS,
62         .num_tbls = 1,
63         .start_tbl_idx = 2
64         }
65 };
66
67 struct bnxt_ulp_mapper_tbl_info ulp_act_tbl_list[] = {
68         {
69         .resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
70         .resource_type = TF_TBL_TYPE_EXT,
71         .resource_sub_type =
72                 BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_NORMAL,
73         .direction = TF_DIR_RX,
74         .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
75         .result_start_idx = 0,
76         .result_bit_size = 128,
77         .result_num_fields = 26,
78         .encap_num_fields = 0,
79         .regfile_idx = BNXT_ULP_REGFILE_INDEX_MAIN_ACTION_PTR
80         },
81         {
82         .resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
83         .resource_type = TF_TBL_TYPE_EXT,
84         .resource_sub_type =
85                 BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_NORMAL,
86         .direction = TF_DIR_TX,
87         .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
88         .result_start_idx = 26,
89         .result_bit_size = 128,
90         .result_num_fields = 26,
91         .encap_num_fields = 12,
92         .regfile_idx = BNXT_ULP_REGFILE_INDEX_MAIN_ACTION_PTR
93         },
94         {
95         .resource_func = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
96         .resource_type = TF_TBL_TYPE_EXT,
97         .resource_sub_type =
98                 BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_NORMAL,
99         .direction = TF_DIR_RX,
100         .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
101         .result_start_idx = 64,
102         .result_bit_size = 128,
103         .result_num_fields = 26,
104         .encap_num_fields = 0,
105         .regfile_idx = BNXT_ULP_REGFILE_INDEX_MAIN_ACTION_PTR
106         }
107 };
108
109 struct bnxt_ulp_mapper_result_field_info ulp_act_result_field_list[] = {
110         {
111         .field_bit_size = 14,
112         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
113         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
114                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
115         },
116         {
117         .field_bit_size = 1,
118         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
119         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
120                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
121         },
122         {
123         .field_bit_size = 1,
124         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
125         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
126                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
127         },
128         {
129         .field_bit_size = 1,
130         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
131         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
132                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
133         },
134         {
135         .field_bit_size = 1,
136         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
137         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
138                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
139         },
140         {
141         .field_bit_size = 1,
142         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
143         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
144                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
145         },
146         {
147         .field_bit_size = 8,
148         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
149         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
150                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
151         },
152         {
153         .field_bit_size = 1,
154         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
155         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
156                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
157         },
158         {
159         .field_bit_size = 1,
160         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
161         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
162                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
163         },
164         {
165         .field_bit_size = 11,
166         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
167         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
168                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
169         },
170         {
171         .field_bit_size = 1,
172         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
173         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
174                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
175         },
176         {
177         .field_bit_size = 10,
178         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
179         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
180                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
181         },
182         {
183         .field_bit_size = 16,
184         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
185         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
186                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
187         },
188         {
189         .field_bit_size = 10,
190         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
191         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
192                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
193         },
194         {
195         .field_bit_size = 16,
196         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
197         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
198                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
199         },
200         {
201         .field_bit_size = 10,
202         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
203         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
204                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
205         },
206         {
207         .field_bit_size = 1,
208         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
209         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
210                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
211         },
212         {
213         .field_bit_size = 1,
214         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
215         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
216                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
217         },
218         {
219         .field_bit_size = 1,
220         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
221         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
222                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
223         },
224         {
225         .field_bit_size = 1,
226         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
227         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
228                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
229         },
230         {
231         .field_bit_size = 4,
232         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
233         .result_operand = {
234                 BNXT_ULP_SYM_DECAP_FUNC_THRU_TUN,
235                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
236                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
237         },
238         {
239         .field_bit_size = 12,
240         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP,
241         .result_operand = {
242                 (BNXT_ULP_ACT_PROP_IDX_VNIC >> 8) & 0xff,
243                 BNXT_ULP_ACT_PROP_IDX_VNIC & 0xff,
244                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
245                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
246         },
247         {
248         .field_bit_size = 1,
249         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
250         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
251                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
252         },
253         {
254         .field_bit_size = 1,
255         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
256         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
257                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
258         },
259         {
260         .field_bit_size = 2,
261         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
262         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
263                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
264         },
265         {
266         .field_bit_size = 1,
267         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
268         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
269                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
270         },
271         {
272         .field_bit_size = 14,
273         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
274         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
275                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
276         },
277         {
278         .field_bit_size = 1,
279         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
280         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
281                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
282         },
283         {
284         .field_bit_size = 1,
285         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
286         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
287                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
288         },
289         {
290         .field_bit_size = 1,
291         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
292         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
293                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
294         },
295         {
296         .field_bit_size = 1,
297         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
298         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
299                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
300         },
301         {
302         .field_bit_size = 1,
303         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
304         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
305                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
306         },
307         {
308         .field_bit_size = 8,
309         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
310         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
311                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
312         },
313         {
314         .field_bit_size = 1,
315         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
316         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
317                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
318         },
319         {
320         .field_bit_size = 1,
321         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
322         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
323                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
324         },
325         {
326         .field_bit_size = 11,
327         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
328         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
329                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
330         },
331         {
332         .field_bit_size = 1,
333         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
334         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
335                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
336         },
337         {
338         .field_bit_size = 10,
339         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
340         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
341                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
342         },
343         {
344         .field_bit_size = 16,
345         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
346         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
347                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
348         },
349         {
350         .field_bit_size = 10,
351         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
352         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
353                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
354         },
355         {
356         .field_bit_size = 16,
357         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
358         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
359                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
360         },
361         {
362         .field_bit_size = 10,
363         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
364         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
365                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
366         },
367         {
368         .field_bit_size = 1,
369         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
370         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
371                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
372         },
373         {
374         .field_bit_size = 1,
375         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
376         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
377                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
378         },
379         {
380         .field_bit_size = 1,
381         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
382         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
383                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
384         },
385         {
386         .field_bit_size = 1,
387         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
388         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
389                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
390         },
391         {
392         .field_bit_size = 4,
393         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
394         .result_operand = {
395                 BNXT_ULP_SYM_DECAP_FUNC_NONE,
396                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
397                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
398         },
399         {
400         .field_bit_size = 12,
401         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP,
402         .result_operand = {
403                 (BNXT_ULP_ACT_PROP_IDX_VPORT >> 8) & 0xff,
404                 BNXT_ULP_ACT_PROP_IDX_VPORT & 0xff,
405                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
406                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
407         },
408         {
409         .field_bit_size = 1,
410         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
411         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
412                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
413         },
414         {
415         .field_bit_size = 1,
416         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
417         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
418                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
419         },
420         {
421         .field_bit_size = 2,
422         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
423         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
424                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
425         },
426         {
427         .field_bit_size = 1,
428         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
429         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
430                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
431         },
432         {
433         .field_bit_size = 3,
434         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
435         .result_operand = {
436                 BNXT_ULP_SYM_ECV_TUN_TYPE_VXLAN,
437                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
438                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
439         },
440         {
441         .field_bit_size = 3,
442         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
443         .result_operand = {
444                 BNXT_ULP_SYM_ECV_L4_TYPE_UDP_CSUM,
445                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
446                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
447         },
448         {
449         .field_bit_size = 3,
450         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP,
451         .result_operand = {
452                 (BNXT_ULP_ACT_PROP_IDX_ENCAP_L3_TYPE >> 8) & 0xff,
453                 BNXT_ULP_ACT_PROP_IDX_ENCAP_L3_TYPE & 0xff,
454                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
455                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
456         },
457         {
458         .field_bit_size = 1,
459         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
460         .result_operand = {0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
461                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
462         },
463         {
464         .field_bit_size = 4,
465         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP,
466         .result_operand = {
467                 (BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG_TYPE >> 8) & 0xff,
468                 BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG_TYPE & 0xff,
469                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
470                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
471         },
472         {
473         .field_bit_size = 1,
474         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
475         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
476                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
477         },
478         {
479         .field_bit_size = 1,
480         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
481         .result_operand = {0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
482                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
483         },
484         {
485         .field_bit_size = 48,
486         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP,
487         .result_operand = {
488                 (BNXT_ULP_ACT_PROP_IDX_ENCAP_L2_DMAC >> 8) & 0xff,
489                 BNXT_ULP_ACT_PROP_IDX_ENCAP_L2_DMAC & 0xff,
490                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
491                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
492         },
493         {
494         .field_bit_size = 0,
495         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ENCAP_ACT_PROP_SZ,
496         .result_operand = {
497                 (BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG >> 8) & 0xff,
498                 BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG & 0xff,
499                 (BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG_SZ >> 8) & 0xff,
500                 BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG_SZ & 0xff,
501                 0x00, 0x00, 0x00, 0x00, 0x00,
502                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
503         },
504         {
505         .field_bit_size = 0,
506         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ENCAP_ACT_PROP_SZ,
507         .result_operand = {
508                 (BNXT_ULP_ACT_PROP_IDX_ENCAP_IP >> 8) & 0xff,
509                 BNXT_ULP_ACT_PROP_IDX_ENCAP_IP & 0xff,
510                 (BNXT_ULP_ACT_PROP_IDX_ENCAP_IP_SZ >> 8) & 0xff,
511                 BNXT_ULP_ACT_PROP_IDX_ENCAP_IP_SZ & 0xff,
512                 0x00, 0x00, 0x00, 0x00, 0x00,
513                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
514         },
515         {
516         .field_bit_size = 32,
517         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP,
518         .result_operand = {
519                 (BNXT_ULP_ACT_PROP_IDX_ENCAP_UDP >> 8) & 0xff,
520                 BNXT_ULP_ACT_PROP_IDX_ENCAP_UDP & 0xff,
521                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
522                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
523         },
524         {
525         .field_bit_size = 0,
526         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ENCAP_ACT_PROP_SZ,
527         .result_operand = {
528                 (BNXT_ULP_ACT_PROP_IDX_ENCAP_TUN >> 8) & 0xff,
529                 BNXT_ULP_ACT_PROP_IDX_ENCAP_TUN & 0xff,
530                 (BNXT_ULP_ACT_PROP_IDX_ENCAP_TUN_SZ >> 8) & 0xff,
531                 BNXT_ULP_ACT_PROP_IDX_ENCAP_TUN_SZ & 0xff,
532                 0x00, 0x00, 0x00, 0x00, 0x00,
533                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
534         },
535         {
536         .field_bit_size = 14,
537         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
538         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
539                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
540         },
541         {
542         .field_bit_size = 1,
543         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
544         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
545                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
546         },
547         {
548         .field_bit_size = 1,
549         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
550         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
551                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
552         },
553         {
554         .field_bit_size = 1,
555         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
556         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
557                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
558         },
559         {
560         .field_bit_size = 1,
561         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
562         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
563                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
564         },
565         {
566         .field_bit_size = 1,
567         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
568         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
569                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
570         },
571         {
572         .field_bit_size = 8,
573         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
574         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
575                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
576         },
577         {
578         .field_bit_size = 1,
579         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
580         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
581                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
582         },
583         {
584         .field_bit_size = 1,
585         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
586         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
587                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
588         },
589         {
590         .field_bit_size = 11,
591         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
592         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
593                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
594         },
595         {
596         .field_bit_size = 1,
597         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
598         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
599                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
600         },
601         {
602         .field_bit_size = 10,
603         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
604         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
605                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
606         },
607         {
608         .field_bit_size = 16,
609         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
610         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
611                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
612         },
613         {
614         .field_bit_size = 10,
615         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
616         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
617                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
618         },
619         {
620         .field_bit_size = 16,
621         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
622         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
623                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
624         },
625         {
626         .field_bit_size = 10,
627         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
628         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
629                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
630         },
631         {
632         .field_bit_size = 1,
633         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
634         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
635                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
636         },
637         {
638         .field_bit_size = 1,
639         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
640         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
641                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
642         },
643         {
644         .field_bit_size = 1,
645         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
646         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
647                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
648         },
649         {
650         .field_bit_size = 1,
651         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
652         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
653                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
654         },
655         {
656         .field_bit_size = 4,
657         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
658         .result_operand = {
659                 BNXT_ULP_SYM_DECAP_FUNC_NONE,
660                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
661                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
662         },
663         {
664         .field_bit_size = 12,
665         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_ACT_PROP,
666         .result_operand = {
667                 (BNXT_ULP_ACT_PROP_IDX_VNIC >> 8) & 0xff,
668                 BNXT_ULP_ACT_PROP_IDX_VNIC & 0xff,
669                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
670                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
671         },
672         {
673         .field_bit_size = 1,
674         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
675         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
676                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
677         },
678         {
679         .field_bit_size = 1,
680         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
681         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
682                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
683         },
684         {
685         .field_bit_size = 2,
686         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
687         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
688                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
689         },
690         {
691         .field_bit_size = 1,
692         .result_opcode = BNXT_ULP_RESULT_OPC_SET_TO_CONSTANT,
693         .result_operand = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
694                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
695         }
696 };