get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 78321,
    "url": "http://patches.dpdk.org/api/patches/78321/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200922085401.12272-14-huwei013@chinasoftinc.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": "<20200922085401.12272-14-huwei013@chinasoftinc.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200922085401.12272-14-huwei013@chinasoftinc.com",
    "date": "2020-09-22T08:53:57",
    "name": "[13/17] net/hns3: fix config when creating RSS rule after flush",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2837b15ecce2f4ae9e24d3f1da5fbde55c3a951e",
    "submitter": {
        "id": 1537,
        "url": "http://patches.dpdk.org/api/people/1537/?format=api",
        "name": "Wei Hu (Xavier)",
        "email": "huwei013@chinasoftinc.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/20200922085401.12272-14-huwei013@chinasoftinc.com/mbox/",
    "series": [
        {
            "id": 12401,
            "url": "http://patches.dpdk.org/api/series/12401/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12401",
            "date": "2020-09-22T08:53:46",
            "name": "updates for hns3 PMD driver",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/12401/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/78321/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/78321/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id CF3E1A04E1;\n\tTue, 22 Sep 2020 11:04:09 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DAA3E1DC81;\n\tTue, 22 Sep 2020 10:55:24 +0200 (CEST)",
            "from incedge.chinasoftinc.com (unknown [114.113.233.8])\n by dpdk.org (Postfix) with ESMTP id 2465B1DAF8\n for <dev@dpdk.org>; Tue, 22 Sep 2020 10:54:59 +0200 (CEST)",
            "from mail.chinasoftinc.com ([10.168.0.51]) by\n incedge.chinasoftinc.com with ESMTP id T2xAIvT3ZQJjCPx2 (version=TLSv1\n cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO);\n Tue, 22 Sep 2020 16:54:58 +0800 (CST)",
            "from localhost.localdomain (120.133.139.157) by INCCAS001.ito.icss\n (10.168.0.60) with Microsoft SMTP Server id 14.3.487.0; Tue, 22 Sep 2020\n 16:54:57 +0800"
        ],
        "X-ASG-Debug-ID": "1600764898-149d111bae19b070001-TfluYd",
        "X-Barracuda-Envelope-From": "huwei013@chinasoftinc.com",
        "X-Barracuda-RBL-Trusted-Forwarder": [
            "10.168.0.51",
            "10.168.0.60"
        ],
        "X-ASG-Whitelist": "Client",
        "From": "\"Wei Hu (Xavier)\" <huwei013@chinasoftinc.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<xavier.huwei@huawei.com>",
        "Date": "Tue, 22 Sep 2020 16:53:57 +0800",
        "X-ASG-Orig-Subj": "[PATCH 13/17] net/hns3: fix config when creating RSS rule\n after flush",
        "Message-ID": "<20200922085401.12272-14-huwei013@chinasoftinc.com>",
        "X-Mailer": "git-send-email 2.9.5",
        "In-Reply-To": "<20200922085401.12272-1-huwei013@chinasoftinc.com>",
        "References": "<20200922085401.12272-1-huwei013@chinasoftinc.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[120.133.139.157]",
        "X-Barracuda-Connect": "UNKNOWN[10.168.0.51]",
        "X-Barracuda-Start-Time": "1600764898",
        "X-Barracuda-Encrypted": "ECDHE-RSA-AES256-SHA",
        "X-Barracuda-URL": "https://incspam.chinasofti.com:443/cgi-mod/mark.cgi",
        "X-Virus-Scanned": "by bsmtpd at chinasoftinc.com",
        "X-Barracuda-Scan-Msg-Size": "3678",
        "Subject": "[dpdk-dev] [PATCH 13/17] net/hns3: fix config when creating RSS\n\trule after flush",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Lijun Ou <oulijun@huawei.com>\n\nCurrnetly, when user create a flow RSS rule and then flush the rule, driver\nwill set 0 for the internal structure of hw->rss_info maintained in driver.\nAnd then user create a flow RSS rule without specified RSS hash key, driver\nconfigure a validate RSS hash key into hardware network engine and will\ncause an RSS error. The related steps when using testpmd as\nfollows:\n  flow 0 <pattern> action rss xx end / end\n  flow flush 0\n  flow 0 <pattern> action rss queues 0 1 end / end\n\nTo slove the preceding problem, the flow flush processing is modified.\nit don't clear all RSS configurations for hw->rss_info. Actually the RSS\nkey information in the hardware is not cleared, therefore, the\nhw->rss_info.key is kept consistent with the value in the hardware. In\naddition, because reset the redirection table, we need to set queues NULL\nand queue_num for zero that indicate the corresponding parameters in the\nhardware is unavailable. Also we set hw->rss_info.func to\nRTE_ETH_HASH_FUNCTION_MAX that indicate it is invalid.\n\nFixes: c37ca66f2b27 (\"net/hns3: support RSS\")\nCc: stable@dpdk.org\n\nSigned-off-by: Lijun Ou <oulijun@huawei.com>\nSigned-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>\n---\n drivers/net/hns3/hns3_flow.c | 40 +++++++++++++++++++++++++++++++++++-----\n 1 file changed, 35 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c\nindex f4ea47a..6f2ff87 100644\n--- a/drivers/net/hns3/hns3_flow.c\n+++ b/drivers/net/hns3/hns3_flow.c\n@@ -1293,10 +1293,24 @@ static bool\n hns3_action_rss_same(const struct rte_flow_action_rss *comp,\n \t\t     const struct rte_flow_action_rss *with)\n {\n-\treturn (comp->func == with->func &&\n-\t\tcomp->level == with->level &&\n-\t\tcomp->types == with->types &&\n-\t\tcomp->key_len == with->key_len &&\n+\tbool func_is_same;\n+\n+\t/*\n+\t * When user flush all RSS rule, RSS func is set invalid with\n+\t * RTE_ETH_HASH_FUNCTION_MAX. Then the user create a flow after\n+\t * flushed, any validate RSS func is different with it before\n+\t * flushed. Others, when user create an action RSS with RSS func\n+\t * specified RTE_ETH_HASH_FUNCTION_DEFAULT, the func is the same\n+\t * between continuous RSS flow.\n+\t */\n+\tif (comp->func == RTE_ETH_HASH_FUNCTION_MAX)\n+\t\tfunc_is_same = false;\n+\telse\n+\t\tfunc_is_same = (with->func ? (comp->func == with->func) : true);\n+\n+\treturn (func_is_same &&\n+\t\tcomp->types == (with->types & HNS3_ETH_RSS_SUPPORT) &&\n+\t\tcomp->level == with->level && comp->key_len == with->key_len &&\n \t\tcomp->queue_num == with->queue_num &&\n \t\t!memcmp(comp->key, with->key, with->key_len) &&\n \t\t!memcmp(comp->queue, with->queue,\n@@ -1589,7 +1603,19 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,\n \t\t\t\thns3_err(hw, \"RSS disable failed(%d)\", ret);\n \t\t\t\treturn ret;\n \t\t\t}\n-\t\t\tmemset(rss_info, 0, sizeof(struct hns3_rss_conf));\n+\n+\t\t\tif (rss_flow_conf.queue_num) {\n+\t\t\t\t/*\n+\t\t\t\t * Due the content of queue pointer have been\n+\t\t\t\t * reset to 0, the rss_info->conf.queue should\n+\t\t\t\t * be set NULL.\n+\t\t\t\t */\n+\t\t\t\trss_info->conf.queue = NULL;\n+\t\t\t\trss_info->conf.queue_num = 0;\n+\t\t\t}\n+\n+\t\t\t/* set RSS func invalid after flushed */\n+\t\t\trss_info->conf.func = RTE_ETH_HASH_FUNCTION_MAX;\n \t\t\treturn 0;\n \t\t}\n \t\treturn -EINVAL;\n@@ -1651,6 +1677,10 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev)\n \tif (hw->rss_info.conf.queue_num == 0)\n \t\treturn 0;\n \n+\t/* When user flush all rules, it doesn't need to restore RSS rule */\n+\tif (hw->rss_info.conf.func == RTE_ETH_HASH_FUNCTION_MAX)\n+\t\treturn 0;\n+\n \treturn hns3_config_rss_filter(dev, &hw->rss_info, true);\n }\n \n",
    "prefixes": [
        "13/17"
    ]
}