1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
3 * Copyright 2013-2016 Freescale Semiconductor Inc.
4 * Copyright 2016-2017 NXP
11 #include <fsl_dpopr.h>
16 * Data Path Network Interface API
17 * Contains initialization APIs and runtime control APIs for DPNI
20 /** General DPNI macros */
23 * Maximum number of traffic classes
27 * Maximum number of buffer pools per DPNI
29 #define DPNI_MAX_DPBP 8
31 * Maximum number of storage-profiles per DPNI
36 * All traffic classes considered; see dpni_set_queue()
38 #define DPNI_ALL_TCS (uint8_t)(-1)
40 * All flows within traffic class considered; see dpni_set_queue()
42 #define DPNI_ALL_TC_FLOWS (uint16_t)(-1)
45 * Tx traffic is always released to a buffer pool on transmit, there are no
46 * resources allocated to have the frames confirmed back to the source after
49 #define DPNI_OPT_TX_FRM_RELEASE 0x000001
51 * Disables support for MAC address filtering for addresses other than primary
52 * MAC address. This affects both unicast and multicast. Promiscuous mode can
53 * still be enabled/disabled for both unicast and multicast. If promiscuous mode
54 * is disabled, only traffic matching the primary MAC address will be accepted.
56 #define DPNI_OPT_NO_MAC_FILTER 0x000002
58 * Allocate policers for this DPNI. They can be used to rate-limit traffic per
59 * traffic class (TC) basis.
61 #define DPNI_OPT_HAS_POLICING 0x000004
63 * Congestion can be managed in several ways, allowing the buffer pool to
64 * deplete on ingress, taildrop on each queue or use congestion groups for sets
65 * of queues. If set, it configures a single congestion groups across all TCs.
66 * If reset, a congestion group is allocated for each TC. Only relevant if the
67 * DPNI has multiple traffic classes.
69 #define DPNI_OPT_SHARED_CONGESTION 0x000008
71 * Enables TCAM for Flow Steering and QoS look-ups. If not specified, all
72 * look-ups are exact match. Note that TCAM is not available on LS1088 and its
73 * variants. Setting this bit on these SoCs will trigger an error.
75 #define DPNI_OPT_HAS_KEY_MASKING 0x000010
77 * Disables the flow steering table.
79 #define DPNI_OPT_NO_FS 0x000020
82 * Enable the Order Restoration support
84 #define DPNI_OPT_HAS_OPR 0x000040
87 * Order Point Records are shared for the entire TC
89 #define DPNI_OPT_OPR_PER_TC 0x000080
91 * All Tx traffic classes will use a single sender (ignore num_queueus for tx)
93 #define DPNI_OPT_SINGLE_SENDER 0x000100
95 * Define a custom number of congestion groups
97 #define DPNI_OPT_CUSTOM_CG 0x000200
101 * Software sequence maximum layout size
103 #define DPNI_SW_SEQUENCE_LAYOUT_SIZE 33
105 int dpni_open(struct fsl_mc_io *mc_io,
110 int dpni_close(struct fsl_mc_io *mc_io,
115 * struct dpni_cfg - Structure representing DPNI configuration
116 * @options: Any combination of the following options:
117 * DPNI_OPT_TX_FRM_RELEASE
118 * DPNI_OPT_NO_MAC_FILTER
119 * DPNI_OPT_HAS_POLICING
120 * DPNI_OPT_SHARED_CONGESTION
121 * DPNI_OPT_HAS_KEY_MASKING
123 * DPNI_OPT_SINGLE_SENDER
124 * @fs_entries: Number of entries in the flow steering table.
125 * This table is used to select the ingress queue for
126 * ingress traffic, targeting a GPP core or another.
127 * In addition it can be used to discard traffic that
128 * matches the set rule. It is either an exact match table
129 * or a TCAM table, depending on DPNI_OPT_ HAS_KEY_MASKING
130 * bit in OPTIONS field. This field is ignored if
131 * DPNI_OPT_NO_FS bit is set in OPTIONS field. Otherwise,
132 * value 0 defaults to 64. Maximum supported value is 1024.
133 * Note that the total number of entries is limited on the
134 * SoC to as low as 512 entries if TCAM is used.
135 * @vlan_filter_entries: Number of entries in the VLAN address filtering
136 * table. This is an exact match table used to filter
137 * ingress traffic based on VLAN IDs. Value 0 disables VLAN
138 * filtering. Maximum supported value is 16.
139 * @mac_filter_entries: Number of entries in the MAC address filtering
140 * table. This is an exact match table and allows both
141 * unicast and multicast entries. The primary MAC address
142 * of the network interface is not part of this table,
143 * this contains only entries in addition to it. This
144 * field is ignored if DPNI_OPT_ NO_MAC_FILTER is set in
145 * OPTIONS field. Otherwise, value 0 defaults to 80.
146 * Maximum supported value is 80.
147 * @num_queues: Number of Tx and Rx queues used for traffic
148 * distribution. This is orthogonal to QoS and is only
149 * used to distribute traffic to multiple GPP cores.
150 * This configuration affects the number of Tx queues
151 * (logical FQs, all associated with a single CEETM queue),
152 * Rx queues and Tx confirmation queues, if applicable.
153 * Value 0 defaults to one queue. Maximum supported value
155 * @num_tcs: Number of traffic classes (TCs), reserved for the DPNI.
156 * TCs can have different priority levels for the purpose
157 * of Tx scheduling (see DPNI_SET_TX_PRIORITIES), different
158 * BPs (DPNI_ SET_POOLS), policers. There are dedicated QM
159 * queues for traffic classes (including class queues on
160 * Tx). Value 0 defaults to one TC. Maximum supported value
161 * is 16. There are maximum 16 TCs for Tx and 8 TCs for Rx.
162 * When num_tcs>8 Tx will use this value but Rx will have
163 * only 8 traffic classes.
164 * @num_rx_tcs: if set to other value than zero represents number
165 * of TCs used for Rx. Maximum value is 8. If set to zero the
166 * number of Rx TCs will be initialized with the value provided
167 * in num_tcs parameter.
168 * @qos_entries: Number of entries in the QoS classification table. This
169 * table is used to select the TC for ingress traffic. It
170 * is either an exact match or a TCAM table, depending on
171 * DPNI_OPT_ HAS_KEY_MASKING bit in OPTIONS field. This
172 * field is ignored if the DPNI has a single TC. Otherwise,
173 * a value of 0 defaults to 64. Maximum supported value
179 uint8_t vlan_filter_entries;
180 uint8_t mac_filter_entries;
188 int dpni_create(struct fsl_mc_io *mc_io,
191 const struct dpni_cfg *cfg,
194 int dpni_destroy(struct fsl_mc_io *mc_io,
200 * struct dpni_pools_cfg - Structure representing buffer pools configuration
201 * @num_dpbp: Number of DPBPs
202 * @pools: Array of buffer pools parameters; The number of valid entries
203 * must match 'num_dpbp' value
204 * @pools.dpbp_id: DPBP object ID
205 * @pools.priority: Priority mask that indicates TC's used with this buffer.
206 * I set to 0x00 MC will assume value 0xff.
207 * @pools.buffer_size: Buffer size
208 * @pools.backup_pool: Backup pool
210 struct dpni_pools_cfg {
214 uint8_t priority_mask;
215 uint16_t buffer_size;
217 } pools[DPNI_MAX_DPBP];
220 int dpni_set_pools(struct fsl_mc_io *mc_io,
223 const struct dpni_pools_cfg *cfg);
225 int dpni_enable(struct fsl_mc_io *mc_io,
229 int dpni_disable(struct fsl_mc_io *mc_io,
233 int dpni_is_enabled(struct fsl_mc_io *mc_io,
238 int dpni_reset(struct fsl_mc_io *mc_io,
243 * DPNI IRQ Index and Events
249 #define DPNI_IRQ_INDEX 0
251 * IRQ event - indicates a change in link state
253 #define DPNI_IRQ_EVENT_LINK_CHANGED 0x00000001
255 int dpni_set_irq_enable(struct fsl_mc_io *mc_io,
261 int dpni_get_irq_enable(struct fsl_mc_io *mc_io,
267 int dpni_set_irq_mask(struct fsl_mc_io *mc_io,
273 int dpni_get_irq_mask(struct fsl_mc_io *mc_io,
279 int dpni_get_irq_status(struct fsl_mc_io *mc_io,
285 int dpni_clear_irq_status(struct fsl_mc_io *mc_io,
292 * struct dpni_attr - Structure representing DPNI attributes
293 * @options: Any combination of the following options:
294 * DPNI_OPT_TX_FRM_RELEASE
295 * DPNI_OPT_NO_MAC_FILTER
296 * DPNI_OPT_HAS_POLICING
297 * DPNI_OPT_SHARED_CONGESTION
298 * DPNI_OPT_HAS_KEY_MASKING
300 * @num_queues: Number of Tx and Rx queues used for traffic distribution.
301 * @num_rx_tcs: Number of RX traffic classes (TCs), reserved for the DPNI.
302 * @num_tx_tcs: Number of TX traffic classes (TCs), reserved for the DPNI.
303 * @mac_filter_entries: Number of entries in the MAC address filtering
305 * @vlan_filter_entries: Number of entries in the VLAN address filtering
307 * @qos_entries: Number of entries in the QoS classification table.
308 * @fs_entries: Number of entries in the flow steering table.
309 * @qos_key_size: Size, in bytes, of the QoS look-up key. Defining a key larger
310 * than this when adding QoS entries will result
312 * @fs_key_size: Size, in bytes, of the flow steering look-up key. Defining a
313 * key larger than this when composing the hash + FS key
314 * will result in an error.
315 * @wriop_version: Version of WRIOP HW block.
316 * The 3 version values are stored on 6, 5, 5 bits
319 * - 0x400 - WRIOP version 1.0.0, used on LS2080 and
321 * - 0x421 - WRIOP version 1.1.1, used on LS2088 and
323 * - 0x422 - WRIOP version 1.1.2, used on LS1088 and
325 * - 0xC00 - WRIOP version 3.0.0, used on LX2160 and
333 uint8_t mac_filter_entries;
334 uint8_t vlan_filter_entries;
337 uint8_t qos_key_size;
339 uint16_t wriop_version;
343 int dpni_get_attributes(struct fsl_mc_io *mc_io,
346 struct dpni_attr *attr);
353 * Discard error. When set all discarded frames in wriop will be enqueued to
354 * error queue. To be used in dpni_set_errors_behavior() only if error_action
355 * parameter is set to DPNI_ERROR_ACTION_SEND_TO_ERROR_QUEUE.
357 #define DPNI_ERROR_DISC 0x80000000
360 * Extract out of frame header error
362 #define DPNI_ERROR_EOFHE 0x00020000
366 #define DPNI_ERROR_FLE 0x00002000
368 * Frame physical error
370 #define DPNI_ERROR_FPE 0x00001000
372 * Parsing header error
374 #define DPNI_ERROR_PHE 0x00000020
376 * Parser L3 checksum error
378 #define DPNI_ERROR_L3CE 0x00000004
380 * Parser L3 checksum error
382 #define DPNI_ERROR_L4CE 0x00000001
385 * enum dpni_error_action - Defines DPNI behavior for errors
386 * @DPNI_ERROR_ACTION_DISCARD: Discard the frame
387 * @DPNI_ERROR_ACTION_CONTINUE: Continue with the normal flow
388 * @DPNI_ERROR_ACTION_SEND_TO_ERROR_QUEUE: Send the frame to the error queue
390 enum dpni_error_action {
391 DPNI_ERROR_ACTION_DISCARD = 0,
392 DPNI_ERROR_ACTION_CONTINUE = 1,
393 DPNI_ERROR_ACTION_SEND_TO_ERROR_QUEUE = 2
397 * struct dpni_error_cfg - Structure representing DPNI errors treatment
398 * @errors: Errors mask; use 'DPNI_ERROR__<X>
399 * @error_action: The desired action for the errors mask
400 * @set_frame_annotation: Set to '1' to mark the errors in frame
401 * annotation status (FAS); relevant only
402 * for the non-discard action
404 struct dpni_error_cfg {
406 enum dpni_error_action error_action;
407 int set_frame_annotation;
410 int dpni_set_errors_behavior(struct fsl_mc_io *mc_io,
413 struct dpni_error_cfg *cfg);
416 * DPNI buffer layout modification options
420 * Select to modify the time-stamp setting
422 #define DPNI_BUF_LAYOUT_OPT_TIMESTAMP 0x00000001
424 * Select to modify the parser-result setting; not applicable for Tx
426 #define DPNI_BUF_LAYOUT_OPT_PARSER_RESULT 0x00000002
428 * Select to modify the frame-status setting
430 #define DPNI_BUF_LAYOUT_OPT_FRAME_STATUS 0x00000004
432 * Select to modify the private-data-size setting
434 #define DPNI_BUF_LAYOUT_OPT_PRIVATE_DATA_SIZE 0x00000008
436 * Select to modify the data-alignment setting
438 #define DPNI_BUF_LAYOUT_OPT_DATA_ALIGN 0x00000010
440 * Select to modify the data-head-room setting
442 #define DPNI_BUF_LAYOUT_OPT_DATA_HEAD_ROOM 0x00000020
444 * Select to modify the data-tail-room setting
446 #define DPNI_BUF_LAYOUT_OPT_DATA_TAIL_ROOM 0x00000040
448 * Select to modify the sw-opaque value setting
450 #define DPNI_BUF_LAYOUT_OPT_SW_OPAQUE 0x00000080
453 * struct dpni_buffer_layout - Structure representing DPNI buffer layout
454 * @options: Flags representing the suggested modifications to the
456 * Use any combination of 'DPNI_BUF_LAYOUT_OPT_<X>' flags
457 * @pass_timestamp: Pass timestamp value
458 * @pass_parser_result: Pass parser results
459 * @pass_frame_status: Pass frame status
460 * @private_data_size: Size kept for private data (in bytes)
461 * @data_align: Data alignment
462 * @data_head_room: Data head room
463 * @data_tail_room: Data tail room
465 struct dpni_buffer_layout {
468 int pass_parser_result;
469 int pass_frame_status;
471 uint16_t private_data_size;
473 uint16_t data_head_room;
474 uint16_t data_tail_room;
478 * enum dpni_queue_type - Identifies a type of queue targeted by the command
479 * @DPNI_QUEUE_RX: Rx queue
480 * @DPNI_QUEUE_TX: Tx queue
481 * @DPNI_QUEUE_TX_CONFIRM: Tx confirmation queue
482 * @DPNI_QUEUE_RX_ERR: Rx error queue
484 enum dpni_queue_type {
487 DPNI_QUEUE_TX_CONFIRM,
491 int dpni_get_buffer_layout(struct fsl_mc_io *mc_io,
494 enum dpni_queue_type qtype,
495 struct dpni_buffer_layout *layout);
497 int dpni_set_buffer_layout(struct fsl_mc_io *mc_io,
500 enum dpni_queue_type qtype,
501 const struct dpni_buffer_layout *layout);
504 * enum dpni_offload - Identifies a type of offload targeted by the command
505 * @DPNI_OFF_RX_L3_CSUM: Rx L3 checksum validation
506 * @DPNI_OFF_RX_L4_CSUM: Rx L4 checksum validation
507 * @DPNI_OFF_TX_L3_CSUM: Tx L3 checksum generation
508 * @DPNI_OFF_TX_L4_CSUM: Tx L4 checksum generation
509 * @DPNI_OPT_FLCTYPE_HASH: flow context will be generated by WRIOP for AIOP or
520 int dpni_set_offload(struct fsl_mc_io *mc_io,
523 enum dpni_offload type,
526 int dpni_get_offload(struct fsl_mc_io *mc_io,
529 enum dpni_offload type,
532 int dpni_get_qdid(struct fsl_mc_io *mc_io,
535 enum dpni_queue_type qtype,
538 int dpni_get_tx_data_offset(struct fsl_mc_io *mc_io,
541 uint16_t *data_offset);
543 #define DPNI_STATISTICS_CNT 7
546 * union dpni_statistics - Union describing the DPNI statistics
547 * @page_0: Page_0 statistics structure
548 * @page_0.ingress_all_frames: Ingress frame count
549 * @page_0.ingress_all_bytes: Ingress byte count
550 * @page_0.ingress_multicast_frames: Ingress multicast frame count
551 * @page_0.ingress_multicast_bytes: Ingress multicast byte count
552 * @page_0.ingress_broadcast_frames: Ingress broadcast frame count
553 * @page_0.ingress_broadcast_bytes: Ingress broadcast byte count
554 * @page_1: Page_1 statistics structure
555 * @page_1.egress_all_frames: Egress frame count
556 * @page_1.egress_all_bytes: Egress byte count
557 * @page_1.egress_multicast_frames: Egress multicast frame count
558 * @page_1.egress_multicast_bytes: Egress multicast byte count
559 * @page_1.egress_broadcast_frames: Egress broadcast frame count
560 * @page_1.egress_broadcast_bytes: Egress broadcast byte count
561 * @page_2: Page_2 statistics structure
562 * @page_2.ingress_filtered_frames: Ingress filtered frame count
563 * @page_2.ingress_discarded_frames: Ingress discarded frame count
564 * @page_2.ingress_nobuffer_discards: Ingress discarded frame count due to
566 * @page_2.egress_discarded_frames: Egress discarded frame count
567 * @page_2.egress_confirmed_frames: Egress confirmed frame count
568 * @page_3: Page_3 statistics structure with values for the selected TC
569 * @page_3.ceetm_dequeue_bytes: Cumulative count of the number of bytes dequeued
570 * @page_3.ceetm_dequeue_frames: Cumulative count of the number of frames
572 * @page_3.ceetm_reject_bytes: Cumulative count of the number of bytes in all
573 * frames whose enqueue was rejected
574 * @page_3.ceetm_reject_frames: Cumulative count of all frame enqueues rejected
575 * @page_4: congestion point drops for seleted TC
576 * @page_4.cgr_reject_frames: number of rejected frames due to congestion point
577 * @page_4.cgr_reject_bytes: number of rejected bytes due to congestion point
578 * @page_5: policer statistics per TC
579 * @page_5.policer_cnt_red: NUmber of red colored frames
580 * @page_5.policer_cnt_yellow: number of yellow colored frames
581 * @page_5.policer_cnt_green: number of green colored frames
582 * @page_5.policer_cnt_re_red: number of recolored red frames
583 * @page_5.policer_cnt_re_yellow: number of recolored yellow frames
584 * @raw: raw statistics structure, used to index counters
586 union dpni_statistics {
588 uint64_t ingress_all_frames;
589 uint64_t ingress_all_bytes;
590 uint64_t ingress_multicast_frames;
591 uint64_t ingress_multicast_bytes;
592 uint64_t ingress_broadcast_frames;
593 uint64_t ingress_broadcast_bytes;
596 uint64_t egress_all_frames;
597 uint64_t egress_all_bytes;
598 uint64_t egress_multicast_frames;
599 uint64_t egress_multicast_bytes;
600 uint64_t egress_broadcast_frames;
601 uint64_t egress_broadcast_bytes;
604 uint64_t ingress_filtered_frames;
605 uint64_t ingress_discarded_frames;
606 uint64_t ingress_nobuffer_discards;
607 uint64_t egress_discarded_frames;
608 uint64_t egress_confirmed_frames;
611 uint64_t ceetm_dequeue_bytes;
612 uint64_t ceetm_dequeue_frames;
613 uint64_t ceetm_reject_bytes;
614 uint64_t ceetm_reject_frames;
617 uint64_t cgr_reject_frames;
618 uint64_t cgr_reject_bytes;
621 uint64_t policer_cnt_red;
622 uint64_t policer_cnt_yellow;
623 uint64_t policer_cnt_green;
624 uint64_t policer_cnt_re_red;
625 uint64_t policer_cnt_re_yellow;
628 uint64_t counter[DPNI_STATISTICS_CNT];
633 * Enable auto-negotiation
635 #define DPNI_LINK_OPT_AUTONEG 0x0000000000000001ULL
637 * Enable half-duplex mode
639 #define DPNI_LINK_OPT_HALF_DUPLEX 0x0000000000000002ULL
641 * Enable pause frames
643 #define DPNI_LINK_OPT_PAUSE 0x0000000000000004ULL
645 * Enable a-symmetric pause frames
647 #define DPNI_LINK_OPT_ASYM_PAUSE 0x0000000000000008ULL
649 * Enable priority flow control pause frames
651 #define DPNI_LINK_OPT_PFC_PAUSE 0x0000000000000010ULL
654 * Advertise 10MB full duplex
656 #define DPNI_ADVERTISED_10BASET_FULL 0x0000000000000001ULL
658 * Advertise 100MB full duplex
660 #define DPNI_ADVERTISED_100BASET_FULL 0x0000000000000002ULL
662 * Advertise 1GB full duplex
664 #define DPNI_ADVERTISED_1000BASET_FULL 0x0000000000000004ULL
666 * Advertise auto-negotiation enable
668 #define DPNI_ADVERTISED_AUTONEG 0x0000000000000008ULL
670 * Advertise 10GB full duplex
672 #define DPNI_ADVERTISED_10000BASET_FULL 0x0000000000000010ULL
674 * Advertise 2.5GB full duplex
676 #define DPNI_ADVERTISED_2500BASEX_FULL 0x0000000000000020ULL
678 * Advertise 5GB full duplex
680 #define DPNI_ADVERTISED_5000BASET_FULL 0x0000000000000040ULL
684 * struct - Structure representing DPNI link configuration
686 * @options: Mask of available options; use 'DPNI_LINK_OPT_<X>' values
687 * @advertising: Speeds that are advertised for autoneg (bitmap)
689 struct dpni_link_cfg {
692 uint64_t advertising;
695 int dpni_set_link_cfg(struct fsl_mc_io *mc_io,
698 const struct dpni_link_cfg *cfg);
701 * struct dpni_link_state - Structure representing DPNI link state
703 * @options: Mask of available options; use 'DPNI_LINK_OPT_<X>' values
704 * @up: Link state; '0' for down, '1' for up
705 * @state_valid: Ignore/Update the state of the link
706 * @supported: Speeds capability of the phy (bitmap)
707 * @advertising: Speeds that are advertised for autoneg (bitmap)
709 struct dpni_link_state {
715 uint64_t advertising;
718 int dpni_get_link_state(struct fsl_mc_io *mc_io,
721 struct dpni_link_state *state);
723 int dpni_set_max_frame_length(struct fsl_mc_io *mc_io,
726 uint16_t max_frame_length);
728 int dpni_get_max_frame_length(struct fsl_mc_io *mc_io,
731 uint16_t *max_frame_length);
733 int dpni_set_mtu(struct fsl_mc_io *mc_io,
738 int dpni_get_mtu(struct fsl_mc_io *mc_io,
743 int dpni_set_multicast_promisc(struct fsl_mc_io *mc_io,
748 int dpni_get_multicast_promisc(struct fsl_mc_io *mc_io,
753 int dpni_set_unicast_promisc(struct fsl_mc_io *mc_io,
758 int dpni_get_unicast_promisc(struct fsl_mc_io *mc_io,
763 int dpni_set_primary_mac_addr(struct fsl_mc_io *mc_io,
766 const uint8_t mac_addr[6]);
768 int dpni_get_primary_mac_addr(struct fsl_mc_io *mc_io,
771 uint8_t mac_addr[6]);
773 int dpni_add_mac_addr(struct fsl_mc_io *mc_io,
776 const uint8_t mac_addr[6]);
778 int dpni_remove_mac_addr(struct fsl_mc_io *mc_io,
781 const uint8_t mac_addr[6]);
783 int dpni_clear_mac_filters(struct fsl_mc_io *mc_io,
789 int dpni_get_port_mac_addr(struct fsl_mc_io *mc_io,
792 uint8_t mac_addr[6]);
794 int dpni_enable_vlan_filter(struct fsl_mc_io *mc_io,
799 int dpni_add_vlan_id(struct fsl_mc_io *mc_io,
804 int dpni_remove_vlan_id(struct fsl_mc_io *mc_io,
809 int dpni_clear_vlan_filters(struct fsl_mc_io *mc_io,
814 * enum dpni_dist_mode - DPNI distribution mode
815 * @DPNI_DIST_MODE_NONE: No distribution
816 * @DPNI_DIST_MODE_HASH: Use hash distribution; only relevant if
817 * the 'DPNI_OPT_DIST_HASH' option was set at DPNI creation
818 * @DPNI_DIST_MODE_FS: Use explicit flow steering; only relevant if
819 * the 'DPNI_OPT_DIST_FS' option was set at DPNI creation
821 enum dpni_dist_mode {
822 DPNI_DIST_MODE_NONE = 0,
823 DPNI_DIST_MODE_HASH = 1,
824 DPNI_DIST_MODE_FS = 2
828 * enum dpni_fs_miss_action - DPNI Flow Steering miss action
829 * @DPNI_FS_MISS_DROP: In case of no-match, drop the frame
830 * @DPNI_FS_MISS_EXPLICIT_FLOWID: In case of no-match, use explicit flow-id
831 * @DPNI_FS_MISS_HASH: In case of no-match, distribute using hash
833 enum dpni_fs_miss_action {
834 DPNI_FS_MISS_DROP = 0,
835 DPNI_FS_MISS_EXPLICIT_FLOWID = 1,
836 DPNI_FS_MISS_HASH = 2
840 * struct dpni_fs_tbl_cfg - Flow Steering table configuration
841 * @miss_action: Miss action selection
842 * @default_flow_id: Used when 'miss_action = DPNI_FS_MISS_EXPLICIT_FLOWID'
843 * @keep_hash_key: used only when miss_action is set to DPNI_FS_MISS_HASH. When
844 * set to one unclassified frames will be distributed according to previous
845 * used hash key. If set to zero hash key will be replaced with the key
846 * provided for flow steering.
847 * @keep_entries: if set to one command will not delete the entries that already
848 * exist into FS table. Use this option with caution: if the table
849 * entries are not compatible with the distribution key the packets
850 * will not be classified properly.
852 struct dpni_fs_tbl_cfg {
853 enum dpni_fs_miss_action miss_action;
854 uint16_t default_flow_id;
856 uint8_t keep_entries;
860 * struct dpni_rx_tc_dist_cfg - Rx traffic class distribution configuration
861 * @dist_size: Set the distribution size;
862 * supported values: 1,2,3,4,6,7,8,12,14,16,24,28,32,48,56,64,96,
863 * 112,128,192,224,256,384,448,512,768,896,1024
864 * @dist_mode: Distribution mode
865 * @key_cfg_iova: I/O virtual address of 256 bytes DMA-able memory filled with
866 * the extractions to be used for the distribution key by calling
867 * dpkg_prepare_key_cfg() relevant only when
868 * 'dist_mode != DPNI_DIST_MODE_NONE', otherwise it can be '0'
869 * @fs_cfg: Flow Steering table configuration; only relevant if
870 * 'dist_mode = DPNI_DIST_MODE_FS'
872 struct dpni_rx_tc_dist_cfg {
874 enum dpni_dist_mode dist_mode;
875 uint64_t key_cfg_iova;
876 struct dpni_fs_tbl_cfg fs_cfg;
879 int dpni_set_rx_tc_dist(struct fsl_mc_io *mc_io,
883 const struct dpni_rx_tc_dist_cfg *cfg);
886 * enum dpni_congestion_unit - DPNI congestion units
887 * @DPNI_CONGESTION_UNIT_BYTES: bytes units
888 * @DPNI_CONGESTION_UNIT_FRAMES: frames units
890 enum dpni_congestion_unit {
891 DPNI_CONGESTION_UNIT_BYTES = 0,
892 DPNI_CONGESTION_UNIT_FRAMES
896 * enum dpni_dest - DPNI destination types
897 * @DPNI_DEST_NONE: Unassigned destination; The queue is set in parked mode and
898 * does not generate FQDAN notifications; user is expected to
899 * dequeue from the queue based on polling or other user-defined
901 * @DPNI_DEST_DPIO: The queue is set in schedule mode and generates FQDAN
902 * notifications to the specified DPIO; user is expected to dequeue
903 * from the queue only after notification is received
904 * @DPNI_DEST_DPCON: The queue is set in schedule mode and does not generate
905 * FQDAN notifications, but is connected to the specified DPCON
906 * object; user is expected to dequeue from the DPCON channel
915 * struct dpni_dest_cfg - Structure representing DPNI destination parameters
916 * @dest_type: Destination type
917 * @dest_id: Either DPIO ID or DPCON ID, depending on the destination type
918 * @priority: Priority selection within the DPIO or DPCON channel; valid values
919 * are 0-1 or 0-7, depending on the number of priorities in that
920 * channel; not relevant for 'DPNI_DEST_NONE' option
922 struct dpni_dest_cfg {
923 enum dpni_dest dest_type;
928 /* DPNI congestion options */
931 * CSCN message is written to message_iova once entering a
932 * congestion state (see 'threshold_entry')
934 #define DPNI_CONG_OPT_WRITE_MEM_ON_ENTER 0x00000001
936 * CSCN message is written to message_iova once exiting a
937 * congestion state (see 'threshold_exit')
939 #define DPNI_CONG_OPT_WRITE_MEM_ON_EXIT 0x00000002
941 * CSCN write will attempt to allocate into a cache (coherent write);
942 * valid only if 'DPNI_CONG_OPT_WRITE_MEM_<X>' is selected
944 #define DPNI_CONG_OPT_COHERENT_WRITE 0x00000004
946 * if 'dest_cfg.dest_type != DPNI_DEST_NONE' CSCN message is sent to
947 * DPIO/DPCON's WQ channel once entering a congestion state
948 * (see 'threshold_entry')
950 #define DPNI_CONG_OPT_NOTIFY_DEST_ON_ENTER 0x00000008
952 * if 'dest_cfg.dest_type != DPNI_DEST_NONE' CSCN message is sent to
953 * DPIO/DPCON's WQ channel once exiting a congestion state
954 * (see 'threshold_exit')
956 #define DPNI_CONG_OPT_NOTIFY_DEST_ON_EXIT 0x00000010
958 * if 'dest_cfg.dest_type != DPNI_DEST_NONE' when the CSCN is written to the
959 * sw-portal's DQRR, the DQRI interrupt is asserted immediately (if enabled)
961 #define DPNI_CONG_OPT_INTR_COALESCING_DISABLED 0x00000020
963 * This congestion will trigger flow control or priority flow control. This
964 * will have effect only if flow control is enabled with dpni_set_link_cfg()
966 #define DPNI_CONG_OPT_FLOW_CONTROL 0x00000040
969 * enum dpni_congestion_point - Structure representing congestion point
970 * @DPNI_CP_QUEUE: Set congestion per queue, identified by QUEUE_TYPE, TC
972 * @DPNI_CP_GROUP: Set congestion per queue group. Depending on options
973 * used to define the DPNI this can be either per
974 * TC (default) or per interface
975 * (DPNI_OPT_SHARED_CONGESTION set at DPNI create).
976 * QUEUE_INDEX is ignored if this type is used.
977 * @DPNI_CP_CONGESTION_GROUP: Set per congestion group id. This will work
978 * only if the DPNI is created with DPNI_OPT_CUSTOM_CG option
981 enum dpni_congestion_point {
984 DPNI_CP_CONGESTION_GROUP,
988 * struct dpni_congestion_notification_cfg - congestion notification
991 * @threshold_entry: above this threshold we enter a congestion state.
992 * set it to '0' to disable it
993 * @threshold_exit: below this threshold we exit the congestion state.
994 * @message_ctx: The context that will be part of the CSCN message
995 * @message_iova: I/O virtual address (must be in DMA-able memory),
996 * must be 16B aligned; valid only if 'DPNI_CONG_OPT_WRITE_MEM_<X>' is
997 * contained in 'options'
998 * @dest_cfg: CSCN can be send to either DPIO or DPCON WQ channel
999 * @notification_mode: Mask of available options; use 'DPNI_CONG_OPT_<X>' values
1000 * @cg_point: Congestion point settings
1001 * @cgid: id of the congestion group. The index is relative to dpni.
1004 struct dpni_congestion_notification_cfg {
1005 enum dpni_congestion_unit units;
1006 uint32_t threshold_entry;
1007 uint32_t threshold_exit;
1008 uint64_t message_ctx;
1009 uint64_t message_iova;
1010 struct dpni_dest_cfg dest_cfg;
1011 uint16_t notification_mode;
1012 enum dpni_congestion_point cg_point;
1016 int dpni_set_congestion_notification(struct fsl_mc_io *mc_io,
1019 enum dpni_queue_type qtype,
1021 const struct dpni_congestion_notification_cfg *cfg);
1023 int dpni_get_congestion_notification(struct fsl_mc_io *mc_io,
1026 enum dpni_queue_type qtype,
1028 struct dpni_congestion_notification_cfg *cfg);
1030 /* DPNI FLC stash options */
1033 * stashes the whole annotation area (up to 192 bytes)
1035 #define DPNI_FLC_STASH_FRAME_ANNOTATION 0x00000001
1038 * struct dpni_queue - Queue structure
1039 * @destination - Destination structure
1040 * @destination.id: ID of the destination, only relevant if DEST_TYPE is > 0.
1041 * Identifies either a DPIO or a DPCON object.
1042 * Not relevant for Tx queues.
1043 * @destination.type: May be one of the following:
1044 * 0 - No destination, queue can be manually
1045 * queried, but will not push traffic or
1046 * notifications to a DPIO;
1047 * 1 - The destination is a DPIO. When traffic
1048 * becomes available in the queue a FQDAN
1049 * (FQ data available notification) will be
1050 * generated to selected DPIO;
1051 * 2 - The destination is a DPCON. The queue is
1052 * associated with a DPCON object for the
1053 * purpose of scheduling between multiple
1054 * queues. The DPCON may be independently
1055 * configured to generate notifications.
1056 * Not relevant for Tx queues.
1057 * @destination.hold_active: Hold active, maintains a queue scheduled for longer
1058 * in a DPIO during dequeue to reduce spread of traffic.
1059 * Only relevant if queues are
1060 * not affined to a single DPIO.
1061 * @user_context: User data, presented to the user along with any frames
1062 * from this queue. Not relevant for Tx queues.
1063 * @flc: FD FLow Context structure
1064 * @flc.value: Default FLC value for traffic dequeued from
1065 * this queue. Please check description of FD
1066 * structure for more information.
1067 * Note that FLC values set using dpni_add_fs_entry,
1068 * if any, take precedence over values per queue.
1069 * @flc.stash_control: Boolean, indicates whether the 6 lowest
1070 * - significant bits are used for stash control.
1071 * significant bits are used for stash control. If set, the 6
1072 * least significant bits in value are interpreted as follows:
1073 * - bits 0-1: indicates the number of 64 byte units of context
1074 * that are stashed. FLC value is interpreted as a memory address
1075 * in this case, excluding the 6 LS bits.
1076 * - bits 2-3: indicates the number of 64 byte units of frame
1077 * annotation to be stashed. Annotation is placed at FD[ADDR].
1078 * - bits 4-5: indicates the number of 64 byte units of frame
1079 * data to be stashed. Frame data is placed at FD[ADDR] +
1081 * For more details check the Frame Descriptor section in the
1082 * hardware documentation.
1083 *@cgid :indicate the cgid to set relative to dpni
1088 enum dpni_dest type;
1092 uint64_t user_context;
1101 * struct dpni_queue_id - Queue identification, used for enqueue commands
1103 * @fqid: FQID used for enqueueing to and/or configuration of this
1105 * @qdbin: Queueing bin, used to enqueue using QDID, DQBIN, QPRI.
1106 * Only relevant for Tx queues.
1108 struct dpni_queue_id {
1114 * enum dpni_confirmation_mode - Defines DPNI options supported for Tx
1116 * @DPNI_CONF_AFFINE: For each Tx queue set associated with a sender there is
1117 * an affine Tx Confirmation queue
1118 * @DPNI_CONF_SINGLE: All Tx queues are associated with a single Tx
1119 * confirmation queue
1120 * @DPNI_CONF_DISABLE: Tx frames are not confirmed. This must be associated
1121 * with proper FD set-up to have buffers release to a Buffer Pool, otherwise
1122 * buffers will be leaked
1124 enum dpni_confirmation_mode {
1130 int dpni_set_tx_confirmation_mode(struct fsl_mc_io *mc_io,
1133 enum dpni_confirmation_mode mode);
1135 int dpni_get_tx_confirmation_mode(struct fsl_mc_io *mc_io,
1138 enum dpni_confirmation_mode *mode);
1141 * struct dpni_qos_tbl_cfg - Structure representing QOS table configuration
1142 * @key_cfg_iova: I/O virtual address of 256 bytes DMA-able memory filled with
1143 * key extractions to be used as the QoS criteria by calling
1144 * dpkg_prepare_key_cfg()
1145 * @discard_on_miss: Set to '1' to discard frames in case of no match (miss);
1146 * '0' to use the 'default_tc' in such cases
1147 * @keep_entries: if set to one will not delele existing table entries. This
1148 * option will work properly only for dpni objects created with
1149 * DPNI_OPT_HAS_KEY_MASKING option. All previous QoS entries must
1150 * be compatible with new key composition rule.
1151 * It is the caller's job to delete incompatible entries before
1152 * executing this function.
1153 * @default_tc: Used in case of no-match and 'discard_on_miss'= 0
1155 struct dpni_qos_tbl_cfg {
1156 uint64_t key_cfg_iova;
1157 int discard_on_miss;
1162 int dpni_set_qos_table(struct fsl_mc_io *mc_io,
1165 const struct dpni_qos_tbl_cfg *cfg);
1168 * struct dpni_rule_cfg - Rule configuration for table lookup
1169 * @key_iova: I/O virtual address of the key (must be in DMA-able memory)
1170 * @mask_iova: I/O virtual address of the mask (must be in DMA-able memory)
1171 * @key_size: key and mask size (in bytes)
1173 struct dpni_rule_cfg {
1179 int dpni_add_qos_entry(struct fsl_mc_io *mc_io,
1182 const struct dpni_rule_cfg *cfg,
1186 int dpni_remove_qos_entry(struct fsl_mc_io *mc_io,
1189 const struct dpni_rule_cfg *cfg);
1191 int dpni_clear_qos_table(struct fsl_mc_io *mc_io,
1196 * Discard matching traffic. If set, this takes precedence over any other
1197 * configuration and matching traffic is always discarded.
1199 #define DPNI_FS_OPT_DISCARD 0x1
1202 * Set FLC value. If set, flc member of truct dpni_fs_action_cfg is used to
1203 * override the FLC value set per queue.
1204 * For more details check the Frame Descriptor section in the hardware
1207 #define DPNI_FS_OPT_SET_FLC 0x2
1210 * Indicates whether the 6 lowest significant bits of FLC are used for stash
1211 * control. If set, the 6 least significant bits in value are interpreted as
1213 * - bits 0-1: indicates the number of 64 byte units of context that are
1214 * stashed. FLC value is interpreted as a memory address in this case,
1215 * excluding the 6 LS bits.
1216 * - bits 2-3: indicates the number of 64 byte units of frame annotation
1217 * to be stashed. Annotation is placed at FD[ADDR].
1218 * - bits 4-5: indicates the number of 64 byte units of frame data to be
1219 * stashed. Frame data is placed at FD[ADDR] + FD[OFFSET].
1220 * This flag is ignored if DPNI_FS_OPT_SET_FLC is not specified.
1222 #define DPNI_FS_OPT_SET_STASH_CONTROL 0x4
1225 * struct dpni_fs_action_cfg - Action configuration for table look-up
1226 * @flc: FLC value for traffic matching this rule. Please check the Frame
1227 * Descriptor section in the hardware documentation for more information.
1228 * @flow_id: Identifies the Rx queue used for matching traffic. Supported
1229 * values are in range 0 to num_queue-1.
1230 * @options: Any combination of DPNI_FS_OPT_ values.
1232 struct dpni_fs_action_cfg {
1238 int dpni_add_fs_entry(struct fsl_mc_io *mc_io,
1243 const struct dpni_rule_cfg *cfg,
1244 const struct dpni_fs_action_cfg *action);
1246 int dpni_remove_fs_entry(struct fsl_mc_io *mc_io,
1250 const struct dpni_rule_cfg *cfg);
1252 int dpni_clear_fs_entries(struct fsl_mc_io *mc_io,
1257 int dpni_get_api_version(struct fsl_mc_io *mc_io,
1259 uint16_t *major_ver,
1260 uint16_t *minor_ver);
1265 #define DPNI_QUEUE_OPT_USER_CTX 0x00000001
1268 * Set queue destination configuration
1270 #define DPNI_QUEUE_OPT_DEST 0x00000002
1273 * Set FD[FLC] configuration for traffic on this queue. Note that FLC values
1274 * set with dpni_add_fs_entry, if any, take precedence over values per queue.
1276 #define DPNI_QUEUE_OPT_FLC 0x00000004
1279 * Set the queue to hold active mode. This prevents the queue from being
1280 * rescheduled between DPIOs while it carries traffic and is active on one
1281 * DPNI. Can help reduce reordering when servicing one queue on multiple
1282 * CPUs, but the queue is also less likely to push data to multiple CPUs
1283 * especially when congested.
1285 #define DPNI_QUEUE_OPT_HOLD_ACTIVE 0x00000008
1287 #define DPNI_QUEUE_OPT_SET_CGID 0x00000040
1288 #define DPNI_QUEUE_OPT_CLEAR_CGID 0x00000080
1290 int dpni_set_queue(struct fsl_mc_io *mc_io,
1293 enum dpni_queue_type qtype,
1297 const struct dpni_queue *queue);
1299 int dpni_get_queue(struct fsl_mc_io *mc_io,
1302 enum dpni_queue_type qtype,
1305 struct dpni_queue *queue,
1306 struct dpni_queue_id *qid);
1308 int dpni_get_statistics(struct fsl_mc_io *mc_io,
1313 union dpni_statistics *stat);
1315 int dpni_reset_statistics(struct fsl_mc_io *mc_io,
1320 * struct dpni_taildrop - Structure representing the taildrop
1321 * @enable: Indicates whether the taildrop is active or not.
1322 * @units: Indicates the unit of THRESHOLD. Queue taildrop only
1323 * supports byte units, this field is ignored and
1324 * assumed = 0 if CONGESTION_POINT is 0.
1325 * @threshold: Threshold value, in units identified by UNITS field. Value 0
1326 * cannot be used as a valid taildrop threshold,
1327 * THRESHOLD must be > 0 if the taildrop is
1329 * @oal : Overhead Accounting Length, a 12-bit, 2's complement value
1330 * with range (-2048 to +2047) representing a fixed per-frame
1331 * overhead to be added to the actual length of a frame when
1332 * performing WRED and tail drop calculations and threshold
1335 struct dpni_taildrop {
1337 enum dpni_congestion_unit units;
1342 int dpni_set_taildrop(struct fsl_mc_io *mc_io,
1345 enum dpni_congestion_point cg_point,
1346 enum dpni_queue_type q_type,
1349 struct dpni_taildrop *taildrop);
1351 int dpni_get_taildrop(struct fsl_mc_io *mc_io,
1354 enum dpni_congestion_point cg_point,
1355 enum dpni_queue_type q_type,
1358 struct dpni_taildrop *taildrop);
1360 int dpni_set_opr(struct fsl_mc_io *mc_io,
1366 struct opr_cfg *cfg);
1368 int dpni_get_opr(struct fsl_mc_io *mc_io,
1373 struct opr_cfg *cfg,
1374 struct opr_qry *qry);
1377 * When used for queue_idx in function dpni_set_rx_dist_default_queue will
1378 * signal to dpni to drop all unclassified frames
1380 #define DPNI_FS_MISS_DROP ((uint16_t)-1)
1383 * struct dpni_rx_dist_cfg - distribution configuration
1384 * @dist_size: distribution size; supported values: 1,2,3,4,6,7,8,
1385 * 12,14,16,24,28,32,48,56,64,96,112,128,192,224,256,384,448,
1387 * @key_cfg_iova: I/O virtual address of 256 bytes DMA-able memory filled with
1388 * the extractions to be used for the distribution key by calling
1389 * dpkg_prepare_key_cfg() relevant only when enable!=0 otherwise
1391 * @enable: enable/disable the distribution.
1392 * @tc: TC id for which distribution is set
1393 * @fs_miss_flow_id: when packet misses all rules from flow steering table and
1394 * hash is disabled it will be put into this queue id; use
1395 * DPNI_FS_MISS_DROP to drop frames. The value of this field is
1396 * used only when flow steering distribution is enabled and hash
1397 * distribution is disabled
1399 struct dpni_rx_dist_cfg {
1401 uint64_t key_cfg_iova;
1404 uint16_t fs_miss_flow_id;
1407 int dpni_set_rx_fs_dist(struct fsl_mc_io *mc_io, uint32_t cmd_flags,
1408 uint16_t token, const struct dpni_rx_dist_cfg *cfg);
1410 int dpni_set_rx_hash_dist(struct fsl_mc_io *mc_io, uint32_t cmd_flags,
1411 uint16_t token, const struct dpni_rx_dist_cfg *cfg);
1413 int dpni_add_custom_tpid(struct fsl_mc_io *mc_io, uint32_t cmd_flags,
1414 uint16_t token, uint16_t tpid);
1416 int dpni_remove_custom_tpid(struct fsl_mc_io *mc_io, uint32_t cmd_flags,
1417 uint16_t token, uint16_t tpid);
1420 * struct dpni_custom_tpid_cfg - custom TPID configuration. Contains custom TPID
1421 * values used in current dpni object to detect 802.1q frames.
1422 * @tpid1: first tag. Not used if zero.
1423 * @tpid2: second tag. Not used if zero.
1425 struct dpni_custom_tpid_cfg {
1430 int dpni_get_custom_tpid(struct fsl_mc_io *mc_io, uint32_t cmd_flags,
1431 uint16_t token, struct dpni_custom_tpid_cfg *tpid);
1434 * enum dpni_soft_sequence_dest - Enumeration of WRIOP software sequence
1436 * @DPNI_SS_INGRESS: Ingress parser
1437 * @DPNI_SS_EGRESS: Egress parser
1439 enum dpni_soft_sequence_dest {
1440 DPNI_SS_INGRESS = 0,
1445 * struct dpni_load_ss_cfg - Structure for Software Sequence load configuration
1446 * @dest: Destination of the Software Sequence: ingress or egress parser
1447 * @ss_size: Size of the Software Sequence
1448 * @ss_offset: The offset where to load the Software Sequence (0x20-0x7FD)
1449 * @ss_iova: I/O virtual address of the Software Sequence
1451 struct dpni_load_ss_cfg {
1452 enum dpni_soft_sequence_dest dest;
1459 * struct dpni_enable_ss_cfg - Structure for software sequence enable
1461 * @dest: Destination of the Software Sequence: ingress or egress parser
1462 * @hxs: HXS to attach the software sequence to
1463 * @set_start: If the Software Sequence or HDR it is attached to is set as
1465 * If hxs=DUMMY_LAST_HXS the ss_offset is set directly as parser
1466 * start else the hdr index code is set as parser start
1467 * @ss_offset: The offset of the Software Sequence to enable or set as parse
1469 * @param_size: Size of the software sequence parameters
1470 * @param_offset: Offset in the parameter zone for the software sequence
1472 * @param_iova: I/O virtual address of the parameters
1474 struct dpni_enable_ss_cfg {
1475 enum dpni_soft_sequence_dest dest;
1480 uint8_t param_offset;
1481 uint64_t param_iova;
1485 * dpni_load_sw_sequence() - Loads a software sequence in parser memory.
1486 * @mc_io: Pointer to MC portal's I/O object
1487 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
1488 * @token: Token of DPNI object
1489 * @cfg: Software sequence load configuration
1490 * Return: '0' on Success; Error code otherwise.
1492 int dpni_load_sw_sequence(struct fsl_mc_io *mc_io,
1495 struct dpni_load_ss_cfg *cfg);
1498 * dpni_eanble_sw_sequence() - Enables a software sequence in the parser
1500 * corresponding to the ingress or egress of the DPNI.
1501 * @mc_io: Pointer to MC portal's I/O object
1502 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
1503 * @token: Token of DPNI object
1504 * @cfg: Software sequence enable configuration
1505 * Return: '0' on Success; Error code otherwise.
1507 int dpni_enable_sw_sequence(struct fsl_mc_io *mc_io,
1510 struct dpni_enable_ss_cfg *cfg);
1513 * struct dpni_sw_sequence_layout - Structure for software sequence enable
1515 * @num_ss: Number of software sequences returned
1516 * @ss: Array of software sequence entries. The number of valid entries
1517 * must match 'num_ss' value
1519 struct dpni_sw_sequence_layout {
1524 uint8_t param_offset;
1526 } ss[DPNI_SW_SEQUENCE_LAYOUT_SIZE];
1530 * dpni_get_sw_sequence_layout() - Get the soft sequence layout
1531 * @mc_io: Pointer to MC portal's I/O object
1532 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
1533 * @token: Token of DPNI object
1534 * @src: Source of the layout (WRIOP Rx or Tx)
1535 * @ss_layout_iova: I/O virtual address of 264 bytes DMA-able memory
1537 * warning: After calling this function, call dpni_extract_sw_sequence_layout()
1540 * Return: '0' on Success; error code otherwise.
1542 int dpni_get_sw_sequence_layout(struct fsl_mc_io *mc_io,
1545 enum dpni_soft_sequence_dest src,
1546 uint64_t ss_layout_iova);
1549 * dpni_extract_sw_sequence_layout() - extract the software sequence layout
1550 * @layout: software sequence layout
1551 * @sw_sequence_layout_buf: Zeroed 264 bytes of memory before mapping it
1554 * This function has to be called after dpni_get_sw_sequence_layout
1557 void dpni_extract_sw_sequence_layout(struct dpni_sw_sequence_layout *layout,
1558 const uint8_t *sw_sequence_layout_buf);
1560 #endif /* __FSL_DPNI_H */