From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6C993A0C47; Tue, 26 Oct 2021 10:43:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B571426D4; Tue, 26 Oct 2021 10:43:23 +0200 (CEST) Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) by mails.dpdk.org (Postfix) with ESMTP id A0E83426D4 for ; Tue, 26 Oct 2021 10:43:22 +0200 (CEST) Received: by mail-io1-f50.google.com with SMTP id p142so19242015iod.0 for ; Tue, 26 Oct 2021 01:43:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gQeh6ed1ARuRSbyUg66IkuDlWVtLyRMBVPXZimQ8FEE=; b=c8UQpBopj6MyesxB0571rSdOE38VkskyVHR6eLFIXqIDF9oy4MqidFAFuln+ip/EkW gDf0UTNJE0seHMgx42IBuk+qfUKzWyhsikQbELpNm0lXO57VkWh12YHLIixK/BiDaWxb wgQ/z+y+01shvSURr28E8OJakm0WJqAmPARfp2wNsXZWFNZHFPEZMp8rNOKJmrAVPMwn KzlvLhGXOUyEv9YZHgZQrVBE2TPnebEWEaHuZSLKlaoM7wJpMY6RtSPj+GBEpAsJJUJk cj5T49lj/Q4VDYjKjiDhCXj5gEMhpwCstys/ja3njJLlRHveDcXQvjQCTAG0YFJhsIxY qEZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gQeh6ed1ARuRSbyUg66IkuDlWVtLyRMBVPXZimQ8FEE=; b=Fzq/5FUd95KzodWMnZLYceTAb+TPpHb5rgmBeeRVXDhxtdqByPSgJFrVUmoLNrw6gS 0FEnvemziIKClX1lgHc0pdi/CDezmly5ayGrUuZGrDZF7qt7qvE/Jl9tw0LTQTgw0BYA itmlHin2Z++RmEHWdh37czpX2RNcd6k/gUKEC63teRRqYQ+Yr0myv6ndX4HMOwmW1e7G dOLts2s36s62xDjvlhcVfQ9aw4zDWY9B6vfgLNP6a8kJ+OUPU62ckt9jHunwwfNKvB9W 0poFndbpH7ahagSYLKfa17p1AMF6jg/Dmor3FqpSqo5ulRo1TRodIFwD5dqHeTLK6DO8 kNPA== X-Gm-Message-State: AOAM5304T71tncNNBn2WSupcFOgiOsNjFEGL+0YgVuXy//Y9LklHG3nR XjbT3sgAA7U7N760tQZ6Ps2tAXAQhUuFmsx2h08= X-Google-Smtp-Source: ABdhPJwTtHYqjTIRhfvbyUiWHLZmkbM1wsW9CgqRvc6UqlPHmO6dlk26i5JRIaVk8sWteJH1b0lclNinpwOcQXAwiqY= X-Received: by 2002:a05:6638:3aa:: with SMTP id z10mr4934083jap.126.1635237802051; Tue, 26 Oct 2021 01:43:22 -0700 (PDT) MIME-Version: 1.0 References: <20211026041300.28924-1-radhac@marvell.com> <20211026041300.28924-4-radhac@marvell.com> In-Reply-To: <20211026041300.28924-4-radhac@marvell.com> From: Jerin Jacob Date: Tue, 26 Oct 2021 14:12:56 +0530 Message-ID: To: Radha Mohan Chintakuntla Cc: Thomas Monjalon , fengchengwen , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Koteswara Rao Kottidi , Jerin Jacob , Satananda Burla , dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 4/4] dma/cnxk: add copy_sg function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Oct 26, 2021 at 9:43 AM Radha Mohan Chintakuntla 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.