Lines Matching +full:tcs +full:- +full:offset
1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright 2013-2016 Freescale Semiconductor, Inc.
46 /* cmd, param, offset, width, type, arg_name */
50 /* cmd, param, offset, width, type, arg_name */
53 MC_PREP_OP(param, 0, 0, 32, uint16_t, cfg->adv.options); \
54 MC_PREP_OP(param, 0, 32, 8, uint16_t, cfg->adv.num_queues); \
55 MC_PREP_OP(param, 0, 40, 8, uint16_t, cfg->adv.num_tcs); \
56 MC_PREP_OP(param, 0, 48, 8, uint16_t, cfg->adv.mac_entries); \
57 MC_PREP_OP(param, 1, 0, 8, uint16_t, cfg->adv.vlan_entries); \
58 MC_PREP_OP(param, 1, 16, 8, uint16_t, cfg->adv.qos_entries); \
59 MC_PREP_OP(param, 1, 32, 16, uint16_t, cfg->adv.fs_entries); \
62 /* cmd, param, offset, width, type, arg_name */
65 MC_EXT_OP(param, 0, 0, 32, uint16_t, cfg->adv.options); \
66 MC_EXT_OP(param, 0, 32, 8, uint16_t, cfg->adv.num_queues); \
67 MC_EXT_OP(param, 0, 40, 8, uint16_t, cfg->adv.num_tcs); \
68 MC_EXT_OP(param, 0, 48, 8, uint16_t, cfg->adv.mac_entries); \
69 MC_EXT_OP(param, 1, 0, 8, uint16_t, cfg->adv.vlan_entries); \
70 MC_EXT_OP(param, 1, 16, 8, uint16_t, cfg->adv.qos_entries); \
71 MC_EXT_OP(param, 1, 32, 16, uint16_t, cfg->adv.fs_entries); \
74 /* cmd, param, offset, width, type, arg_name */
77 MC_CMD_OP(cmd, 0, 0, 32, uint32_t, cfg->adv.options); \
78 MC_CMD_OP(cmd, 0, 32, 8, uint8_t, cfg->adv.num_queues); \
79 MC_CMD_OP(cmd, 0, 40, 8, uint8_t, cfg->adv.num_tcs); \
80 MC_CMD_OP(cmd, 0, 48, 8, uint8_t, cfg->adv.mac_entries); \
81 MC_CMD_OP(cmd, 1, 0, 8, uint8_t, cfg->adv.vlan_entries); \
82 MC_CMD_OP(cmd, 1, 16, 8, uint8_t, cfg->adv.qos_entries); \
83 MC_CMD_OP(cmd, 1, 32, 16, uint8_t, cfg->adv.fs_entries); \
86 /* cmd, param, offset, width, type, arg_name */
89 MC_CMD_OP(cmd, 0, 0, 8, uint8_t, cfg->num_dpbp); \
90 MC_CMD_OP(cmd, 0, 8, 1, int, cfg->pools[0].backup_pool); \
91 MC_CMD_OP(cmd, 0, 9, 1, int, cfg->pools[1].backup_pool); \
92 MC_CMD_OP(cmd, 0, 10, 1, int, cfg->pools[2].backup_pool); \
93 MC_CMD_OP(cmd, 0, 11, 1, int, cfg->pools[3].backup_pool); \
94 MC_CMD_OP(cmd, 0, 12, 1, int, cfg->pools[4].backup_pool); \
95 MC_CMD_OP(cmd, 0, 13, 1, int, cfg->pools[5].backup_pool); \
96 MC_CMD_OP(cmd, 0, 14, 1, int, cfg->pools[6].backup_pool); \
97 MC_CMD_OP(cmd, 0, 15, 1, int, cfg->pools[7].backup_pool); \
98 MC_CMD_OP(cmd, 0, 32, 32, int, cfg->pools[0].dpbp_id); \
99 MC_CMD_OP(cmd, 4, 32, 16, uint16_t, cfg->pools[0].buffer_size);\
100 MC_CMD_OP(cmd, 1, 0, 32, int, cfg->pools[1].dpbp_id); \
101 MC_CMD_OP(cmd, 4, 48, 16, uint16_t, cfg->pools[1].buffer_size);\
102 MC_CMD_OP(cmd, 1, 32, 32, int, cfg->pools[2].dpbp_id); \
103 MC_CMD_OP(cmd, 5, 0, 16, uint16_t, cfg->pools[2].buffer_size);\
104 MC_CMD_OP(cmd, 2, 0, 32, int, cfg->pools[3].dpbp_id); \
105 MC_CMD_OP(cmd, 5, 16, 16, uint16_t, cfg->pools[3].buffer_size);\
106 MC_CMD_OP(cmd, 2, 32, 32, int, cfg->pools[4].dpbp_id); \
107 MC_CMD_OP(cmd, 5, 32, 16, uint16_t, cfg->pools[4].buffer_size);\
108 MC_CMD_OP(cmd, 3, 0, 32, int, cfg->pools[5].dpbp_id); \
109 MC_CMD_OP(cmd, 5, 48, 16, uint16_t, cfg->pools[5].buffer_size);\
110 MC_CMD_OP(cmd, 3, 32, 32, int, cfg->pools[6].dpbp_id); \
111 MC_CMD_OP(cmd, 6, 0, 16, uint16_t, cfg->pools[6].buffer_size);\
112 MC_CMD_OP(cmd, 4, 0, 32, int, cfg->pools[7].dpbp_id); \
113 MC_CMD_OP(cmd, 6, 16, 16, uint16_t, cfg->pools[7].buffer_size);\
116 /* cmd, param, offset, width, type, arg_name */
119 MC_RSP_OP(cmd, 0, 0, 32, int, attr->options);\
120 MC_RSP_OP(cmd, 0, 32, 8, uint8_t, attr->max_num_queues); \
121 MC_RSP_OP(cmd, 0, 40, 8, uint8_t, attr->max_num_tcs); \
122 MC_RSP_OP(cmd, 0, 48, 8, uint8_t, attr->max_mac_entries); \
123 MC_RSP_OP(cmd, 1, 0, 8, uint8_t, attr->max_vlan_entries); \
124 MC_RSP_OP(cmd, 1, 16, 8, uint8_t, attr->max_qos_entries); \
125 MC_RSP_OP(cmd, 1, 32, 16, uint16_t, attr->max_fs_entries); \
126 MC_RSP_OP(cmd, 2, 0, 8, uint8_t, attr->max_qos_key_size); \
127 MC_RSP_OP(cmd, 2, 8, 8, uint8_t, attr->max_fs_key_size); \
128 MC_RSP_OP(cmd, 2, 16, 16, uint16_t, attr->wriop_version); \
131 /* cmd, param, offset, width, type, arg_name */
134 MC_CMD_OP(cmd, 0, 0, 32, uint32_t, cfg->errors); \
135 MC_CMD_OP(cmd, 0, 32, 4, enum dpni_error_action, cfg->error_action); \
136 MC_CMD_OP(cmd, 0, 36, 1, int, cfg->set_frame_annotation); \
139 /* cmd, param, offset, width, type, arg_name */
143 MC_CMD_OP(cmd, 1, 0, 16, uint16_t, layout->private_data_size); \
144 MC_CMD_OP(cmd, 1, 16, 16, uint16_t, layout->data_align); \
145 MC_CMD_OP(cmd, 0, 32, 16, uint16_t, layout->options); \
146 MC_CMD_OP(cmd, 0, 48, 1, int, layout->pass_timestamp); \
147 MC_CMD_OP(cmd, 0, 49, 1, int, layout->pass_parser_result); \
148 MC_CMD_OP(cmd, 0, 50, 1, int, layout->pass_frame_status); \
149 MC_CMD_OP(cmd, 1, 32, 16, uint16_t, layout->data_head_room); \
150 MC_CMD_OP(cmd, 1, 48, 16, uint16_t, layout->data_tail_room); \
153 /* cmd, param, offset, width, type, arg_name */
157 /* cmd, param, offset, width, type, arg_name */
161 /* cmd, param, offset, width, type, arg_name */
164 MC_CMD_OP(cmd, 1, 0, 32, uint32_t, cfg->rate);\
165 MC_CMD_OP(cmd, 2, 0, 64, uint64_t, cfg->options);\
168 /* cmd, param, offset, width, type, arg_name */
171 MC_RSP_OP(cmd, 0, 32, 1, int, state->up);\
172 MC_RSP_OP(cmd, 1, 0, 32, uint32_t, state->rate);\
173 MC_RSP_OP(cmd, 2, 0, 64, uint64_t, state->options);\
178 /* cmd, param, offset, width, type, arg_name */
189 /* cmd, param, offset, width, type, arg_name */
200 /* cmd, param, offset, width, type, arg_name */
211 /* cmd, param, offset, width, type, arg_name */
231 MC_RSP_OP(cmd, 1, 0, 32, uint32_t, (queue)->destination.id); \
232 MC_RSP_OP(cmd, 1, 56, 4, enum dpni_dest, (queue)->destination.type); \
233 MC_RSP_OP(cmd, 1, 62, 1, char, (queue)->destination.stash_ctrl); \
234 MC_RSP_OP(cmd, 1, 63, 1, char, (queue)->destination.hold_active); \
235 MC_RSP_OP(cmd, 2, 0, 64, uint64_t, (queue)->flc); \
236 MC_RSP_OP(cmd, 3, 0, 64, uint64_t, (queue)->user_context); \
237 MC_RSP_OP(cmd, 4, 0, 32, uint32_t, (queue)->fqid); \
238 MC_RSP_OP(cmd, 4, 32, 16, uint16_t, (queue)->qdbin); \
246 MC_CMD_OP(cmd, 0, 24, 8, uint8_t, (queue)->options); \
247 MC_CMD_OP(cmd, 1, 0, 32, uint32_t, (queue)->destination.id); \
248 MC_CMD_OP(cmd, 1, 56, 4, enum dpni_dest, (queue)->destination.type); \
249 MC_CMD_OP(cmd, 1, 62, 1, char, (queue)->destination.stash_ctrl); \
250 MC_CMD_OP(cmd, 1, 63, 1, char, (queue)->destination.hold_active); \
251 MC_CMD_OP(cmd, 1, 0, 32, uint32_t, (queue)->destination.id); \
252 MC_CMD_OP(cmd, 2, 0, 64, uint64_t, (queue)->flc); \
253 MC_CMD_OP(cmd, 3, 0, 64, uint64_t, (queue)->user_context); \
256 /* cmd, param, offset, width, type, arg_name */
260 /* cmd, param, offset, width, type, arg_name */
263 MC_RSP_OP(cmd, 0, 0, 64, uint64_t, (stat)->counter0); \
264 MC_RSP_OP(cmd, 1, 0, 64, uint64_t, (stat)->counter1); \
265 MC_RSP_OP(cmd, 2, 0, 64, uint64_t, (stat)->counter2); \
266 MC_RSP_OP(cmd, 3, 0, 64, uint64_t, (stat)->counter3); \
267 MC_RSP_OP(cmd, 4, 0, 64, uint64_t, (stat)->counter4); \
268 MC_RSP_OP(cmd, 5, 0, 64, uint64_t, (stat)->counter5); \
269 MC_RSP_OP(cmd, 6, 0, 64, uint64_t, (stat)->counter6); \
341 #define DPNI_ALL_TCS (uint8_t)(-1)
343 #define DPNI_ALL_TC_FLOWS (uint16_t)(-1)
345 #define DPNI_NEW_FLOW_ID (uint16_t)(-1)
346 /* use for common tx-conf queue; see dpni_set_tx_conf_<x>() */
347 #define DPNI_COMMON_TX_CONF (uint16_t)(-1)
350 * dpni_open() - Open a control session for the specified object
372 * dpni_close() - Close the control session of the object
395 * Disable all non-error transmit confirmation; error frames are reported
400 /* Disable per-sender private Tx confirmation/error queue */
434 * enum dpni_queue_type - Identifies a type of queue targeted by the command
461 * struct dpni_extended_cfg - Structure representing extended DPNI configuration
462 * @tc_cfg: TCs configuration
467 * struct tc_cfg - TC configuration
482 * struct ipr_cfg - Structure representing IP reassembly configuration
501 * dpni_prepare_cfg() - function prepare parameters
510 * dpni_create() - Create the DPNI object
539 * dpni_destroy() - Destroy the DPNI object and release all its resources.
553 * struct dpni_pools_cfg - Structure representing buffer pools configuration
561 * struct pools - Buffer pools parameters
574 * dpni_set_pools() - Set buffer pools configuration
591 * dpni_enable() - Enable the DPNI, allow sending and receiving frames.
603 * dpni_disable() - Disable the DPNI, stop sending and receiving frames.
616 * dpni_reset() - Reset the DPNI, returns the object to initial state.
628 * struct dpni_attr - Structure representing DPNI attributes
639 * @max_qos_key_size: Maximum key size for the QoS look-up
658 * dpni_get_attributes() - Retrieve DPNI attributes.
672 * dpni_extract_cfg() - extract the parameters
674 * @cfg_buf: 256 bytes of DMA-able memory
711 * enum dpni_error_action - Defines DPNI behavior for errors
723 * struct dpni_error_cfg - Structure representing DPNI errors treatment
727 * status (FAS); relevant only for the non-discard action
736 * dpni_set_errors_behavior() - Set errors behavior
754 /* Select to modify the time-stamp setting */
756 /* Select to modify the parser-result setting; not applicable for Tx */
758 /* Select to modify the frame-status setting */
760 /* Select to modify the private-data-size setting */
762 /* Select to modify the data-alignment setting */
764 /* Select to modify the data-head-room setting */
766 /*!< Select to modify the data-tail-room setting */
770 * struct dpni_buffer_layout - Structure representing DPNI buffer layout
793 * dpni_get_buffer_layout() - Retrieve buffer layout attributes.
809 * dpni_set_buffer_layout() - Set buffer layout configuration.
827 * dpni_get_qdid() - Get the Queuing Destination ID (QDID) that should be used
843 * dpni_get_tx_data_offset() - Get the Tx data offset (from start of buffer)
847 * @data_offset: Tx data offset (from start of buffer)
856 /* Enable auto-negotiation */
858 /* Enable half-duplex mode */
862 /* Enable a-symmetric pause frames */
866 * struct - Structure representing DPNI link configuration
876 * dpni_set_link_cfg() - set the link configuration.
890 * struct dpni_link_state - Structure representing DPNI link state
902 * dpni_get_link_state() - Return the link state (either up or down)
916 * dpni_set_primary_mac_addr() - Set the primary MAC address
930 * dpni_get_primary_mac_addr() - Get the primary MAC address
944 * dpni_add_mac_addr() - Add MAC address filter
958 * dpni_remove_mac_addr() - Remove MAC address filter
972 * enum dpni_dest - DPNI destination types
975 * dequeue from the queue based on polling or other user-defined
991 * struct dpni_dest_cfg - Structure representing DPNI destination parameters
995 * are 0-1 or 0-7, depending on the number of priorities in that
1005 * enum dpni_flc_type - DPNI FLC types
1015 * enum dpni_stash_size - DPNI FLC stashing size
1034 * struct dpni_flc_cfg - Structure representing DPNI FLC configuration
1045 * flow-context;
1046 * Must be cacheline-aligned and DMA-able memory
1062 /** Select to modify the flow-context parameters;
1063 * not applicable for Tx-conf/Err queues as the FD comes from the user
1068 /* Select to modify the queue's tail-drop threshold */
1072 * struct dpni_queue_cfg - Structure representing queue configuration
1082 * in the case of FS (flow-steering) the flow's FLC settings
1103 * struct dpni_queue_attr - Structure representing queue attributes
1131 * dpni_get_api_version - Retrieve DPNI Major and Minor version info.
1146 * enum dpni_confirmation_mode - Defines DPNI options supported for Tx
1153 * with proper FD set-up to have buffers release to a Buffer Pool, otherwise
1168 * struct dpni_queue - Queue structure
1178 * struct destination - Destination structure
1183 * 0 - No destination, queue can be manually queried, but won't
1185 * 1 - The destination is DPIO. When traffic becomes available in
1188 * 2 - The destination is a DPCON. The queue is associated with a
1208 * dpni_set_queue() - Set queue parameters
1213 * @tc: Traffic class, in range 0 to NUM_TCS - 1
1215 * TC. Value must be in range 0 to NUM_QUEUES - 1
1229 * dpni_get_queue() - Get queue parameters
1234 * @tc: Traffic class, in range 0 to NUM_TCS - 1
1236 * TC. Value must be in range 0 to NUM_QUEUES - 1
1250 * dpni_set_tx_confirmation_mode() - Set TX conf mode
1299 * dpni_get_statistics() - Get DPNI statistics
1316 * dpni_reset_statistics() - Clears DPNI statistics