raw/octeontx2_dma: assign PEM id for external transfer

DPI needs to know the PEM number for all external transfers.

Signed-off-by: Radha Mohan Chintakuntla <radhac@marvell.com>
Reviewed-by: Satananda Burla <sburla@marvell.com>
Acked-by: Satha Rao <skoteshwar@marvell.com>
This commit is contained in:
Radha Mohan Chintakuntla 2020-10-05 22:30:20 -07:00 committed by Thomas Monjalon
parent b19da32e31
commit f4c453765e
2 changed files with 3 additions and 0 deletions

View File

@ -201,6 +201,8 @@ otx2_dpi_rawdev_enqueue_bufs(struct rte_rawdev *dev,
index += 4;
hdr->s.fport = 0;
hdr->s.lport = 0;
if (ctx->xtype != DPI_XTYPE_INTERNAL_ONLY)
hdr->s.lport = ctx->pem_id;
/* For inbound case, src pointers are last pointers.
* For all other cases, src pointers are first pointers.

View File

@ -140,6 +140,7 @@ struct dpi_dma_queue_ctx_s {
uint16_t req_type:2;
uint16_t use_lock:1;
uint16_t deallocv;
uint16_t pem_id;
struct dpi_cring_data_s *c_ring;
};