get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 91584,
    "url": "https://patches.dpdk.org/api/patches/91584/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210415151135.2098674-8-lizh@nvidia.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": "<20210415151135.2098674-8-lizh@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210415151135.2098674-8-lizh@nvidia.com",
    "date": "2021-04-15T15:11:27",
    "name": "[v5,07/14] common/mlx5: add read ASO flow meter HCA capability",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4c4f7e9457e03b882cf1840cb7f50e8d68b349e2",
    "submitter": {
        "id": 1967,
        "url": "https://patches.dpdk.org/api/people/1967/?format=api",
        "name": "Li Zhang",
        "email": "lizh@nvidia.com"
    },
    "delegate": {
        "id": 3268,
        "url": "https://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210415151135.2098674-8-lizh@nvidia.com/mbox/",
    "series": [
        {
            "id": 16417,
            "url": "https://patches.dpdk.org/api/series/16417/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=16417",
            "date": "2021-04-15T15:11:20",
            "name": "Add ASO meter support in MLX5 PMD",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/16417/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/91584/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/91584/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 CF9B8A0C3F;\n\tThu, 15 Apr 2021 17:12:29 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 80631162323;\n\tThu, 15 Apr 2021 17:11:59 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by mails.dpdk.org (Postfix) with ESMTP id 57DAF162301\n for <dev@dpdk.org>; Thu, 15 Apr 2021 17:11:51 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n lizh@nvidia.com)\n with SMTP; 15 Apr 2021 18:11:47 +0300",
            "from nvidia.com (c-235-17-1-009.mtl.labs.mlnx [10.235.17.9])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 13FFBjPM032677;\n Thu, 15 Apr 2021 18:11:47 +0300"
        ],
        "From": "Li Zhang <lizh@nvidia.com>",
        "To": "dekelp@nvidia.com, orika@nvidia.com, viacheslavo@nvidia.com,\n matan@nvidia.com, shahafs@nvidia.com",
        "Cc": "dev@dpdk.org, thomas@monjalon.net, rasland@nvidia.com, roniba@nvidia.com",
        "Date": "Thu, 15 Apr 2021 18:11:27 +0300",
        "Message-Id": "<20210415151135.2098674-8-lizh@nvidia.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20210415151135.2098674-1-lizh@nvidia.com>",
        "References": "<20210331073632.1443011-1-lizh@nvidia.com>\n <20210415151135.2098674-1-lizh@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v5 07/14] common/mlx5: add read ASO flow meter\n HCA capability",
        "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": "Read and store the device capability of FLOW_METER_ASO general object,\nusing the DevX API.\n\nSigned-off-by: Li Zhang <lizh@nvidia.com>\nAcked-by: Matan Azrad <matan@nvidia.com>\n---\n drivers/common/mlx5/mlx5_devx_cmds.c | 14 ++++++++++++++\n drivers/common/mlx5/mlx5_devx_cmds.h |  8 ++++++++\n 2 files changed, 22 insertions(+)",
    "diff": "diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c\nindex 268bcd0d99..a878a5c689 100644\n--- a/drivers/common/mlx5/mlx5_devx_cmds.c\n+++ b/drivers/common/mlx5/mlx5_devx_cmds.c\n@@ -696,6 +696,9 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,\n \tattr->max_geneve_tlv_option_data_len = MLX5_GET(cmd_hca_cap, hcattr,\n \t\t\tmax_geneve_tlv_option_data_len);\n \tattr->qos.sup = MLX5_GET(cmd_hca_cap, hcattr, qos);\n+\tattr->qos.flow_meter_aso_sup = !!(MLX5_GET64(cmd_hca_cap, hcattr,\n+\t\t\t\t\t general_obj_types) &\n+\t\t\t      MLX5_GENERAL_OBJ_TYPES_CAP_FLOW_METER_ASO);\n \tattr->vdpa.valid = !!(MLX5_GET64(cmd_hca_cap, hcattr,\n \t\t\t\t\t general_obj_types) &\n \t\t\t      MLX5_GENERAL_OBJ_TYPES_CAP_VIRTQ_NET_Q);\n@@ -783,6 +786,17 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,\n \t\t\t\tMLX5_GET(qos_cap, hcattr, packet_pacing);\n \t\tattr->qos.wqe_rate_pp =\n \t\t\t\tMLX5_GET(qos_cap, hcattr, wqe_rate_pp);\n+\t\tif (attr->qos.flow_meter_aso_sup) {\n+\t\t\tattr->qos.log_meter_aso_granularity =\n+\t\t\t\tMLX5_GET(qos_cap, hcattr,\n+\t\t\t\t\tlog_meter_aso_granularity);\n+\t\t\tattr->qos.log_meter_aso_max_alloc =\n+\t\t\t\tMLX5_GET(qos_cap, hcattr,\n+\t\t\t\t\tlog_meter_aso_max_alloc);\n+\t\t\tattr->qos.log_max_num_meter_aso =\n+\t\t\t\tMLX5_GET(qos_cap, hcattr,\n+\t\t\t\t\tlog_max_num_meter_aso);\n+\t\t}\n \t}\n \tif (attr->vdpa.valid)\n \t\tmlx5_devx_cmd_query_hca_vdpa_attr(ctx, &attr->vdpa);\ndiff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h\nindex 67b5f771c6..673e41599e 100644\n--- a/drivers/common/mlx5/mlx5_devx_cmds.h\n+++ b/drivers/common/mlx5/mlx5_devx_cmds.h\n@@ -50,10 +50,18 @@ struct mlx5_hca_qos_attr {\n \t * Using older driver versions, flow_meter_old can be 1\n \t * while flow_meter is 0.\n \t */\n+\tuint32_t flow_meter_aso_sup:1;\n+\t/* Whether FLOW_METER_ASO Object is supported. */\n \tuint8_t log_max_flow_meter;\n \t/* Power of the maximum supported meters. */\n \tuint8_t flow_meter_reg_c_ids;\n \t/* Bitmap of the reg_Cs available for flow meter to use. */\n+\tuint32_t log_meter_aso_granularity:5;\n+\t/* Power of the minimum allocation granularity Object. */\n+\tuint32_t log_meter_aso_max_alloc:5;\n+\t/* Power of the maximum allocation granularity Object. */\n+\tuint32_t log_max_num_meter_aso:5;\n+\t/* Power of the maximum number of supported objects. */\n \n };\n \n",
    "prefixes": [
        "v5",
        "07/14"
    ]
}