On Tue, Oct 26, 2021 at 9:43 AM Radha Mohan Chintakuntla
<rad...@marvell.com> wrote:
>
> Add the copy_sg function that will do the multiple DMA transfers of
> different sizes and different source/destination as well.

> +static int
> +cnxk_dmadev_copy_sg(void *dev_private, uint16_t vchan,
> +                   const struct rte_dma_sge *src,
> +                   const struct rte_dma_sge *dst,
> +                   uint16_t nb_src, uint16_t nb_dst, uint64_t flags)
> +{
> +       uint64_t cmd[DPI_MAX_CMD_SIZE] = {0};
> +       union dpi_instr_hdr_s *header = (union dpi_instr_hdr_s *)&cmd[0];
> +       struct cnxk_dpi_vf_s *dpivf = dev_private;
> +       const struct rte_dma_sge *fptr, *lptr;
> +       struct cnxk_dpi_compl_s *comp_ptr;
> +       int num_words = 0;
> +       int i, rc;
> +
> +       RTE_SET_USED(vchan);
> +
> +       header->s.xtype = dpivf->conf.direction;
> +       header->s.pt = DPI_HDR_PT_ZBW_CA;
> +       header->s.grp = 0;
> +       header->s.tag = 0;
> +       header->s.tt = 0;
> +       header->s.func = 0;
> +       comp_ptr = dpivf->conf.c_desc.compl_ptr[dpivf->conf.c_desc.tail];
> +       comp_ptr->cdata = DPI_REQ_CDATA;
> +       header->s.ptr = (uint64_t)comp_ptr;
> +       STRM_INC(dpivf->conf.c_desc);
> +
> +       /* pvfs should be set for inbound and outbound only */
> +       if (header->s.xtype <= 1)
> +               header->s.pvfe = 1;
> +       num_words += 4;


# Please change the logic to populate the static items based on
configure/channel setup
in slowpath and update only per transfer-specific items to have better
performance.


# Also make sure test application and example application passes this
patch series.

Reply via email to