Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/83791/?format=api
http://patches.dpdk.org/api/patches/83791/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1604634716-43484-6-git-send-email-oulijun@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": "<1604634716-43484-6-git-send-email-oulijun@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1604634716-43484-6-git-send-email-oulijun@huawei.com", "date": "2020-11-06T03:51:56", "name": "[v2,5/5] net/hns3: fix queue enabling status not store after FLR", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "7161100433f8447c949ee1fb89da088241e2017c", "submitter": { "id": 1675, "url": "http://patches.dpdk.org/api/people/1675/?format=api", "name": "Lijun Ou", "email": "oulijun@huawei.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/1604634716-43484-6-git-send-email-oulijun@huawei.com/mbox/", "series": [ { "id": 13715, "url": "http://patches.dpdk.org/api/series/13715/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13715", "date": "2020-11-06T03:51:51", "name": "bugfix and cleanups for hns3", "version": 2, "mbox": "http://patches.dpdk.org/series/13715/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/83791/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/83791/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 20E6DA0524;\n\tFri, 6 Nov 2020 04:53:01 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B504A558E;\n\tFri, 6 Nov 2020 04:51:43 +0100 (CET)", "from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190])\n by dpdk.org (Postfix) with ESMTP id F08A42C55\n for <dev@dpdk.org>; Fri, 6 Nov 2020 04:51:39 +0100 (CET)", "from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58])\n by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CS5zT3hp5z15QTk\n for <dev@dpdk.org>; Fri, 6 Nov 2020 11:51:33 +0800 (CST)", "from localhost.localdomain (10.69.192.56) by\n DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id\n 14.3.487.0; Fri, 6 Nov 2020 11:51:27 +0800" ], "From": "Lijun Ou <oulijun@huawei.com>", "To": "<ferruh.yigit@intel.com>", "CC": "<dev@dpdk.org>, <linuxarm@huawei.com>", "Date": "Fri, 6 Nov 2020 11:51:56 +0800", "Message-ID": "<1604634716-43484-6-git-send-email-oulijun@huawei.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1604634716-43484-1-git-send-email-oulijun@huawei.com>", "References": "<1604586194-29523-1-git-send-email-oulijun@huawei.com>\n <1604634716-43484-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 v2 5/5] net/hns3: fix queue enabling status 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\nThe FLR will resets the queue enabling status. In the\ncurrent code, the queue enabling status is not restored\nafter the reset. Therefore, if upper layer users have\ncalled queue start/stop function before the reset, the\nbehavior after the reset is not as expected.\n\nThis patch fix it by add a queue enabling status 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---\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 b27cf67..e177549 100644\n--- a/drivers/net/hns3/hns3_ethdev.c\n+++ b/drivers/net/hns3/hns3_ethdev.c\n@@ -5567,6 +5567,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 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 2f6d91b..511cd26 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 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 285c06d..c76e635 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": [ "v2", "5/5" ] }{ "id": 83791, "url": "