get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 113940,
    "url": "http://patches.dpdk.org/api/patches/113940/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220713115002.8959-6-liudongdong3@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": "<20220713115002.8959-6-liudongdong3@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220713115002.8959-6-liudongdong3@huawei.com",
    "date": "2022-07-13T11:50:02",
    "name": "[5/5] net/hns3: fix fail to receive PTP packet",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b7ef2cf1f19278ea4a04bbc4654ed6a7c7084352",
    "submitter": {
        "id": 2718,
        "url": "http://patches.dpdk.org/api/people/2718/?format=api",
        "name": "Dongdong Liu",
        "email": "liudongdong3@huawei.com"
    },
    "delegate": {
        "id": 3961,
        "url": "http://patches.dpdk.org/api/users/3961/?format=api",
        "username": "arybchenko",
        "first_name": "Andrew",
        "last_name": "Rybchenko",
        "email": "andrew.rybchenko@oktetlabs.ru"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220713115002.8959-6-liudongdong3@huawei.com/mbox/",
    "series": [
        {
            "id": 23982,
            "url": "http://patches.dpdk.org/api/series/23982/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=23982",
            "date": "2022-07-13T11:49:57",
            "name": "some bugfixes and clean code for hns3",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/23982/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/113940/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/113940/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 AFBE3A0032;\n\tWed, 13 Jul 2022 13:51:14 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8B0DC42B81;\n\tWed, 13 Jul 2022 13:51:08 +0200 (CEST)",
            "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id 34D2042B6F;\n Wed, 13 Jul 2022 13:51:04 +0200 (CEST)",
            "from kwepemi500017.china.huawei.com (unknown [172.30.72.55])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LjbWS28tjzlVwM;\n Wed, 13 Jul 2022 19:49:24 +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; Wed, 13 Jul 2022 19:50:58 +0800"
        ],
        "From": "Dongdong Liu <liudongdong3@huawei.com>",
        "To": "<dev@dpdk.org>, <ferruh.yigit@xilinx.com>,\n <andrew.rybchenko@oktetlabs.ru>, <thomas@monjalon.net>",
        "CC": "<stable@dpdk.org>, Huisong Li <lihuisong@huawei.com>, Dongdong Liu\n <liudongdong3@huawei.com>, Yisen Zhuang <yisen.zhuang@huawei.com>, \"Min Hu\n (Connor)\" <humin29@huawei.com>",
        "Subject": "[PATCH 5/5] net/hns3: fix fail to receive PTP packet",
        "Date": "Wed, 13 Jul 2022 19:50:02 +0800",
        "Message-ID": "<20220713115002.8959-6-liudongdong3@huawei.com>",
        "X-Mailer": "git-send-email 2.22.0",
        "In-Reply-To": "<20220713115002.8959-1-liudongdong3@huawei.com>",
        "References": "<20220713115002.8959-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": "dggems706-chm.china.huawei.com (10.3.19.183) 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 73f0ab6bc8..153866cf03 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@@ -233,9 +236,8 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)\n \tstruct rte_eth_fdir_conf *fconf = &dev->data->dev_conf.fdir_conf;\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@@ -249,9 +251,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": [
        "5/5"
    ]
}