get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 83854,
    "url": "https://patches.dpdk.org/api/patches/83854/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1604932142-19900-6-git-send-email-oulijun@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": "<1604932142-19900-6-git-send-email-oulijun@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1604932142-19900-6-git-send-email-oulijun@huawei.com",
    "date": "2020-11-09T14:29:01",
    "name": "[V3,5/6] net/hns3: fix queue enabling state not store after FLR",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "8a94476f91cb58def0e0396a0f69c244bc978af8",
    "submitter": {
        "id": 1675,
        "url": "https://patches.dpdk.org/api/people/1675/?format=api",
        "name": "Lijun Ou",
        "email": "oulijun@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/1604932142-19900-6-git-send-email-oulijun@huawei.com/mbox/",
    "series": [
        {
            "id": 13748,
            "url": "https://patches.dpdk.org/api/series/13748/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13748",
            "date": "2020-11-09T14:29:00",
            "name": "bugfix and cleanups for hns3",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/13748/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/83854/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/83854/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 53BB6A0527;\n\tMon,  9 Nov 2020 15:30:10 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 42D17AC8D;\n\tMon,  9 Nov 2020 15:28:57 +0100 (CET)",
            "from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190])\n by dpdk.org (Postfix) with ESMTP id D37A26CBF\n for <dev@dpdk.org>; Mon,  9 Nov 2020 15:28:48 +0100 (CET)",
            "from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60])\n by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CVCz42JcWzkhYr\n for <dev@dpdk.org>; Mon,  9 Nov 2020 22:28:32 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) by\n DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id\n 14.3.487.0; Mon, 9 Nov 2020 22:28:35 +0800"
        ],
        "From": "Lijun Ou <oulijun@huawei.com>",
        "To": "<ferruh.yigit@intel.com>",
        "CC": "<dev@dpdk.org>, <linuxarm@huawei.com>",
        "Date": "Mon, 9 Nov 2020 22:29:01 +0800",
        "Message-ID": "<1604932142-19900-6-git-send-email-oulijun@huawei.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1604932142-19900-1-git-send-email-oulijun@huawei.com>",
        "References": "<1604634716-43484-1-git-send-email-oulijun@huawei.com>\n <1604932142-19900-1-git-send-email-oulijun@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.69.192.56]",
        "X-CFilter-Loop": "Reflected",
        "Subject": "[dpdk-dev] [PATCH V3 5/6] net/hns3: fix queue enabling state not\n\tstore after FLR",
        "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: Chengchang Tang <tangchengchang@huawei.com>\n\nFLR operation will reset the queue enabling state and\nthe driver needs to restore the state after reset. As\na result, it will result in unpredictable behavior with\nreseted when user start or stop queue by calling the\nrelatived function if the driver does not do this.\n\nThis patch fix it by add a queue enabling state restore\nfunction to the reset handler.\n\nFixes: fa29fe45a7b4 (\"net/hns3: support queue start and stop\")\nCc: stable@dpdk.org\n\nSigned-off-by: Chengchang Tang <tangchengchang@huawei.com>\nSigned-off-by: Lijun Ou <oulijun@huawei.com>\n---\nV2->V3:\n- rewrite commit log\n\nV1->V2:\n- no fix\n---\n drivers/net/hns3/hns3_ethdev.c    |  5 +++++\n drivers/net/hns3/hns3_ethdev_vf.c |  5 +++++\n drivers/net/hns3/hns3_rxtx.c      | 20 ++++++++++++++++++++\n drivers/net/hns3/hns3_rxtx.h      |  1 +\n 4 files changed, 31 insertions(+)",
    "diff": "diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c\nindex ba96724..79c0389 100644\n--- a/drivers/net/hns3/hns3_ethdev.c\n+++ b/drivers/net/hns3/hns3_ethdev.c\n@@ -5571,6 +5571,11 @@ hns3_start_service(struct hns3_adapter *hns)\n \t\t/* Enable interrupt of all rx queues before enabling queues */\n \t\thns3_dev_all_rx_queue_intr_enable(hw, true);\n \t\t/*\n+\t\t * Enable state of each rxq and txq will be recovered after\n+\t\t * reset, so we need to restore them before enable all tqps;\n+\t\t */\n+\t\thns3_restore_tqp_enable_state(hw);\n+\t\t/*\n \t\t * When finished the initialization, enable queues to receive\n \t\t * and transmit packets.\n \t\t */\ndiff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c\nindex 0e63314..0366b9d 100644\n--- a/drivers/net/hns3/hns3_ethdev_vf.c\n+++ b/drivers/net/hns3/hns3_ethdev_vf.c\n@@ -2424,6 +2424,11 @@ hns3vf_start_service(struct hns3_adapter *hns)\n \t\t/* Enable interrupt of all rx queues before enabling queues */\n \t\thns3_dev_all_rx_queue_intr_enable(hw, true);\n \t\t/*\n+\t\t * Enable state of each rxq and txq will be recovered after\n+\t\t * reset, so we need to restore them before enable all tqps;\n+\t\t */\n+\t\thns3_restore_tqp_enable_state(hw);\n+\t\t/*\n \t\t * When finished the initialization, enable queues to receive\n \t\t * and transmit packets.\n \t\t */\ndiff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c\nindex 85316ca..4b88b46 100644\n--- a/drivers/net/hns3/hns3_rxtx.c\n+++ b/drivers/net/hns3/hns3_rxtx.c\n@@ -503,6 +503,26 @@ hns3_start_all_rxqs(struct rte_eth_dev *dev)\n }\n \n void\n+hns3_restore_tqp_enable_state(struct hns3_hw *hw)\n+{\n+\tstruct hns3_rx_queue *rxq;\n+\tstruct hns3_tx_queue *txq;\n+\tuint16_t i;\n+\n+\tfor (i = 0; i < hw->data->nb_rx_queues; i++) {\n+\t\trxq = hw->data->rx_queues[i];\n+\t\tif (rxq != NULL)\n+\t\t\thns3_enable_rxq(rxq, rxq->enabled);\n+\t}\n+\n+\tfor (i = 0; i < hw->data->nb_tx_queues; i++) {\n+\t\ttxq = hw->data->tx_queues[i];\n+\t\tif (txq != NULL)\n+\t\t\thns3_enable_txq(txq, txq->enabled);\n+\t}\n+}\n+\n+void\n hns3_stop_all_txqs(struct rte_eth_dev *dev)\n {\n \tstruct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);\ndiff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h\nindex 8b32abe..6538848 100644\n--- a/drivers/net/hns3/hns3_rxtx.h\n+++ b/drivers/net/hns3/hns3_rxtx.h\n@@ -677,5 +677,6 @@ uint32_t hns3_get_tqp_reg_offset(uint16_t idx);\n int hns3_start_all_txqs(struct rte_eth_dev *dev);\n int hns3_start_all_rxqs(struct rte_eth_dev *dev);\n void hns3_stop_all_txqs(struct rte_eth_dev *dev);\n+void hns3_restore_tqp_enable_state(struct hns3_hw *hw);\n \n #endif /* _HNS3_RXTX_H_ */\n",
    "prefixes": [
        "V3",
        "5/6"
    ]
}