get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 38705,
    "url": "http://patches.dpdk.org/api/patches/38705/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180423123310.32991-7-xuemingl@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": "<20180423123310.32991-7-xuemingl@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180423123310.32991-7-xuemingl@mellanox.com",
    "date": "2018-04-23T12:33:05",
    "name": "[dpdk-dev,v6,06/11] net/mlx5: split flow RSS handling logic",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "66b07441e956c88b260a858e842048cfa68f5b22",
    "submitter": {
        "id": 814,
        "url": "http://patches.dpdk.org/api/people/814/?format=api",
        "name": "Xueming Li",
        "email": "xuemingl@mellanox.com"
    },
    "delegate": {
        "id": 6624,
        "url": "http://patches.dpdk.org/api/users/6624/?format=api",
        "username": "shahafs",
        "first_name": "Shahaf",
        "last_name": "Shuler",
        "email": "shahafs@mellanox.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180423123310.32991-7-xuemingl@mellanox.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/38705/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/38705/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5214A4F9C;\n\tMon, 23 Apr 2018 14:33:37 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n\tby dpdk.org (Postfix) with ESMTP id F002A4C95\n\tfor <dev@dpdk.org>; Mon, 23 Apr 2018 14:33:24 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n\txuemingl@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 23 Apr 2018 15:34:48 +0300",
            "from dev-r630-06.mtbc.labs.mlnx (dev-r630-06.mtbc.labs.mlnx\n\t[10.12.205.180])\n\tby labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w3NCXLPR017765;\n\tMon, 23 Apr 2018 15:33:22 +0300",
            "from dev-r630-06.mtbc.labs.mlnx (localhost [127.0.0.1])\n\tby dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7) with ESMTP id\n\tw3NCXLxF033070; Mon, 23 Apr 2018 20:33:21 +0800",
            "(from xuemingl@localhost)\n\tby dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7/Submit) id\n\tw3NCXLvc033069; Mon, 23 Apr 2018 20:33:21 +0800"
        ],
        "From": "Xueming Li <xuemingl@mellanox.com>",
        "To": "Nelio Laranjeiro <nelio.laranjeiro@6wind.com>,\n\tShahaf Shuler <shahafs@mellanox.com>",
        "Cc": "Xueming Li <xuemingl@mellanox.com>, dev@dpdk.org",
        "Date": "Mon, 23 Apr 2018 20:33:05 +0800",
        "Message-Id": "<20180423123310.32991-7-xuemingl@mellanox.com>",
        "X-Mailer": "git-send-email 2.13.3",
        "In-Reply-To": [
            "<20180423123310.32991-1-xuemingl@mellanox.com>",
            "<20180420122340.113348-1-xuemingl@mellanox.com>"
        ],
        "References": [
            "<20180423123310.32991-1-xuemingl@mellanox.com>",
            "<20180420122340.113348-1-xuemingl@mellanox.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v6 06/11] net/mlx5: split flow RSS handling logic",
        "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://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch split out flow RSS hash field handling logic to dedicate\nfunction.\n\nSigned-off-by: Xueming Li <xuemingl@mellanox.com>\nAcked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>\n---\n drivers/net/mlx5/mlx5_flow.c | 126 +++++++++++++++++++++++--------------------\n 1 file changed, 68 insertions(+), 58 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c\nindex fa1487d29..c2e57094e 100644\n--- a/drivers/net/mlx5/mlx5_flow.c\n+++ b/drivers/net/mlx5/mlx5_flow.c\n@@ -1000,59 +1000,8 @@ mlx5_flow_update_priority(struct rte_eth_dev *dev,\n static void\n mlx5_flow_convert_finalise(struct mlx5_flow_parse *parser)\n {\n-\tconst unsigned int ipv4 =\n-\t\thash_rxq_init[parser->layer].ip_version == MLX5_IPV4;\n-\tconst enum hash_rxq_type hmin = ipv4 ? HASH_RXQ_TCPV4 : HASH_RXQ_TCPV6;\n-\tconst enum hash_rxq_type hmax = ipv4 ? HASH_RXQ_IPV4 : HASH_RXQ_IPV6;\n-\tconst enum hash_rxq_type ohmin = ipv4 ? HASH_RXQ_TCPV6 : HASH_RXQ_TCPV4;\n-\tconst enum hash_rxq_type ohmax = ipv4 ? HASH_RXQ_IPV6 : HASH_RXQ_IPV4;\n-\tconst enum hash_rxq_type ip = ipv4 ? HASH_RXQ_IPV4 : HASH_RXQ_IPV6;\n \tunsigned int i;\n \n-\t/* Remove any other flow not matching the pattern. */\n-\tif (parser->rss_conf.queue_num == 1 && !parser->rss_conf.types) {\n-\t\tfor (i = 0; i != hash_rxq_init_n; ++i) {\n-\t\t\tif (i == HASH_RXQ_ETH)\n-\t\t\t\tcontinue;\n-\t\t\trte_free(parser->queue[i].ibv_attr);\n-\t\t\tparser->queue[i].ibv_attr = NULL;\n-\t\t}\n-\t\treturn;\n-\t}\n-\tif (parser->layer == HASH_RXQ_ETH) {\n-\t\tgoto fill;\n-\t} else {\n-\t\t/*\n-\t\t * This layer becomes useless as the pattern define under\n-\t\t * layers.\n-\t\t */\n-\t\trte_free(parser->queue[HASH_RXQ_ETH].ibv_attr);\n-\t\tparser->queue[HASH_RXQ_ETH].ibv_attr = NULL;\n-\t}\n-\t/* Remove opposite kind of layer e.g. IPv6 if the pattern is IPv4. */\n-\tfor (i = ohmin; i != (ohmax + 1); ++i) {\n-\t\tif (!parser->queue[i].ibv_attr)\n-\t\t\tcontinue;\n-\t\trte_free(parser->queue[i].ibv_attr);\n-\t\tparser->queue[i].ibv_attr = NULL;\n-\t}\n-\t/* Remove impossible flow according to the RSS configuration. */\n-\tif (hash_rxq_init[parser->layer].dpdk_rss_hf &\n-\t    parser->rss_conf.types) {\n-\t\t/* Remove any other flow. */\n-\t\tfor (i = hmin; i != (hmax + 1); ++i) {\n-\t\t\tif ((i == parser->layer) ||\n-\t\t\t     (!parser->queue[i].ibv_attr))\n-\t\t\t\tcontinue;\n-\t\t\trte_free(parser->queue[i].ibv_attr);\n-\t\t\tparser->queue[i].ibv_attr = NULL;\n-\t\t}\n-\t} else  if (!parser->queue[ip].ibv_attr) {\n-\t\t/* no RSS possible with the current configuration. */\n-\t\tparser->rss_conf.queue_num = 1;\n-\t\treturn;\n-\t}\n-fill:\n \t/*\n \t * Fill missing layers in verbs specifications, or compute the correct\n \t * offset to allocate the memory space for the attributes and\n@@ -1115,6 +1064,66 @@ mlx5_flow_convert_finalise(struct mlx5_flow_parse *parser)\n }\n \n /**\n+ * Update flows according to pattern and RSS hash fields.\n+ *\n+ * @param[in, out] parser\n+ *   Internal parser structure.\n+ *\n+ * @return\n+ *   0 on success, a negative errno value otherwise and rte_errno is set.\n+ */\n+static int\n+mlx5_flow_convert_rss(struct mlx5_flow_parse *parser)\n+{\n+\tconst unsigned int ipv4 =\n+\t\thash_rxq_init[parser->layer].ip_version == MLX5_IPV4;\n+\tconst enum hash_rxq_type hmin = ipv4 ? HASH_RXQ_TCPV4 : HASH_RXQ_TCPV6;\n+\tconst enum hash_rxq_type hmax = ipv4 ? HASH_RXQ_IPV4 : HASH_RXQ_IPV6;\n+\tconst enum hash_rxq_type ohmin = ipv4 ? HASH_RXQ_TCPV6 : HASH_RXQ_TCPV4;\n+\tconst enum hash_rxq_type ohmax = ipv4 ? HASH_RXQ_IPV6 : HASH_RXQ_IPV4;\n+\tconst enum hash_rxq_type ip = ipv4 ? HASH_RXQ_IPV4 : HASH_RXQ_IPV6;\n+\tunsigned int i;\n+\n+\t/* Remove any other flow not matching the pattern. */\n+\tif (parser->rss_conf.queue_num == 1 && !parser->rss_conf.types) {\n+\t\tfor (i = 0; i != hash_rxq_init_n; ++i) {\n+\t\t\tif (i == HASH_RXQ_ETH)\n+\t\t\t\tcontinue;\n+\t\t\trte_free(parser->queue[i].ibv_attr);\n+\t\t\tparser->queue[i].ibv_attr = NULL;\n+\t\t}\n+\t\treturn 0;\n+\t}\n+\tif (parser->layer == HASH_RXQ_ETH)\n+\t\treturn 0;\n+\t/* This layer becomes useless as the pattern define under layers. */\n+\trte_free(parser->queue[HASH_RXQ_ETH].ibv_attr);\n+\tparser->queue[HASH_RXQ_ETH].ibv_attr = NULL;\n+\t/* Remove opposite kind of layer e.g. IPv6 if the pattern is IPv4. */\n+\tfor (i = ohmin; i != (ohmax + 1); ++i) {\n+\t\tif (!parser->queue[i].ibv_attr)\n+\t\t\tcontinue;\n+\t\trte_free(parser->queue[i].ibv_attr);\n+\t\tparser->queue[i].ibv_attr = NULL;\n+\t}\n+\t/* Remove impossible flow according to the RSS configuration. */\n+\tif (hash_rxq_init[parser->layer].dpdk_rss_hf &\n+\t    parser->rss_conf.types) {\n+\t\t/* Remove any other flow. */\n+\t\tfor (i = hmin; i != (hmax + 1); ++i) {\n+\t\t\tif (i == parser->layer || !parser->queue[i].ibv_attr)\n+\t\t\t\tcontinue;\n+\t\t\trte_free(parser->queue[i].ibv_attr);\n+\t\t\tparser->queue[i].ibv_attr = NULL;\n+\t\t}\n+\t} else if (!parser->queue[ip].ibv_attr) {\n+\t\t/* no RSS possible with the current configuration. */\n+\t\tparser->rss_conf.queue_num = 1;\n+\t}\n+\treturn 0;\n+}\n+\n+/**\n  * Validate and convert a flow supported by the NIC.\n  *\n  * @param dev\n@@ -1211,6 +1220,14 @@ mlx5_flow_convert(struct rte_eth_dev *dev,\n \t\tif (ret)\n \t\t\tgoto exit_free;\n \t}\n+\tif (!parser->drop)\n+\t\t/* RSS check, remove unused hash types. */\n+\t\tret = mlx5_flow_convert_rss(parser);\n+\t\tif (ret)\n+\t\t\tgoto exit_free;\n+\t\t/* Complete missing specification. */\n+\t\tmlx5_flow_convert_finalise(parser);\n+\tmlx5_flow_update_priority(dev, parser, attr);\n \tif (parser->mark)\n \t\tmlx5_flow_create_flag_mark(parser, parser->mark_id);\n \tif (parser->count && parser->create) {\n@@ -1218,13 +1235,6 @@ mlx5_flow_convert(struct rte_eth_dev *dev,\n \t\tif (!parser->cs)\n \t\t\tgoto exit_count_error;\n \t}\n-\t/*\n-\t * Last step. Complete missing specification to reach the RSS\n-\t * configuration.\n-\t */\n-\tif (!parser->drop)\n-\t\tmlx5_flow_convert_finalise(parser);\n-\tmlx5_flow_update_priority(dev, parser, attr);\n exit_free:\n \t/* Only verification is expected, all resources should be released. */\n \tif (!parser->create) {\n",
    "prefixes": [
        "dpdk-dev",
        "v6",
        "06/11"
    ]
}