Show a patch.

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

{
    "id": 73489,
    "url": "https://patches.dpdk.org/api/patches/73489/",
    "web_url": "https://patches.dpdk.org/patch/73489/",
    "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-5-chenxux.di@intel.com>",
    "date": "2020-07-08T01:18:40",
    "name": "[v4,4/5] net/i40e: enable flow query RSS",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7bd949e5ad020b011c96ab8cb11a7c3f01ffc2e3",
    "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/73489/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/73489/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/73489/checks/",
    "tags": {},
    "headers": {
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "IronPort-SDR": [
            "\n OI4dnEJZCpBhwajg3h7vgU+Qdj5N/sx9FYa9/2sdx6LdlBVcVqTv2GD3Ek6gQNYjcTTr0HXoni\n isEOl7ewHYaQ==",
            "\n tI+rZqXsrXIUA5eH/6HvUJq8E1fxuHsVxiczUTbiyYx+kOtzJQxy0WDy6p+3pHPxhaGcie01KH\n CBuuRWaxRemQ=="
        ],
        "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 8C391A00BE;\n\tWed,  8 Jul 2020 03:37:49 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 2F5E51DD04;\n\tWed,  8 Jul 2020 03:37:23 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id CF5001DC78\n for <dev@dpdk.org>; Wed,  8 Jul 2020 03:37:20 +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:20 -0700",
            "from intel.sh.intel.com ([10.239.255.20])\n by orsmga002.jf.intel.com with ESMTP; 07 Jul 2020 18:37:19 -0700"
        ],
        "X-BeenThere": "dev@dpdk.org",
        "X-Amp-File-Uploaded": "False",
        "Subject": "[dpdk-dev] [PATCH v4 4/5] net/i40e: enable flow query RSS",
        "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=\"149235878\"",
            "E=Sophos;i=\"5.75,326,1589266800\"; d=\"scan'208\";a=\"149235878\"",
            "E=Sophos;i=\"5.75,326,1589266800\"; d=\"scan'208\";a=\"297570819\""
        ],
        "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-5-chenxux.di@intel.com>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Date": "Wed,  8 Jul 2020 01:18:40 +0000",
        "X-Mailman-Version": "2.1.15"
    },
    "content": "This patch enables flow query function to get the\nconfiguration of the specified rule.\n\nSigned-off-by: Chenxu Di <chenxux.di@intel.com>\nAcked-by: Jeff Guo <jia.guo@intel.com>\n---\n doc/guides/rel_notes/release_20_08.rst |  1 +\n drivers/net/i40e/i40e_flow.c           | 49 ++++++++++++++++++++++++++\n 2 files changed, 50 insertions(+)",
    "diff": "diff --git a/doc/guides/rel_notes/release_20_08.rst b/doc/guides/rel_notes/release_20_08.rst\nindex 0eec5b08a..18d653b3d 100644\n--- a/doc/guides/rel_notes/release_20_08.rst\n+++ b/doc/guides/rel_notes/release_20_08.rst\n@@ -103,6 +103,7 @@ New Features\n \n   * Re-implemented get_fdir_info and get_fdir_stat in private API.\n   * Re-implemented set_gre_key_len in private API.\n+  * Added support for flow query RSS.\n \n * **Updated the Intel ixgbe driver.**\n \ndiff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c\nindex 8f8df6fae..4186a5df2 100644\n--- a/drivers/net/i40e/i40e_flow.c\n+++ b/drivers/net/i40e/i40e_flow.c\n@@ -43,6 +43,10 @@ static int i40e_flow_destroy(struct rte_eth_dev *dev,\n \t\t\t     struct rte_flow_error *error);\n static int i40e_flow_flush(struct rte_eth_dev *dev,\n \t\t\t   struct rte_flow_error *error);\n+static int i40e_flow_query(struct rte_eth_dev *dev,\n+\t\t\t   struct rte_flow *flow,\n+\t\t\t   const struct rte_flow_action *actions,\n+\t\t\t   void *data, struct rte_flow_error *error);\n static int\n i40e_flow_parse_ethertype_pattern(struct rte_eth_dev *dev,\n \t\t\t\t  const struct rte_flow_item *pattern,\n@@ -129,6 +133,7 @@ const struct rte_flow_ops i40e_flow_ops = {\n \t.create = i40e_flow_create,\n \t.destroy = i40e_flow_destroy,\n \t.flush = i40e_flow_flush,\n+\t.query = i40e_flow_query,\n };\n \n static union i40e_filter_t cons_filter;\n@@ -5462,3 +5467,47 @@ i40e_flow_flush_rss_filter(struct rte_eth_dev *dev)\n \n \treturn ret;\n }\n+\n+static int\n+i40e_flow_query(struct rte_eth_dev *dev __rte_unused,\n+\t\tstruct rte_flow *flow,\n+\t\tconst struct rte_flow_action *actions,\n+\t\tvoid *data, struct rte_flow_error *error)\n+{\n+\tstruct i40e_rss_filter *rss_rule = (struct i40e_rss_filter *)flow->rule;\n+\tenum rte_filter_type filter_type = flow->filter_type;\n+\tstruct rte_flow_action_rss *rss_conf = data;\n+\n+\tif (!rss_rule) {\n+\t\trte_flow_error_set(error, EINVAL,\n+\t\t\t\t   RTE_FLOW_ERROR_TYPE_HANDLE,\n+\t\t\t\t   NULL, \"Invalid rule\");\n+\t\treturn -rte_errno;\n+\t}\n+\n+\tfor (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) {\n+\t\tswitch (actions->type) {\n+\t\tcase RTE_FLOW_ACTION_TYPE_VOID:\n+\t\t\tbreak;\n+\t\tcase RTE_FLOW_ACTION_TYPE_RSS:\n+\t\t\tif (filter_type != RTE_ETH_FILTER_HASH) {\n+\t\t\t\trte_flow_error_set(error, ENOTSUP,\n+\t\t\t\t\t\t   RTE_FLOW_ERROR_TYPE_ACTION,\n+\t\t\t\t\t\t   actions,\n+\t\t\t\t\t\t   \"action not supported\");\n+\t\t\t\treturn -rte_errno;\n+\t\t\t}\n+\t\t\trte_memcpy(rss_conf,\n+\t\t\t\t   &rss_rule->rss_filter_info.conf,\n+\t\t\t\t   sizeof(struct rte_flow_action_rss));\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\treturn rte_flow_error_set(error, ENOTSUP,\n+\t\t\t\t\t\t  RTE_FLOW_ERROR_TYPE_ACTION,\n+\t\t\t\t\t\t  actions,\n+\t\t\t\t\t\t  \"action not supported\");\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n",
    "prefixes": [
        "v4",
        "4/5"
    ]
}