get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 50752,
    "url": "http://patches.dpdk.org/api/patches/50752/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190302104251.32565-7-hyonkim@cisco.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": "<20190302104251.32565-7-hyonkim@cisco.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190302104251.32565-7-hyonkim@cisco.com",
    "date": "2019-03-02T10:42:44",
    "name": "[v2,06/13] net/enic: enable limited RSS flow action",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "9f5325ef96e5a7916025d00f8bf51073e372c15d",
    "submitter": {
        "id": 948,
        "url": "http://patches.dpdk.org/api/people/948/?format=api",
        "name": "Hyong Youb Kim (hyonkim)",
        "email": "hyonkim@cisco.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190302104251.32565-7-hyonkim@cisco.com/mbox/",
    "series": [
        {
            "id": 3613,
            "url": "http://patches.dpdk.org/api/series/3613/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3613",
            "date": "2019-03-02T10:42:38",
            "name": "net/enic: 19.05 updates",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/3613/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/50752/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/50752/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 135D0374C;\n\tSat,  2 Mar 2019 11:44:27 +0100 (CET)",
            "from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78])\n\tby dpdk.org (Postfix) with ESMTP id 208A73576\n\tfor <dev@dpdk.org>; Sat,  2 Mar 2019 11:44:26 +0100 (CET)",
            "from alln-core-3.cisco.com ([173.36.13.136])\n\tby rcdn-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t02 Mar 2019 10:44:25 +0000",
            "from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48])\n\tby alln-core-3.cisco.com (8.15.2/8.15.2) with ESMTP id x22AiP8l020196;\n\tSat, 2 Mar 2019 10:44:25 GMT",
            "by cisco.com (Postfix, from userid 508933)\n\tid 25B2A20F2001; Sat,  2 Mar 2019 02:44:25 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n\td=cisco.com; i=@cisco.com; l=5885; q=dns/txt; s=iport;\n\tt=1551523466; x=1552733066;\n\th=from:to:cc:subject:date:message-id:in-reply-to: references;\n\tbh=FhHaWsPRY3SiJZO1SVrR7qHcdFfxAdrlgQFUjmaPBBU=;\n\tb=KwI73XCWMQ65rWI4WQ0gQi/3u3gxWl20q5h5u2URz+ZGyYqt+8JMi9ty\n\tun009YJskVy3ljkLVbRMeC6fkZtdRqUDubYBYiMEmJV8nKd+LJxIiGJOs\n\tvGi6PdhtB6VZ7Bg10va1H+39tmVuL7wgLmWD+6mVsbtne4lMJZI1n+wFF 4=;",
        "X-IronPort-AV": "E=Sophos;i=\"5.58,431,1544486400\"; d=\"scan'208\";a=\"524228194\"",
        "From": "Hyong Youb Kim <hyonkim@cisco.com>",
        "To": "Ferruh Yigit <ferruh.yigit@intel.com>",
        "Cc": "dev@dpdk.org, John Daley <johndale@cisco.com>,\n\tHyong Youb Kim <hyonkim@cisco.com>",
        "Date": "Sat,  2 Mar 2019 02:42:44 -0800",
        "Message-Id": "<20190302104251.32565-7-hyonkim@cisco.com>",
        "X-Mailer": "git-send-email 2.16.2",
        "In-Reply-To": "<20190302104251.32565-1-hyonkim@cisco.com>",
        "References": "<20190302104251.32565-1-hyonkim@cisco.com>",
        "X-Outbound-SMTP-Client": "10.193.184.48, savbu-usnic-a.cisco.com",
        "X-Outbound-Node": "alln-core-3.cisco.com",
        "Subject": "[dpdk-dev] [PATCH v2 06/13] net/enic: enable limited RSS flow action",
        "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://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Some apps like OVS-DPDK use MARK+RSS flow rules in order to offload\npacket matching to the NIC. The RSS action in such flow rules simply\nindicates \"receive packet normally\", not trying to override the port\nwide RSS. The action is included in the flow rules simply to terminate\nthem, as MARK is not a fate-deciding action. And, the RSS action has a\nmost basic config: default hash, level, types, null key, and identity\nqueue mapping.\n\nRecent VIC adapters can support these \"mark and receive\" flow\nrules. So, enable support for RSS action for this limited use case.\n\nSigned-off-by: Hyong Youb Kim <hyonkim@cisco.com>\nReviewed-by: John Daley <johndale@cisco.com>\n---\n doc/guides/nics/enic.rst               |  2 +-\n doc/guides/rel_notes/release_19_05.rst |  3 +++\n drivers/net/enic/enic_flow.c           | 48 +++++++++++++++++++++++++++++-----\n 3 files changed, 46 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/doc/guides/nics/enic.rst b/doc/guides/nics/enic.rst\nindex e456e6c2d..ed093ef44 100644\n--- a/doc/guides/nics/enic.rst\n+++ b/doc/guides/nics/enic.rst\n@@ -256,7 +256,7 @@ Generic Flow API is supported. The baseline support is:\n \n   - Attributes: ingress\n   - Items: eth, ipv4, ipv6, udp, tcp, vxlan, inner eth, ipv4, ipv6, udp, tcp\n-  - Actions: queue, mark, drop, flag and void\n+  - Actions: queue, mark, drop, flag, rss, and void\n   - Selectors: 'is', 'spec' and 'mask'. 'last' is not supported\n   - In total, up to 64 bytes of mask is allowed across all headers\n \ndiff --git a/doc/guides/rel_notes/release_19_05.rst b/doc/guides/rel_notes/release_19_05.rst\nindex 4a3e2a7f3..73403c79e 100644\n--- a/doc/guides/rel_notes/release_19_05.rst\n+++ b/doc/guides/rel_notes/release_19_05.rst\n@@ -77,6 +77,9 @@ New Features\n   which includes the directory name, lib name, filenames, makefile, docs,\n   macros, functions, structs and any other strings in the code.\n \n+* **Updated the enic driver.**\n+\n+  * Added limited support for RSS.\n \n Removed Items\n -------------\ndiff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c\nindex c60476c8c..0f6b6b930 100644\n--- a/drivers/net/enic/enic_flow.c\n+++ b/drivers/net/enic/enic_flow.c\n@@ -45,7 +45,8 @@ struct enic_filter_cap {\n };\n \n /* functions for copying flow actions into enic actions */\n-typedef int (copy_action_fn)(const struct rte_flow_action actions[],\n+typedef int (copy_action_fn)(struct enic *enic,\n+\t\t\t     const struct rte_flow_action actions[],\n \t\t\t     struct filter_action_v2 *enic_action);\n \n /* functions for copying items into enic filters */\n@@ -57,8 +58,7 @@ struct enic_action_cap {\n \t/** list of valid actions */\n \tconst enum rte_flow_action_type *actions;\n \t/** copy function for a particular NIC */\n-\tint (*copy_fn)(const struct rte_flow_action actions[],\n-\t\t       struct filter_action_v2 *enic_action);\n+\tcopy_action_fn *copy_fn;\n };\n \n /* Forward declarations */\n@@ -282,6 +282,7 @@ static const enum rte_flow_action_type enic_supported_actions_v2_id[] = {\n \tRTE_FLOW_ACTION_TYPE_QUEUE,\n \tRTE_FLOW_ACTION_TYPE_MARK,\n \tRTE_FLOW_ACTION_TYPE_FLAG,\n+\tRTE_FLOW_ACTION_TYPE_RSS,\n \tRTE_FLOW_ACTION_TYPE_END,\n };\n \n@@ -290,6 +291,7 @@ static const enum rte_flow_action_type enic_supported_actions_v2_drop[] = {\n \tRTE_FLOW_ACTION_TYPE_MARK,\n \tRTE_FLOW_ACTION_TYPE_FLAG,\n \tRTE_FLOW_ACTION_TYPE_DROP,\n+\tRTE_FLOW_ACTION_TYPE_RSS,\n \tRTE_FLOW_ACTION_TYPE_END,\n };\n \n@@ -299,6 +301,7 @@ static const enum rte_flow_action_type enic_supported_actions_v2_count[] = {\n \tRTE_FLOW_ACTION_TYPE_FLAG,\n \tRTE_FLOW_ACTION_TYPE_DROP,\n \tRTE_FLOW_ACTION_TYPE_COUNT,\n+\tRTE_FLOW_ACTION_TYPE_RSS,\n \tRTE_FLOW_ACTION_TYPE_END,\n };\n \n@@ -1016,7 +1019,8 @@ enic_copy_filter(const struct rte_flow_item pattern[],\n  * @param error[out]\n  */\n static int\n-enic_copy_action_v1(const struct rte_flow_action actions[],\n+enic_copy_action_v1(__rte_unused struct enic *enic,\n+\t\t    const struct rte_flow_action actions[],\n \t\t    struct filter_action_v2 *enic_action)\n {\n \tenum { FATE = 1, };\n@@ -1062,7 +1066,8 @@ enic_copy_action_v1(const struct rte_flow_action actions[],\n  * @param error[out]\n  */\n static int\n-enic_copy_action_v2(const struct rte_flow_action actions[],\n+enic_copy_action_v2(struct enic *enic,\n+\t\t    const struct rte_flow_action actions[],\n \t\t    struct filter_action_v2 *enic_action)\n {\n \tenum { FATE = 1, MARK = 2, };\n@@ -1128,6 +1133,37 @@ enic_copy_action_v2(const struct rte_flow_action actions[],\n \t\t\tenic_action->flags |= FILTER_ACTION_COUNTER_FLAG;\n \t\t\tbreak;\n \t\t}\n+\t\tcase RTE_FLOW_ACTION_TYPE_RSS: {\n+\t\t\tconst struct rte_flow_action_rss *rss =\n+\t\t\t\t(const struct rte_flow_action_rss *)\n+\t\t\t\tactions->conf;\n+\t\t\tbool allow;\n+\t\t\tuint16_t i;\n+\n+\t\t\t/*\n+\t\t\t * Hardware does not support general RSS actions, but\n+\t\t\t * we can still support the dummy one that is used to\n+\t\t\t * \"receive normally\".\n+\t\t\t */\n+\t\t\tallow = rss->func == RTE_ETH_HASH_FUNCTION_DEFAULT &&\n+\t\t\t\trss->level == 0 &&\n+\t\t\t\t(rss->types == 0 ||\n+\t\t\t\t rss->types == enic->rss_hf) &&\n+\t\t\t\trss->queue_num == enic->rq_count &&\n+\t\t\t\trss->key_len == 0;\n+\t\t\t/* Identity queue map is ok */\n+\t\t\tfor (i = 0; i < rss->queue_num; i++)\n+\t\t\t\tallow = allow && (i == rss->queue[i]);\n+\t\t\tif (!allow)\n+\t\t\t\treturn ENOTSUP;\n+\t\t\tif (overlap & FATE)\n+\t\t\t\treturn ENOTSUP;\n+\t\t\t/* Need MARK or FLAG */\n+\t\t\tif (!(overlap & MARK))\n+\t\t\t\treturn ENOTSUP;\n+\t\t\toverlap |= FATE;\n+\t\t\tbreak;\n+\t\t}\n \t\tcase RTE_FLOW_ACTION_TYPE_VOID:\n \t\t\tcontinue;\n \t\tdefault:\n@@ -1418,7 +1454,7 @@ enic_flow_parse(struct rte_eth_dev *dev,\n \t\t\t\t   action, \"Invalid action.\");\n \t\treturn -rte_errno;\n \t}\n-\tret = enic_action_cap->copy_fn(actions, enic_action);\n+\tret = enic_action_cap->copy_fn(enic, actions, enic_action);\n \tif (ret) {\n \t\trte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_HANDLE,\n \t\t\t   NULL, \"Unsupported action.\");\n",
    "prefixes": [
        "v2",
        "06/13"
    ]
}