get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64318,
    "url": "http://patches.dpdk.org/api/patches/64318/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200109031559.63194-8-huwei013@chinasoftinc.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": "<20200109031559.63194-8-huwei013@chinasoftinc.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200109031559.63194-8-huwei013@chinasoftinc.com",
    "date": "2020-01-09T03:15:55",
    "name": "[07/11] net/hns3: fix segment error when closing the port",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "03aaa2526f99aee1c8139dbeee7fc71763221bf3",
    "submitter": {
        "id": 1537,
        "url": "http://patches.dpdk.org/api/people/1537/?format=api",
        "name": "Wei Hu (Xavier)",
        "email": "huwei013@chinasoftinc.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/20200109031559.63194-8-huwei013@chinasoftinc.com/mbox/",
    "series": [
        {
            "id": 8023,
            "url": "http://patches.dpdk.org/api/series/8023/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8023",
            "date": "2020-01-09T03:15:48",
            "name": "misc updates and fixes for hns3 PMD driver",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8023/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64318/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/64318/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 ECEC1A04F3;\n\tThu,  9 Jan 2020 04:24:25 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 40F9C1DB5A;\n\tThu,  9 Jan 2020 04:23:47 +0100 (CET)",
            "from incedge.chinasoftinc.com (unknown [114.113.233.8])\n by dpdk.org (Postfix) with ESMTP id 00B791DB3E\n for <dev@dpdk.org>; Thu,  9 Jan 2020 04:23:39 +0100 (CET)",
            "from mail.chinasoftinc.com (inccas002.ito.icss [10.168.0.52]) by\n incedge.chinasoftinc.com with ESMTP id RL2z9bZ9DCFo90Jp (version=TLSv1\n cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO) for <dev@dpdk.org>;\n Thu, 09 Jan 2020 11:22:49 +0800 (CST)",
            "from localhost.localdomain (203.160.91.226) by INCCAS002.ito.icss\n (10.168.0.60) with Microsoft SMTP Server id 14.3.439.0; Thu, 9 Jan 2020\n 11:16:13 +0800"
        ],
        "X-ASG-Debug-ID": "1578539661-0a3dd116cf0458000f-TfluYd",
        "X-Barracuda-Envelope-From": "huwei013@chinasoftinc.com",
        "X-Barracuda-RBL-Trusted-Forwarder": [
            "10.168.0.52",
            "10.168.0.60"
        ],
        "X-ASG-Whitelist": "Client",
        "From": "\"Wei Hu (Xavier)\" <huwei013@chinasoftinc.com>",
        "To": "<dev@dpdk.org>",
        "Date": "Thu, 9 Jan 2020 11:15:55 +0800",
        "X-ASG-Orig-Subj": "[PATCH 07/11] net/hns3: fix segment error when closing the\n port",
        "Message-ID": "<20200109031559.63194-8-huwei013@chinasoftinc.com>",
        "X-Mailer": "git-send-email 2.23.0",
        "In-Reply-To": "<20200109031559.63194-1-huwei013@chinasoftinc.com>",
        "References": "<20200109031559.63194-1-huwei013@chinasoftinc.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[203.160.91.226]",
        "X-Barracuda-Connect": "inccas002.ito.icss[10.168.0.52]",
        "X-Barracuda-Start-Time": "1578540168",
        "X-Barracuda-Encrypted": "ECDHE-RSA-AES256-SHA",
        "X-Barracuda-URL": "https://spam.chinasoftinc.com:443/cgi-mod/mark.cgi",
        "X-Virus-Scanned": "by bsmtpd at chinasoftinc.com",
        "X-Barracuda-Scan-Msg-Size": "5031",
        "Subject": "[dpdk-dev] [PATCH 07/11] net/hns3: fix segment error when closing\n\tthe port",
        "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: Hongbo Zheng <zhenghongbo3@huawei.com>\n\nCurrently there is a certain probability of segment error in concurrent\nreset when the port is closing.\nThe calltrace info:\n\nThis GDB was configured as \"aarch64-redhat-linux-gnu\".\nReading symbols from /usr/app/testpmd...(no debugging symbols found)...\n done.\n[New LWP 98204]\n[New LWP 98203]\n[New LWP 98206]\n[New LWP 98205]\n[New LWP 98207]\n[New LWP 98208]\nMissing separate debuginfo for /root/lib/libnuma.so.1\n[Thread debugging using libthread_db enabled]\nUsing host libthread_db library \"/lib64/libthread_db.so.1\".\nCore was generated by `/usr/app/testpmd --log-level=6 --socket-mem 16'.\nProgram terminated with signal 11, Segmentation fault.\nMissing separate debuginfos, use:\n debuginfo-install glibc-2.17-260.el7.aarch64\n(gdb) bt\nin hns3vf_service_handler ()\n1  0x00000000006988b8 in eal_alarm_callback ()\n2  0x00000000006969b4 in eal_intr_thread_main ()\n3  0x0000ffffb08d6c48 in start_thread () from /lib64/libpthread.so.0\n4  0x0000ffffb0828600 in thread_start () from /lib64/libc.so.6\n(gdb)\n\nReset process may turn on the cancelled link state timer whether the\ncurrent port status is on or off, in order to solve this problem, this\npatch add judge the current network port state before starting the timer,\nonly the port in the running state can start the link state timer, so as\nto solve the problem that the link state timer accesses the null pointer\nand causes the segment error.\n\nFixes: 2790c6464725 (\"net/hns3: support device reset\")\nCc: stable@dpdk.org\n\nSigned-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>\nSigned-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>\n---\n drivers/net/hns3/hns3_ethdev.c    | 11 +++++++----\n drivers/net/hns3/hns3_ethdev_vf.c |  7 +++++--\n 2 files changed, 12 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c\nindex ca8718000..b05a55781 100644\n--- a/drivers/net/hns3/hns3_ethdev.c\n+++ b/drivers/net/hns3/hns3_ethdev.c\n@@ -4197,6 +4197,7 @@ hns3_dev_start(struct rte_eth_dev *dev)\n \t\treturn ret;\n \thns3_set_rxtx_function(dev);\n \thns3_mp_req_start_rxtx(dev);\n+\trte_eal_alarm_set(HNS3_SERVICE_INTERVAL, hns3_service_handler, dev);\n \n \thns3_info(hw, \"hns3 dev start successful!\");\n \treturn 0;\n@@ -4279,6 +4280,7 @@ hns3_dev_stop(struct rte_eth_dev *dev)\n \t\thns3_dev_release_mbufs(hns);\n \t\thw->adapter_state = HNS3_NIC_CONFIGURED;\n \t}\n+\trte_eal_alarm_cancel(hns3_service_handler, dev);\n \trte_spinlock_unlock(&hw->lock);\n \thns3_unmap_rx_interrupt(dev);\n }\n@@ -4301,7 +4303,6 @@ hns3_dev_close(struct rte_eth_dev *eth_dev)\n \thw->adapter_state = HNS3_NIC_CLOSING;\n \thns3_reset_abort(hns);\n \thw->adapter_state = HNS3_NIC_CLOSED;\n-\trte_eal_alarm_cancel(hns3_service_handler, eth_dev);\n \n \thns3_configure_all_mc_mac_addr(hns, true);\n \thns3_remove_all_vlan_table(hns);\n@@ -4760,7 +4761,8 @@ hns3_stop_service(struct hns3_adapter *hns)\n \tstruct rte_eth_dev *eth_dev;\n \n \teth_dev = &rte_eth_devices[hw->data->port_id];\n-\trte_eal_alarm_cancel(hns3_service_handler, eth_dev);\n+\tif (hw->adapter_state == HNS3_NIC_STARTED)\n+\t\trte_eal_alarm_cancel(hns3_service_handler, eth_dev);\n \thw->mac.link_status = ETH_LINK_DOWN;\n \n \thns3_set_rxtx_function(eth_dev);\n@@ -4801,7 +4803,9 @@ hns3_start_service(struct hns3_adapter *hns)\n \teth_dev = &rte_eth_devices[hw->data->port_id];\n \thns3_set_rxtx_function(eth_dev);\n \thns3_mp_req_start_rxtx(eth_dev);\n-\thns3_service_handler(eth_dev);\n+\tif (hw->adapter_state == HNS3_NIC_STARTED)\n+\t\thns3_service_handler(eth_dev);\n+\n \treturn 0;\n }\n \n@@ -5059,7 +5063,6 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)\n \t\thns3_notify_reset_ready(hw, false);\n \t}\n \n-\trte_eal_alarm_set(HNS3_SERVICE_INTERVAL, hns3_service_handler, eth_dev);\n \thns3_info(hw, \"hns3 dev initialization successful!\");\n \treturn 0;\n \ndiff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c\nindex 92cf7ee99..35243b2be 100644\n--- a/drivers/net/hns3/hns3_ethdev_vf.c\n+++ b/drivers/net/hns3/hns3_ethdev_vf.c\n@@ -1559,6 +1559,7 @@ hns3vf_dev_start(struct rte_eth_dev *dev)\n \thns3_set_rxtx_function(dev);\n \thns3_mp_req_start_rxtx(dev);\n \trte_eal_alarm_set(HNS3VF_SERVICE_INTERVAL, hns3vf_service_handler, dev);\n+\n \treturn ret;\n }\n \n@@ -1671,7 +1672,8 @@ hns3vf_stop_service(struct hns3_adapter *hns)\n \tstruct rte_eth_dev *eth_dev;\n \n \teth_dev = &rte_eth_devices[hw->data->port_id];\n-\trte_eal_alarm_cancel(hns3vf_service_handler, eth_dev);\n+\tif (hw->adapter_state == HNS3_NIC_STARTED)\n+\t\trte_eal_alarm_cancel(hns3vf_service_handler, eth_dev);\n \thw->mac.link_status = ETH_LINK_DOWN;\n \n \thns3_set_rxtx_function(eth_dev);\n@@ -1709,8 +1711,9 @@ hns3vf_start_service(struct hns3_adapter *hns)\n \teth_dev = &rte_eth_devices[hw->data->port_id];\n \thns3_set_rxtx_function(eth_dev);\n \thns3_mp_req_start_rxtx(eth_dev);\n+\tif (hw->adapter_state == HNS3_NIC_STARTED)\n+\t\thns3vf_service_handler(eth_dev);\n \n-\thns3vf_service_handler(eth_dev);\n \treturn 0;\n }\n \n",
    "prefixes": [
        "07/11"
    ]
}