get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 117179,
    "url": "http://patches.dpdk.org/api/patches/117179/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220930072220.20753-5-liudongdong3@huawei.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": "<20220930072220.20753-5-liudongdong3@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220930072220.20753-5-liudongdong3@huawei.com",
    "date": "2022-09-30T07:22:05",
    "name": "[04/19] net/hns3: fix RSS flow rule restore failed",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "250706cbd1d6f33e3b589e9ba4dfe5fc27ad9a0f",
    "submitter": {
        "id": 2718,
        "url": "http://patches.dpdk.org/api/people/2718/?format=api",
        "name": "Dongdong Liu",
        "email": "liudongdong3@huawei.com"
    },
    "delegate": {
        "id": 3961,
        "url": "http://patches.dpdk.org/api/users/3961/?format=api",
        "username": "arybchenko",
        "first_name": "Andrew",
        "last_name": "Rybchenko",
        "email": "andrew.rybchenko@oktetlabs.ru"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220930072220.20753-5-liudongdong3@huawei.com/mbox/",
    "series": [
        {
            "id": 24928,
            "url": "http://patches.dpdk.org/api/series/24928/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24928",
            "date": "2022-09-30T07:22:03",
            "name": "some bugfixes and clean code for hns3 - part2",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/24928/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/117179/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/117179/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 33D29A034C;\n\tFri, 30 Sep 2022 09:24:28 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 605B642B7B;\n\tFri, 30 Sep 2022 09:24:09 +0200 (CEST)",
            "from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189])\n by mails.dpdk.org (Postfix) with ESMTP id AE6AC410FA;\n Fri, 30 Sep 2022 09:24:03 +0200 (CEST)",
            "from kwepemi500017.china.huawei.com (unknown [172.30.72.56])\n by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Mf1r703chzHqVT;\n Fri, 30 Sep 2022 15:21:42 +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.2375.31; Fri, 30 Sep 2022 15:24:01 +0800"
        ],
        "From": "Dongdong Liu <liudongdong3@huawei.com>",
        "To": "<dev@dpdk.org>, <andrew.rybchenko@oktetlabs.ru>, <ferruh.yigit@amd.com>,\n <thomas@monjalon.net>",
        "CC": "<stable@dpdk.org>, <fengchengwen@huawei.com>, <yisen.zhuang@huawei.com>,\n <liudongdong3@huawei.com>, <lihuisong@huawei.com>, <haijie1@huawei.com>",
        "Subject": "[PATCH 04/19] net/hns3: fix RSS flow rule restore failed",
        "Date": "Fri, 30 Sep 2022 15:22:05 +0800",
        "Message-ID": "<20220930072220.20753-5-liudongdong3@huawei.com>",
        "X-Mailer": "git-send-email 2.22.0",
        "In-Reply-To": "<20220930072220.20753-1-liudongdong3@huawei.com>",
        "References": "<20220930072220.20753-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": "dggems701-chm.china.huawei.com (10.3.19.178) 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\nAfter reset process, types of RSS flow rule cannot be restored when\nload driver without RTE_ETH_MQ_RX_RSS_FLAG flag. This is because the\nrestoration for RSS flow rule is done in the 'hns3_config_rss()'. But\nthis function is also used to configure and restore RSS configuration\nfrom ethdev ops, and doesn't configure RSS types if 'rxmode.mq_mode'\nhas not the flag. As a result, RSS types configured by rte flow API\ncan't be restored in this case when encounter reset. Actually, all\nRSS rules are saved to a global link list. This patch uses the linked\nlist to restore RSS flow rule.\n\nFixes: 920be799dbc3 (\"net/hns3: fix RSS indirection table configuration\")\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_ethdev.c    | 11 ++---------\n drivers/net/hns3/hns3_ethdev_vf.c | 11 ++---------\n drivers/net/hns3/hns3_flow.c      |  8 +++++++-\n drivers/net/hns3/hns3_flow.h      |  1 +\n drivers/net/hns3/hns3_rss.h       |  1 -\n 5 files changed, 12 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c\nindex 3d9f7c6ec7..b0f69589d9 100644\n--- a/drivers/net/hns3/hns3_ethdev.c\n+++ b/drivers/net/hns3/hns3_ethdev.c\n@@ -5006,6 +5006,7 @@ static int\n hns3_do_start(struct hns3_adapter *hns, bool reset_queue)\n {\n \tstruct hns3_hw *hw = &hns->hw;\n+\tstruct rte_eth_dev *dev = &rte_eth_devices[hw->data->port_id];\n \tbool link_en;\n \tint ret;\n \n@@ -5042,7 +5043,7 @@ hns3_do_start(struct hns3_adapter *hns, bool reset_queue)\n \tif (ret)\n \t\tgoto err_set_link_speed;\n \n-\treturn 0;\n+\treturn hns3_restore_filter(dev);\n \n err_set_link_speed:\n \t(void)hns3_cfg_mac_mode(hw, false);\n@@ -5059,12 +5060,6 @@ hns3_do_start(struct hns3_adapter *hns, bool reset_queue)\n \treturn ret;\n }\n \n-static void\n-hns3_restore_filter(struct rte_eth_dev *dev)\n-{\n-\thns3_restore_rss_filter(dev);\n-}\n-\n static int\n hns3_dev_start(struct rte_eth_dev *dev)\n {\n@@ -5121,8 +5116,6 @@ hns3_dev_start(struct rte_eth_dev *dev)\n \thns3_set_rxtx_function(dev);\n \thns3_mp_req_start_rxtx(dev);\n \n-\thns3_restore_filter(dev);\n-\n \t/* Enable interrupt of all rx queues before enabling queues */\n \thns3_dev_all_rx_queue_intr_enable(hw, true);\n \ndiff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c\nindex a72535eb7d..bc8f5ecec2 100644\n--- a/drivers/net/hns3/hns3_ethdev_vf.c\n+++ b/drivers/net/hns3/hns3_ethdev_vf.c\n@@ -1727,6 +1727,7 @@ static int\n hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue)\n {\n \tstruct hns3_hw *hw = &hns->hw;\n+\tstruct rte_eth_dev *dev = &rte_eth_devices[hw->data->port_id];\n \tuint16_t nb_rx_q = hw->data->nb_rx_queues;\n \tuint16_t nb_tx_q = hw->data->nb_tx_queues;\n \tint ret;\n@@ -1741,13 +1742,7 @@ hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue)\n \tif (ret)\n \t\thns3_err(hw, \"failed to init queues, ret = %d.\", ret);\n \n-\treturn ret;\n-}\n-\n-static void\n-hns3vf_restore_filter(struct rte_eth_dev *dev)\n-{\n-\thns3_restore_rss_filter(dev);\n+\treturn hns3_restore_filter(dev);\n }\n \n static int\n@@ -1799,8 +1794,6 @@ hns3vf_dev_start(struct rte_eth_dev *dev)\n \thns3_set_rxtx_function(dev);\n \thns3_mp_req_start_rxtx(dev);\n \n-\thns3vf_restore_filter(dev);\n-\n \t/* Enable interrupt of all rx queues before enabling queues */\n \thns3_dev_all_rx_queue_intr_enable(hw, true);\n \thns3_start_tqps(hw);\ndiff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c\nindex 162a48e590..08fa6da7bb 100644\n--- a/drivers/net/hns3/hns3_flow.c\n+++ b/drivers/net/hns3/hns3_flow.c\n@@ -1646,7 +1646,7 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev)\n \treturn ret;\n }\n \n-int\n+static int\n hns3_restore_rss_filter(struct rte_eth_dev *dev)\n {\n \tstruct hns3_adapter *hns = dev->data->dev_private;\n@@ -1672,6 +1672,12 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev)\n \treturn ret;\n }\n \n+int\n+hns3_restore_filter(struct rte_eth_dev *dev)\n+{\n+\treturn hns3_restore_rss_filter(dev);\n+}\n+\n static int\n hns3_flow_parse_rss(struct rte_eth_dev *dev,\n \t\t    const struct hns3_rss_conf *conf, bool add)\ndiff --git a/drivers/net/hns3/hns3_flow.h b/drivers/net/hns3/hns3_flow.h\nindex 1ab3f9f5c6..0f5de129a3 100644\n--- a/drivers/net/hns3/hns3_flow.h\n+++ b/drivers/net/hns3/hns3_flow.h\n@@ -49,5 +49,6 @@ int hns3_dev_flow_ops_get(struct rte_eth_dev *dev,\n \t\t\t  const struct rte_flow_ops **ops);\n void hns3_flow_init(struct rte_eth_dev *dev);\n void hns3_flow_uninit(struct rte_eth_dev *dev);\n+int hns3_restore_filter(struct rte_eth_dev *dev);\n \n #endif /* _HNS3_FLOW_H_ */\ndiff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h\nindex 39af01ef13..1589c67c59 100644\n--- a/drivers/net/hns3/hns3_rss.h\n+++ b/drivers/net/hns3/hns3_rss.h\n@@ -110,6 +110,5 @@ int hns3_config_rss(struct hns3_adapter *hns);\n void hns3_rss_uninit(struct hns3_adapter *hns);\n int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf);\n int hns3_rss_set_algo_key(struct hns3_hw *hw, const uint8_t *key);\n-int hns3_restore_rss_filter(struct rte_eth_dev *dev);\n \n #endif /* _HNS3_RSS_H_ */\n",
    "prefixes": [
        "04/19"
    ]
}