Show a patch.

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

{
    "id": 73490,
    "url": "https://patches.dpdk.org/api/patches/73490/",
    "web_url": "https://patches.dpdk.org/patch/73490/",
    "project": {
        "id": 1,
        "url": "https://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": "<20200708011841.22295-6-chenxux.di@intel.com>",
    "date": "2020-07-08T01:18:41",
    "name": "[v4,5/5] app/testpmd: support query RSS config in flow query",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "978af4c69723ab10961bdf0c18cd87f5ca8418f1",
    "submitter": {
        "id": 1409,
        "url": "https://patches.dpdk.org/api/people/1409/",
        "name": "Chenxu Di",
        "email": "chenxux.di@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/patch/73490/mbox/",
    "series": [
        {
            "id": 10869,
            "url": "https://patches.dpdk.org/api/series/10869/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10869",
            "date": "2020-07-08T01:18:36",
            "name": "re-implement legacy filter functions by private API",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/10869/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/73490/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/73490/checks/",
    "tags": {},
    "headers": {
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "IronPort-SDR": [
            "\n 0f5oSj3hLsevb5/MAXdHGwk504/twcgWiaXWysFyApa4CwWoGLICJ8p5t+ZZgvruaFBzxnu1wd\n hqsDdj51q6SQ==",
            "\n MfRKMReIkeWbMw20YyXa+l/q1KmAdC+jDLEWoO4ScygIVOP/rklTFKgnLUliG4xbFf/gBqL4IV\n bo7xMw5Ye4+Q=="
        ],
        "X-Mailer": "git-send-email 2.17.1",
        "To": "dev@dpdk.org",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id CDDD6A00BE;\n\tWed,  8 Jul 2020 03:37:56 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5A7D21DD37;\n\tWed,  8 Jul 2020 03:37:25 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id 670101DD04\n for <dev@dpdk.org>; Wed,  8 Jul 2020 03:37:22 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Jul 2020 18:37:22 -0700",
            "from intel.sh.intel.com ([10.239.255.20])\n by orsmga002.jf.intel.com with ESMTP; 07 Jul 2020 18:37:20 -0700"
        ],
        "X-BeenThere": "dev@dpdk.org",
        "X-Amp-File-Uploaded": "False",
        "Subject": "[dpdk-dev] [PATCH v4 5/5] app/testpmd: support query RSS config in\n\tflow query",
        "Cc": "Yang Qiming <qiming.yang@intel.com>,\n\tChenxu Di <chenxux.di@intel.com>",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "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-Post": "<mailto:dev@dpdk.org>",
        "In-Reply-To": "<20200708011841.22295-1-chenxux.di@intel.com>",
        "X-ExtLoop1": "1",
        "Precedence": "list",
        "From": "Chenxu Di <chenxux.di@intel.com>",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9675\"; a=\"149235879\"",
            "E=Sophos;i=\"5.75,326,1589266800\"; d=\"scan'208\";a=\"149235879\"",
            "E=Sophos;i=\"5.75,326,1589266800\"; d=\"scan'208\";a=\"297570824\""
        ],
        "References": "<20200611060142.75465-1-chenxux.di@intel.com>\n <20200708011841.22295-1-chenxux.di@intel.com>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Errors-To": "dev-bounces@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Message-Id": "<20200708011841.22295-6-chenxux.di@intel.com>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Date": "Wed,  8 Jul 2020 01:18:41 +0000",
        "X-Mailman-Version": "2.1.15"
    },
    "content": "This patch support RSS action in flow query.\nIt can display the RSS configuration of the specified rule.\n\nFor example:\nwe can create an RSS rule by command \"flow create 0 ingress\npattern eth / ipv4 / tcp / end actions rss types ipv4-tcp\nl3-src-only l4-dst-only end queues end func symmetric_toeplitz\n / end\" and then query it \"flow query 0 0 rss\"\nthe log will be follow\nRSS:\n queues: none\n function: symmetric_toeplitz\n types:\n  ipv4-tcp\n  l3-src-only\n  l4-dst-only\n\nSigned-off-by: Chenxu Di <chenxux.di@intel.com>\n---\n app/test-pmd/config.c | 55 +++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 55 insertions(+)",
    "diff": "diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex cf14b584f..53a9b97d6 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -1395,6 +1395,56 @@ port_flow_complain(struct rte_flow_error *error)\n \treturn -err;\n }\n \n+static void\n+rss_config_display(struct rte_flow_action_rss *rss_conf)\n+{\n+\tuint8_t i;\n+\n+\tif (rss_conf == NULL) {\n+\t\tprintf(\"Invalid rule\\n\");\n+\t\treturn;\n+\t}\n+\n+\tprintf(\"RSS:\\n\"\n+\t       \" queues: \");\n+\tif (rss_conf->queue_num == 0)\n+\t\tprintf(\"none\\n\");\n+\tfor (i = 0; i < rss_conf->queue_num; i++)\n+\t\tprintf(\"%d\\n\", rss_conf->queue[i]);\n+\n+\tprintf(\" function: \");\n+\tswitch (rss_conf->func) {\n+\tcase RTE_ETH_HASH_FUNCTION_DEFAULT:\n+\t\tprintf(\"default\\n\");\n+\t\tbreak;\n+\tcase RTE_ETH_HASH_FUNCTION_TOEPLITZ:\n+\t\tprintf(\"toeplitz\\n\");\n+\t\tbreak;\n+\tcase RTE_ETH_HASH_FUNCTION_SIMPLE_XOR:\n+\t\tprintf(\"simple_xor\\n\");\n+\t\tbreak;\n+\tcase RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ:\n+\t\tprintf(\"symmetric_toeplitz\\n\");\n+\t\tbreak;\n+\tdefault:\n+\t\tprintf(\"Unknown function\\n\");\n+\t\treturn;\n+\t}\n+\n+\tprintf(\" types:\\n\");\n+\tif (rss_conf->types == 0) {\n+\t\tprintf(\"  none\\n\");\n+\t\treturn;\n+\t}\n+\tfor (i = 0; rss_type_table[i].str; i++) {\n+\t\tif ((rss_conf->types &\n+\t\t    rss_type_table[i].rss_type) ==\n+\t\t    rss_type_table[i].rss_type &&\n+\t\t    rss_type_table[i].rss_type != 0)\n+\t\t\tprintf(\"  %s\\n\", rss_type_table[i].str);\n+\t}\n+}\n+\n /** Validate flow rule. */\n int\n port_flow_validate(portid_t port_id,\n@@ -1581,6 +1631,7 @@ port_flow_query(portid_t port_id, uint32_t rule,\n \tconst char *name;\n \tunion {\n \t\tstruct rte_flow_query_count count;\n+\t\tstruct rte_flow_action_rss rss_conf;\n \t} query;\n \tint ret;\n \n@@ -1602,6 +1653,7 @@ port_flow_query(portid_t port_id, uint32_t rule,\n \t\treturn port_flow_complain(&error);\n \tswitch (action->type) {\n \tcase RTE_FLOW_ACTION_TYPE_COUNT:\n+\tcase RTE_FLOW_ACTION_TYPE_RSS:\n \t\tbreak;\n \tdefault:\n \t\tprintf(\"Cannot query action type %d (%s)\\n\",\n@@ -1626,6 +1678,9 @@ port_flow_query(portid_t port_id, uint32_t rule,\n \t\t       query.count.hits,\n \t\t       query.count.bytes);\n \t\tbreak;\n+\tcase RTE_FLOW_ACTION_TYPE_RSS:\n+\t\trss_config_display(&query.rss_conf);\n+\t\tbreak;\n \tdefault:\n \t\tprintf(\"Cannot display result for action type %d (%s)\\n\",\n \t\t       action->type, name);\n",
    "prefixes": [
        "v4",
        "5/5"
    ]
}