* dpseci_get_tx_queue() - Retrieve Tx queue attributes. * @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 * @attr: Returned Tx queue attributes * * Return: '0' on Success; Error code otherwise. */
| 416 | * Return: '0' on Success; Error code otherwise. |
| 417 | */ |
| 418 | int dpseci_get_tx_queue(struct fsl_mc_io *mc_io, |
| 419 | uint32_t cmd_flags, |
| 420 | uint16_t token, |
| 421 | uint8_t queue, |
| 422 | struct dpseci_tx_queue_attr *attr) |
| 423 | { |
| 424 | struct dpseci_rsp_get_tx_queue *rsp_params; |
| 425 | struct dpseci_cmd_get_queue *cmd_params; |
| 426 | struct mc_command cmd = { 0 }; |
| 427 | int err; |
| 428 | |
| 429 | /* prepare command */ |
| 430 | cmd.header = mc_encode_cmd_header(DPSECI_CMDID_GET_TX_QUEUE, |
| 431 | cmd_flags, |
| 432 | token); |
| 433 | cmd_params = (struct dpseci_cmd_get_queue *)cmd.params; |
| 434 | cmd_params->queue = queue; |
| 435 | |
| 436 | /* send command to mc*/ |
| 437 | err = mc_send_command(mc_io, &cmd); |
| 438 | if (err) |
| 439 | return err; |
| 440 | |
| 441 | /* retrieve response parameters */ |
| 442 | rsp_params = (struct dpseci_rsp_get_tx_queue *)cmd.params; |
| 443 | attr->fqid = le32_to_cpu(rsp_params->fqid); |
| 444 | attr->priority = rsp_params->priority; |
| 445 | |
| 446 | return 0; |
| 447 | } |
| 448 | |
| 449 | /** |
| 450 | * dpseci_get_sec_attr() - Retrieve SEC accelerator attributes. |
no test coverage detected