get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 66252,
    "url": "http://patches.dpdk.org/api/patches/66252/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1583346152-10186-5-git-send-email-nicolas.chautru@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<1583346152-10186-5-git-send-email-nicolas.chautru@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1583346152-10186-5-git-send-email-nicolas.chautru@intel.com",
    "date": "2020-03-04T18:22:21",
    "name": "[v2,04/15] baseband/turbo_sw: support large size code block",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4ef493354537f9bf3430ebd47a94bdb7b96e96da",
    "submitter": {
        "id": 1314,
        "url": "http://patches.dpdk.org/api/people/1314/?format=api",
        "name": "Chautru, Nicolas",
        "email": "nicolas.chautru@intel.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1583346152-10186-5-git-send-email-nicolas.chautru@intel.com/mbox/",
    "series": [
        {
            "id": 8783,
            "url": "http://patches.dpdk.org/api/series/8783/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8783",
            "date": "2020-03-04T18:22:17",
            "name": "bbdev new features",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/8783/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/66252/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/66252/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 56014A0573;\n\tWed,  4 Mar 2020 19:23:25 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DC5701BFE9;\n\tWed,  4 Mar 2020 19:22:52 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by dpdk.org (Postfix) with ESMTP id 1B1572C16\n for <dev@dpdk.org>; Wed,  4 Mar 2020 19:22:45 +0100 (CET)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 04 Mar 2020 10:22:43 -0800",
            "from skx-5gnr-sc12-4.sc.intel.com ([172.25.69.210])\n by fmsmga008.fm.intel.com with ESMTP; 04 Mar 2020 10:22:43 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.70,514,1574150400\"; d=\"scan'208\";a=\"234199003\"",
        "From": "Nicolas Chautru <nicolas.chautru@intel.com>",
        "To": "thomas@monjalon.net,\n\takhil.goyal@nxp.com,\n\tdev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com,\n\tNic Chautru <nicolas.chautru@intel.com>",
        "Date": "Wed,  4 Mar 2020 10:22:21 -0800",
        "Message-Id": "<1583346152-10186-5-git-send-email-nicolas.chautru@intel.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1583346152-10186-1-git-send-email-nicolas.chautru@intel.com>",
        "References": "<1582778348-113547-15-git-send-email-nicolas.chautru@intel.com>\n <1583346152-10186-1-git-send-email-nicolas.chautru@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 04/15] baseband/turbo_sw: support large size\n\tcode block",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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: Nic Chautru <nicolas.chautru@intel.com>\n\nThis is to support cases when the input data for\ndecoding a code block is larger than 64kB and would\nnot fit as a contiguous block of data into one\nmbuf. In that case the length from the opearation\nsupersedes the mbug default structure.\n\nSigned-off-by: Nic Chautru <nicolas.chautru@intel.com>\n---\n app/test-bbdev/test_bbdev_perf.c                 | 40 +++++++++++++++++++-----\n drivers/baseband/turbo_sw/bbdev_turbo_software.c | 11 ++++---\n 2 files changed, 39 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c\nindex d8db58e..d46966d 100644\n--- a/app/test-bbdev/test_bbdev_perf.c\n+++ b/app/test-bbdev/test_bbdev_perf.c\n@@ -764,6 +764,7 @@ typedef int (test_case_function)(struct active_device *ad,\n {\n \tint ret;\n \tunsigned int i, j;\n+\tbool large_input = false;\n \n \tfor (i = 0; i < n; ++i) {\n \t\tchar *data;\n@@ -774,24 +775,47 @@ typedef int (test_case_function)(struct active_device *ad,\n \t\t\t\top_type, n * ref_entries->nb_segments,\n \t\t\t\tmbuf_pool->size);\n \n-\t\tTEST_ASSERT_SUCCESS(((seg->length + RTE_PKTMBUF_HEADROOM) >\n-\t\t\t\t(uint32_t)UINT16_MAX),\n-\t\t\t\t\"Given data is bigger than allowed mbuf segment size\");\n-\n+\t\tif (seg->length > 64000) {\n+\t\t\t/*\n+\t\t\t * Special case when DPDK mbuf cannot handle\n+\t\t\t * the required input size\n+\t\t\t */\n+\t\t\tprintf(\"Warning: Larger input size than DPDK mbuf %d\\n\",\n+\t\t\t\t\tseg->length);\n+\t\t\tlarge_input = true;\n+\t\t} else {\n+\t\t\tTEST_ASSERT_SUCCESS(\n+\t\t\t\t\t((seg->length + RTE_PKTMBUF_HEADROOM)\n+\t\t\t\t\t> (uint32_t)UINT16_MAX),\n+\t\t\t\t\t\"Given data is bigger than allowed mbuf segment size\"\n+\t\t\t\t\t);\n+\t\t}\n \t\tbufs[i].data = m_head;\n \t\tbufs[i].offset = 0;\n \t\tbufs[i].length = 0;\n \n \t\tif ((op_type == DATA_INPUT) || (op_type == DATA_HARQ_INPUT)) {\n-\t\t\tdata = rte_pktmbuf_append(m_head, seg->length);\n-\t\t\tTEST_ASSERT_NOT_NULL(data,\n+\t\t\tif ((op_type == DATA_INPUT) && large_input) {\n+\t\t\t\t/* Allocate a fake overused mbuf */\n+\t\t\t\tdata = rte_malloc(NULL, 128 * 1024, 0);\n+\t\t\t\tmemcpy(data, seg->addr, seg->length);\n+\t\t\t\tm_head->buf_addr = data;\n+\t\t\t\tm_head->buf_iova = rte_mem_virt2phy(data);\n+\t\t\t\tm_head->data_off = 0;\n+\t\t\t\tm_head->data_len = seg->length;\n+\t\t\t} else {\n+\t\t\t\tdata = rte_pktmbuf_append(m_head, seg->length);\n+\t\t\t\tTEST_ASSERT_NOT_NULL(data,\n \t\t\t\t\t\"Couldn't append %u bytes to mbuf from %d data type mbuf pool\",\n \t\t\t\t\tseg->length, op_type);\n \n-\t\t\tTEST_ASSERT(data == RTE_PTR_ALIGN(data, min_alignment),\n+\t\t\t\tTEST_ASSERT(data == RTE_PTR_ALIGN(\n+\t\t\t\t\t\tdata, min_alignment),\n \t\t\t\t\t\"Data addr in mbuf (%p) is not aligned to device min alignment (%u)\",\n \t\t\t\t\tdata, min_alignment);\n-\t\t\trte_memcpy(data, seg->addr, seg->length);\n+\t\t\t\trte_memcpy(data, seg->addr, seg->length);\n+\t\t\t}\n+\n \t\t\tbufs[i].length += seg->length;\n \n \t\t\tfor (j = 1; j < ref_entries->nb_segments; ++j) {\ndiff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c\nindex 5ca8ca1..ea3fecb 100644\n--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c\n+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c\n@@ -1335,7 +1335,7 @@ struct turbo_sw_queue {\n \n static inline void\n process_ldpc_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op,\n-\t\tuint8_t c, uint16_t out_length, uint16_t e,\n+\t\tuint8_t c, uint16_t out_length, uint32_t e,\n \t\tstruct rte_mbuf *m_in,\n \t\tstruct rte_mbuf *m_out_head, struct rte_mbuf *m_out,\n \t\tstruct rte_mbuf *m_harq_in,\n@@ -1617,8 +1617,8 @@ struct turbo_sw_queue {\n \t\tstruct rte_bbdev_stats *queue_stats)\n {\n \tuint8_t c, r = 0;\n-\tuint16_t e, out_length;\n-\tuint16_t crc24_overlap = 0;\n+\tuint32_t e;\n+\tuint16_t out_length, crc24_overlap = 0;\n \tstruct rte_bbdev_op_ldpc_dec *dec = &op->ldpc_dec;\n \tstruct rte_mbuf *m_in = dec->input.data;\n \tstruct rte_mbuf *m_harq_in = dec->harq_combined_input.data;\n@@ -1661,7 +1661,10 @@ struct turbo_sw_queue {\n \t\t\te = (r < dec->tb_params.cab) ?\n \t\t\t\tdec->tb_params.ea : dec->tb_params.eb;\n \n-\t\tseg_total_left = rte_pktmbuf_data_len(m_in) - in_offset;\n+\t\tif (e < 64000) /* Special case handling when overusing mbuf */\n+\t\t\tseg_total_left = rte_pktmbuf_data_len(m_in) - in_offset;\n+\t\telse\n+\t\t\tseg_total_left = e;\n \n \t\tprocess_ldpc_dec_cb(q, op, c, out_length, e,\n \t\t\t\tm_in, m_out_head, m_out,\n",
    "prefixes": [
        "v2",
        "04/15"
    ]
}