* dpseci_set_rx_queue() - Set Rx queue configuration * @mc_io: Pointer to MC portal's I/O object * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' * @token: Token of DPSECI object * @queue: Select the queue relative to number of * priorities configured at DPSECI creation; use * DPSECI_ALL_QUEUES to configure all Rx queues identically. * @cfg: Rx queue configuration * * Return:
| 325 | * Return: '0' on Success; Error code otherwise. |
| 326 | */ |
| 327 | int dpseci_set_rx_queue(struct fsl_mc_io *mc_io, |
| 328 | uint32_t cmd_flags, |
| 329 | uint16_t token, |
| 330 | uint8_t queue, |
| 331 | const struct dpseci_rx_queue_cfg *cfg) |
| 332 | { |
| 333 | struct dpseci_cmd_set_rx_queue *cmd_params; |
| 334 | struct mc_command cmd = { 0 }; |
| 335 | |
| 336 | /* prepare command */ |
| 337 | cmd.header = mc_encode_cmd_header(DPSECI_CMDID_SET_RX_QUEUE, |
| 338 | cmd_flags, |
| 339 | token); |
| 340 | cmd_params = (struct dpseci_cmd_set_rx_queue *)cmd.params; |
| 341 | cmd_params->dest_id = cpu_to_le32(cfg->dest_cfg.dest_id); |
| 342 | cmd_params->dest_priority = cfg->dest_cfg.priority; |
| 343 | cmd_params->queue = queue; |
| 344 | cmd_params->user_ctx = cpu_to_le64(cfg->user_ctx); |
| 345 | cmd_params->options = cpu_to_le32(cfg->options); |
| 346 | dpseci_set_field(cmd_params->dest_type, |
| 347 | DEST_TYPE, |
| 348 | cfg->dest_cfg.dest_type); |
| 349 | dpseci_set_field(cmd_params->order_preservation_en, |
| 350 | ORDER_PRESERVATION, |
| 351 | cfg->order_preservation_en); |
| 352 | |
| 353 | /* send command to mc*/ |
| 354 | return mc_send_command(mc_io, &cmd); |
| 355 | } |
| 356 | |
| 357 | /** |
| 358 | * dpseci_get_rx_queue() - Retrieve Rx queue attributes. |
no test coverage detected