get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64366,
    "url": "http://patches.dpdk.org/api/patches/64366/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200109122710.1362-1-fangtonghao@sangfor.com.cn/",
    "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": "<20200109122710.1362-1-fangtonghao@sangfor.com.cn>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200109122710.1362-1-fangtonghao@sangfor.com.cn",
    "date": "2020-01-09T12:27:10",
    "name": "ethdev: fix secondary process change share memory",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2e6d325d38553722863c72cb766e7dba1ee20d30",
    "submitter": {
        "id": 1562,
        "url": "http://patches.dpdk.org/api/people/1562/?format=api",
        "name": "方统浩50450",
        "email": "fangtonghao@sangfor.com.cn"
    },
    "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/20200109122710.1362-1-fangtonghao@sangfor.com.cn/mbox/",
    "series": [
        {
            "id": 8035,
            "url": "http://patches.dpdk.org/api/series/8035/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8035",
            "date": "2020-01-09T12:27:10",
            "name": "ethdev: fix secondary process change share memory",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8035/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64366/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/64366/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 2B717A046B;\n\tThu,  9 Jan 2020 13:27:58 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 470351DD3B;\n\tThu,  9 Jan 2020 13:27:57 +0100 (CET)",
            "from m176115.mail.qiye.163.com (m176115.mail.qiye.163.com\n [59.111.176.115]) by dpdk.org (Postfix) with ESMTP id AF45F1DD37;\n Thu,  9 Jan 2020 13:27:55 +0100 (CET)",
            "from localhost.localdomain (unknown [113.87.162.54])\n by m176115.mail.qiye.163.com (Hmail) with ESMTPA id 69A2E6639FF;\n Thu,  9 Jan 2020 20:27:51 +0800 (CST)"
        ],
        "From": "Fang TongHao <fangtonghao@sangfor.com.cn>",
        "To": "thomas@monjalon.net,\n\tferruh.yigit@intel.com,\n\tarybchenko@solarflare.com",
        "Cc": "cunming.liang@intel.com, jia.guo@intel.com, dev@dpdk.org, stable@dpdk.org,\n Fang TongHao <fangtonghao@sangfor.com.cn>",
        "Date": "Thu,  9 Jan 2020 20:27:10 +0800",
        "Message-Id": "<20200109122710.1362-1-fangtonghao@sangfor.com.cn>",
        "X-Mailer": "git-send-email 2.24.1.windows.2",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-HM-Spam-Status": "e1kfGhgUHx5ZQUtXWQgYFAkeWUFZT1VKQkxLS0tLSU1MS0lDQ1lXWShZQU\n hPN1dZLVlBSVdZCQ4XHghZQVk1NCk2OjckKS43PlkG",
        "X-HM-Sender-Digest": "e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PRA6Sww6DDgxNR5RODcvEEI0\n FAEKCz1VSlVKTkxDTkxJQ0xKQ0tLVTMWGhIXVR0aFRwPFBUcExoUOwgaFRwdFAlVGBQWVRgVRVlX\n WRILWUFZSkpIVUNMVUpNSVVOT1lXWQgBWUFIS09INwY+",
        "X-HM-Tid": "0a6f8a4678069373kuws69a2e6639ff",
        "Subject": "[dpdk-dev] [PATCH] ethdev: fix secondary process change share memory",
        "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": "Hi all,I am from Sangfor Tech.I found a bug when using DPDK in\nmultiprocess scenario.The secondary process enters\n\"rte_eth_dev_pci_copy_info\" function when initializing.Then it\nsets the value of struct \"rte_eth_dev_data.dev_flags\" to zero,\nbut this struct is shared by primary process and secondary\nprocess, and the value change is unexpected by primary process.\nThis may cause very serious damage.I think\nthe secondary process should not enter \"rte_eth_dev_pci_copy_info\"\nfunction or changes the value of struct \"rte_eth_dev_data.dev_flags\"\nin shared memory.\nI fixed this bug by adding an if-statement to forbid the secondary\nprocess changing the above-mentioned value.\nThansk, All.\n\nSigned-off-by: Fang TongHao <fangtonghao@sangfor.com.cn>\n---\n lib/librte_ethdev/rte_ethdev_pci.h | 19 ++++++++++---------\n 1 file changed, 10 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h\nindex ccdbb46ec..916de8a14 100644\n--- a/lib/librte_ethdev/rte_ethdev_pci.h\n+++ b/lib/librte_ethdev/rte_ethdev_pci.h\n@@ -59,15 +59,16 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,\n \t}\n \n \teth_dev->intr_handle = &pci_dev->intr_handle;\n-\n-\teth_dev->data->dev_flags = 0;\n-\tif (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC)\n-\t\teth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;\n-\tif (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_RMV)\n-\t\teth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_RMV;\n-\n-\teth_dev->data->kdrv = pci_dev->kdrv;\n-\teth_dev->data->numa_node = pci_dev->device.numa_node;\n+\tif (rte_eal_process_type() == RTE_PROC_PRIMARY) {\n+\t\teth_dev->data->dev_flags = 0;\n+\t\tif (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC)\n+\t\t\teth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;\n+\t\tif (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_RMV)\n+\t\t\teth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_RMV;\n+\n+\t\teth_dev->data->kdrv = pci_dev->kdrv;\n+\t\teth_dev->data->numa_node = pci_dev->device.numa_node;\n+\t}\n }\n \n static inline int\n",
    "prefixes": []
}