New upstream version 18.11-rc1
[deb_dpdk.git] / drivers / net / dpaa2 / mc / fsl_dpni_cmd.h
1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
2  *
3  * Copyright 2013-2016 Freescale Semiconductor Inc.
4  * Copyright 2016-2017 NXP
5  *
6  */
7 #ifndef _FSL_DPNI_CMD_H
8 #define _FSL_DPNI_CMD_H
9
10 /* DPNI Version */
11 #define DPNI_VER_MAJOR                          7
12 #define DPNI_VER_MINOR                          8
13
14 #define DPNI_CMD_BASE_VERSION                   1
15 #define DPNI_CMD_VERSION_2                      2
16 #define DPNI_CMD_VERSION_3                      3
17 #define DPNI_CMD_ID_OFFSET                      4
18
19 #define DPNI_CMD(id)    (((id) << DPNI_CMD_ID_OFFSET) | DPNI_CMD_BASE_VERSION)
20 #define DPNI_CMD_V2(id) (((id) << DPNI_CMD_ID_OFFSET) | DPNI_CMD_VERSION_2)
21 #define DPNI_CMD_V3(id) (((id) << DPNI_CMD_ID_OFFSET) | DPNI_CMD_VERSION_3)
22
23 /* Command IDs */
24 #define DPNI_CMDID_OPEN                         DPNI_CMD(0x801)
25 #define DPNI_CMDID_CLOSE                        DPNI_CMD(0x800)
26 #define DPNI_CMDID_CREATE                       DPNI_CMD_V2(0x901)
27 #define DPNI_CMDID_DESTROY                      DPNI_CMD(0x981)
28 #define DPNI_CMDID_GET_API_VERSION              DPNI_CMD(0xa01)
29
30 #define DPNI_CMDID_ENABLE                       DPNI_CMD(0x002)
31 #define DPNI_CMDID_DISABLE                      DPNI_CMD(0x003)
32 #define DPNI_CMDID_GET_ATTR                     DPNI_CMD_V2(0x004)
33 #define DPNI_CMDID_RESET                        DPNI_CMD(0x005)
34 #define DPNI_CMDID_IS_ENABLED                   DPNI_CMD(0x006)
35
36 #define DPNI_CMDID_SET_IRQ_ENABLE               DPNI_CMD(0x012)
37 #define DPNI_CMDID_GET_IRQ_ENABLE               DPNI_CMD(0x013)
38 #define DPNI_CMDID_SET_IRQ_MASK                 DPNI_CMD(0x014)
39 #define DPNI_CMDID_GET_IRQ_MASK                 DPNI_CMD(0x015)
40 #define DPNI_CMDID_GET_IRQ_STATUS               DPNI_CMD(0x016)
41 #define DPNI_CMDID_CLEAR_IRQ_STATUS             DPNI_CMD(0x017)
42
43 #define DPNI_CMDID_SET_POOLS                    DPNI_CMD_V2(0x200)
44 #define DPNI_CMDID_SET_ERRORS_BEHAVIOR          DPNI_CMD(0x20B)
45
46 #define DPNI_CMDID_GET_QDID                     DPNI_CMD(0x210)
47 #define DPNI_CMDID_GET_SP_INFO                  DPNI_CMD(0x211)
48 #define DPNI_CMDID_GET_TX_DATA_OFFSET           DPNI_CMD(0x212)
49 #define DPNI_CMDID_GET_LINK_STATE               DPNI_CMD_V2(0x215)
50 #define DPNI_CMDID_SET_MAX_FRAME_LENGTH         DPNI_CMD(0x216)
51 #define DPNI_CMDID_GET_MAX_FRAME_LENGTH         DPNI_CMD(0x217)
52 #define DPNI_CMDID_SET_LINK_CFG                 DPNI_CMD_V2(0x21A)
53 #define DPNI_CMDID_SET_TX_SHAPING               DPNI_CMD_V2(0x21B)
54
55 #define DPNI_CMDID_SET_MCAST_PROMISC            DPNI_CMD(0x220)
56 #define DPNI_CMDID_GET_MCAST_PROMISC            DPNI_CMD(0x221)
57 #define DPNI_CMDID_SET_UNICAST_PROMISC          DPNI_CMD(0x222)
58 #define DPNI_CMDID_GET_UNICAST_PROMISC          DPNI_CMD(0x223)
59 #define DPNI_CMDID_SET_PRIM_MAC                 DPNI_CMD(0x224)
60 #define DPNI_CMDID_GET_PRIM_MAC                 DPNI_CMD(0x225)
61 #define DPNI_CMDID_ADD_MAC_ADDR                 DPNI_CMD(0x226)
62 #define DPNI_CMDID_REMOVE_MAC_ADDR              DPNI_CMD(0x227)
63 #define DPNI_CMDID_CLR_MAC_FILTERS              DPNI_CMD(0x228)
64
65 #define DPNI_CMDID_ENABLE_VLAN_FILTER           DPNI_CMD(0x230)
66 #define DPNI_CMDID_ADD_VLAN_ID                  DPNI_CMD(0x231)
67 #define DPNI_CMDID_REMOVE_VLAN_ID               DPNI_CMD(0x232)
68 #define DPNI_CMDID_CLR_VLAN_FILTERS             DPNI_CMD(0x233)
69
70 #define DPNI_CMDID_SET_RX_TC_DIST               DPNI_CMD_V3(0x235)
71
72 #define DPNI_CMDID_GET_STATISTICS               DPNI_CMD_V2(0x25D)
73 #define DPNI_CMDID_RESET_STATISTICS             DPNI_CMD(0x25E)
74 #define DPNI_CMDID_GET_QUEUE                    DPNI_CMD(0x25F)
75 #define DPNI_CMDID_SET_QUEUE                    DPNI_CMD(0x260)
76 #define DPNI_CMDID_GET_TAILDROP                 DPNI_CMD_V2(0x261)
77 #define DPNI_CMDID_SET_TAILDROP                 DPNI_CMD_V2(0x262)
78
79 #define DPNI_CMDID_GET_PORT_MAC_ADDR            DPNI_CMD(0x263)
80
81 #define DPNI_CMDID_GET_BUFFER_LAYOUT            DPNI_CMD_V2(0x264)
82 #define DPNI_CMDID_SET_BUFFER_LAYOUT            DPNI_CMD_V2(0x265)
83
84 #define DPNI_CMDID_SET_CONGESTION_NOTIFICATION  DPNI_CMD(0x267)
85 #define DPNI_CMDID_GET_CONGESTION_NOTIFICATION  DPNI_CMD(0x268)
86 #define DPNI_CMDID_SET_EARLY_DROP               DPNI_CMD_V2(0x269)
87 #define DPNI_CMDID_GET_EARLY_DROP               DPNI_CMD_V2(0x26A)
88 #define DPNI_CMDID_GET_OFFLOAD                  DPNI_CMD(0x26B)
89 #define DPNI_CMDID_SET_OFFLOAD                  DPNI_CMD(0x26C)
90 #define DPNI_CMDID_SET_TX_CONFIRMATION_MODE     DPNI_CMD(0x266)
91 #define DPNI_CMDID_GET_TX_CONFIRMATION_MODE     DPNI_CMD(0x26D)
92 #define DPNI_CMDID_SET_OPR                      DPNI_CMD(0x26e)
93 #define DPNI_CMDID_GET_OPR                      DPNI_CMD(0x26f)
94
95 /* Macros for accessing command fields smaller than 1byte */
96 #define DPNI_MASK(field)        \
97         GENMASK(DPNI_##field##_SHIFT + DPNI_##field##_SIZE - 1, \
98                 DPNI_##field##_SHIFT)
99 #define dpni_set_field(var, field, val) \
100         ((var) |= (((val) << DPNI_##field##_SHIFT) & DPNI_MASK(field)))
101 #define dpni_get_field(var, field)      \
102         (((var) & DPNI_MASK(field)) >> DPNI_##field##_SHIFT)
103
104 #pragma pack(push, 1)
105 struct dpni_cmd_open {
106         uint32_t dpni_id;
107 };
108
109 struct dpni_cmd_create {
110         uint32_t options;
111         uint8_t num_queues;
112         uint8_t num_tcs;
113         uint8_t mac_filter_entries;
114         uint8_t pad1;
115         uint8_t vlan_filter_entries;
116         uint8_t pad2;
117         uint8_t qos_entries;
118         uint8_t pad3;
119         uint16_t fs_entries;
120         uint8_t num_rx_tcs;
121 };
122
123 struct dpni_cmd_destroy {
124         uint32_t dpsw_id;
125 };
126
127 #define DPNI_BACKUP_POOL(val, order)    (((val) & 0x1) << (order))
128
129 struct dpni_cmd_pool {
130         uint16_t dpbp_id;
131         uint8_t priority_mask;
132         uint8_t pad;
133 };
134
135 struct dpni_cmd_set_pools {
136         uint8_t num_dpbp;
137         uint8_t backup_pool_mask;
138         uint16_t pad;
139         struct dpni_cmd_pool pool[8];
140         uint16_t buffer_size[8];
141 };
142
143 /* The enable indication is always the least significant bit */
144 #define DPNI_ENABLE_SHIFT               0
145 #define DPNI_ENABLE_SIZE                1
146
147 struct dpni_rsp_is_enabled {
148         uint8_t enabled;
149 };
150
151 struct dpni_cmd_set_irq_enable {
152         uint8_t enable;
153         uint8_t pad[3];
154         uint8_t irq_index;
155 };
156
157 struct dpni_cmd_get_irq_enable {
158         uint32_t pad;
159         uint8_t irq_index;
160 };
161
162 struct dpni_rsp_get_irq_enable {
163         uint8_t enabled;
164 };
165
166 struct dpni_cmd_set_irq_mask {
167         uint32_t mask;
168         uint8_t irq_index;
169 };
170
171 struct dpni_cmd_get_irq_mask {
172         uint32_t pad;
173         uint8_t irq_index;
174 };
175
176 struct dpni_rsp_get_irq_mask {
177         uint32_t mask;
178 };
179
180 struct dpni_cmd_get_irq_status {
181         uint32_t status;
182         uint8_t irq_index;
183 };
184
185 struct dpni_rsp_get_irq_status {
186         uint32_t status;
187 };
188
189 struct dpni_cmd_clear_irq_status {
190         uint32_t status;
191         uint8_t irq_index;
192 };
193
194 struct dpni_rsp_get_attr {
195         /* response word 0 */
196         uint32_t options;
197         uint8_t num_queues;
198         uint8_t num_rx_tcs;
199         uint8_t mac_filter_entries;
200         uint8_t num_tx_tcs;
201         /* response word 1 */
202         uint8_t vlan_filter_entries;
203         uint8_t pad1;
204         uint8_t qos_entries;
205         uint8_t pad2;
206         uint16_t fs_entries;
207         uint16_t pad3;
208         /* response word 2 */
209         uint8_t qos_key_size;
210         uint8_t fs_key_size;
211         uint16_t wriop_version;
212 };
213
214 #define DPNI_ERROR_ACTION_SHIFT         0
215 #define DPNI_ERROR_ACTION_SIZE          4
216 #define DPNI_FRAME_ANN_SHIFT            4
217 #define DPNI_FRAME_ANN_SIZE             1
218
219 struct dpni_cmd_set_errors_behavior {
220         uint32_t errors;
221         /* from least significant bit: error_action:4, set_frame_annotation:1 */
222         uint8_t flags;
223 };
224
225 /* There are 3 separate commands for configuring Rx, Tx and Tx confirmation
226  * buffer layouts, but they all share the same parameters.
227  * If one of the functions changes, below structure needs to be split.
228  */
229
230 #define DPNI_PASS_TS_SHIFT              0
231 #define DPNI_PASS_TS_SIZE               1
232 #define DPNI_PASS_PR_SHIFT              1
233 #define DPNI_PASS_PR_SIZE               1
234 #define DPNI_PASS_FS_SHIFT              2
235 #define DPNI_PASS_FS_SIZE               1
236 #define DPNI_PASS_SWO_SHIFT             3
237 #define DPNI_PASS_SWO_SIZE              1
238
239 struct dpni_cmd_get_buffer_layout {
240         uint8_t qtype;
241 };
242
243 struct dpni_rsp_get_buffer_layout {
244         /* response word 0 */
245         uint8_t pad0[6];
246         /* from LSB: pass_timestamp:1, parser_result:1, frame_status:1 */
247         uint8_t flags;
248         uint8_t pad1;
249         /* response word 1 */
250         uint16_t private_data_size;
251         uint16_t data_align;
252         uint16_t head_room;
253         uint16_t tail_room;
254 };
255
256 struct dpni_cmd_set_buffer_layout {
257         /* cmd word 0 */
258         uint8_t qtype;
259         uint8_t pad0[3];
260         uint16_t options;
261         /* from LSB: pass_timestamp:1, parser_result:1, frame_status:1 */
262         uint8_t flags;
263         uint8_t pad1;
264         /* cmd word 1 */
265         uint16_t private_data_size;
266         uint16_t data_align;
267         uint16_t head_room;
268         uint16_t tail_room;
269 };
270
271 struct dpni_cmd_set_offload {
272         uint8_t pad[3];
273         uint8_t dpni_offload;
274         uint32_t config;
275 };
276
277 struct dpni_cmd_get_offload {
278         uint8_t pad[3];
279         uint8_t dpni_offload;
280 };
281
282 struct dpni_rsp_get_offload {
283         uint32_t pad;
284         uint32_t config;
285 };
286
287 struct dpni_cmd_get_qdid {
288         uint8_t qtype;
289 };
290
291 struct dpni_rsp_get_qdid {
292         uint16_t qdid;
293 };
294
295 struct dpni_rsp_get_sp_info {
296         uint16_t spids[2];
297 };
298
299 struct dpni_rsp_get_tx_data_offset {
300         uint16_t data_offset;
301 };
302
303 struct dpni_cmd_get_statistics {
304         uint8_t page_number;
305         uint8_t param;
306 };
307
308 struct dpni_rsp_get_statistics {
309         uint64_t counter[7];
310 };
311
312 struct dpni_cmd_set_link_cfg {
313         uint64_t pad0;
314         uint32_t rate;
315         uint32_t pad1;
316         uint64_t options;
317         uint64_t advertising;
318 };
319
320 #define DPNI_LINK_STATE_SHIFT           0
321 #define DPNI_LINK_STATE_SIZE            1
322 #define DPNI_STATE_VALID_SHIFT          1
323 #define DPNI_STATE_VALID_SIZE           1
324
325 struct dpni_rsp_get_link_state {
326         uint32_t pad0;
327         /* from LSB: up:1 */
328         uint8_t flags;
329         uint8_t pad1[3];
330         uint32_t rate;
331         uint32_t pad2;
332         uint64_t options;
333         uint64_t supported;
334         uint64_t advertising;
335 };
336
337 struct dpni_cmd_set_max_frame_length {
338         uint16_t max_frame_length;
339 };
340
341 struct dpni_rsp_get_max_frame_length {
342         uint16_t max_frame_length;
343 };
344
345 struct dpni_cmd_set_multicast_promisc {
346         uint8_t enable;
347 };
348
349 struct dpni_rsp_get_multicast_promisc {
350         uint8_t enabled;
351 };
352
353 struct dpni_cmd_set_unicast_promisc {
354         uint8_t enable;
355 };
356
357 struct dpni_rsp_get_unicast_promisc {
358         uint8_t enabled;
359 };
360
361 struct dpni_cmd_set_primary_mac_addr {
362         uint16_t pad;
363         uint8_t mac_addr[6];
364 };
365
366 struct dpni_rsp_get_primary_mac_addr {
367         uint16_t pad;
368         uint8_t mac_addr[6];
369 };
370
371 struct dpni_rsp_get_port_mac_addr {
372         uint16_t pad;
373         uint8_t mac_addr[6];
374 };
375
376 struct dpni_cmd_add_mac_addr {
377         uint16_t pad;
378         uint8_t mac_addr[6];
379 };
380
381 struct dpni_cmd_remove_mac_addr {
382         uint16_t pad;
383         uint8_t mac_addr[6];
384 };
385
386 #define DPNI_UNICAST_FILTERS_SHIFT      0
387 #define DPNI_UNICAST_FILTERS_SIZE       1
388 #define DPNI_MULTICAST_FILTERS_SHIFT    1
389 #define DPNI_MULTICAST_FILTERS_SIZE     1
390
391 struct dpni_cmd_clear_mac_filters {
392         /* from LSB: unicast:1, multicast:1 */
393         uint8_t flags;
394 };
395
396 struct dpni_cmd_enable_vlan_filter {
397         /* only the LSB */
398         uint8_t en;
399 };
400
401 struct dpni_cmd_vlan_id {
402         uint32_t pad;
403         uint16_t vlan_id;
404 };
405
406 #define DPNI_SEPARATE_GRP_SHIFT 0
407 #define DPNI_SEPARATE_GRP_SIZE  1
408 #define DPNI_MODE_1_SHIFT               0
409 #define DPNI_MODE_1_SIZE                4
410 #define DPNI_MODE_2_SHIFT               4
411 #define DPNI_MODE_2_SIZE                4
412
413 struct dpni_cmd_set_tx_priorities {
414         uint16_t flags;
415         uint8_t prio_group_A;
416         uint8_t prio_group_B;
417         uint32_t pad0;
418         uint8_t modes[4];
419         uint32_t pad1;
420         uint64_t pad2;
421         uint16_t delta_bandwidth[8];
422 };
423
424 #define DPNI_DIST_MODE_SHIFT            0
425 #define DPNI_DIST_MODE_SIZE             4
426 #define DPNI_MISS_ACTION_SHIFT          4
427 #define DPNI_MISS_ACTION_SIZE           4
428 #define DPNI_KEEP_HASH_KEY_SHIFT        7
429 #define DPNI_KEEP_HASH_KEY_SIZE         1
430 #define DPNI_KEEP_ENTRIES_SHIFT         6
431 #define DPNI_KEEP_ENTRIES_SIZE          1
432
433 struct dpni_cmd_set_rx_tc_dist {
434         uint16_t dist_size;
435         uint8_t tc_id;
436         /* from LSB: dist_mode:4, miss_action:4 */
437         uint8_t flags;
438         uint8_t pad0;
439         /* only the LSB */
440         uint8_t keep_hash_key;
441         uint16_t default_flow_id;
442         uint64_t pad1[5];
443         uint64_t key_cfg_iova;
444 };
445
446 struct dpni_cmd_get_queue {
447         uint8_t qtype;
448         uint8_t tc;
449         uint8_t index;
450 };
451
452 #define DPNI_DEST_TYPE_SHIFT            0
453 #define DPNI_DEST_TYPE_SIZE             4
454 #define DPNI_STASH_CTRL_SHIFT           6
455 #define DPNI_STASH_CTRL_SIZE            1
456 #define DPNI_HOLD_ACTIVE_SHIFT          7
457 #define DPNI_HOLD_ACTIVE_SIZE           1
458
459 struct dpni_rsp_get_queue {
460         /* response word 0 */
461         uint64_t pad0;
462         /* response word 1 */
463         uint32_t dest_id;
464         uint16_t pad1;
465         uint8_t dest_prio;
466         /* From LSB: dest_type:4, pad:2, flc_stash_ctrl:1, hold_active:1 */
467         uint8_t flags;
468         /* response word 2 */
469         uint64_t flc;
470         /* response word 3 */
471         uint64_t user_context;
472         /* response word 4 */
473         uint32_t fqid;
474         uint16_t qdbin;
475 };
476
477 struct dpni_cmd_set_queue {
478         /* cmd word 0 */
479         uint8_t qtype;
480         uint8_t tc;
481         uint8_t index;
482         uint8_t options;
483         uint32_t pad0;
484         /* cmd word 1 */
485         uint32_t dest_id;
486         uint16_t pad1;
487         uint8_t dest_prio;
488         uint8_t flags;
489         /* cmd word 2 */
490         uint64_t flc;
491         /* cmd word 3 */
492         uint64_t user_context;
493 };
494
495 #define DPNI_DROP_ENABLE_SHIFT  0
496 #define DPNI_DROP_ENABLE_SIZE   1
497 #define DPNI_DROP_UNITS_SHIFT   2
498 #define DPNI_DROP_UNITS_SIZE    2
499
500 struct dpni_early_drop {
501         /* from LSB: enable:1 units:2 */
502         uint8_t flags;
503         uint8_t pad0[3];
504         uint32_t pad1;
505         uint8_t green_drop_probability;
506         uint8_t pad2[7];
507         uint64_t green_max_threshold;
508         uint64_t green_min_threshold;
509         uint64_t pad3;
510         uint8_t yellow_drop_probability;
511         uint8_t pad4[7];
512         uint64_t yellow_max_threshold;
513         uint64_t yellow_min_threshold;
514         uint64_t pad5;
515         uint8_t red_drop_probability;
516         uint8_t pad6[7];
517         uint64_t red_max_threshold;
518         uint64_t red_min_threshold;
519 };
520
521 struct dpni_cmd_early_drop {
522         uint8_t qtype;
523         uint8_t tc;
524         uint8_t pad[6];
525         uint64_t early_drop_iova;
526 };
527
528 struct dpni_rsp_get_api_version {
529         uint16_t major;
530         uint16_t minor;
531 };
532
533 struct dpni_cmd_get_taildrop {
534         uint8_t congestion_point;
535         uint8_t qtype;
536         uint8_t tc;
537         uint8_t index;
538 };
539
540 struct dpni_rsp_get_taildrop {
541         /* cmd word 0 */
542         uint64_t pad0;
543         /* cmd word 1 */
544         /* from LSB: enable:1 oal_lo:7 */
545         uint8_t enable_oal_lo;
546         /* from LSB: oal_hi:5 */
547         uint8_t oal_hi;
548         uint8_t units;
549         uint8_t pad2;
550         uint32_t threshold;
551 };
552
553 #define DPNI_OAL_LO_SHIFT       1
554 #define DPNI_OAL_LO_SIZE        7
555 #define DPNI_OAL_HI_SHIFT       0
556 #define DPNI_OAL_HI_SIZE        5
557
558 struct dpni_cmd_set_taildrop {
559         /* cmd word 0 */
560         uint8_t congestion_point;
561         uint8_t qtype;
562         uint8_t tc;
563         uint8_t index;
564         uint32_t pad0;
565         /* cmd word 1 */
566         /* from LSB: enable:1 oal_lo:7 */
567         uint8_t enable_oal_lo;
568         /* from LSB: oal_hi:5 */
569         uint8_t oal_hi;
570         uint8_t units;
571         uint8_t pad2;
572         uint32_t threshold;
573 };
574
575 struct dpni_tx_confirmation_mode {
576         uint32_t pad;
577         uint8_t confirmation_mode;
578 };
579
580 #define DPNI_DEST_TYPE_SHIFT            0
581 #define DPNI_DEST_TYPE_SIZE             4
582 #define DPNI_CONG_UNITS_SHIFT           4
583 #define DPNI_CONG_UNITS_SIZE            2
584
585 struct dpni_cmd_set_congestion_notification {
586         uint8_t qtype;
587         uint8_t tc;
588         uint8_t pad[6];
589         uint32_t dest_id;
590         uint16_t notification_mode;
591         uint8_t dest_priority;
592         /* from LSB: dest_type: 4 units:2 */
593         uint8_t type_units;
594         uint64_t message_iova;
595         uint64_t message_ctx;
596         uint32_t threshold_entry;
597         uint32_t threshold_exit;
598 };
599
600 struct dpni_cmd_get_congestion_notification {
601         uint8_t qtype;
602         uint8_t tc;
603 };
604
605 struct dpni_rsp_get_congestion_notification {
606         uint64_t pad;
607         uint32_t dest_id;
608         uint16_t notification_mode;
609         uint8_t dest_priority;
610         /* from LSB: dest_type: 4 units:2 */
611         uint8_t type_units;
612         uint64_t message_iova;
613         uint64_t message_ctx;
614         uint32_t threshold_entry;
615         uint32_t threshold_exit;
616 };
617
618 struct dpni_cmd_set_opr {
619         uint8_t pad0;
620         uint8_t tc_id;
621         uint8_t index;
622         uint8_t options;
623         uint8_t pad1[7];
624         uint8_t oloe;
625         uint8_t oeane;
626         uint8_t olws;
627         uint8_t oa;
628         uint8_t oprrws;
629 };
630
631 struct dpni_cmd_get_opr {
632         uint8_t pad;
633         uint8_t tc_id;
634         uint8_t index;
635 };
636
637 #define DPNI_RIP_SHIFT  0
638 #define DPNI_RIP_SIZE           1
639 #define DPNI_OPR_ENABLE_SHIFT   1
640 #define DPNI_OPR_ENABLE_SIZE    1
641 #define DPNI_TSEQ_NLIS_SHIFT    0
642 #define DPNI_TSEQ_NLIS_SIZE     1
643 #define DPNI_HSEQ_NLIS_SHIFT    0
644 #define DPNI_HSEQ_NLIS_SIZE     1
645
646 struct dpni_rsp_get_opr {
647         uint64_t pad0;
648         /* from LSB: rip:1 enable:1 */
649         uint8_t flags;
650         uint16_t pad1;
651         uint8_t oloe;
652         uint8_t oeane;
653         uint8_t olws;
654         uint8_t oa;
655         uint8_t oprrws;
656         uint16_t nesn;
657         uint16_t pad8;
658         uint16_t ndsn;
659         uint16_t pad2;
660         uint16_t ea_tseq;
661         /* only the LSB */
662         uint8_t tseq_nlis;
663         uint8_t pad3;
664         uint16_t ea_hseq;
665         /* only the LSB */
666         uint8_t hseq_nlis;
667         uint8_t pad4;
668         uint16_t ea_hptr;
669         uint16_t pad5;
670         uint16_t ea_tptr;
671         uint16_t pad6;
672         uint16_t opr_vid;
673         uint16_t pad7;
674         uint16_t opr_id;
675 };
676
677 #pragma pack(pop)
678 #endif /* _FSL_DPNI_CMD_H */