get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 125001,
    "url": "https://patches.dpdk.org/api/patches/125001/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230310093518.5198-12-liudongdong3@huawei.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20230310093518.5198-12-liudongdong3@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230310093518.5198-12-liudongdong3@huawei.com",
    "date": "2023-03-10T09:35:13",
    "name": "[11/16] net/hns3: use new RSS rule to configure hardware",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e230f3e73f354e32e85b5a2d418b7ce57a158ead",
    "submitter": {
        "id": 2718,
        "url": "https://patches.dpdk.org/api/people/2718/?format=api",
        "name": "Dongdong Liu",
        "email": "liudongdong3@huawei.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230310093518.5198-12-liudongdong3@huawei.com/mbox/",
    "series": [
        {
            "id": 27329,
            "url": "https://patches.dpdk.org/api/series/27329/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=27329",
            "date": "2023-03-10T09:35:02",
            "name": "net/hns3: some code refactor for hns3 RSS",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/27329/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/125001/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/125001/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 709CE41E3A;\n\tFri, 10 Mar 2023 10:37:46 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DEA3A42D69;\n\tFri, 10 Mar 2023 10:36:44 +0100 (CET)",
            "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id 199AA42D17;\n Fri, 10 Mar 2023 10:36:40 +0100 (CET)",
            "from kwepemi500017.china.huawei.com (unknown [172.30.72.53])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4PY18C2Y5YznWrc;\n Fri, 10 Mar 2023 17:33:47 +0800 (CST)",
            "from localhost.localdomain (10.28.79.22) by\n kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.21; Fri, 10 Mar 2023 17:36:38 +0800"
        ],
        "From": "Dongdong Liu <liudongdong3@huawei.com>",
        "To": "<dev@dpdk.org>, <ferruh.yigit@amd.com>, <thomas@monjalon.net>,\n <andrew.rybchenko@oktetlabs.ru>",
        "CC": "<stable@dpdk.org>, <yisen.zhuang@huawei.com>, <liudongdong3@huawei.com>,\n <lihuisong@huawei.com>",
        "Subject": "[PATCH 11/16] net/hns3: use new RSS rule to configure hardware",
        "Date": "Fri, 10 Mar 2023 17:35:13 +0800",
        "Message-ID": "<20230310093518.5198-12-liudongdong3@huawei.com>",
        "X-Mailer": "git-send-email 2.22.0",
        "In-Reply-To": "<20230310093518.5198-1-liudongdong3@huawei.com>",
        "References": "<20230310093518.5198-1-liudongdong3@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.28.79.22]",
        "X-ClientProxiedBy": "dggems706-chm.china.huawei.com (10.3.19.183) To\n kwepemi500017.china.huawei.com (7.221.188.110)",
        "X-CFilter-Loop": "Reflected",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "From: Huisong Li <lihuisong@huawei.com>\n\nRemove redundant assignment and directly use new RSS rule to configure\nhardware. Additionally, considering that the new rule configuration may\nneed to be modified, the 'const' of input parameter about it is removed.\n\nCc: stable@dpdk.org\n\nSigned-off-by: Huisong Li <lihuisong@huawei.com>\nSigned-off-by: Dongdong Liu <liudongdong3@huawei.com>\n---\n drivers/net/hns3/hns3_flow.c | 52 ++++++++++++++----------------------\n 1 file changed, 20 insertions(+), 32 deletions(-)",
    "diff": "diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c\nindex 4da98d7adc..3700d073b1 100644\n--- a/drivers/net/hns3/hns3_flow.c\n+++ b/drivers/net/hns3/hns3_flow.c\n@@ -1482,6 +1482,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)\n {\n \tuint8_t rss_key[HNS3_RSS_KEY_SIZE_MAX] = {0};\n \tbool use_default_key = false;\n+\tuint64_t flow_types;\n \tuint8_t hash_algo;\n \tint ret;\n \n@@ -1501,10 +1502,18 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)\n \t\t\t\t    hw->rss_key_size);\n \tif (ret)\n \t\treturn ret;\n-\n \thw->rss_info.rte_flow_hash_algo = hash_algo;\n \n-\tret = hns3_set_rss_tuple_by_rss_hf(hw, rss_config->types);\n+\t/* Filter the unsupported flow types */\n+\tflow_types = rss_config->types ?\n+\t\t     rss_config->types & HNS3_ETH_RSS_SUPPORT :\n+\t\t     hw->rss_info.rss_hf;\n+\tif (flow_types != rss_config->types)\n+\t\thns3_warn(hw, \"modified RSS types based on hardware support,\"\n+\t\t\t  \" requested:0x%\" PRIx64 \" configured:0x%\" PRIx64,\n+\t\t\t  rss_config->types, flow_types);\n+\n+\tret = hns3_set_rss_tuple_by_rss_hf(hw, flow_types);\n \tif (ret)\n \t\thns3_err(hw, \"Update RSS tuples by rss hf failed %d\", ret);\n \n@@ -1550,48 +1559,27 @@ hns3_reset_rss_filter(struct hns3_hw *hw, const struct hns3_rss_conf *conf)\n }\n \n static int\n-hns3_config_rss_filter(struct hns3_hw *hw, const struct hns3_rss_conf *conf)\n+hns3_config_rss_filter(struct hns3_hw *hw, struct hns3_rss_conf *conf)\n {\n-\tuint64_t flow_types;\n+\tstruct rte_flow_action_rss *rss_act;\n \tuint16_t num;\n \tint ret;\n \n-\tstruct rte_flow_action_rss rss_flow_conf = {\n-\t\t.func = conf->conf.func,\n-\t\t.level = conf->conf.level,\n-\t\t.types = conf->conf.types,\n-\t\t.key_len = conf->conf.key_len,\n-\t\t.queue_num = conf->conf.queue_num,\n-\t\t.key = conf->conf.key_len ?\n-\t\t    (void *)(uintptr_t)conf->conf.key : NULL,\n-\t\t.queue = conf->conf.queue,\n-\t};\n-\n+\trss_act = &conf->conf;\n \t/* Set rx queues to use */\n-\tnum = RTE_MIN(hw->data->nb_rx_queues, rss_flow_conf.queue_num);\n-\tif (rss_flow_conf.queue_num > num)\n+\tnum = RTE_MIN(hw->data->nb_rx_queues, rss_act->queue_num);\n+\tif (rss_act->queue_num > num)\n \t\thns3_warn(hw, \"Config queue numbers %u are beyond the scope of truncated\",\n-\t\t\t  rss_flow_conf.queue_num);\n+\t\t\t  rss_act->queue_num);\n \thns3_info(hw, \"Max of contiguous %u PF queues are configured\", num);\n \tif (num) {\n-\t\tret = hns3_update_indir_table(hw, &rss_flow_conf, num);\n+\t\tret = hns3_update_indir_table(hw, rss_act, num);\n \t\tif (ret)\n \t\t\treturn ret;\n \t}\n \n-\t/* Filter the unsupported flow types */\n-\tflow_types = conf->conf.types ?\n-\t\t     rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT :\n-\t\t     hw->rss_info.rss_hf;\n-\tif (flow_types != rss_flow_conf.types)\n-\t\thns3_warn(hw, \"modified RSS types based on hardware support,\"\n-\t\t\t  \" requested:0x%\" PRIx64 \" configured:0x%\" PRIx64,\n-\t\t\t  rss_flow_conf.types, flow_types);\n-\t/* Update the useful flow types */\n-\trss_flow_conf.types = flow_types;\n-\n \t/* Set hash algorithm and flow types by the user's config */\n-\treturn hns3_hw_rss_hash_set(hw, &rss_flow_conf);\n+\treturn hns3_hw_rss_hash_set(hw, rss_act);\n }\n \n static int\n@@ -1680,7 +1668,7 @@ hns3_rss_action_is_dup(struct hns3_hw *hw,\n }\n \n static int\n-hns3_flow_parse_rss(struct rte_eth_dev *dev, const struct hns3_rss_conf *conf)\n+hns3_flow_parse_rss(struct rte_eth_dev *dev, struct hns3_rss_conf *conf)\n {\n \tstruct hns3_adapter *hns = dev->data->dev_private;\n \tstruct hns3_hw *hw = &hns->hw;\n",
    "prefixes": [
        "11/16"
    ]
}