get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 74038,
    "url": "http://patches.dpdk.org/api/patches/74038/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1594785603-152773-5-git-send-email-suanmingm@mellanox.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": "<1594785603-152773-5-git-send-email-suanmingm@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1594785603-152773-5-git-send-email-suanmingm@mellanox.com",
    "date": "2020-07-15T04:00:00",
    "name": "[4/7] common/mlx5: convert control path memory to unified malloc",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9fb1991e415a01f72c9c3906db431bda2224f359",
    "submitter": {
        "id": 1358,
        "url": "http://patches.dpdk.org/api/people/1358/?format=api",
        "name": "Suanming Mou",
        "email": "suanmingm@mellanox.com"
    },
    "delegate": {
        "id": 3268,
        "url": "http://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1594785603-152773-5-git-send-email-suanmingm@mellanox.com/mbox/",
    "series": [
        {
            "id": 11031,
            "url": "http://patches.dpdk.org/api/series/11031/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11031",
            "date": "2020-07-15T03:59:56",
            "name": "net/mlx5: add sys_mem_en devarg",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/11031/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/74038/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/74038/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 5315FA0540;\n\tWed, 15 Jul 2020 06:00:54 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 3B33F1C220;\n\tWed, 15 Jul 2020 06:00:21 +0200 (CEST)",
            "from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130])\n by dpdk.org (Postfix) with ESMTP id 9D7FC1C1CB\n for <dev@dpdk.org>; Wed, 15 Jul 2020 06:00:16 +0200 (CEST)"
        ],
        "From": "Suanming Mou <suanmingm@mellanox.com>",
        "To": "viacheslavo@mellanox.com,\n\tmatan@mellanox.com",
        "Cc": "orika@mellanox.com,\n\trasland@mellanox.com,\n\tdev@dpdk.org",
        "Date": "Wed, 15 Jul 2020 12:00:00 +0800",
        "Message-Id": "<1594785603-152773-5-git-send-email-suanmingm@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1594785603-152773-1-git-send-email-suanmingm@mellanox.com>",
        "References": "<1594785603-152773-1-git-send-email-suanmingm@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH 4/7] common/mlx5: convert control path memory to\n\tunified malloc",
        "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": "This commit allocateis the control path objects memory from the unified\nmalloc function.\n\nThese objects are all used during the instances initialize, it will not\naffect the data path.\n\nSigned-off-by: Suanming Mou <suanmingm@mellanox.com>\nAcked-by: Matan Azrad <matan@mellanox.com>\n---\n drivers/common/mlx5/linux/mlx5_glue.c | 13 +++---\n drivers/common/mlx5/linux/mlx5_nl.c   |  5 ++-\n drivers/common/mlx5/mlx5_common_mp.c  |  7 ++--\n drivers/common/mlx5/mlx5_devx_cmds.c  | 75 +++++++++++++++++++----------------\n 4 files changed, 55 insertions(+), 45 deletions(-)",
    "diff": "diff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c\nindex 395519d..48d2808 100644\n--- a/drivers/common/mlx5/linux/mlx5_glue.c\n+++ b/drivers/common/mlx5/linux/mlx5_glue.c\n@@ -184,7 +184,7 @@\n \t\tres = ibv_destroy_flow_action(attr->action);\n \t\tbreak;\n \t}\n-\tfree(action);\n+\tmlx5_free(action);\n \treturn res;\n #endif\n #else\n@@ -617,7 +617,7 @@\n \tstruct mlx5dv_flow_action_attr *action;\n \n \t(void)offset;\n-\taction = malloc(sizeof(*action));\n+\taction = mlx5_malloc(0, sizeof(*action), 0, SOCKET_ID_ANY);\n \tif (!action)\n \t\treturn NULL;\n \taction->type = MLX5DV_FLOW_ACTION_COUNTERS_DEVX;\n@@ -641,7 +641,7 @@\n #else\n \tstruct mlx5dv_flow_action_attr *action;\n \n-\taction = malloc(sizeof(*action));\n+\taction = mlx5_malloc(0, sizeof(*action), 0, SOCKET_ID_ANY);\n \tif (!action)\n \t\treturn NULL;\n \taction->type = MLX5DV_FLOW_ACTION_DEST_IBV_QP;\n@@ -686,7 +686,7 @@\n \n \t(void)domain;\n \t(void)flags;\n-\taction = malloc(sizeof(*action));\n+\taction = mlx5_malloc(0, sizeof(*action), 0, SOCKET_ID_ANY);\n \tif (!action)\n \t\treturn NULL;\n \taction->type = MLX5DV_FLOW_ACTION_IBV_FLOW_ACTION;\n@@ -726,7 +726,7 @@\n \t(void)flags;\n \tstruct mlx5dv_flow_action_attr *action;\n \n-\taction = malloc(sizeof(*action));\n+\taction = mlx5_malloc(0, sizeof(*action), 0, SOCKET_ID_ANY);\n \tif (!action)\n \t\treturn NULL;\n \taction->type = MLX5DV_FLOW_ACTION_IBV_FLOW_ACTION;\n@@ -755,7 +755,8 @@\n \treturn mlx5dv_dr_action_create_tag(tag);\n #else /* HAVE_MLX5DV_DR */\n \tstruct mlx5dv_flow_action_attr *action;\n-\taction = malloc(sizeof(*action));\n+\n+\taction = mlx5_malloc(0, sizeof(*action), 0, SOCKET_ID_ANY);\n \tif (!action)\n \t\treturn NULL;\n \taction->type = MLX5DV_FLOW_ACTION_TAG;\ndiff --git a/drivers/common/mlx5/linux/mlx5_nl.c b/drivers/common/mlx5/linux/mlx5_nl.c\nindex dc504d8..8ab7f6b 100644\n--- a/drivers/common/mlx5/linux/mlx5_nl.c\n+++ b/drivers/common/mlx5/linux/mlx5_nl.c\n@@ -22,6 +22,7 @@\n \n #include \"mlx5_nl.h\"\n #include \"mlx5_common_utils.h\"\n+#include \"mlx5_malloc.h\"\n #ifdef HAVE_DEVLINK\n #include <linux/devlink.h>\n #endif\n@@ -330,7 +331,7 @@ struct mlx5_nl_ifindex_data {\n \t     void *arg)\n {\n \tstruct sockaddr_nl sa;\n-\tvoid *buf = malloc(MLX5_RECV_BUF_SIZE);\n+\tvoid *buf = mlx5_malloc(0, MLX5_RECV_BUF_SIZE, 0, SOCKET_ID_ANY);\n \tstruct iovec iov = {\n \t\t.iov_base = buf,\n \t\t.iov_len = MLX5_RECV_BUF_SIZE,\n@@ -393,7 +394,7 @@ struct mlx5_nl_ifindex_data {\n \t\t}\n \t} while (multipart);\n exit:\n-\tfree(buf);\n+\tmlx5_free(buf);\n \treturn ret;\n }\n \ndiff --git a/drivers/common/mlx5/mlx5_common_mp.c b/drivers/common/mlx5/mlx5_common_mp.c\nindex da55143..40e3956 100644\n--- a/drivers/common/mlx5/mlx5_common_mp.c\n+++ b/drivers/common/mlx5/mlx5_common_mp.c\n@@ -11,6 +11,7 @@\n \n #include \"mlx5_common_mp.h\"\n #include \"mlx5_common_utils.h\"\n+#include \"mlx5_malloc.h\"\n \n /**\n  * Request Memory Region creation to the primary process.\n@@ -49,7 +50,7 @@\n \tret = res->result;\n \tif (ret)\n \t\trte_errno = -ret;\n-\tfree(mp_rep.msgs);\n+\tmlx5_free(mp_rep.msgs);\n \treturn ret;\n }\n \n@@ -89,7 +90,7 @@\n \tmp_res = &mp_rep.msgs[0];\n \tres = (struct mlx5_mp_param *)mp_res->param;\n \tret = res->result;\n-\tfree(mp_rep.msgs);\n+\tmlx5_free(mp_rep.msgs);\n \treturn ret;\n }\n \n@@ -136,7 +137,7 @@\n \tDRV_LOG(DEBUG, \"port %u command FD from primary is %d\",\n \t\tmp_id->port_id, ret);\n exit:\n-\tfree(mp_rep.msgs);\n+\tmlx5_free(mp_rep.msgs);\n \treturn ret;\n }\n \ndiff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c\nindex 2179a83..af2863e 100644\n--- a/drivers/common/mlx5/mlx5_devx_cmds.c\n+++ b/drivers/common/mlx5/mlx5_devx_cmds.c\n@@ -9,6 +9,7 @@\n #include \"mlx5_prm.h\"\n #include \"mlx5_devx_cmds.h\"\n #include \"mlx5_common_utils.h\"\n+#include \"mlx5_malloc.h\"\n \n \n /**\n@@ -28,7 +29,8 @@\n struct mlx5_devx_obj *\n mlx5_devx_cmd_flow_counter_alloc(void *ctx, uint32_t bulk_n_128)\n {\n-\tstruct mlx5_devx_obj *dcs = rte_zmalloc(\"dcs\", sizeof(*dcs), 0);\n+\tstruct mlx5_devx_obj *dcs = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*dcs),\n+\t\t\t\t\t\t0, SOCKET_ID_ANY);\n \tuint32_t in[MLX5_ST_SZ_DW(alloc_flow_counter_in)]   = {0};\n \tuint32_t out[MLX5_ST_SZ_DW(alloc_flow_counter_out)] = {0};\n \n@@ -44,7 +46,7 @@ struct mlx5_devx_obj *\n \tif (!dcs->obj) {\n \t\tDRV_LOG(ERR, \"Can't allocate counters - error %d\", errno);\n \t\trte_errno = errno;\n-\t\trte_free(dcs);\n+\t\tmlx5_free(dcs);\n \t\treturn NULL;\n \t}\n \tdcs->id = MLX5_GET(alloc_flow_counter_out, out, flow_counter_id);\n@@ -149,7 +151,8 @@ struct mlx5_devx_obj *\n \tuint32_t in[in_size_dw];\n \tuint32_t out[MLX5_ST_SZ_DW(create_mkey_out)] = {0};\n \tvoid *mkc;\n-\tstruct mlx5_devx_obj *mkey = rte_zmalloc(\"mkey\", sizeof(*mkey), 0);\n+\tstruct mlx5_devx_obj *mkey = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*mkey),\n+\t\t\t\t\t\t 0, SOCKET_ID_ANY);\n \tsize_t pgsize;\n \tuint32_t translation_size;\n \n@@ -208,7 +211,7 @@ struct mlx5_devx_obj *\n \t\tDRV_LOG(ERR, \"Can't create %sdirect mkey - error %d\\n\",\n \t\t\tklm_num ? \"an in\" : \"a \", errno);\n \t\trte_errno = errno;\n-\t\trte_free(mkey);\n+\t\tmlx5_free(mkey);\n \t\treturn NULL;\n \t}\n \tmkey->id = MLX5_GET(create_mkey_out, out, mkey_index);\n@@ -260,7 +263,7 @@ struct mlx5_devx_obj *\n \tif (!obj)\n \t\treturn 0;\n \tret =  mlx5_glue->devx_obj_destroy(obj->obj);\n-\trte_free(obj);\n+\tmlx5_free(obj);\n \treturn ret;\n }\n \n@@ -671,7 +674,7 @@ struct mlx5_devx_obj *\n \tstruct mlx5_devx_wq_attr *wq_attr;\n \tstruct mlx5_devx_obj *rq = NULL;\n \n-\trq = rte_calloc_socket(__func__, 1, sizeof(*rq), 0, socket);\n+\trq = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*rq), 0, socket);\n \tif (!rq) {\n \t\tDRV_LOG(ERR, \"Failed to allocate RQ data\");\n \t\trte_errno = ENOMEM;\n@@ -699,7 +702,7 @@ struct mlx5_devx_obj *\n \tif (!rq->obj) {\n \t\tDRV_LOG(ERR, \"Failed to create RQ using DevX\");\n \t\trte_errno = errno;\n-\t\trte_free(rq);\n+\t\tmlx5_free(rq);\n \t\treturn NULL;\n \t}\n \trq->id = MLX5_GET(create_rq_out, out, rqn);\n@@ -776,7 +779,7 @@ struct mlx5_devx_obj *\n \tvoid *tir_ctx, *outer, *inner, *rss_key;\n \tstruct mlx5_devx_obj *tir = NULL;\n \n-\ttir = rte_calloc(__func__, 1, sizeof(*tir), 0);\n+\ttir = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*tir), 0, SOCKET_ID_ANY);\n \tif (!tir) {\n \t\tDRV_LOG(ERR, \"Failed to allocate TIR data\");\n \t\trte_errno = ENOMEM;\n@@ -818,7 +821,7 @@ struct mlx5_devx_obj *\n \tif (!tir->obj) {\n \t\tDRV_LOG(ERR, \"Failed to create TIR using DevX\");\n \t\trte_errno = errno;\n-\t\trte_free(tir);\n+\t\tmlx5_free(tir);\n \t\treturn NULL;\n \t}\n \ttir->id = MLX5_GET(create_tir_out, out, tirn);\n@@ -848,17 +851,17 @@ struct mlx5_devx_obj *\n \tstruct mlx5_devx_obj *rqt = NULL;\n \tint i;\n \n-\tin = rte_calloc(__func__, 1, inlen, 0);\n+\tin = mlx5_malloc(MLX5_MEM_ZERO, inlen, 0, SOCKET_ID_ANY);\n \tif (!in) {\n \t\tDRV_LOG(ERR, \"Failed to allocate RQT IN data\");\n \t\trte_errno = ENOMEM;\n \t\treturn NULL;\n \t}\n-\trqt = rte_calloc(__func__, 1, sizeof(*rqt), 0);\n+\trqt = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*rqt), 0, SOCKET_ID_ANY);\n \tif (!rqt) {\n \t\tDRV_LOG(ERR, \"Failed to allocate RQT data\");\n \t\trte_errno = ENOMEM;\n-\t\trte_free(in);\n+\t\tmlx5_free(in);\n \t\treturn NULL;\n \t}\n \tMLX5_SET(create_rqt_in, in, opcode, MLX5_CMD_OP_CREATE_RQT);\n@@ -869,11 +872,11 @@ struct mlx5_devx_obj *\n \tfor (i = 0; i < rqt_attr->rqt_actual_size; i++)\n \t\tMLX5_SET(rqtc, rqt_ctx, rq_num[i], rqt_attr->rq_list[i]);\n \trqt->obj = mlx5_glue->devx_obj_create(ctx, in, inlen, out, sizeof(out));\n-\trte_free(in);\n+\tmlx5_free(in);\n \tif (!rqt->obj) {\n \t\tDRV_LOG(ERR, \"Failed to create RQT using DevX\");\n \t\trte_errno = errno;\n-\t\trte_free(rqt);\n+\t\tmlx5_free(rqt);\n \t\treturn NULL;\n \t}\n \trqt->id = MLX5_GET(create_rqt_out, out, rqtn);\n@@ -898,7 +901,7 @@ struct mlx5_devx_obj *\n \tuint32_t inlen = MLX5_ST_SZ_BYTES(modify_rqt_in) +\n \t\t\t rqt_attr->rqt_actual_size * sizeof(uint32_t);\n \tuint32_t out[MLX5_ST_SZ_DW(modify_rqt_out)] = {0};\n-\tuint32_t *in = rte_calloc(__func__, 1, inlen, 0);\n+\tuint32_t *in = mlx5_malloc(MLX5_MEM_ZERO, inlen, 0, SOCKET_ID_ANY);\n \tvoid *rqt_ctx;\n \tint i;\n \tint ret;\n@@ -918,7 +921,7 @@ struct mlx5_devx_obj *\n \tfor (i = 0; i < rqt_attr->rqt_actual_size; i++)\n \t\tMLX5_SET(rqtc, rqt_ctx, rq_num[i], rqt_attr->rq_list[i]);\n \tret = mlx5_glue->devx_obj_modify(rqt->obj, in, inlen, out, sizeof(out));\n-\trte_free(in);\n+\tmlx5_free(in);\n \tif (ret) {\n \t\tDRV_LOG(ERR, \"Failed to modify RQT using DevX.\");\n \t\trte_errno = errno;\n@@ -951,7 +954,7 @@ struct mlx5_devx_obj *\n \tstruct mlx5_devx_wq_attr *wq_attr;\n \tstruct mlx5_devx_obj *sq = NULL;\n \n-\tsq = rte_calloc(__func__, 1, sizeof(*sq), 0);\n+\tsq = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*sq), 0, SOCKET_ID_ANY);\n \tif (!sq) {\n \t\tDRV_LOG(ERR, \"Failed to allocate SQ data\");\n \t\trte_errno = ENOMEM;\n@@ -985,7 +988,7 @@ struct mlx5_devx_obj *\n \tif (!sq->obj) {\n \t\tDRV_LOG(ERR, \"Failed to create SQ using DevX\");\n \t\trte_errno = errno;\n-\t\trte_free(sq);\n+\t\tmlx5_free(sq);\n \t\treturn NULL;\n \t}\n \tsq->id = MLX5_GET(create_sq_out, out, sqn);\n@@ -1049,7 +1052,7 @@ struct mlx5_devx_obj *\n \tstruct mlx5_devx_obj *tis = NULL;\n \tvoid *tis_ctx;\n \n-\ttis = rte_calloc(__func__, 1, sizeof(*tis), 0);\n+\ttis = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*tis), 0, SOCKET_ID_ANY);\n \tif (!tis) {\n \t\tDRV_LOG(ERR, \"Failed to allocate TIS object\");\n \t\trte_errno = ENOMEM;\n@@ -1069,7 +1072,7 @@ struct mlx5_devx_obj *\n \tif (!tis->obj) {\n \t\tDRV_LOG(ERR, \"Failed to create TIS using DevX\");\n \t\trte_errno = errno;\n-\t\trte_free(tis);\n+\t\tmlx5_free(tis);\n \t\treturn NULL;\n \t}\n \ttis->id = MLX5_GET(create_tis_out, out, tisn);\n@@ -1091,7 +1094,7 @@ struct mlx5_devx_obj *\n \tuint32_t out[MLX5_ST_SZ_DW(alloc_transport_domain_out)] = {0};\n \tstruct mlx5_devx_obj *td = NULL;\n \n-\ttd = rte_calloc(__func__, 1, sizeof(*td), 0);\n+\ttd = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*td), 0, SOCKET_ID_ANY);\n \tif (!td) {\n \t\tDRV_LOG(ERR, \"Failed to allocate TD object\");\n \t\trte_errno = ENOMEM;\n@@ -1104,7 +1107,7 @@ struct mlx5_devx_obj *\n \tif (!td->obj) {\n \t\tDRV_LOG(ERR, \"Failed to create TIS using DevX\");\n \t\trte_errno = errno;\n-\t\trte_free(td);\n+\t\tmlx5_free(td);\n \t\treturn NULL;\n \t}\n \ttd->id = MLX5_GET(alloc_transport_domain_out, out,\n@@ -1168,8 +1171,9 @@ struct mlx5_devx_obj *\n {\n \tuint32_t in[MLX5_ST_SZ_DW(create_cq_in)] = {0};\n \tuint32_t out[MLX5_ST_SZ_DW(create_cq_out)] = {0};\n-\tstruct mlx5_devx_obj *cq_obj = rte_zmalloc(__func__, sizeof(*cq_obj),\n-\t\t\t\t\t\t   0);\n+\tstruct mlx5_devx_obj *cq_obj = mlx5_malloc(MLX5_MEM_ZERO,\n+\t\t\t\t\t\t   sizeof(*cq_obj),\n+\t\t\t\t\t\t   0, SOCKET_ID_ANY);\n \tvoid *cqctx = MLX5_ADDR_OF(create_cq_in, in, cq_context);\n \n \tif (!cq_obj) {\n@@ -1203,7 +1207,7 @@ struct mlx5_devx_obj *\n \tif (!cq_obj->obj) {\n \t\trte_errno = errno;\n \t\tDRV_LOG(ERR, \"Failed to create CQ using DevX errno=%d.\", errno);\n-\t\trte_free(cq_obj);\n+\t\tmlx5_free(cq_obj);\n \t\treturn NULL;\n \t}\n \tcq_obj->id = MLX5_GET(create_cq_out, out, cqn);\n@@ -1227,8 +1231,9 @@ struct mlx5_devx_obj *\n {\n \tuint32_t in[MLX5_ST_SZ_DW(create_virtq_in)] = {0};\n \tuint32_t out[MLX5_ST_SZ_DW(general_obj_out_cmd_hdr)] = {0};\n-\tstruct mlx5_devx_obj *virtq_obj = rte_zmalloc(__func__,\n-\t\t\t\t\t\t     sizeof(*virtq_obj), 0);\n+\tstruct mlx5_devx_obj *virtq_obj = mlx5_malloc(MLX5_MEM_ZERO,\n+\t\t\t\t\t\t     sizeof(*virtq_obj),\n+\t\t\t\t\t\t     0, SOCKET_ID_ANY);\n \tvoid *virtq = MLX5_ADDR_OF(create_virtq_in, in, virtq);\n \tvoid *hdr = MLX5_ADDR_OF(create_virtq_in, in, hdr);\n \tvoid *virtctx = MLX5_ADDR_OF(virtio_net_q, virtq, virtio_q_context);\n@@ -1276,7 +1281,7 @@ struct mlx5_devx_obj *\n \tif (!virtq_obj->obj) {\n \t\trte_errno = errno;\n \t\tDRV_LOG(ERR, \"Failed to create VIRTQ Obj using DevX.\");\n-\t\trte_free(virtq_obj);\n+\t\tmlx5_free(virtq_obj);\n \t\treturn NULL;\n \t}\n \tvirtq_obj->id = MLX5_GET(general_obj_out_cmd_hdr, out, obj_id);\n@@ -1398,8 +1403,9 @@ struct mlx5_devx_obj *\n {\n \tuint32_t in[MLX5_ST_SZ_DW(create_qp_in)] = {0};\n \tuint32_t out[MLX5_ST_SZ_DW(create_qp_out)] = {0};\n-\tstruct mlx5_devx_obj *qp_obj = rte_zmalloc(__func__, sizeof(*qp_obj),\n-\t\t\t\t\t\t   0);\n+\tstruct mlx5_devx_obj *qp_obj = mlx5_malloc(MLX5_MEM_ZERO,\n+\t\t\t\t\t\t   sizeof(*qp_obj),\n+\t\t\t\t\t\t   0, SOCKET_ID_ANY);\n \tvoid *qpc = MLX5_ADDR_OF(create_qp_in, in, qpc);\n \n \tif (!qp_obj) {\n@@ -1454,7 +1460,7 @@ struct mlx5_devx_obj *\n \tif (!qp_obj->obj) {\n \t\trte_errno = errno;\n \t\tDRV_LOG(ERR, \"Failed to create QP Obj using DevX.\");\n-\t\trte_free(qp_obj);\n+\t\tmlx5_free(qp_obj);\n \t\treturn NULL;\n \t}\n \tqp_obj->id = MLX5_GET(create_qp_out, out, qpn);\n@@ -1550,8 +1556,9 @@ struct mlx5_devx_obj *\n {\n \tuint32_t in[MLX5_ST_SZ_DW(create_virtio_q_counters_in)] = {0};\n \tuint32_t out[MLX5_ST_SZ_DW(general_obj_out_cmd_hdr)] = {0};\n-\tstruct mlx5_devx_obj *couners_obj = rte_zmalloc(__func__,\n-\t\t\t\t\t\t       sizeof(*couners_obj), 0);\n+\tstruct mlx5_devx_obj *couners_obj = mlx5_malloc(MLX5_MEM_ZERO,\n+\t\t\t\t\t\t       sizeof(*couners_obj), 0,\n+\t\t\t\t\t\t       SOCKET_ID_ANY);\n \tvoid *hdr = MLX5_ADDR_OF(create_virtio_q_counters_in, in, hdr);\n \n \tif (!couners_obj) {\n@@ -1569,7 +1576,7 @@ struct mlx5_devx_obj *\n \t\trte_errno = errno;\n \t\tDRV_LOG(ERR, \"Failed to create virtio queue counters Obj using\"\n \t\t\t\" DevX.\");\n-\t\trte_free(couners_obj);\n+\t\tmlx5_free(couners_obj);\n \t\treturn NULL;\n \t}\n \tcouners_obj->id = MLX5_GET(general_obj_out_cmd_hdr, out, obj_id);\n",
    "prefixes": [
        "4/7"
    ]
}