Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/94148/?format=api
https://patches.dpdk.org/api/patches/94148/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1623551516-49635-6-git-send-email-humin29@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": "<1623551516-49635-6-git-send-email-humin29@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1623551516-49635-6-git-send-email-humin29@huawei.com", "date": "2021-06-13T02:31:55", "name": "[5/6] net/hns3: fix config max queues to zero when fails", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "ee9fcb361c9d576886d4d06fdb209a816d371b1a", "submitter": { "id": 1944, "url": "https://patches.dpdk.org/api/people/1944/?format=api", "name": "humin (Q)", "email": "humin29@huawei.com" }, "delegate": { "id": 3961, "url": "https://patches.dpdk.org/api/users/3961/?format=api", "username": "arybchenko", "first_name": "Andrew", "last_name": "Rybchenko", "email": "andrew.rybchenko@oktetlabs.ru" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1623551516-49635-6-git-send-email-humin29@huawei.com/mbox/", "series": [ { "id": 17308, "url": "https://patches.dpdk.org/api/series/17308/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17308", "date": "2021-06-13T02:31:54", "name": "bugfixes for hns3 PMD", "version": 1, "mbox": "https://patches.dpdk.org/series/17308/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/94148/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/94148/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 435EDA0C47;\n\tSun, 13 Jun 2021 04:32:37 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 24D73410FC;\n\tSun, 13 Jun 2021 04:32:27 +0200 (CEST)", "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id 624F540141\n for <dev@dpdk.org>; Sun, 13 Jun 2021 04:32:23 +0200 (CEST)", "from dggeme756-chm.china.huawei.com (unknown [172.30.72.55])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4G2dlJ0wh5zWsTW\n for <dev@dpdk.org>; Sun, 13 Jun 2021 10:27:24 +0800 (CST)", "from localhost.localdomain (10.69.192.56) by\n dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id\n 15.1.2176.2; Sun, 13 Jun 2021 10:32:20 +0800" ], "From": "\"Min Hu (Connor)\" <humin29@huawei.com>", "To": "<dev@dpdk.org>", "CC": "<ferruh.yigit@intel.com>", "Date": "Sun, 13 Jun 2021 10:31:55 +0800", "Message-ID": "<1623551516-49635-6-git-send-email-humin29@huawei.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1623551516-49635-1-git-send-email-humin29@huawei.com>", "References": "<1623551516-49635-1-git-send-email-humin29@huawei.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Originating-IP": "[10.69.192.56]", "X-ClientProxiedBy": "dggems701-chm.china.huawei.com (10.3.19.178) To\n dggeme756-chm.china.huawei.com (10.3.19.102)", "X-CFilter-Loop": "Reflected", "Subject": "[dpdk-dev] [PATCH 5/6] net/hns3: fix config max queues to zero when\n fails", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Huisong Li <lihuisong@huawei.com>\n\nThe \"cfg_max_queues\" maintains configured max queue numbers from user,\nand is equal to the maximum of \"nb_rx_queues\" and \"nb_tx_queues\" in\n\"dev->data\".\n\nFrom the ethdev layer framework, \"nb_rx/tx_queues\" in \"dev->data\" were set\nto zero in rte_eth_dev_configure() if ops.dev_configure in PMD fails to be\nexecuted, In addition, if ops.dev_configure in HNS3 PMD failed, the fake\nqueues are also cleared on a device that does not support independent Rx/Tx\nqueues.\n\nTherefore, the \"cfg_max_queues\" should be also set to zero when\ndev_configure fails.\n\nFixes: fa29fe45a7b4 (\"net/hns3: support queue start and stop\")\nCc: stable@dpdk.org\n\nSigned-off-by: Huisong Li <lihuisong@huawei.com>\nSigned-off-by: Min Hu (Connor) <humin29@huawei.com>\n---\n drivers/net/hns3/hns3_ethdev.c | 2 ++\n drivers/net/hns3/hns3_ethdev_vf.c | 2 ++\n 2 files changed, 4 insertions(+)", "diff": "diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c\nindex db96fbc..5f6daa9 100644\n--- a/drivers/net/hns3/hns3_ethdev.c\n+++ b/drivers/net/hns3/hns3_ethdev.c\n@@ -2501,6 +2501,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)\n \tret = hns3_set_fake_rx_or_tx_queues(dev, nb_rx_q, nb_tx_q);\n \tif (ret) {\n \t\thns3_err(hw, \"fail to set Rx/Tx fake queues, ret = %d.\", ret);\n+\t\thw->cfg_max_queues = 0;\n \t\treturn ret;\n \t}\n \n@@ -2549,6 +2550,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)\n \treturn 0;\n \n cfg_err:\n+\thw->cfg_max_queues = 0;\n \t(void)hns3_set_fake_rx_or_tx_queues(dev, 0, 0);\n \thw->adapter_state = HNS3_NIC_INITIALIZED;\n \ndiff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c\nindex e0a0797..e582503 100644\n--- a/drivers/net/hns3/hns3_ethdev_vf.c\n+++ b/drivers/net/hns3/hns3_ethdev_vf.c\n@@ -804,6 +804,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)\n \tret = hns3_set_fake_rx_or_tx_queues(dev, nb_rx_q, nb_tx_q);\n \tif (ret) {\n \t\thns3_err(hw, \"fail to set Rx/Tx fake queues, ret = %d.\", ret);\n+\t\thw->cfg_max_queues = 0;\n \t\treturn ret;\n \t}\n \n@@ -863,6 +864,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)\n \treturn 0;\n \n cfg_err:\n+\thw->cfg_max_queues = 0;\n \t(void)hns3_set_fake_rx_or_tx_queues(dev, 0, 0);\n \thw->adapter_state = HNS3_NIC_INITIALIZED;\n \n", "prefixes": [ "5/6" ] }{ "id": 94148, "url": "