Show a patch.

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

{
    "id": 42950,
    "url": "http://patches.dpdk.org/api/patches/42950/",
    "web_url": "http://patches.dpdk.org/patch/42950/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<8404fe64d562a672f999591e77abcdb1881d83b6.1531387413.git.nelio.laranjeiro@6wind.com>",
    "date": "2018-07-12T09:30:49",
    "name": "[v4,03/21] net/mlx5: replace verbs priorities by flow",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "609728b9efd2af56d429d250b2aabea0b6c34183",
    "submitter": {
        "id": 243,
        "url": "http://patches.dpdk.org/api/people/243/",
        "name": "Nélio Laranjeiro",
        "email": "nelio.laranjeiro@6wind.com"
    },
    "delegate": {
        "id": 6624,
        "url": "http://patches.dpdk.org/api/users/6624/",
        "username": "shahafs",
        "first_name": "Shahaf",
        "last_name": "Shuler",
        "email": "shahafs@mellanox.com"
    },
    "mbox": "http://patches.dpdk.org/patch/42950/mbox/",
    "series": [
        {
            "id": 544,
            "url": "http://patches.dpdk.org/api/series/544/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=544",
            "date": "2018-07-12T09:30:46",
            "name": "net/mlx5: flow rework",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/544/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/42950/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/42950/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "In-Reply-To": "<cover.1531387413.git.nelio.laranjeiro@6wind.com>",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Mailer": "git-send-email 2.18.0",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D38521B57A;\n\tThu, 12 Jul 2018 11:31:34 +0200 (CEST)",
            "from mail-wr1-f66.google.com (mail-wr1-f66.google.com\n\t[209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 2C7ED1B526\n\tfor <dev@dpdk.org>; Thu, 12 Jul 2018 11:31:28 +0200 (CEST)",
            "by mail-wr1-f66.google.com with SMTP id h9-v6so20974489wro.3\n\tfor <dev@dpdk.org>; Thu, 12 Jul 2018 02:31:28 -0700 (PDT)",
            "from laranjeiro-vm.dev.6wind.com\n\t(host.78.145.23.62.rev.coltfrance.com. [62.23.145.78])\n\tby smtp.gmail.com with ESMTPSA id\n\ts2-v6sm18717603wrn.75.2018.07.12.02.31.26\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 12 Jul 2018 02:31:26 -0700 (PDT)"
        ],
        "References": "<cover.1531293415.git.nelio.laranjeiro@6wind.com>\n\t<cover.1531387413.git.nelio.laranjeiro@6wind.com>",
        "X-Google-Smtp-Source": "AAOMgpd3KbK3nyrZEe6uMWjrPxoXzlm6AmQ93oc3fBkEwFMwxhvc/czh0Br+GG7L/0YvgVasoIehsQ==",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=qjBo8v3AxKvoiPxec9Q3pQKBaqGYlE1KG6Z5NSIWHgI=;\n\tb=lPZKTKy5gxKrq79N8kvsyPEsbs5dFkA0xQZFY74s9WC6FS01fUKMzOZZOdqM/7jUbK\n\tV0P0cL8UI7fvVHVCC7yySiwDxGzww0OwTwCn+zJI7+pzDHfMi8fOmF9ZE5NLjoHkTWtn\n\t7p01w9qyS0+T2E+EH7DP7PAtL+7eFiBiDmWL+jtF4LKlCM/hurAcizH3EueXHISWXW/d\n\taN2GTKpgbELOOax/zRWnSU+IKfNz8t8w3tuJSrf2I53G89PCwf1hFPfGvWB3coLsgznu\n\tftRjKzsu9iCTu067g4ETDKJwxHjy8n02dQE3Pyl2Zq8ZwygLlmw1FGOecwGGvw80DB+T\n\t8Nmg==",
        "X-BeenThere": "dev@dpdk.org",
        "X-Received": "by 2002:adf:c78e:: with SMTP id\n\tl14-v6mr1124631wrg.230.1531387887712; \n\tThu, 12 Jul 2018 02:31:27 -0700 (PDT)",
        "Message-Id": "<8404fe64d562a672f999591e77abcdb1881d83b6.1531387413.git.nelio.laranjeiro@6wind.com>",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=qjBo8v3AxKvoiPxec9Q3pQKBaqGYlE1KG6Z5NSIWHgI=;\n\tb=e2WpShyrqeL8TDKtU6t7K9inVEoWqO+77GQg2JQNE015vsxrGXqpShr9wVp7JyxXLB\n\tqYcIAHI0AFrAvophNEVVlVU0BJAXSQgyOuxCXOuWhtzVMXCZdIp1loGy511SyWBz561U\n\t0eVHCha82J3yXKToB3Aesahmyne3FIH0jjEoTDuWn+JSvKROqSuU7df/SM8D3eRco/F4\n\tqjQg35KqHMnU0+TvUSmnO7+E2+1ZOo0hSzfxQWD+BC9g1BB60O/nM0tQbhjeW1R5fNbh\n\t4M7NkdG7xS50wFbSuHHBr69t456NrKXD1xqlILTaHRnDj5K3YpP53fRWocAhgELwSZ1z\n\tTJyA==",
        "Delivered-To": "patchwork@dpdk.org",
        "Precedence": "list",
        "From": "Nelio Laranjeiro <nelio.laranjeiro@6wind.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "To": "dev@dpdk.org,\n\tYongseok Koh <yskoh@mellanox.com>",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Date": "Thu, 12 Jul 2018 11:30:49 +0200",
        "X-Gm-Message-State": "AOUpUlHctxPeOyHP9aP5FfK6e8rC1ToxEVuQYtQihkoeOqKBIHahg/SV\n\tuGwTaSKqyyxx8zPLcsGVUVJUj5TVlA==",
        "Cc": "Adrien Mazarguil <adrien.mazarguil@6wind.com>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v4 03/21] net/mlx5: replace verbs priorities by\n\tflow"
    },
    "content": "Previous work introduce verbs priorities, whereas the PMD is making\ntranslation between Flow priority into Verbs.  Rename this to make more\nsense on what the PMD has to translate.\n\nSigned-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>\nAcked-by: Yongseok Koh <yskoh@mellanox.com>\n---\n drivers/net/mlx5/mlx5.c      | 15 ++++-----------\n drivers/net/mlx5/mlx5.h      |  4 ++--\n drivers/net/mlx5/mlx5_flow.c | 24 ++++++++++++------------\n 3 files changed, 18 insertions(+), 25 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex e9780ac8f..74248f098 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -717,7 +717,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,\n \tunsigned int tunnel_en = 0;\n \tunsigned int mpls_en = 0;\n \tunsigned int swp = 0;\n-\tunsigned int verb_priorities = 0;\n \tunsigned int mprq = 0;\n \tunsigned int mprq_min_stride_size_n = 0;\n \tunsigned int mprq_max_stride_size_n = 0;\n@@ -1139,16 +1138,10 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,\n \t/* Store device configuration on private structure. */\n \tpriv->config = config;\n \t/* Supported Verbs flow priority number detection. */\n-\tif (verb_priorities == 0) {\n-\t\terr = mlx5_verbs_max_prio(eth_dev);\n-\t\tif (err < 0) {\n-\t\t\tDRV_LOG(ERR, \"port %u wrong Verbs flow priorities\",\n-\t\t\t\teth_dev->data->port_id);\n-\t\t\tgoto error;\n-\t\t}\n-\t\tverb_priorities = err;\n-\t}\n-\tpriv->config.max_verbs_prio = verb_priorities;\n+\terr = mlx5_flow_discover_priorities(eth_dev);\n+\tif (err < 0)\n+\t\tgoto error;\n+\tpriv->config.flow_prio = err;\n \t/*\n \t * Once the device is added to the list of memory event\n \t * callback, its global MR cache table cannot be expanded\ndiff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h\nindex 227429848..9949cd3fa 100644\n--- a/drivers/net/mlx5/mlx5.h\n+++ b/drivers/net/mlx5/mlx5.h\n@@ -122,7 +122,7 @@ struct mlx5_dev_config {\n \t\tunsigned int min_rxqs_num;\n \t\t/* Rx queue count threshold to enable MPRQ. */\n \t} mprq; /* Configurations for Multi-Packet RQ. */\n-\tunsigned int max_verbs_prio; /* Number of Verb flow priorities. */\n+\tunsigned int flow_prio; /* Number of flow priorities. */\n \tunsigned int tso_max_payload_sz; /* Maximum TCP payload for TSO. */\n \tunsigned int ind_table_max_size; /* Maximum indirection table size. */\n \tint txq_inline; /* Maximum packet size for inlining. */\n@@ -317,7 +317,7 @@ int mlx5_traffic_restart(struct rte_eth_dev *dev);\n \n /* mlx5_flow.c */\n \n-int mlx5_verbs_max_prio(struct rte_eth_dev *dev);\n+int mlx5_flow_discover_priorities(struct rte_eth_dev *dev);\n void mlx5_flow_print(struct rte_flow *flow);\n int mlx5_flow_validate(struct rte_eth_dev *dev,\n \t\t       const struct rte_flow_attr *attr,\ndiff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c\nindex 5e325be37..8fdc6d7bb 100644\n--- a/drivers/net/mlx5/mlx5_flow.c\n+++ b/drivers/net/mlx5/mlx5_flow.c\n@@ -76,17 +76,17 @@ struct ibv_spec_header {\n };\n \n  /**\n-  * Get the maximum number of priority available.\n+  * Discover the maximum number of priority available.\n   *\n   * @param[in] dev\n   *   Pointer to Ethernet device.\n   *\n   * @return\n-  *   number of supported Verbs flow priority on success, a negative errno\n-  *   value otherwise and rte_errno is set.\n+  *   number of supported flow priority on success, a negative errno value\n+  *   otherwise and rte_errno is set.\n   */\n int\n-mlx5_verbs_max_prio(struct rte_eth_dev *dev)\n+mlx5_flow_discover_priorities(struct rte_eth_dev *dev)\n {\n \tstruct {\n \t\tstruct ibv_flow_attr attr;\n@@ -106,25 +106,25 @@ mlx5_verbs_max_prio(struct rte_eth_dev *dev)\n \t\t},\n \t};\n \tstruct ibv_flow *flow;\n-\tuint32_t verb_priorities;\n \tstruct mlx5_hrxq *drop = mlx5_hrxq_drop_new(dev);\n+\tuint16_t vprio[] = { 8, 16 };\n+\tint i;\n \n \tif (!drop) {\n \t\trte_errno = ENOTSUP;\n \t\treturn -rte_errno;\n \t}\n-\tfor (verb_priorities = 0; 1; verb_priorities++) {\n-\t\tflow_attr.attr.priority = verb_priorities;\n-\t\tflow = mlx5_glue->create_flow(drop->qp,\n-\t\t\t\t\t      &flow_attr.attr);\n+\tfor (i = 0; i != RTE_DIM(vprio); i++) {\n+\t\tflow_attr.attr.priority = vprio[i] - 1;\n+\t\tflow = mlx5_glue->create_flow(drop->qp, &flow_attr.attr);\n \t\tif (!flow)\n \t\t\tbreak;\n \t\tclaim_zero(mlx5_glue->destroy_flow(flow));\n \t}\n \tmlx5_hrxq_drop_release(dev);\n \tDRV_LOG(INFO, \"port %u flow maximum priority: %d\",\n-\t\tdev->data->port_id, verb_priorities);\n-\treturn verb_priorities;\n+\t\tdev->data->port_id, vprio[i - 1]);\n+\treturn vprio[i - 1];\n }\n \n /**\n@@ -318,7 +318,7 @@ mlx5_ctrl_flow_vlan(struct rte_eth_dev *dev,\n \tstruct priv *priv = dev->data->dev_private;\n \tconst struct rte_flow_attr attr = {\n \t\t.ingress = 1,\n-\t\t.priority = priv->config.max_verbs_prio - 1,\n+\t\t.priority = priv->config.flow_prio - 1,\n \t};\n \tstruct rte_flow_item items[] = {\n \t\t{\n",
    "prefixes": [
        "v4",
        "03/21"
    ]
}