get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/102833/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 102833,
    "url": "https://patches.dpdk.org/api/patches/102833/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20211026041300.28924-4-radhac@marvell.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20211026041300.28924-4-radhac@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211026041300.28924-4-radhac@marvell.com",
    "date": "2021-10-26T04:13:00",
    "name": "[4/4] dma/cnxk: add copy_sg function",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "f3778fa3bb59746365e98d95c31202e7b1b38571",
    "submitter": {
        "id": 2007,
        "url": "https://patches.dpdk.org/api/people/2007/?format=api",
        "name": "Radha Chintakuntla",
        "email": "radhac@marvell.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20211026041300.28924-4-radhac@marvell.com/mbox/",
    "series": [
        {
            "id": 19972,
            "url": "https://patches.dpdk.org/api/series/19972/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=19972",
            "date": "2021-10-26T04:12:58",
            "name": "[1/4] common/cnxk: add DPI DMA support",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/19972/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/102833/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/102833/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id BDB89A0C47;\n\tTue, 26 Oct 2021 06:13:39 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EE43841165;\n\tTue, 26 Oct 2021 06:13:28 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 4A9934003E\n for <dev@dpdk.org>; Tue, 26 Oct 2021 06:13:25 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id\n 19PLKxk4012626;\n Mon, 25 Oct 2021 21:13:24 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com with ESMTP id 3bx4dx196y-2\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Mon, 25 Oct 2021 21:13:24 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Mon, 25 Oct 2021 21:13:22 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Mon, 25 Oct 2021 21:13:22 -0700",
            "from rchintakuntla-lnx3.caveonetworks.com (unknown [10.111.140.81])\n by maili.marvell.com (Postfix) with ESMTP id 495F63F7095;\n Mon, 25 Oct 2021 21:13:22 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-type; s=pfpt0220; bh=XQWb/lUaVV1PzDd6epL19wGdhH4pegCUDEVaOoeIyzg=;\n b=Z0CRRQMN3XEisXXmZVc2lJy+Arma99WRu/OiF1+OoR5vWCVMQjOP+NduaB0n6sZl53Fm\n u0g8wLB82BLKjHWWBKRcgHz/2CttKI19cTWorPDIxWVjLVKn6ssDmxfpwtmywEoaRUo6\n 86Ah2BLvFaBGFfPCpPgaFbSV5ntDYqUxXxg6hbl9abxKS/WBExWZJc9iMO/PJxt2uevc\n D0MaKPZ6y8bj1ERm/75GXG9eNYWRTG7OymlxcxM/IQVbclnKwgQlEaPhk7L+LEx+GZqw\n YtK+38rVrxBN4GYrD2vBKGN69cOi+V0eH4+vhsdpo42mVwgnH4Bmvy2bxlh4/aYfGvpy Jg==",
        "From": "Radha Mohan Chintakuntla <radhac@marvell.com>",
        "To": "<thomas@monjalon.net>, <fengchengwen@huawei.com>,\n <ndabilpuram@marvell.com>, <kirankumark@marvell.com>,\n <skori@marvell.com>, <skoteshwar@marvell.com>, <jerinj@marvell.com>,\n <sburla@marvell.com>",
        "CC": "<dev@dpdk.org>, Radha Mohan Chintakuntla <radhac@marvell.com>",
        "Date": "Mon, 25 Oct 2021 21:13:00 -0700",
        "Message-ID": "<20211026041300.28924-4-radhac@marvell.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20211026041300.28924-1-radhac@marvell.com>",
        "References": "<20211026041300.28924-1-radhac@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "VzZqqq5zKHODq1TaOEC0Lmn58_gr81G_",
        "X-Proofpoint-ORIG-GUID": "VzZqqq5zKHODq1TaOEC0Lmn58_gr81G_",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475\n definitions=2021-10-25_08,2021-10-25_02,2020-04-07_01",
        "Subject": "[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 <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add the copy_sg function that will do the multiple DMA transfers of\ndifferent sizes and different source/destination as well.\n\nSigned-off-by: Radha Mohan Chintakuntla <radhac@marvell.com>\n---\n drivers/dma/cnxk/cnxk_dmadev.c | 80 +++++++++++++++++++++++++++++++++-\n 1 file changed, 79 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/dma/cnxk/cnxk_dmadev.c b/drivers/dma/cnxk/cnxk_dmadev.c\nindex 8434579aa2..f15ea16c5f 100644\n--- a/drivers/dma/cnxk/cnxk_dmadev.c\n+++ b/drivers/dma/cnxk/cnxk_dmadev.c\n@@ -29,7 +29,7 @@ cnxk_dmadev_info_get(const struct rte_dma_dev *dev,\n \tdev_info->nb_vchans = 1;\n \tdev_info->dev_capa = RTE_DMA_CAPA_MEM_TO_MEM |\n \t\tRTE_DMA_CAPA_MEM_TO_DEV | RTE_DMA_CAPA_DEV_TO_MEM |\n-\t\tRTE_DMA_CAPA_OPS_COPY;\n+\t\tRTE_DMA_CAPA_OPS_COPY | RTE_DMA_CAPA_OPS_COPY_SG;\n \tdev_info->max_desc = DPI_MAX_DESC;\n \tdev_info->min_desc = 1;\n \tdev_info->max_sges = DPI_MAX_POINTER;\n@@ -294,6 +294,83 @@ cnxk_dmadev_completed(void *dev_private, uint16_t vchan, const uint16_t nb_cpls,\n \treturn cnt;\n }\n \n+static int\n+cnxk_dmadev_copy_sg(void *dev_private, uint16_t vchan,\n+\t\t    const struct rte_dma_sge *src,\n+\t\t    const struct rte_dma_sge *dst,\n+\t\t    uint16_t nb_src, uint16_t nb_dst, uint64_t flags)\n+{\n+\tuint64_t cmd[DPI_MAX_CMD_SIZE] = {0};\n+\tunion dpi_instr_hdr_s *header = (union dpi_instr_hdr_s *)&cmd[0];\n+\tstruct cnxk_dpi_vf_s *dpivf = dev_private;\n+\tconst struct rte_dma_sge *fptr, *lptr;\n+\tstruct cnxk_dpi_compl_s *comp_ptr;\n+\tint num_words = 0;\n+\tint i, rc;\n+\n+\tRTE_SET_USED(vchan);\n+\n+\theader->s.xtype = dpivf->conf.direction;\n+\theader->s.pt = DPI_HDR_PT_ZBW_CA;\n+\theader->s.grp = 0;\n+\theader->s.tag = 0;\n+\theader->s.tt = 0;\n+\theader->s.func = 0;\n+\tcomp_ptr = dpivf->conf.c_desc.compl_ptr[dpivf->conf.c_desc.tail];\n+\tcomp_ptr->cdata = DPI_REQ_CDATA;\n+\theader->s.ptr = (uint64_t)comp_ptr;\n+\tSTRM_INC(dpivf->conf.c_desc);\n+\n+\t/* pvfs should be set for inbound and outbound only */\n+\tif (header->s.xtype <= 1)\n+\t\theader->s.pvfe = 1;\n+\tnum_words += 4;\n+\n+\t/*\n+\t * For inbound case, src pointers are last pointers.\n+\t * For all other cases, src pointers are first pointers.\n+\t */\n+\tif (header->s.xtype == DPI_XTYPE_INBOUND) {\n+\t\theader->s.nfst = nb_dst & 0xf;\n+\t\theader->s.nlst = nb_src & 0xf;\n+\t\tfptr = &dst[0];\n+\t\tlptr = &src[0];\n+\t\theader->s.fport = dpivf->conf.dst_port & 0x3;\n+\t\theader->s.lport = dpivf->conf.src_port & 0x3;\n+\t} else {\n+\t\theader->s.nfst = nb_src & 0xf;\n+\t\theader->s.nlst = nb_dst & 0xf;\n+\t\tfptr = &src[0];\n+\t\tlptr = &dst[0];\n+\t\theader->s.fport = dpivf->conf.src_port & 0x3;\n+\t\theader->s.lport = dpivf->conf.dst_port & 0x3;\n+\t}\n+\n+\tfor (i = 0; i < header->s.nfst; i++) {\n+\t\tcmd[num_words++] = (uint64_t)fptr->length;\n+\t\tcmd[num_words++] = fptr->addr;\n+\t\tfptr++;\n+\t}\n+\n+\tfor (i = 0; i < header->s.nlst; i++) {\n+\t\tcmd[num_words++] = (uint64_t)lptr->length;\n+\t\tcmd[num_words++] = lptr->addr;\n+\t\tlptr++;\n+\t}\n+\n+\trc = __dpi_queue_write(&dpivf->rdpi, cmd, num_words);\n+\tif (!rc) {\n+\t\tif (flags & RTE_DMA_OP_FLAG_SUBMIT) {\n+\t\t\trte_wmb();\n+\t\t\tplt_write64(num_words,\n+\t\t\t\t    dpivf->rdpi.rbase + DPI_VDMA_DBELL);\n+\t\t}\n+\t\tdpivf->num_words = num_words;\n+\t}\n+\n+\treturn rc;\n+}\n+\n static uint16_t\n cnxk_dmadev_completed_status(void *dev_private, uint16_t vchan,\n \t\t\t     const uint16_t nb_cpls, uint16_t *last_idx,\n@@ -369,6 +446,7 @@ cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \tdmadev->dev_ops = &cnxk_dmadev_ops;\n \n \tdmadev->fp_obj->copy = cnxk_dmadev_copy;\n+\tdmadev->fp_obj->copy_sg = cnxk_dmadev_copy_sg;\n \tdmadev->fp_obj->submit = cnxk_dmadev_submit;\n \tdmadev->fp_obj->completed = cnxk_dmadev_completed;\n \tdmadev->fp_obj->completed_status = cnxk_dmadev_completed_status;\n",
    "prefixes": [
        "4/4"
    ]
}