raw/octeontx2_dma: assign PEM id for external transfer
authorRadha Mohan Chintakuntla <radhac@marvell.com>
Tue, 6 Oct 2020 05:30:20 +0000 (22:30 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 11 Oct 2020 19:55:37 +0000 (21:55 +0200)
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>
drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
drivers/raw/octeontx2_dma/otx2_dpi_rawdev.h

index 5b49644..a1b94ce 100644 (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.
index 9ebb259..81740e8 100644 (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;
 };