get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 132245,
    "url": "http://patches.dpdk.org/api/patches/132245/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230929181328.104311-10-hernan.vargas@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": "<20230929181328.104311-10-hernan.vargas@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230929181328.104311-10-hernan.vargas@intel.com",
    "date": "2023-09-29T18:13:26",
    "name": "[v1,09/11] test/bbdev: add MLD support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "58e4b3747e9eff93017a5acb7cf67194f5fa82f7",
    "submitter": {
        "id": 2659,
        "url": "http://patches.dpdk.org/api/people/2659/?format=api",
        "name": "Hernan Vargas",
        "email": "hernan.vargas@intel.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230929181328.104311-10-hernan.vargas@intel.com/mbox/",
    "series": [
        {
            "id": 29705,
            "url": "http://patches.dpdk.org/api/series/29705/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29705",
            "date": "2023-09-29T18:13:17",
            "name": "test-bbdev changes for 23.11",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/29705/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/132245/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/132245/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 67D3042677;\n\tFri, 29 Sep 2023 22:16:45 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2161C40A7F;\n\tFri, 29 Sep 2023 22:15:52 +0200 (CEST)",
            "from mgamail.intel.com (mgamail.intel.com [192.198.163.7])\n by mails.dpdk.org (Postfix) with ESMTP id 61A1B402D4\n for <dev@dpdk.org>; Fri, 29 Sep 2023 22:15:42 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 29 Sep 2023 11:14:04 -0700",
            "from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103])\n by fmsmga002.fm.intel.com with ESMTP; 29 Sep 2023 11:14:03 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1696018542; x=1727554542;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=lL9Y/S+Sn8jrmIRrBLcbRihKL8ebxZ3XRuPwh8abdYI=;\n b=Sf0Mv2dhsZpYgmjBqTsQoA0VQzQoIF7uyHd7+SDlyEhgpM3pAUzFtqVk\n 0Zu+4tZT78ghoIPuenJde8adQQP0itLmsFLYN27BoOPKP/qHb55h3Tkcm\n 0a1VLnlBbUbw6qL/i2/vubVPRke9WY0yFH7ojICfCm5y6ud7Jgktyu+w4\n 6sqsAgwNoGaMFGZyh2t7MuD1w0rrk2tNu7rUHh+RJnVj1izYYji5lJfvm\n s0d65KFMhpyx0Q+OEXkx20SdlEcx20fcoWPirL2JnpaY/SOYK5jpS4n93\n Ymg5MeXuRKX0wm8yTxlTnIphtxWpgbsTwIm76t6hwq9hVGrDgnGe5ynPV A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10848\"; a=\"3925516\"",
            "E=Sophos;i=\"6.03,188,1694761200\";\n   d=\"scan'208\";a=\"3925516\"",
            "E=McAfee;i=\"6600,9927,10848\"; a=\"865777317\"",
            "E=Sophos;i=\"6.03,188,1694761200\"; d=\"scan'208\";a=\"865777317\""
        ],
        "X-ExtLoop1": "1",
        "From": "Hernan Vargas <hernan.vargas@intel.com>",
        "To": "dev@dpdk.org, gakhil@marvell.com, trix@redhat.com,\n maxime.coquelin@redhat.com",
        "Cc": "nicolas.chautru@intel.com, qi.z.zhang@intel.com,\n Hernan Vargas <hernan.vargas@intel.com>",
        "Subject": "[PATCH v1 09/11] test/bbdev: add MLD support",
        "Date": "Fri, 29 Sep 2023 11:13:26 -0700",
        "Message-Id": "<20230929181328.104311-10-hernan.vargas@intel.com>",
        "X-Mailer": "git-send-email 2.37.1",
        "In-Reply-To": "<20230929181328.104311-1-hernan.vargas@intel.com>",
        "References": "<20230929181328.104311-1-hernan.vargas@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "Adding test-bbdev support for the MLD-TS processing specific to the VRB2\nvariant.\n\nSigned-off-by: Hernan Vargas <hernan.vargas@intel.com>\n---\n app/test-bbdev/test_bbdev_perf.c   | 519 +++++++++++++++++++++++++++++\n app/test-bbdev/test_bbdev_vector.c | 132 ++++++++\n app/test-bbdev/test_bbdev_vector.h |   1 +\n 3 files changed, 652 insertions(+)",
    "diff": "diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c\nindex 4f8e226e587b..8a349fdb03d5 100644\n--- a/app/test-bbdev/test_bbdev_perf.c\n+++ b/app/test-bbdev/test_bbdev_perf.c\n@@ -139,6 +139,7 @@ struct test_op_params {\n \tstruct rte_bbdev_dec_op *ref_dec_op;\n \tstruct rte_bbdev_enc_op *ref_enc_op;\n \tstruct rte_bbdev_fft_op *ref_fft_op;\n+\tstruct rte_bbdev_mldts_op *ref_mldts_op;\n \tuint16_t burst_sz;\n \tuint16_t num_to_process;\n \tuint16_t num_lcores;\n@@ -165,6 +166,7 @@ struct thread_params {\n \tstruct rte_bbdev_dec_op *dec_ops[MAX_BURST];\n \tstruct rte_bbdev_enc_op *enc_ops[MAX_BURST];\n \tstruct rte_bbdev_fft_op *fft_ops[MAX_BURST];\n+\tstruct rte_bbdev_mldts_op *mldts_ops[MAX_BURST];\n };\n \n /* Stores time statistics */\n@@ -472,6 +474,18 @@ check_dev_cap(const struct rte_bbdev_info *dev_info)\n \t\t\t\treturn TEST_FAILED;\n \t\t\t}\n \t\t\treturn TEST_SUCCESS;\n+\t\t} else if (op_cap->type == RTE_BBDEV_OP_MLDTS) {\n+\t\t\tconst struct rte_bbdev_op_cap_mld *cap = &op_cap->cap.mld;\n+\t\t\tif (!flags_match(test_vector.mldts.op_flags, cap->capability_flags)) {\n+\t\t\t\tprintf(\"Flag Mismatch\\n\");\n+\t\t\t\treturn TEST_FAILED;\n+\t\t\t}\n+\t\t\tif (nb_inputs > cap->num_buffers_src) {\n+\t\t\t\tprintf(\"Too many inputs defined: %u, max: %u\\n\",\n+\t\t\t\t\tnb_inputs, cap->num_buffers_src);\n+\t\t\t\treturn TEST_FAILED;\n+\t\t\t}\n+\t\t\treturn TEST_SUCCESS;\n \t\t}\n \t}\n \n@@ -822,6 +836,9 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info,\n \t\t\tconf.arb_fft[i].gbr_threshold1 = VRB_QOS_GBR;\n \t\t\tconf.arb_fft[i].gbr_threshold1 = VRB_QOS_GBR;\n \t\t\tconf.arb_fft[i].round_robin_weight = VRB_QMGR_RR;\n+\t\t\tconf.arb_mld[i].gbr_threshold1 = VRB_QOS_GBR;\n+\t\t\tconf.arb_mld[i].gbr_threshold1 = VRB_QOS_GBR;\n+\t\t\tconf.arb_mld[i].round_robin_weight = VRB_QMGR_RR;\n \t\t}\n \n \t\tconf.input_pos_llr_1_bit = true;\n@@ -847,6 +864,10 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info,\n \t\tconf.q_fft.num_qgroups = VRB_QMGR_NUM_QGS;\n \t\tconf.q_fft.first_qgroup_index = VRB_QMGR_INVALID_IDX;\n \t\tconf.q_fft.num_aqs_per_groups = VRB_QMGR_NUM_AQS;\n+\t\tconf.q_mld.num_qgroups = VRB_QMGR_NUM_QGS;\n+\t\tconf.q_mld.first_qgroup_index = VRB_QMGR_INVALID_IDX;\n+\t\tconf.q_mld.num_aqs_per_groups = VRB_QMGR_NUM_AQS;\n+\t\tconf.q_mld.aq_depth_log2 = VRB_QMGR_AQ_DEPTH;\n \n \t\t/* setup PF with configuration information */\n \t\tret = rte_acc_configure(info->dev_name, &conf);\n@@ -1979,6 +2000,31 @@ copy_reference_fft_op(struct rte_bbdev_fft_op **ops, unsigned int n,\n \t}\n }\n \n+static void\n+copy_reference_mldts_op(struct rte_bbdev_mldts_op **ops, unsigned int n,\n+\t\tunsigned int start_idx,\n+\t\tstruct rte_bbdev_op_data *q_inputs,\n+\t\tstruct rte_bbdev_op_data *r_inputs,\n+\t\tstruct rte_bbdev_op_data *outputs,\n+\t\tstruct rte_bbdev_mldts_op *ref_op)\n+{\n+\tunsigned int i, j;\n+\tstruct rte_bbdev_op_mldts *mldts = &ref_op->mldts;\n+\tfor (i = 0; i < n; i++) {\n+\t\tops[i]->mldts.c_rep = mldts->c_rep;\n+\t\tops[i]->mldts.num_layers = mldts->num_layers;\n+\t\tops[i]->mldts.num_rbs = mldts->num_rbs;\n+\t\tops[i]->mldts.op_flags = mldts->op_flags;\n+\t\tfor (j = 0; j < RTE_BBDEV_MAX_MLD_LAYERS; j++)\n+\t\t\tops[i]->mldts.q_m[j] = mldts->q_m[j];\n+\t\tops[i]->mldts.r_rep = mldts->r_rep;\n+\t\tops[i]->mldts.c_rep = mldts->c_rep;\n+\t\tops[i]->mldts.r_input = r_inputs[start_idx + i];\n+\t\tops[i]->mldts.qhy_input = q_inputs[start_idx + i];\n+\t\tops[i]->mldts.output = outputs[start_idx + i];\n+\t}\n+}\n+\n static int\n check_dec_status_and_ordering(struct rte_bbdev_dec_op *op,\n \t\tunsigned int order_idx, const int expected_status)\n@@ -2039,6 +2085,21 @@ check_fft_status_and_ordering(struct rte_bbdev_fft_op *op,\n \treturn TEST_SUCCESS;\n }\n \n+static int\n+check_mldts_status_and_ordering(struct rte_bbdev_mldts_op *op,\n+\t\tunsigned int order_idx, const int expected_status)\n+{\n+\tTEST_ASSERT(op->status == expected_status,\n+\t\t\t\"op_status (%d) != expected_status (%d)\",\n+\t\t\top->status, expected_status);\n+\n+\tTEST_ASSERT((void *)(uintptr_t)order_idx == op->opaque_data,\n+\t\t\t\"Ordering error, expected %p, got %p\",\n+\t\t\t(void *)(uintptr_t)order_idx, op->opaque_data);\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n static inline int\n validate_op_chain(struct rte_bbdev_op_data *op,\n \t\tstruct op_data_entries *orig_op)\n@@ -2554,6 +2615,57 @@ validate_op_fft_chain(struct rte_bbdev_op_data *op, struct op_data_entries *orig\n \treturn TEST_SUCCESS;\n }\n \n+static inline int\n+validate_op_mldts_chain(struct rte_bbdev_op_data *op,\n+\t\tstruct op_data_entries *orig_op)\n+{\n+\tuint8_t i;\n+\tstruct rte_mbuf *m = op->data;\n+\tuint8_t nb_dst_segments = orig_op->nb_segments;\n+\t/*the result is not bit exact*/\n+\tint16_t thres_hold = 3;\n+\tint16_t delt, abs_delt;\n+\tuint32_t j, data_len_iq;\n+\tuint32_t error_num;\n+\tint8_t *ref_out;\n+\tint8_t *op_out;\n+\n+\tTEST_ASSERT(nb_dst_segments == m->nb_segs,\n+\t\t\t\"Number of segments differ in original (%u) and filled (%u) op mldts\",\n+\t\t\tnb_dst_segments, m->nb_segs);\n+\n+\t/* Due to size limition of mbuf, MLDTS doesn't use real mbuf. */\n+\tfor (i = 0; i < nb_dst_segments; ++i) {\n+\t\tuint16_t offset = (i == 0) ? op->offset : 0;\n+\t\tuint32_t data_len = op->length;\n+\n+\t\tTEST_ASSERT(orig_op->segments[i].length == data_len,\n+\t\t\t\t\"Length of segment differ in original (%u) and filled (%u) op mldts\",\n+\t\t\t\torig_op->segments[i].length, data_len);\n+\t\tdata_len_iq = data_len;\n+\t\tref_out = (int8_t *)(orig_op->segments[i].addr);\n+\t\top_out = rte_pktmbuf_mtod_offset(m, int8_t *, offset),\n+\t\terror_num = 0;\n+\t\tfor (j = 0; j < data_len_iq; j++) {\n+\n+\t\t\tdelt = ref_out[j] - op_out[j];\n+\t\t\tabs_delt = delt > 0 ? delt : -delt;\n+\t\t\terror_num += (abs_delt > thres_hold ? 1 : 0);\n+\t\t\tif (error_num > 0)\n+\t\t\t\tprintf(\"MLD Error %d: Exp %x %d Actual %x %d Diff %d\\n\",\n+\t\t\t\t\t\tj, ref_out[j], ref_out[j], op_out[j], op_out[j],\n+\t\t\t\t\t\tdelt);\n+\t\t}\n+\t\tTEST_ASSERT(error_num == 0,\n+\t\t\t\"MLDTS Output are not matched total (%u) errors (%u)\",\n+\t\t\tdata_len_iq, error_num);\n+\n+\t\tm = m->next;\n+\t}\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n static int\n validate_fft_op(struct rte_bbdev_fft_op **ops, const uint16_t n,\n \t\tstruct rte_bbdev_fft_op *ref_op)\n@@ -2578,6 +2690,28 @@ validate_fft_op(struct rte_bbdev_fft_op **ops, const uint16_t n,\n \treturn TEST_SUCCESS;\n }\n \n+static int\n+validate_mldts_op(struct rte_bbdev_mldts_op **ops, const uint16_t n,\n+\t\tstruct rte_bbdev_mldts_op *ref_op)\n+{\n+\tunsigned int i;\n+\tint ret;\n+\tstruct op_data_entries *mldts_data_orig =\n+\t\t\t&test_vector.entries[DATA_HARD_OUTPUT];\n+\tfor (i = 0; i < n; ++i) {\n+\t\tret = check_mldts_status_and_ordering(ops[i], i, ref_op->status);\n+\t\tTEST_ASSERT_SUCCESS(ret,\n+\t\t\t\t\"Checking status and ordering for MLDTS failed\");\n+\t\tTEST_ASSERT_SUCCESS(validate_op_mldts_chain(\n+\t\t\t\t&ops[i]->mldts.output,\n+\t\t\t\tmldts_data_orig),\n+\t\t\t\t\"MLDTS Output buffers (op=%u) are not matched\",\n+\t\t\t\ti);\n+\t}\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n static void\n create_reference_dec_op(struct rte_bbdev_dec_op *op)\n {\n@@ -2622,6 +2756,20 @@ create_reference_fft_op(struct rte_bbdev_fft_op *op)\n \t\top->fft.base_input.length += entry->segments[i].length;\n }\n \n+static void\n+create_reference_mldts_op(struct rte_bbdev_mldts_op *op)\n+{\n+\tunsigned int i;\n+\tstruct op_data_entries *entry;\n+\top->mldts = test_vector.mldts;\n+\tentry = &test_vector.entries[DATA_INPUT];\n+\tfor (i = 0; i < entry->nb_segments; ++i)\n+\t\top->mldts.qhy_input.length += entry->segments[i].length;\n+\tentry = &test_vector.entries[DATA_HARQ_INPUT];\n+\tfor (i = 0; i < entry->nb_segments; ++i)\n+\t\top->mldts.r_input.length += entry->segments[i].length;\n+}\n+\n static void\n create_reference_enc_op(struct rte_bbdev_enc_op *op)\n {\n@@ -2730,6 +2878,14 @@ calc_fft_size(struct rte_bbdev_fft_op *op)\n \treturn output_size;\n }\n \n+static uint32_t\n+calc_mldts_size(struct rte_bbdev_mldts_op *op)\n+{\n+\tuint32_t output_size;\n+\toutput_size = op->mldts.num_layers * op->mldts.num_rbs * op->mldts.c_rep;\n+\treturn output_size;\n+}\n+\n static int\n init_test_op_params(struct test_op_params *op_params,\n \t\tenum rte_bbdev_op_type op_type, const int expected_status,\n@@ -2744,6 +2900,9 @@ init_test_op_params(struct test_op_params *op_params,\n \telse if (op_type == RTE_BBDEV_OP_FFT)\n \t\tret = rte_bbdev_fft_op_alloc_bulk(ops_mp,\n \t\t\t\t&op_params->ref_fft_op, 1);\n+\telse if (op_type == RTE_BBDEV_OP_MLDTS)\n+\t\tret = rte_bbdev_mldts_op_alloc_bulk(ops_mp,\n+\t\t\t\t&op_params->ref_mldts_op, 1);\n \telse\n \t\tret = rte_bbdev_enc_op_alloc_bulk(ops_mp,\n \t\t\t\t&op_params->ref_enc_op, 1);\n@@ -2763,6 +2922,8 @@ init_test_op_params(struct test_op_params *op_params,\n \t\top_params->ref_enc_op->status = expected_status;\n \telse if (op_type == RTE_BBDEV_OP_FFT)\n \t\top_params->ref_fft_op->status = expected_status;\n+\telse if (op_type == RTE_BBDEV_OP_MLDTS)\n+\t\top_params->ref_mldts_op->status = expected_status;\n \treturn 0;\n }\n \n@@ -2831,6 +2992,8 @@ run_test_case_on_device(test_case_function *test_case_func, uint8_t dev_id,\n \t\tcreate_reference_ldpc_dec_op(op_params->ref_dec_op);\n \telse if (test_vector.op_type == RTE_BBDEV_OP_FFT)\n \t\tcreate_reference_fft_op(op_params->ref_fft_op);\n+\telse if (test_vector.op_type == RTE_BBDEV_OP_MLDTS)\n+\t\tcreate_reference_mldts_op(op_params->ref_mldts_op);\n \n \tfor (i = 0; i < ad->nb_queues; ++i) {\n \t\tf_ret = fill_queue_buffers(op_params,\n@@ -3047,6 +3210,11 @@ dequeue_event_callback(uint16_t dev_id,\n \t\t\t\t&tp->fft_ops[\n \t\t\t\t\t__atomic_load_n(&tp->nb_dequeued, __ATOMIC_RELAXED)],\n \t\t\t\tburst_sz);\n+\telse if (test_vector.op_type == RTE_BBDEV_OP_MLDTS)\n+\t\tdeq = rte_bbdev_dequeue_mldts_ops(dev_id, queue_id,\n+\t\t\t\t&tp->mldts_ops[\n+\t\t\t\t\t__atomic_load_n(&tp->nb_dequeued, __ATOMIC_RELAXED)],\n+\t\t\t\tburst_sz);\n \telse /*RTE_BBDEV_OP_TURBO_ENC*/\n \t\tdeq = rte_bbdev_dequeue_enc_ops(dev_id, queue_id,\n \t\t\t\t&tp->enc_ops[\n@@ -3093,6 +3261,10 @@ dequeue_event_callback(uint16_t dev_id,\n \t\tstruct rte_bbdev_fft_op *ref_op = tp->op_params->ref_fft_op;\n \t\tret = validate_fft_op(tp->fft_ops, num_ops, ref_op);\n \t\trte_bbdev_fft_op_free_bulk(tp->fft_ops, deq);\n+\t} else if (test_vector.op_type == RTE_BBDEV_OP_MLDTS) {\n+\t\tstruct rte_bbdev_mldts_op *ref_op = tp->op_params->ref_mldts_op;\n+\t\tret = validate_mldts_op(tp->mldts_ops, num_ops, ref_op);\n+\t\trte_bbdev_mldts_op_free_bulk(tp->mldts_ops, deq);\n \t} else if (test_vector.op_type == RTE_BBDEV_OP_LDPC_DEC) {\n \t\tstruct rte_bbdev_dec_op *ref_op = tp->op_params->ref_dec_op;\n \t\tret = validate_ldpc_dec_op(tp->dec_ops, num_ops, ref_op,\n@@ -3118,6 +3290,9 @@ dequeue_event_callback(uint16_t dev_id,\n \tcase RTE_BBDEV_OP_FFT:\n \t\ttb_len_bits = calc_fft_size(tp->op_params->ref_fft_op);\n \t\tbreak;\n+\tcase RTE_BBDEV_OP_MLDTS:\n+\t\ttb_len_bits = calc_mldts_size(tp->op_params->ref_mldts_op);\n+\t\tbreak;\n \tcase RTE_BBDEV_OP_LDPC_ENC:\n \t\ttb_len_bits = calc_ldpc_enc_TB_size(tp->op_params->ref_enc_op);\n \t\tbreak;\n@@ -3593,6 +3768,88 @@ throughput_intr_lcore_fft(void *arg)\n \treturn TEST_SUCCESS;\n }\n \n+static int\n+throughput_intr_lcore_mldts(void *arg)\n+{\n+\tstruct thread_params *tp = arg;\n+\tunsigned int enqueued;\n+\tconst uint16_t queue_id = tp->queue_id;\n+\tconst uint16_t burst_sz = tp->op_params->burst_sz;\n+\tconst uint16_t num_to_process = tp->op_params->num_to_process;\n+\tstruct rte_bbdev_mldts_op *ops[num_to_process];\n+\tstruct test_buffers *bufs = NULL;\n+\tstruct rte_bbdev_info info;\n+\tint ret, i, j;\n+\tuint16_t num_to_enq, enq;\n+\n+\tTEST_ASSERT_SUCCESS((burst_sz > MAX_BURST), \"BURST_SIZE should be <= %u\", MAX_BURST);\n+\n+\tTEST_ASSERT_SUCCESS(rte_bbdev_queue_intr_enable(tp->dev_id, queue_id),\n+\t\t\t\"Failed to enable interrupts for dev: %u, queue_id: %u\",\n+\t\t\ttp->dev_id, queue_id);\n+\n+\trte_bbdev_info_get(tp->dev_id, &info);\n+\n+\tTEST_ASSERT_SUCCESS((num_to_process > info.drv.queue_size_lim),\n+\t\t\t\"NUM_OPS cannot exceed %u for this device\",\n+\t\t\tinfo.drv.queue_size_lim);\n+\n+\tbufs = &tp->op_params->q_bufs[GET_SOCKET(info.socket_id)][queue_id];\n+\n+\t__atomic_store_n(&tp->processing_status, 0, __ATOMIC_RELAXED);\n+\t__atomic_store_n(&tp->nb_dequeued, 0, __ATOMIC_RELAXED);\n+\n+\trte_wait_until_equal_16(&tp->op_params->sync, SYNC_START, __ATOMIC_RELAXED);\n+\n+\tret = rte_bbdev_mldts_op_alloc_bulk(tp->op_params->mp, ops, num_to_process);\n+\tTEST_ASSERT_SUCCESS(ret, \"Allocation failed for %d ops\", num_to_process);\n+\tif (test_vector.op_type != RTE_BBDEV_OP_NONE)\n+\t\tcopy_reference_mldts_op(ops, num_to_process, 0, bufs->inputs, bufs->harq_inputs,\n+\t\t\t\tbufs->hard_outputs, tp->op_params->ref_mldts_op);\n+\n+\t/* Set counter to validate the ordering */\n+\tfor (j = 0; j < num_to_process; ++j)\n+\t\tops[j]->opaque_data = (void *)(uintptr_t)j;\n+\n+\tfor (j = 0; j < TEST_REPETITIONS; ++j) {\n+\t\tfor (i = 0; i < num_to_process; ++i)\n+\t\t\tmbuf_reset(ops[i]->mldts.output.data);\n+\n+\t\ttp->start_time = rte_rdtsc_precise();\n+\t\tfor (enqueued = 0; enqueued < num_to_process;) {\n+\t\t\tnum_to_enq = burst_sz;\n+\n+\t\t\tif (unlikely(num_to_process - enqueued < num_to_enq))\n+\t\t\t\tnum_to_enq = num_to_process - enqueued;\n+\n+\t\t\tenq = 0;\n+\t\t\tdo {\n+\t\t\t\tenq += rte_bbdev_enqueue_mldts_ops(tp->dev_id,\n+\t\t\t\t\t\tqueue_id, &ops[enqueued], num_to_enq);\n+\t\t\t} while (unlikely(enq != num_to_enq));\n+\t\t\tenqueued += enq;\n+\n+\t\t\t/* Write to thread burst_sz current number of enqueued\n+\t\t\t * descriptors. It ensures that proper number of\n+\t\t\t * descriptors will be dequeued in callback\n+\t\t\t * function - needed for last batch in case where\n+\t\t\t * the number of operations is not a multiple of\n+\t\t\t * burst size.\n+\t\t\t */\n+\t\t\t__atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);\n+\n+\t\t\t/* Wait until processing of previous batch is\n+\t\t\t * completed\n+\t\t\t */\n+\t\t\trte_wait_until_equal_16(&tp->nb_dequeued, enqueued, __ATOMIC_RELAXED);\n+\t\t}\n+\t\tif (j != TEST_REPETITIONS - 1)\n+\t\t\t__atomic_store_n(&tp->nb_dequeued, 0, __ATOMIC_RELAXED);\n+\t}\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n static int\n throughput_pmd_lcore_dec(void *arg)\n {\n@@ -4403,6 +4660,104 @@ throughput_pmd_lcore_fft(void *arg)\n \treturn TEST_SUCCESS;\n }\n \n+static int\n+throughput_pmd_lcore_mldts(void *arg)\n+{\n+\tstruct thread_params *tp = arg;\n+\tuint16_t enq, deq;\n+\tuint64_t total_time = 0, start_time;\n+\tconst uint16_t queue_id = tp->queue_id;\n+\tconst uint16_t burst_sz = tp->op_params->burst_sz;\n+\tconst uint16_t num_ops = tp->op_params->num_to_process;\n+\tstruct rte_bbdev_mldts_op *ops_enq[num_ops];\n+\tstruct rte_bbdev_mldts_op *ops_deq[num_ops];\n+\tstruct rte_bbdev_mldts_op *ref_op = tp->op_params->ref_mldts_op;\n+\tstruct test_buffers *bufs = NULL;\n+\tint i, j, ret;\n+\tstruct rte_bbdev_info info;\n+\tuint16_t num_to_enq;\n+\n+\tTEST_ASSERT_SUCCESS((burst_sz > MAX_BURST), \"BURST_SIZE should be <= %u\", MAX_BURST);\n+\n+\trte_bbdev_info_get(tp->dev_id, &info);\n+\n+\tTEST_ASSERT_SUCCESS((num_ops > info.drv.queue_size_lim),\n+\t\t\t\"NUM_OPS cannot exceed %u for this device\",\n+\t\t\tinfo.drv.queue_size_lim);\n+\n+\tbufs = &tp->op_params->q_bufs[GET_SOCKET(info.socket_id)][queue_id];\n+\n+\trte_wait_until_equal_16(&tp->op_params->sync, SYNC_START, __ATOMIC_RELAXED);\n+\n+\tret = rte_bbdev_mldts_op_alloc_bulk(tp->op_params->mp, ops_enq, num_ops);\n+\tTEST_ASSERT_SUCCESS(ret, \"Allocation failed for %d ops\", num_ops);\n+\n+\tif (test_vector.op_type != RTE_BBDEV_OP_NONE)\n+\t\tcopy_reference_mldts_op(ops_enq, num_ops, 0, bufs->inputs, bufs->harq_inputs,\n+\t\t\t\tbufs->hard_outputs, ref_op);\n+\n+\t/* Set counter to validate the ordering */\n+\tfor (j = 0; j < num_ops; ++j)\n+\t\tops_enq[j]->opaque_data = (void *)(uintptr_t)j;\n+\n+\tfor (i = 0; i < TEST_REPETITIONS; ++i) {\n+\t\tuint32_t time_out = 0;\n+\t\tfor (j = 0; j < num_ops; ++j)\n+\t\t\tmbuf_reset(ops_enq[j]->mldts.output.data);\n+\n+\t\tstart_time = rte_rdtsc_precise();\n+\n+\t\tfor (enq = 0, deq = 0; enq < num_ops;) {\n+\t\t\tnum_to_enq = burst_sz;\n+\n+\t\t\tif (unlikely(num_ops - enq < num_to_enq))\n+\t\t\t\tnum_to_enq = num_ops - enq;\n+\n+\t\t\tenq += rte_bbdev_enqueue_mldts_ops(tp->dev_id,\n+\t\t\t\t\tqueue_id, &ops_enq[enq], num_to_enq);\n+\n+\t\t\tdeq += rte_bbdev_dequeue_mldts_ops(tp->dev_id,\n+\t\t\t\t\tqueue_id, &ops_deq[deq], enq - deq);\n+\t\t\ttime_out++;\n+\t\t\tif (time_out >= TIME_OUT_POLL) {\n+\t\t\t\ttimeout_exit(tp->dev_id);\n+\t\t\t\tTEST_ASSERT_SUCCESS(TEST_FAILED, \"Enqueue timeout!\");\n+\t\t\t}\n+\t\t}\n+\n+\t\t/* dequeue the remaining */\n+\t\ttime_out = 0;\n+\t\twhile (deq < enq) {\n+\t\t\tdeq += rte_bbdev_dequeue_mldts_ops(tp->dev_id,\n+\t\t\t\t\tqueue_id, &ops_deq[deq], enq - deq);\n+\t\t\ttime_out++;\n+\t\t\tif (time_out >= TIME_OUT_POLL) {\n+\t\t\t\ttimeout_exit(tp->dev_id);\n+\t\t\t\tTEST_ASSERT_SUCCESS(TEST_FAILED, \"Dequeue timeout!\");\n+\t\t\t}\n+\t\t}\n+\n+\t\ttotal_time += rte_rdtsc_precise() - start_time;\n+\t}\n+\n+\tif (test_vector.op_type != RTE_BBDEV_OP_NONE) {\n+\t\tret = validate_mldts_op(ops_deq, num_ops, ref_op);\n+\t\tTEST_ASSERT_SUCCESS(ret, \"Validation failed!\");\n+\t}\n+\n+\trte_bbdev_mldts_op_free_bulk(ops_enq, num_ops);\n+\n+\tdouble tb_len_bits = calc_mldts_size(ref_op);\n+\n+\ttp->ops_per_sec = ((double)num_ops * TEST_REPETITIONS) /\n+\t\t\t((double)total_time / (double)rte_get_tsc_hz());\n+\ttp->mbps = (((double)(num_ops * TEST_REPETITIONS * tb_len_bits)) /\n+\t\t\t1000000.0) / ((double)total_time /\n+\t\t\t(double)rte_get_tsc_hz());\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n static void\n print_enc_throughput(struct thread_params *t_params, unsigned int used_cores)\n {\n@@ -4624,6 +4979,8 @@ throughput_test(struct active_device *ad,\n \t\t\tthroughput_function = throughput_intr_lcore_ldpc_enc;\n \t\telse if (test_vector.op_type == RTE_BBDEV_OP_FFT)\n \t\t\tthroughput_function = throughput_intr_lcore_fft;\n+\t\telse if (test_vector.op_type == RTE_BBDEV_OP_MLDTS)\n+\t\t\tthroughput_function = throughput_intr_lcore_mldts;\n \t\telse\n \t\t\tthroughput_function = throughput_intr_lcore_enc;\n \n@@ -4646,6 +5003,8 @@ throughput_test(struct active_device *ad,\n \t\t\tthroughput_function = throughput_pmd_lcore_ldpc_enc;\n \t\telse if (test_vector.op_type == RTE_BBDEV_OP_FFT)\n \t\t\tthroughput_function = throughput_pmd_lcore_fft;\n+\t\telse if (test_vector.op_type == RTE_BBDEV_OP_MLDTS)\n+\t\t\tthroughput_function = throughput_pmd_lcore_mldts;\n \t\telse\n \t\t\tthroughput_function = throughput_pmd_lcore_enc;\n \t}\n@@ -5139,6 +5498,77 @@ latency_test_fft(struct rte_mempool *mempool,\n \treturn i;\n }\n \n+static int\n+latency_test_mldts(struct rte_mempool *mempool,\n+\t\tstruct test_buffers *bufs, struct rte_bbdev_mldts_op *ref_op,\n+\t\tuint16_t dev_id, uint16_t queue_id,\n+\t\tconst uint16_t num_to_process, uint16_t burst_sz,\n+\t\tuint64_t *total_time, uint64_t *min_time, uint64_t *max_time)\n+{\n+\tint ret = TEST_SUCCESS;\n+\tuint16_t i, j, dequeued;\n+\tstruct rte_bbdev_mldts_op *ops_enq[MAX_BURST], *ops_deq[MAX_BURST];\n+\tuint64_t start_time = 0, last_time = 0;\n+\n+\tfor (i = 0, dequeued = 0; dequeued < num_to_process; ++i) {\n+\t\tuint16_t enq = 0, deq = 0;\n+\t\tuint32_t time_out = 0;\n+\t\tbool first_time = true;\n+\t\tlast_time = 0;\n+\n+\t\tif (unlikely(num_to_process - dequeued < burst_sz))\n+\t\t\tburst_sz = num_to_process - dequeued;\n+\n+\t\tret = rte_bbdev_mldts_op_alloc_bulk(mempool, ops_enq, burst_sz);\n+\t\tTEST_ASSERT_SUCCESS(ret, \"rte_bbdev_mldts_op_alloc_bulk() failed\");\n+\t\tif (test_vector.op_type != RTE_BBDEV_OP_NONE)\n+\t\t\tcopy_reference_mldts_op(ops_enq, burst_sz, dequeued,\n+\t\t\t\t\tbufs->inputs, bufs->harq_inputs,\n+\t\t\t\t\tbufs->hard_outputs,\n+\t\t\t\t\tref_op);\n+\n+\t\t/* Set counter to validate the ordering */\n+\t\tfor (j = 0; j < burst_sz; ++j)\n+\t\t\tops_enq[j]->opaque_data = (void *)(uintptr_t)j;\n+\n+\t\tstart_time = rte_rdtsc_precise();\n+\n+\t\tenq = rte_bbdev_enqueue_mldts_ops(dev_id, queue_id, &ops_enq[enq], burst_sz);\n+\t\tTEST_ASSERT(enq == burst_sz,\n+\t\t\t\t\"Error enqueueing burst, expected %u, got %u\",\n+\t\t\t\tburst_sz, enq);\n+\n+\t\t/* Dequeue */\n+\t\tdo {\n+\t\t\tdeq += rte_bbdev_dequeue_mldts_ops(dev_id, queue_id,\n+\t\t\t\t\t&ops_deq[deq], burst_sz - deq);\n+\t\t\tif (likely(first_time && (deq > 0))) {\n+\t\t\t\tlast_time += rte_rdtsc_precise() - start_time;\n+\t\t\t\tfirst_time = false;\n+\t\t\t}\n+\t\t\ttime_out++;\n+\t\t\tif (time_out >= TIME_OUT_POLL) {\n+\t\t\t\ttimeout_exit(dev_id);\n+\t\t\t\tTEST_ASSERT_SUCCESS(TEST_FAILED, \"Dequeue timeout!\");\n+\t\t\t}\n+\t\t} while (unlikely(burst_sz != deq));\n+\n+\t\t*max_time = RTE_MAX(*max_time, last_time);\n+\t\t*min_time = RTE_MIN(*min_time, last_time);\n+\t\t*total_time += last_time;\n+\n+\t\tif (test_vector.op_type != RTE_BBDEV_OP_NONE) {\n+\t\t\tret = validate_mldts_op(ops_deq, burst_sz, ref_op);\n+\t\t\tTEST_ASSERT_SUCCESS(ret, \"Validation failed!\");\n+\t\t}\n+\n+\t\trte_bbdev_mldts_op_free_bulk(ops_enq, deq);\n+\t\tdequeued += deq;\n+\t}\n+\n+\treturn i;\n+}\n+\n /* Common function for running validation and latency test cases */\n static int\n validation_latency_test(struct active_device *ad,\n@@ -5196,6 +5626,12 @@ validation_latency_test(struct active_device *ad,\n \t\t\t\tad->dev_id, queue_id,\n \t\t\t\tnum_to_process, burst_sz, &total_time,\n \t\t\t\t&min_time, &max_time);\n+\telse if (op_type == RTE_BBDEV_OP_MLDTS)\n+\t\titer = latency_test_mldts(op_params->mp, bufs,\n+\t\t\t\top_params->ref_mldts_op,\n+\t\t\t\tad->dev_id, queue_id,\n+\t\t\t\tnum_to_process, burst_sz, &total_time,\n+\t\t\t\t&min_time, &max_time);\n \telse /* RTE_BBDEV_OP_TURBO_ENC */\n \t\titer = latency_test_enc(op_params->mp, bufs,\n \t\t\t\top_params->ref_enc_op,\n@@ -5337,6 +5773,85 @@ offload_latency_test_fft(struct rte_mempool *mempool, struct test_buffers *bufs,\n \treturn i;\n }\n \n+static int\n+offload_latency_test_mldts(struct rte_mempool *mempool, struct test_buffers *bufs,\n+\t\tstruct rte_bbdev_mldts_op *ref_op, uint16_t dev_id,\n+\t\tuint16_t queue_id, const uint16_t num_to_process,\n+\t\tuint16_t burst_sz, struct test_time_stats *time_st)\n+{\n+\tint i, dequeued, ret;\n+\tstruct rte_bbdev_mldts_op *ops_enq[MAX_BURST], *ops_deq[MAX_BURST];\n+\tuint64_t enq_start_time, deq_start_time;\n+\tuint64_t enq_sw_last_time, deq_last_time;\n+\tstruct rte_bbdev_stats stats;\n+\n+\tfor (i = 0, dequeued = 0; dequeued < num_to_process; ++i) {\n+\t\tuint16_t enq = 0, deq = 0;\n+\n+\t\tif (unlikely(num_to_process - dequeued < burst_sz))\n+\t\t\tburst_sz = num_to_process - dequeued;\n+\n+\t\tret = rte_bbdev_mldts_op_alloc_bulk(mempool, ops_enq, burst_sz);\n+\t\tTEST_ASSERT_SUCCESS(ret, \"rte_bbdev_mldts_op_alloc_bulk() failed\");\n+\t\tif (test_vector.op_type != RTE_BBDEV_OP_NONE)\n+\t\t\tcopy_reference_mldts_op(ops_enq, burst_sz, dequeued,\n+\t\t\t\t\tbufs->inputs, bufs->harq_inputs,\n+\t\t\t\t\tbufs->hard_outputs,\n+\t\t\t\t\tref_op);\n+\n+\t\t/* Start time meas for enqueue function offload latency */\n+\t\tenq_start_time = rte_rdtsc_precise();\n+\t\tdo {\n+\t\t\tenq += rte_bbdev_enqueue_mldts_ops(dev_id, queue_id,\n+\t\t\t\t\t&ops_enq[enq], burst_sz - enq);\n+\t\t} while (unlikely(burst_sz != enq));\n+\n+\t\tret = get_bbdev_queue_stats(dev_id, queue_id, &stats);\n+\t\tTEST_ASSERT_SUCCESS(ret,\n+\t\t\t\t\"Failed to get stats for queue (%u) of device (%u)\",\n+\t\t\t\tqueue_id, dev_id);\n+\n+\t\tenq_sw_last_time = rte_rdtsc_precise() - enq_start_time -\n+\t\t\t\tstats.acc_offload_cycles;\n+\t\ttime_st->enq_sw_max_time = RTE_MAX(time_st->enq_sw_max_time,\n+\t\t\t\tenq_sw_last_time);\n+\t\ttime_st->enq_sw_min_time = RTE_MIN(time_st->enq_sw_min_time,\n+\t\t\t\tenq_sw_last_time);\n+\t\ttime_st->enq_sw_total_time += enq_sw_last_time;\n+\n+\t\ttime_st->enq_acc_max_time = RTE_MAX(time_st->enq_acc_max_time,\n+\t\t\t\tstats.acc_offload_cycles);\n+\t\ttime_st->enq_acc_min_time = RTE_MIN(time_st->enq_acc_min_time,\n+\t\t\t\tstats.acc_offload_cycles);\n+\t\ttime_st->enq_acc_total_time += stats.acc_offload_cycles;\n+\n+\t\t/* give time for device to process ops */\n+\t\trte_delay_us(WAIT_OFFLOAD_US);\n+\n+\t\t/* Start time meas for dequeue function offload latency */\n+\t\tdeq_start_time = rte_rdtsc_precise();\n+\t\t/* Dequeue one operation */\n+\t\tdo {\n+\t\t\tdeq += rte_bbdev_dequeue_mldts_ops(dev_id, queue_id, &ops_deq[deq], enq);\n+\t\t} while (unlikely(deq == 0));\n+\n+\t\tdeq_last_time = rte_rdtsc_precise() - deq_start_time;\n+\t\ttime_st->deq_max_time = RTE_MAX(time_st->deq_max_time, deq_last_time);\n+\t\ttime_st->deq_min_time = RTE_MIN(time_st->deq_min_time, deq_last_time);\n+\t\ttime_st->deq_total_time += deq_last_time;\n+\n+\t\t/* Dequeue remaining operations if needed*/\n+\t\twhile (burst_sz != deq)\n+\t\t\tdeq += rte_bbdev_dequeue_mldts_ops(dev_id, queue_id,\n+\t\t\t\t\t&ops_deq[deq], burst_sz - deq);\n+\n+\t\trte_bbdev_mldts_op_free_bulk(ops_enq, deq);\n+\t\tdequeued += deq;\n+\t}\n+\n+\treturn i;\n+}\n+\n static int\n offload_latency_test_dec(struct rte_mempool *mempool, struct test_buffers *bufs,\n \t\tstruct rte_bbdev_dec_op *ref_op, uint16_t dev_id,\n@@ -5734,6 +6249,10 @@ offload_cost_test(struct active_device *ad,\n \t\titer = offload_latency_test_fft(op_params->mp, bufs,\n \t\t\top_params->ref_fft_op, ad->dev_id, queue_id,\n \t\t\tnum_to_process, burst_sz, &time_st);\n+\telse if (op_type == RTE_BBDEV_OP_MLDTS)\n+\t\titer = offload_latency_test_mldts(op_params->mp, bufs,\n+\t\t\top_params->ref_mldts_op, ad->dev_id, queue_id,\n+\t\t\tnum_to_process, burst_sz, &time_st);\n \telse\n \t\titer = offload_latency_test_enc(op_params->mp, bufs,\n \t\t\t\top_params->ref_enc_op, ad->dev_id, queue_id,\ndiff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c\nindex 0ef1481f2af3..8f464db83882 100644\n--- a/app/test-bbdev/test_bbdev_vector.c\n+++ b/app/test-bbdev/test_bbdev_vector.c\n@@ -244,6 +244,20 @@ op_fft_flag_strtoul(char *token, uint32_t *op_flag_value)\n \treturn 0;\n }\n \n+/* convert MLD flag from string to unsigned long int*/\n+static int\n+op_mld_flag_strtoul(char *token, uint32_t *op_flag_value)\n+{\n+\tif (!strcmp(token, \"RTE_BBDEV_MLDTS_REP\"))\n+\t\t*op_flag_value = RTE_BBDEV_MLDTS_REP;\n+\telse {\n+\t\tprintf(\"The given value is not a MLD flag\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\treturn 0;\n+}\n+\n /* convert turbo encoder flag from string to unsigned long int*/\n static int\n op_encoder_flag_strtoul(char *token, uint32_t *op_flag_value)\n@@ -326,6 +340,10 @@ parse_turbo_flags(char *tokens, uint32_t *op_flags,\n \t\t\tif (op_fft_flag_strtoul(tok, &op_flag_value)\n \t\t\t\t\t== -1)\n \t\t\t\treturn -1;\n+\t\t} else if (op_type == RTE_BBDEV_OP_MLDTS) {\n+\t\t\tif (op_mld_flag_strtoul(tok, &op_flag_value)\n+\t\t\t\t\t== -1)\n+\t\t\t\treturn -1;\n \t\t} else {\n \t\t\treturn -1;\n \t\t}\n@@ -355,6 +373,8 @@ op_turbo_type_strtol(char *token, enum rte_bbdev_op_type *op_type)\n \t\t*op_type = RTE_BBDEV_OP_LDPC_DEC;\n \telse if (!strcmp(token, \"RTE_BBDEV_OP_FFT\"))\n \t\t*op_type = RTE_BBDEV_OP_FFT;\n+\telse if (!strcmp(token, \"RTE_BBDEV_OP_MLDTS\"))\n+\t\t*op_type = RTE_BBDEV_OP_MLDTS;\n \telse if (!strcmp(token, \"RTE_BBDEV_OP_NONE\"))\n \t\t*op_type = RTE_BBDEV_OP_NONE;\n \telse {\n@@ -992,6 +1012,73 @@ parse_fft_params(const char *key_token, char *token,\n \treturn 0;\n }\n \n+/* parses MLD parameters and assigns to global variable */\n+static int\n+parse_mld_params(const char *key_token, char *token,\n+\t\tstruct test_bbdev_vector *vector)\n+{\n+\tint ret = 0, status = 0;\n+\tuint32_t op_flags = 0;\n+\tchar *err = NULL;\n+\n+\tstruct rte_bbdev_op_mldts *mld = &vector->mldts;\n+\n+\tif (starts_with(key_token, \"qhy_input\")) {\n+\t\tret = parse_data_entry(key_token, token, vector,\n+\t\t\t\tDATA_INPUT, \"qhy_input\");\n+\t} else if (starts_with(key_token, \"r_input\")) {\n+\t\tret = parse_data_entry(key_token, token, vector,\n+\t\t\t\tDATA_HARQ_INPUT, \"r_input\");\n+\t} else if (starts_with(key_token, \"output\")) {\n+\t\tret = parse_data_entry(key_token, token, vector,\n+\t\t\t\tDATA_HARD_OUTPUT, \"output\");\n+\t} else if (!strcmp(key_token, \"layers\")) {\n+\t\tmld->num_layers = (uint32_t) strtoul(token, &err, 0);\n+\t\tret = ((err == NULL) || (*err != '\\0')) ? -1 : 0;\n+\t} else if (!strcmp(key_token, \"layer1\")) {\n+\t\tmld->q_m[0] = (uint32_t) strtoul(token, &err, 0);\n+\t\tret = ((err == NULL) || (*err != '\\0')) ? -1 : 0;\n+\t} else if (!strcmp(key_token, \"layer2\")) {\n+\t\tmld->q_m[1] = (uint32_t) strtoul(token, &err, 0);\n+\t\tret = ((err == NULL) || (*err != '\\0')) ? -1 : 0;\n+\t} else if (!strcmp(key_token, \"layer3\")) {\n+\t\tmld->q_m[2] = (uint32_t) strtoul(token, &err, 0);\n+\t\tret = ((err == NULL) || (*err != '\\0')) ? -1 : 0;\n+\t} else if (!strcmp(key_token, \"layer4\")) {\n+\t\tmld->q_m[3] = (uint32_t) strtoul(token, &err, 0);\n+\t\tret = ((err == NULL) || (*err != '\\0')) ? -1 : 0;\n+\t} else if (!strcmp(key_token, \"crep\")) {\n+\t\tmld->c_rep = (uint32_t) strtoul(token, &err, 0);\n+\t\tret = ((err == NULL) || (*err != '\\0')) ? -1 : 0;\n+\t} else if (!strcmp(key_token, \"rrep\")) {\n+\t\tmld->r_rep = (uint32_t) strtoul(token, &err, 0);\n+\t\tret = ((err == NULL) || (*err != '\\0')) ? -1 : 0;\n+\t} else if (!strcmp(key_token, \"rbs\")) {\n+\t\tmld->num_rbs = (uint32_t) strtoul(token, &err, 0);\n+\t\tret = ((err == NULL) || (*err != '\\0')) ? -1 : 0;\n+\t} else if (!strcmp(key_token, \"op_flags\")) {\n+\t\tvector->mask |= TEST_BBDEV_VF_OP_FLAGS;\n+\t\tret = parse_turbo_flags(token, &op_flags, vector->op_type);\n+\t\tif (!ret)\n+\t\t\tmld->op_flags = op_flags;\n+\t} else if (!strcmp(key_token, \"expected_status\")) {\n+\t\tvector->mask |= TEST_BBDEV_VF_EXPECTED_STATUS;\n+\t\tret = parse_expected_status(token, &status, vector->op_type);\n+\t\tif (!ret)\n+\t\t\tvector->expected_status = status;\n+\t} else {\n+\t\tprintf(\"Not valid mld key: '%s'\\n\", key_token);\n+\t\treturn -1;\n+\t}\n+\n+\tif (ret != 0) {\n+\t\tprintf(\"Failed with convert '%s\\t%s'\\n\", key_token, token);\n+\t\treturn -1;\n+\t}\n+\n+\treturn 0;\n+}\n+\n /* checks the type of key and assigns data */\n static int\n parse_entry(char *entry, struct test_bbdev_vector *vector)\n@@ -1046,6 +1133,9 @@ parse_entry(char *entry, struct test_bbdev_vector *vector)\n \t} else if (vector->op_type == RTE_BBDEV_OP_FFT) {\n \t\tif (parse_fft_params(key_token, token, vector) == -1)\n \t\t\treturn -1;\n+\t} else if (vector->op_type == RTE_BBDEV_OP_MLDTS) {\n+\t\tif (parse_mld_params(key_token, token, vector) == -1)\n+\t\t\treturn -1;\n \t}\n \n \treturn 0;\n@@ -1132,6 +1222,25 @@ check_fft_segments(struct test_bbdev_vector *vector)\n \treturn 0;\n }\n \n+static int\n+check_mld_segments(struct test_bbdev_vector *vector)\n+{\n+\tunsigned char i;\n+\n+\tfor (i = 0; i < vector->entries[DATA_INPUT].nb_segments; i++)\n+\t\tif (vector->entries[DATA_INPUT].segments[i].addr == NULL)\n+\t\t\treturn -1;\n+\n+\tfor (i = 0; i < vector->entries[DATA_HARQ_INPUT].nb_segments; i++)\n+\t\tif (vector->entries[DATA_HARQ_INPUT].segments[i].addr == NULL)\n+\t\t\treturn -1;\n+\n+\tfor (i = 0; i < vector->entries[DATA_HARD_OUTPUT].nb_segments; i++)\n+\t\tif (vector->entries[DATA_HARD_OUTPUT].segments[i].addr == NULL)\n+\t\t\treturn -1;\n+\treturn 0;\n+}\n+\n static int\n check_decoder_llr_spec(struct test_bbdev_vector *vector)\n {\n@@ -1359,6 +1468,26 @@ check_fft(struct test_bbdev_vector *vector)\n \treturn 0;\n }\n \n+/* checks mld parameters */\n+static int\n+check_mld(struct test_bbdev_vector *vector)\n+{\n+\tconst int mask = vector->mask;\n+\n+\tif (check_mld_segments(vector) < 0)\n+\t\treturn -1;\n+\n+\t/* Check which params were set */\n+\tif (!(mask & TEST_BBDEV_VF_OP_FLAGS)) {\n+\t\tprintf(\n+\t\t\t\"WARNING: op_flags was not specified in vector file and capabilities will not be validated\\n\");\n+\t}\n+\tif (!(mask & TEST_BBDEV_VF_EXPECTED_STATUS))\n+\t\tprintf(\n+\t\t\t\"WARNING: expected_status was not specified in vector file and will be set to 0\\n\");\n+\treturn 0;\n+}\n+\n /* checks encoder parameters */\n static int\n check_encoder(struct test_bbdev_vector *vector)\n@@ -1520,6 +1649,9 @@ bbdev_check_vector(struct test_bbdev_vector *vector)\n \t} else if (vector->op_type == RTE_BBDEV_OP_FFT) {\n \t\tif (check_fft(vector) == -1)\n \t\t\treturn -1;\n+\t} else if (vector->op_type == RTE_BBDEV_OP_MLDTS) {\n+\t\tif (check_mld(vector) == -1)\n+\t\t\treturn -1;\n \t} else if (vector->op_type != RTE_BBDEV_OP_NONE) {\n \t\tprintf(\"Vector was not filled\\n\");\n \t\treturn -1;\ndiff --git a/app/test-bbdev/test_bbdev_vector.h b/app/test-bbdev/test_bbdev_vector.h\nindex 2ea271ffb78b..14b8ef2764ad 100644\n--- a/app/test-bbdev/test_bbdev_vector.h\n+++ b/app/test-bbdev/test_bbdev_vector.h\n@@ -65,6 +65,7 @@ struct test_bbdev_vector {\n \t\tstruct rte_bbdev_op_ldpc_dec ldpc_dec;\n \t\tstruct rte_bbdev_op_ldpc_enc ldpc_enc;\n \t\tstruct rte_bbdev_op_fft fft;\n+\t\tstruct rte_bbdev_op_mldts mldts;\n \t};\n \t/* Additional storage for op data entries */\n \tstruct op_data_entries entries[DATA_NUM_TYPES];\n",
    "prefixes": [
        "v1",
        "09/11"
    ]
}