Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/133662/?format=api
http://patches.dpdk.org/api/patches/133662/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231031122359.3930935-2-haijie1@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": "<20231031122359.3930935-2-haijie1@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231031122359.3930935-2-haijie1@huawei.com", "date": "2023-10-31T12:23:54", "name": "[1/6] net/hns3: fix setting DCB capability", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "9815c6313e1b7643a6298a8bfc76daaf9fc69c69", "submitter": { "id": 2935, "url": "http://patches.dpdk.org/api/people/2935/?format=api", "name": "Jie Hai", "email": "haijie1@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/20231031122359.3930935-2-haijie1@huawei.com/mbox/", "series": [ { "id": 30073, "url": "http://patches.dpdk.org/api/series/30073/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30073", "date": "2023-10-31T12:23:55", "name": "net/hns3: add some bugfix for hns3", "version": 1, "mbox": "http://patches.dpdk.org/series/30073/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/133662/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/133662/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 A190A43252;\n\tTue, 31 Oct 2023 13:35:46 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8C5F64067C;\n\tTue, 31 Oct 2023 13:35:42 +0100 (CET)", "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id 998DD4026C\n for <dev@dpdk.org>; Tue, 31 Oct 2023 13:35:39 +0100 (CET)", "from kwepemi500020.china.huawei.com (unknown [172.30.72.55])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SKTyr0DkHzPnb0\n for <dev@dpdk.org>; Tue, 31 Oct 2023 20:31:32 +0800 (CST)", "from localhost.localdomain (10.67.165.2) by\n kwepemi500020.china.huawei.com (7.221.188.8) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.31; Tue, 31 Oct 2023 20:35:37 +0800" ], "From": "Jie Hai <haijie1@huawei.com>", "To": "<dev@dpdk.org>, Yisen Zhuang <yisen.zhuang@huawei.com>, \"Wei Hu (Xavier)\"\n <xavier.huwei@huawei.com>, Chengchang Tang <tangchengchang@huawei.com>,\n Chengwen Feng <fengchengwen@huawei.com>, Huisong Li <lihuisong@huawei.com>", "CC": "<liudongdong3@huawei.com>", "Subject": "[PATCH 1/6] net/hns3: fix setting DCB capability", "Date": "Tue, 31 Oct 2023 20:23:54 +0800", "Message-ID": "<20231031122359.3930935-2-haijie1@huawei.com>", "X-Mailer": "git-send-email 2.30.0", "In-Reply-To": "<20231031122359.3930935-1-haijie1@huawei.com>", "References": "<20231031122359.3930935-1-haijie1@huawei.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Originating-IP": "[10.67.165.2]", "X-ClientProxiedBy": "dggems703-chm.china.huawei.com (10.3.19.180) To\n kwepemi500020.china.huawei.com (7.221.188.8)", "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\nThe \"hw->capability\" is set after querying firmware and version.\nBut the DCB capability of PF is set in other place.\nSo this patch moves setting DCB capability to the place where\nall capabilities are set.\n\nFixes: ab2e2e344163 (\"net/hns3: get device capability in primary process\")\nCc: stable@dpdk.org\n\nSigned-off-by: Huisong Li <lihuisong@huawei.com>\nSigned-off-by: Jie Hai <haijie1@huawei.com>\n---\n drivers/net/hns3/hns3_cmd.c | 25 +++++++++++++++++++++++++\n drivers/net/hns3/hns3_ethdev.c | 13 -------------\n 2 files changed, 25 insertions(+), 13 deletions(-)", "diff": "diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c\nindex ca1d3f1b8c0d..62c55f347fa3 100644\n--- a/drivers/net/hns3/hns3_cmd.c\n+++ b/drivers/net/hns3/hns3_cmd.c\n@@ -525,6 +525,28 @@ hns3_build_api_caps(void)\n \treturn rte_cpu_to_le_32(api_caps);\n }\n \n+static void\n+hns3_set_dcb_capability(struct hns3_hw *hw)\n+{\n+\tstruct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);\n+\tstruct rte_pci_device *pci_dev;\n+\tstruct rte_eth_dev *eth_dev;\n+\tuint16_t device_id;\n+\n+\tif (hns->is_vf)\n+\t\treturn;\n+\n+\teth_dev = &rte_eth_devices[hw->data->port_id];\n+\tpci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);\n+\tdevice_id = pci_dev->id.device_id;\n+\n+\tif (device_id == HNS3_DEV_ID_25GE_RDMA ||\n+\t device_id == HNS3_DEV_ID_50GE_RDMA ||\n+\t device_id == HNS3_DEV_ID_100G_RDMA_MACSEC ||\n+\t device_id == HNS3_DEV_ID_200G_RDMA)\n+\t\thns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_DCB_B, 1);\n+}\n+\n static int\n hns3_cmd_query_firmware_version_and_capability(struct hns3_hw *hw)\n {\n@@ -542,6 +564,9 @@ hns3_cmd_query_firmware_version_and_capability(struct hns3_hw *hw)\n \t\treturn ret;\n \n \thw->fw_version = rte_le_to_cpu_32(resp->firmware);\n+\n+\thns3_set_dcb_capability(hw);\n+\n \t/*\n \t * Make sure mask the capability before parse capability because it\n \t * may overwrite resp's data.\ndiff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c\nindex 964f47f1641e..29f9625b4036 100644\n--- a/drivers/net/hns3/hns3_ethdev.c\n+++ b/drivers/net/hns3/hns3_ethdev.c\n@@ -2669,22 +2669,9 @@ static int\n hns3_get_capability(struct hns3_hw *hw)\n {\n \tstruct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);\n-\tstruct rte_pci_device *pci_dev;\n \tstruct hns3_pf *pf = &hns->pf;\n-\tstruct rte_eth_dev *eth_dev;\n-\tuint16_t device_id;\n \tint ret;\n \n-\teth_dev = &rte_eth_devices[hw->data->port_id];\n-\tpci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);\n-\tdevice_id = pci_dev->id.device_id;\n-\n-\tif (device_id == HNS3_DEV_ID_25GE_RDMA ||\n-\t device_id == HNS3_DEV_ID_50GE_RDMA ||\n-\t device_id == HNS3_DEV_ID_100G_RDMA_MACSEC ||\n-\t device_id == HNS3_DEV_ID_200G_RDMA)\n-\t\thns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_DCB_B, 1);\n-\n \tret = hns3_get_pci_revision_id(hw, &hw->revision);\n \tif (ret)\n \t\treturn ret;\n", "prefixes": [ "1/6" ] }{ "id": 133662, "url": "