Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/115875/?format=api
https://patches.dpdk.org/api/patches/115875/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220905085939.22236-6-liudongdong3@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": "<20220905085939.22236-6-liudongdong3@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220905085939.22236-6-liudongdong3@huawei.com", "date": "2022-09-05T08:59:31", "name": "[RESEND,05/13] net/hns3: fix fail to receive PTP packet", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "1d55efaca02babcb3e9bdaedba9c01e75bc7fd77", "submitter": { "id": 2718, "url": "https://patches.dpdk.org/api/people/2718/?format=api", "name": "Dongdong Liu", "email": "liudongdong3@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/20220905085939.22236-6-liudongdong3@huawei.com/mbox/", "series": [ { "id": 24533, "url": "https://patches.dpdk.org/api/series/24533/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24533", "date": "2022-09-05T08:59:26", "name": "some bugfixes and clean code for hns3", "version": 1, "mbox": "https://patches.dpdk.org/series/24533/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/115875/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/115875/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 A9FDFA054A;\n\tMon, 5 Sep 2022 11:01:39 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CD8C042B85;\n\tMon, 5 Sep 2022 11:01:10 +0200 (CEST)", "from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255])\n by mails.dpdk.org (Postfix) with ESMTP id F141742836;\n Mon, 5 Sep 2022 11:01:08 +0200 (CEST)", "from kwepemi500017.china.huawei.com (unknown [172.30.72.53])\n by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MLj814ZJlz1P6hm;\n Mon, 5 Sep 2022 16:57:21 +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.24; Mon, 5 Sep 2022 17:01:06 +0800" ], "From": "Dongdong Liu <liudongdong3@huawei.com>", "To": "<dev@dpdk.org>, <andrew.rybchenko@oktetlabs.ru>,\n <ferruh.yigit@xilinx.com>, <thomas@monjalon.net>, <liudongdong3@huawei.com>,\n <lihuisong@huawei.com>, <haijie1@huawei.com>", "CC": "<stable@dpdk.org>, <fengchengwen@huawei.com>, <yisen.zhuang@huawei.com>,\n <humin29@huawei.com>", "Subject": "[PATCH RESEND 05/13] net/hns3: fix fail to receive PTP packet", "Date": "Mon, 5 Sep 2022 16:59:31 +0800", "Message-ID": "<20220905085939.22236-6-liudongdong3@huawei.com>", "X-Mailer": "git-send-email 2.22.0", "In-Reply-To": "<20220905085939.22236-1-liudongdong3@huawei.com>", "References": "<20220905085939.22236-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": "dggems702-chm.china.huawei.com (10.3.19.179) 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\nThe Rx and Tx vector algorithm of hns3 PMD don't support PTP\nfunction. Currently, hns3 driver uses 'pf->ptp_enable' to check\nwhether PTP is enabled so as to not select Rx and Tx vector\nalgorithm. And the variable is set when call rte_eth_timesync_enable().\nNamely, it may not be set before selecting Rx/Tx function, let's say\nthe case: set PTP offload in dev_configure(), do dev_start() and then\ncall rte_eth_timesync_enable(). In this case, all PTP packets can not\nbe received to application. So this patch fixes the check based on the\nRTE_ETH_RX_OFFLOAD_TIMESTAMP flag.\n\nFixes: 71f4d1aae11f (\"net/hns3: fix vector burst unsupported when PTP capability set\")\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_ptp.c | 1 -\n drivers/net/hns3/hns3_rxtx_vec.c | 20 +++++++++-----------\n 2 files changed, 9 insertions(+), 12 deletions(-)", "diff": "diff --git a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c\nindex 0b0061bba5..6bbd85ba23 100644\n--- a/drivers/net/hns3/hns3_ptp.c\n+++ b/drivers/net/hns3/hns3_ptp.c\n@@ -125,7 +125,6 @@ hns3_timesync_enable(struct rte_eth_dev *dev)\n \n \tif (pf->ptp_enable)\n \t\treturn 0;\n-\thns3_warn(hw, \"note: please ensure Rx/Tx burst mode is simple or common when enabling PTP!\");\n \n \trte_spinlock_lock(&hw->lock);\n \tret = hns3_timesync_configure(hns, true);\ndiff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c\nindex 0dd6fccb13..cd9264d91b 100644\n--- a/drivers/net/hns3/hns3_rxtx_vec.c\n+++ b/drivers/net/hns3/hns3_rxtx_vec.c\n@@ -17,15 +17,18 @@ int\n hns3_tx_check_vec_support(struct rte_eth_dev *dev)\n {\n \tstruct rte_eth_txmode *txmode = &dev->data->dev_conf.txmode;\n-\tstruct hns3_adapter *hns = dev->data->dev_private;\n-\tstruct hns3_pf *pf = &hns->pf;\n+\tstruct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;\n \n \t/* Only support RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE */\n \tif (txmode->offloads != RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE)\n \t\treturn -ENOTSUP;\n \n-\t/* Vec is not supported when PTP enabled */\n-\tif (pf->ptp_enable)\n+\t/*\n+\t * PTP function requires the cooperation of Rx and Tx.\n+\t * Tx vector isn't supported if RTE_ETH_RX_OFFLOAD_TIMESTAMP is set\n+\t * in Rx offloads.\n+\t */\n+\tif (rxmode->offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)\n \t\treturn -ENOTSUP;\n \n \treturn 0;\n@@ -232,9 +235,8 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)\n {\n \tstruct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;\n \tuint64_t offloads_mask = RTE_ETH_RX_OFFLOAD_TCP_LRO |\n-\t\t\t\t RTE_ETH_RX_OFFLOAD_VLAN;\n-\tstruct hns3_adapter *hns = dev->data->dev_private;\n-\tstruct hns3_pf *pf = &hns->pf;\n+\t\t\t\t RTE_ETH_RX_OFFLOAD_VLAN |\n+\t\t\t\t RTE_ETH_RX_OFFLOAD_TIMESTAMP;\n \n \tif (dev->data->scattered_rx)\n \t\treturn -ENOTSUP;\n@@ -245,9 +247,5 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)\n \tif (hns3_rxq_iterate(dev, hns3_rxq_vec_check, NULL) != 0)\n \t\treturn -ENOTSUP;\n \n-\t/* Vec is not supported when PTP enabled */\n-\tif (pf->ptp_enable)\n-\t\treturn -ENOTSUP;\n-\n \treturn 0;\n }\n", "prefixes": [ "RESEND", "05/13" ] }{ "id": 115875, "url": "