get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 100687,
    "url": "http://patchwork.dpdk.org/api/patches/100687/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20211007093315.17384-9-nipun.gupta@nxp.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20211007093315.17384-9-nipun.gupta@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211007093315.17384-9-nipun.gupta@nxp.com",
    "date": "2021-10-07T09:33:15",
    "name": "[v9,8/8] app/bbdev: handle endianness of test data",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9a6459296564c544ed6976a3cf28965df260fd40",
    "submitter": {
        "id": 471,
        "url": "http://patchwork.dpdk.org/api/people/471/?format=api",
        "name": "Nipun Gupta",
        "email": "nipun.gupta@nxp.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patchwork.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20211007093315.17384-9-nipun.gupta@nxp.com/mbox/",
    "series": [
        {
            "id": 19424,
            "url": "http://patchwork.dpdk.org/api/series/19424/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=19424",
            "date": "2021-10-07T09:33:07",
            "name": "baseband: add NXP LA12xx driver",
            "version": 9,
            "mbox": "http://patchwork.dpdk.org/series/19424/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/100687/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/100687/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 0C46CA0C47;\n\tThu,  7 Oct 2021 11:34:04 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 76EF3411F6;\n\tThu,  7 Oct 2021 11:33:30 +0200 (CEST)",
            "from inva020.nxp.com (inva020.nxp.com [92.121.34.13])\n by mails.dpdk.org (Postfix) with ESMTP id 88893411A6\n for <dev@dpdk.org>; Thu,  7 Oct 2021 11:33:21 +0200 (CEST)",
            "from inva020.nxp.com (localhost [127.0.0.1])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 69D811A0338;\n Thu,  7 Oct 2021 11:33:21 +0200 (CEST)",
            "from aprdc01srsp001v.ap-rdc01.nxp.com\n (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id F2F6A1A1D65;\n Thu,  7 Oct 2021 11:33:20 +0200 (CEST)",
            "from lsv03274.swis.in-blr01.nxp.com (lsv03274.swis.in-blr01.nxp.com\n [92.120.147.114])\n by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 5B710183AD28;\n Thu,  7 Oct 2021 17:33:20 +0800 (+08)"
        ],
        "From": "nipun.gupta@nxp.com",
        "To": "dev@dpdk.org,\n\tgakhil@marvell.com,\n\tnicolas.chautru@intel.com",
        "Cc": "david.marchand@redhat.com, hemant.agrawal@nxp.com,\n Nipun Gupta <nipun.gupta@nxp.com>",
        "Date": "Thu,  7 Oct 2021 15:03:15 +0530",
        "Message-Id": "<20211007093315.17384-9-nipun.gupta@nxp.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20211007093315.17384-1-nipun.gupta@nxp.com>",
        "References": "<20210318063421.14895-1-hemant.agrawal@nxp.com>\n <20211007093315.17384-1-nipun.gupta@nxp.com>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Subject": "[dpdk-dev] [PATCH v9 8/8] app/bbdev: handle endianness of test data",
        "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": "From: Nipun Gupta <nipun.gupta@nxp.com>\n\nWith data input, output and harq also supported in big\nendian format, this patch updates the testbbdev application\nto handle the endianness conversion as directed by the\nthe driver being used.\n\nThe test vectors assumes the data in the little endian order, and\nthus if the driver supports big endian data processing, conversion\nfrom little endian to big is handled by the testbbdev application.\n\nSigned-off-by: Nipun Gupta <nipun.gupta@nxp.com>\n---\n app/test-bbdev/test_bbdev_perf.c | 43 ++++++++++++++++++++++++++++++++\n doc/guides/tools/testbbdev.rst   |  3 +++\n 2 files changed, 46 insertions(+)",
    "diff": "diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c\nindex 469597b8b3..05f12463a8 100644\n--- a/app/test-bbdev/test_bbdev_perf.c\n+++ b/app/test-bbdev/test_bbdev_perf.c\n@@ -227,6 +227,45 @@ clear_soft_out_cap(uint32_t *op_flags)\n \t*op_flags &= ~RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT;\n }\n \n+/* This API is to convert all the test vector op data entries\n+ * to big endian format. It is used when the device supports\n+ * the input in the big endian format.\n+ */\n+static inline void\n+convert_op_data_to_be(void)\n+{\n+\tstruct op_data_entries *op;\n+\tenum op_data_type type;\n+\tuint8_t nb_segs, *rem_data, temp;\n+\tuint32_t *data, len;\n+\tint complete, rem, i, j;\n+\n+\tfor (type = DATA_INPUT; type < DATA_NUM_TYPES; ++type) {\n+\t\tnb_segs = test_vector.entries[type].nb_segments;\n+\t\top = &test_vector.entries[type];\n+\n+\t\t/* Invert byte endianness for all the segments */\n+\t\tfor (i = 0; i < nb_segs; ++i) {\n+\t\t\tlen = op->segments[i].length;\n+\t\t\tdata = op->segments[i].addr;\n+\n+\t\t\t/* Swap complete u32 bytes */\n+\t\t\tcomplete = len / 4;\n+\t\t\tfor (j = 0; j < complete; j++)\n+\t\t\t\tdata[j] = rte_bswap32(data[j]);\n+\n+\t\t\t/* Swap any remaining bytes */\n+\t\t\trem = len % 4;\n+\t\t\trem_data = (uint8_t *)&data[j];\n+\t\t\tfor (j = 0; j < rem/2; j++) {\n+\t\t\t\ttemp = rem_data[j];\n+\t\t\t\trem_data[j] = rem_data[rem - j - 1];\n+\t\t\t\trem_data[rem - j - 1] = temp;\n+\t\t\t}\n+\t\t}\n+\t}\n+}\n+\n static int\n check_dev_cap(const struct rte_bbdev_info *dev_info)\n {\n@@ -234,6 +273,7 @@ check_dev_cap(const struct rte_bbdev_info *dev_info)\n \tunsigned int nb_inputs, nb_soft_outputs, nb_hard_outputs,\n \t\tnb_harq_inputs, nb_harq_outputs;\n \tconst struct rte_bbdev_op_cap *op_cap = dev_info->drv.capabilities;\n+\tuint8_t dev_data_endianness = dev_info->drv.data_endianness;\n \n \tnb_inputs = test_vector.entries[DATA_INPUT].nb_segments;\n \tnb_soft_outputs = test_vector.entries[DATA_SOFT_OUTPUT].nb_segments;\n@@ -245,6 +285,9 @@ check_dev_cap(const struct rte_bbdev_info *dev_info)\n \t\tif (op_cap->type != test_vector.op_type)\n \t\t\tcontinue;\n \n+\t\tif (dev_data_endianness == RTE_BBDEV_BIG_ENDIAN)\n+\t\t\tconvert_op_data_to_be();\n+\n \t\tif (op_cap->type == RTE_BBDEV_OP_TURBO_DEC) {\n \t\t\tconst struct rte_bbdev_op_cap_turbo_dec *cap =\n \t\t\t\t\t&op_cap->cap.turbo_dec;\ndiff --git a/doc/guides/tools/testbbdev.rst b/doc/guides/tools/testbbdev.rst\nindex d397d991ff..83a0312062 100644\n--- a/doc/guides/tools/testbbdev.rst\n+++ b/doc/guides/tools/testbbdev.rst\n@@ -332,6 +332,9 @@ Variable op_type has to be defined as a first variable in file. It specifies\n what type of operations will be executed. For 4G decoder op_type has to be set to\n ``RTE_BBDEV_OP_TURBO_DEC`` and for 4G encoder to ``RTE_BBDEV_OP_TURBO_ENC``.\n \n+Bbdev-test adjusts the byte endianness based on the PMD capability (data_endianness)\n+and all the test vectors input/output data are assumed to be LE by default\n+\n Full details of the meaning and valid values for the below fields are\n documented in *rte_bbdev_op.h*\n \n",
    "prefixes": [
        "v9",
        "8/8"
    ]
}