get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 43235,
    "url": "http://patchwork.dpdk.org/api/patches/43235/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20180720145423.67882-1-ferruh.yigit@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20180720145423.67882-1-ferruh.yigit@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180720145423.67882-1-ferruh.yigit@intel.com",
    "date": "2018-07-20T14:54:23",
    "name": "[v3] drivers/net: fix segfault in secondary process",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "b9328eed1666c6babe1c415fbc526ad9b03ac28f",
    "submitter": {
        "id": 324,
        "url": "http://patchwork.dpdk.org/api/people/324/?format=api",
        "name": "Ferruh Yigit",
        "email": "ferruh.yigit@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20180720145423.67882-1-ferruh.yigit@intel.com/mbox/",
    "series": [
        {
            "id": 693,
            "url": "http://patchwork.dpdk.org/api/series/693/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=693",
            "date": "2018-07-20T14:54:23",
            "name": "[v3] drivers/net: fix segfault in secondary process",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/693/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/43235/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/43235/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 704F92B92;\n\tFri, 20 Jul 2018 15:54:48 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id 80BD829D2;\n\tFri, 20 Jul 2018 15:54:46 +0200 (CEST)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t20 Jul 2018 06:54:44 -0700",
            "from silpixa00399752.ir.intel.com (HELO\n\tsilpixa00399752.ger.corp.intel.com) ([10.237.222.212])\n\tby orsmga006.jf.intel.com with ESMTP; 20 Jul 2018 06:54:39 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,379,1526367600\"; d=\"scan'208\";a=\"59289981\"",
        "From": "Ferruh Yigit <ferruh.yigit@intel.com>",
        "To": "\"John W. Linville\" <linville@tuxdriver.com>,\n\tDeclan Doherty <declan.doherty@intel.com>,\n\tChas Williams <chas3@att.com>, Hemant Agrawal <hemant.agrawal@nxp.com>,\n\tShreyansh Jain <shreyansh.jain@nxp.com>,\n\tGaetan Rivet <gaetan.rivet@6wind.com>,\n\tTetsuya Mukawa <mtetsuyah@gmail.com>,\n\tSantosh Shukla <santosh.shukla@caviumnetworks.com>,\n\tJerin Jacob <jerin.jacob@caviumnetworks.com>,\n\tKeith Wiles <keith.wiles@intel.com>,\n\tMaxime Coquelin <maxime.coquelin@redhat.com>,\n\tTiwei Bie <tiwei.bie@intel.com>, Zhihong Wang <zhihong.wang@intel.com>",
        "Cc": "dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>, stable@dpdk.org,\n\tStephen Hemminger <stephen@networkplumber.org>,\n\tThomas Monjalon <thomas@monjalon.net>",
        "Date": "Fri, 20 Jul 2018 15:54:23 +0100",
        "Message-Id": "<20180720145423.67882-1-ferruh.yigit@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20180720124421.71277-1-ferruh.yigit@intel.com>",
        "References": "<20180720124421.71277-1-ferruh.yigit@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3] drivers/net: fix segfault in secondary process",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Calling rte_eth_dev_info_get() on secondary process cause a crash\nbecause eth_dev->device is not set properly.\n\nFixes: ee27edbe0c10 (\"drivers/net: share vdev data to secondary process\")\nCc: stable@dpdk.org\n\nReported-by: Vipin Varghese <vipin.varghese@intel.com>\nSigned-off-by: Ferruh Yigit <ferruh.yigit@intel.com>\nReviewed-by: Qi Zhang <qi.z.zhang@intel.com>\n---\nCc: Stephen Hemminger <stephen@networkplumber.org>\nCc: Thomas Monjalon <thomas@monjalon.net>\n\nv2:\n* Added rte_eth_vdev_secondary_probe\n* Updated dpaa\n* More update on octeontx\n\nv3:\n* Removed helper function, fixed PMDs\n---\n drivers/net/af_packet/rte_eth_af_packet.c | 1 +\n drivers/net/bonding/rte_eth_bond_pmd.c    | 1 +\n drivers/net/dpaa/dpaa_ethdev.c            | 2 ++\n drivers/net/failsafe/failsafe.c           | 1 +\n drivers/net/kni/rte_eth_kni.c             | 1 +\n drivers/net/null/rte_eth_null.c           | 1 +\n drivers/net/octeontx/octeontx_ethdev.c    | 3 +++\n drivers/net/pcap/rte_eth_pcap.c           | 1 +\n drivers/net/tap/rte_eth_tap.c             | 2 ++\n drivers/net/vhost/rte_eth_vhost.c         | 1 +\n 10 files changed, 14 insertions(+)",
    "diff": "diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c\nindex ce1e31aa4..eb3cce3a6 100644\n--- a/drivers/net/af_packet/rte_eth_af_packet.c\n+++ b/drivers/net/af_packet/rte_eth_af_packet.c\n@@ -936,6 +936,7 @@ rte_pmd_af_packet_probe(struct rte_vdev_device *dev)\n \t\t}\n \t\t/* TODO: request info from primary to set up Rx and Tx */\n \t\teth_dev->dev_ops = &ops;\n+\t\teth_dev->device = &dev->device;\n \t\trte_eth_dev_probing_finish(eth_dev);\n \t\treturn 0;\n \t}\ndiff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c\nindex fc4d4fd97..ca491a820 100644\n--- a/drivers/net/bonding/rte_eth_bond_pmd.c\n+++ b/drivers/net/bonding/rte_eth_bond_pmd.c\n@@ -3184,6 +3184,7 @@ bond_probe(struct rte_vdev_device *dev)\n \t\t}\n \t\t/* TODO: request info from primary to set up Rx and Tx */\n \t\teth_dev->dev_ops = &default_dev_ops;\n+\t\teth_dev->device = &dev->device;\n \t\trte_eth_dev_probing_finish(eth_dev);\n \t\treturn 0;\n \t}\ndiff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c\nindex 5c0aafb3c..7a950ac04 100644\n--- a/drivers/net/dpaa/dpaa_ethdev.c\n+++ b/drivers/net/dpaa/dpaa_ethdev.c\n@@ -1389,6 +1389,8 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv,\n \t\teth_dev = rte_eth_dev_attach_secondary(dpaa_dev->name);\n \t\tif (!eth_dev)\n \t\t\treturn -ENOMEM;\n+\t\teth_dev->device = &dpaa_dev->device;\n+\t\teth_dev->dev_ops = &dpaa_devops;\n \t\trte_eth_dev_probing_finish(eth_dev);\n \t\treturn 0;\n \t}\ndiff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c\nindex 7f89486d4..657919f93 100644\n--- a/drivers/net/failsafe/failsafe.c\n+++ b/drivers/net/failsafe/failsafe.c\n@@ -328,6 +328,7 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)\n \t\t}\n \t\t/* TODO: request info from primary to set up Rx and Tx */\n \t\teth_dev->dev_ops = &failsafe_ops;\n+\t\teth_dev->device = &vdev->device;\n \t\trte_eth_dev_probing_finish(eth_dev);\n \t\treturn 0;\n \t}\ndiff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c\nindex b038fbf1a..085bb8452 100644\n--- a/drivers/net/kni/rte_eth_kni.c\n+++ b/drivers/net/kni/rte_eth_kni.c\n@@ -420,6 +420,7 @@ eth_kni_probe(struct rte_vdev_device *vdev)\n \t\t}\n \t\t/* TODO: request info from primary to set up Rx and Tx */\n \t\teth_dev->dev_ops = &eth_kni_ops;\n+\t\teth_dev->device = &vdev->device;\n \t\trte_eth_dev_probing_finish(eth_dev);\n \t\treturn 0;\n \t}\ndiff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c\nindex d85d25f7e..244f86545 100644\n--- a/drivers/net/null/rte_eth_null.c\n+++ b/drivers/net/null/rte_eth_null.c\n@@ -624,6 +624,7 @@ rte_pmd_null_probe(struct rte_vdev_device *dev)\n \t\t}\n \t\t/* TODO: request info from primary to set up Rx and Tx */\n \t\teth_dev->dev_ops = &ops;\n+\t\teth_dev->device = &dev->device;\n \t\trte_eth_dev_probing_finish(eth_dev);\n \t\treturn 0;\n \t}\ndiff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c\nindex 21e5e4fca..974ef57c4 100644\n--- a/drivers/net/octeontx/octeontx_ethdev.c\n+++ b/drivers/net/octeontx/octeontx_ethdev.c\n@@ -1015,6 +1015,8 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,\n \t\tif (eth_dev == NULL)\n \t\t\treturn -ENODEV;\n \n+\t\teth_dev->dev_ops = &octeontx_dev_ops;\n+\t\teth_dev->device = &dev->device;\n \t\teth_dev->tx_pkt_burst = octeontx_xmit_pkts;\n \t\teth_dev->rx_pkt_burst = octeontx_recv_pkts;\n \t\trte_eth_dev_probing_finish(eth_dev);\n@@ -1183,6 +1185,7 @@ octeontx_probe(struct rte_vdev_device *dev)\n \t\t}\n \t\t/* TODO: request info from primary to set up Rx and Tx */\n \t\teth_dev->dev_ops = &octeontx_dev_ops;\n+\t\teth_dev->device = &dev->device;\n \t\trte_eth_dev_probing_finish(eth_dev);\n \t\treturn 0;\n \t}\ndiff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c\nindex 6779f97c1..e8810a171 100644\n--- a/drivers/net/pcap/rte_eth_pcap.c\n+++ b/drivers/net/pcap/rte_eth_pcap.c\n@@ -1017,6 +1017,7 @@ pmd_pcap_probe(struct rte_vdev_device *dev)\n \t\t}\n \t\t/* TODO: request info from primary to set up Rx and Tx */\n \t\teth_dev->dev_ops = &ops;\n+\t\teth_dev->device = &dev->device;\n \t\trte_eth_dev_probing_finish(eth_dev);\n \t\treturn 0;\n \t}\ndiff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c\nindex 22ba872ed..0331eb9f8 100644\n--- a/drivers/net/tap/rte_eth_tap.c\n+++ b/drivers/net/tap/rte_eth_tap.c\n@@ -1931,6 +1931,7 @@ rte_pmd_tun_probe(struct rte_vdev_device *dev)\n \t\t\treturn -1;\n \t\t}\n \t\teth_dev->dev_ops = &ops;\n+\t\teth_dev->device = &dev->device;\n \t\treturn 0;\n \t}\n \n@@ -2000,6 +2001,7 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)\n \t\t}\n \t\t/* TODO: request info from primary to set up Rx and Tx */\n \t\teth_dev->dev_ops = &ops;\n+\t\teth_dev->device = &dev->device;\n \t\trte_eth_dev_probing_finish(eth_dev);\n \t\treturn 0;\n \t}\ndiff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c\nindex 47b33456c..e58f32211 100644\n--- a/drivers/net/vhost/rte_eth_vhost.c\n+++ b/drivers/net/vhost/rte_eth_vhost.c\n@@ -1354,6 +1354,7 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)\n \t\t}\n \t\t/* TODO: request info from primary to set up Rx and Tx */\n \t\teth_dev->dev_ops = &ops;\n+\t\teth_dev->device = &dev->device;\n \t\trte_eth_dev_probing_finish(eth_dev);\n \t\treturn 0;\n \t}\n",
    "prefixes": [
        "v3"
    ]
}