MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dpdmai_get_tx_queue

Function dpdmai_get_tx_queue

dpdk/drivers/bus/fslmc/mc/dpdmai.c:415–445  ·  view source on GitHub ↗

* dpdmai_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 DPDMAI object * @queue_idx: Tx queue index. Accepted values are form 0 to num_queues * parameter provided in dpdmai_create * @priority: Select the queue relative to number of * priorities configured at DPDMAI crea

Source from the content-addressed store, hash-verified

413 * Return: '0' on Success; Error code otherwise.
414 */
415int dpdmai_get_tx_queue(struct fsl_mc_io *mc_io,
416 uint32_t cmd_flags,
417 uint16_t token,
418 uint8_t queue_idx,
419 uint8_t priority,
420 struct dpdmai_tx_queue_attr *attr)
421{
422 struct dpdmai_cmd_get_queue *cmd_params;
423 struct dpdmai_rsp_get_tx_queue *rsp_params;
424 struct mc_command cmd = { 0 };
425 int err;
426
427 /* prepare command */
428 cmd.header = mc_encode_cmd_header(DPDMAI_CMDID_GET_TX_QUEUE,
429 cmd_flags,
430 token);
431 cmd_params = (struct dpdmai_cmd_get_queue *)cmd.params;
432 cmd_params->priority = priority;
433 cmd_params->queue_idx = queue_idx;
434
435 /* send command to mc*/
436 err = mc_send_command(mc_io, &cmd);
437 if (err)
438 return err;
439
440 /* retrieve response parameters */
441 rsp_params = (struct dpdmai_rsp_get_tx_queue *)cmd.params;
442 attr->fqid = le32_to_cpu(rsp_params->fqid);
443
444 return 0;
445}

Callers 1

dpaa2_dpdmai_dev_initFunction · 0.85

Calls 2

mc_encode_cmd_headerFunction · 0.85
mc_send_commandFunction · 0.85

Tested by

no test coverage detected