bus/fslmc: support static dequeue from portal
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
This commit is contained in:
parent
8a5d7a8ec7
commit
3844bdd14d
@ -257,6 +257,50 @@ int dpio_get_stashing_destination(struct fsl_mc_io *mc_io,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dpio_add_static_dequeue_channel(struct fsl_mc_io *mc_io,
|
||||
uint32_t cmd_flags,
|
||||
uint16_t token,
|
||||
int dpcon_id,
|
||||
uint8_t *channel_index)
|
||||
{
|
||||
struct mc_command cmd = { 0 };
|
||||
int err;
|
||||
|
||||
/* prepare command */
|
||||
cmd.header = mc_encode_cmd_header(DPIO_CMDID_ADD_STATIC_DEQUEUE_CHANNEL,
|
||||
cmd_flags,
|
||||
token);
|
||||
DPIO_CMD_ADD_STATIC_DEQUEUE_CHANNEL(cmd, dpcon_id);
|
||||
|
||||
/* send command to mc*/
|
||||
err = mc_send_command(mc_io, &cmd);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* retrieve response parameters */
|
||||
DPIO_RSP_ADD_STATIC_DEQUEUE_CHANNEL(cmd, *channel_index);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dpio_remove_static_dequeue_channel(struct fsl_mc_io *mc_io,
|
||||
uint32_t cmd_flags,
|
||||
uint16_t token,
|
||||
int dpcon_id)
|
||||
{
|
||||
struct mc_command cmd = { 0 };
|
||||
|
||||
/* prepare command */
|
||||
cmd.header = mc_encode_cmd_header(
|
||||
DPIO_CMDID_REMOVE_STATIC_DEQUEUE_CHANNEL,
|
||||
cmd_flags,
|
||||
token);
|
||||
DPIO_CMD_REMOVE_STATIC_DEQUEUE_CHANNEL(cmd, dpcon_id);
|
||||
|
||||
/* send command to mc*/
|
||||
return mc_send_command(mc_io, &cmd);
|
||||
}
|
||||
|
||||
int dpio_get_api_version(struct fsl_mc_io *mc_io,
|
||||
uint32_t cmd_flags,
|
||||
uint16_t *major_ver,
|
||||
|
@ -229,6 +229,36 @@ int dpio_get_stashing_destination(struct fsl_mc_io *mc_io,
|
||||
uint16_t token,
|
||||
uint8_t *sdest);
|
||||
|
||||
/**
|
||||
* dpio_add_static_dequeue_channel() - Add a static dequeue channel.
|
||||
* @mc_io: Pointer to MC portal's I/O object
|
||||
* @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
|
||||
* @token: Token of DPIO object
|
||||
* @dpcon_id: DPCON object ID
|
||||
* @channel_index: Returned channel index to be used in qbman API
|
||||
*
|
||||
* Return: '0' on Success; Error code otherwise.
|
||||
*/
|
||||
int dpio_add_static_dequeue_channel(struct fsl_mc_io *mc_io,
|
||||
uint32_t cmd_flags,
|
||||
uint16_t token,
|
||||
int dpcon_id,
|
||||
uint8_t *channel_index);
|
||||
|
||||
/**
|
||||
* dpio_remove_static_dequeue_channel() - Remove a static dequeue channel.
|
||||
* @mc_io: Pointer to MC portal's I/O object
|
||||
* @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
|
||||
* @token: Token of DPIO object
|
||||
* @dpcon_id: DPCON object ID
|
||||
*
|
||||
* Return: '0' on Success; Error code otherwise.
|
||||
*/
|
||||
int dpio_remove_static_dequeue_channel(struct fsl_mc_io *mc_io,
|
||||
uint32_t cmd_flags,
|
||||
uint16_t token,
|
||||
int dpcon_id);
|
||||
|
||||
/**
|
||||
* struct dpio_attr - Structure representing DPIO attributes
|
||||
* @id: DPIO object ID
|
||||
|
@ -42,6 +42,7 @@ struct dpaa2_io_portal_t {
|
||||
struct dpaa2_dpio_dev *sec_dpio_dev;
|
||||
uint64_t net_tid;
|
||||
uint64_t sec_tid;
|
||||
void *eventdev;
|
||||
};
|
||||
|
||||
/*! Global per thread DPIO portal */
|
||||
|
@ -58,6 +58,8 @@ DPDK_17.08 {
|
||||
dpci_set_rx_queue;
|
||||
dpcon_open;
|
||||
dpcon_get_attributes;
|
||||
dpio_add_static_dequeue_channel;
|
||||
dpio_remove_static_dequeue_channel;
|
||||
mc_get_soc_version;
|
||||
mc_get_version;
|
||||
qbman_eq_desc_set_dca;
|
||||
|
Loading…
Reference in New Issue
Block a user