get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 8578,
    "url": "https://patches.dpdk.org/api/patches/8578/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1446555725-19540-4-git-send-email-bernard.iremonger@intel.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": "<1446555725-19540-4-git-send-email-bernard.iremonger@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1446555725-19540-4-git-send-email-bernard.iremonger@intel.com",
    "date": "2015-11-03T13:01:57",
    "name": "[dpdk-dev,v8,03/11] vdev: copy device info to eth_dev data",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e4c9a124c7e012bbe38806b2edc4ed0e4f3969a4",
    "submitter": {
        "id": 91,
        "url": "https://patches.dpdk.org/api/people/91/?format=api",
        "name": "Iremonger, Bernard",
        "email": "bernard.iremonger@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1446555725-19540-4-git-send-email-bernard.iremonger@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/8578/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/8578/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id B900D91A1;\n\tTue,  3 Nov 2015 14:02:29 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 656C98F9B\n\tfor <dev@dpdk.org>; Tue,  3 Nov 2015 14:02:27 +0100 (CET)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga103.jf.intel.com with ESMTP; 03 Nov 2015 05:02:13 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby FMSMGA003.fm.intel.com with ESMTP; 03 Nov 2015 05:02:12 -0800",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\ttA3D2BYq011912; Tue, 3 Nov 2015 13:02:11 GMT",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id tA3D2Bua019614;\n\tTue, 3 Nov 2015 13:02:11 GMT",
            "(from bairemon@localhost)\n\tby sivswdev01.ir.intel.com with  id tA3D2BvJ019609;\n\tTue, 3 Nov 2015 13:02:11 GMT"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.20,238,1444719600\"; d=\"scan'208\";a=\"593168948\"",
        "From": "Bernard Iremonger <bernard.iremonger@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue,  3 Nov 2015 13:01:57 +0000",
        "Message-Id": "<1446555725-19540-4-git-send-email-bernard.iremonger@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1446555725-19540-1-git-send-email-bernard.iremonger@intel.com>",
        "References": "<PATCH v8>\n\t<1446555725-19540-1-git-send-email-bernard.iremonger@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v8 03/11] vdev: copy device info to eth_dev data",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "initialise dev_flags, driver, kdrv, drv_name and numa_node fields in eth_dev data.\n\nfor the following vdevs:\nnull\nring\npcap\naf_packet\nxenvirt\nmpipe\nbonding\n\nSigned-off-by: Bernard Iremonger <bernard.iremonger@intel.com>\nAcked-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/net/af_packet/rte_eth_af_packet.c | 12 ++++++++----\n drivers/net/bonding/rte_eth_bond_api.c    | 11 +++++++++--\n drivers/net/mpipe/mpipe_tilegx.c          |  7 +++++++\n drivers/net/null/rte_eth_null.c           | 13 +++++++++----\n drivers/net/pcap/rte_eth_pcap.c           | 13 ++++++++-----\n drivers/net/ring/rte_eth_ring.c           | 13 ++++++++-----\n drivers/net/xenvirt/rte_eth_xenvirt.c     |  8 ++++++--\n 7 files changed, 55 insertions(+), 22 deletions(-)",
    "diff": "diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c\nindex bfde661..2f14482 100644\n--- a/drivers/net/af_packet/rte_eth_af_packet.c\n+++ b/drivers/net/af_packet/rte_eth_af_packet.c\n@@ -5,7 +5,7 @@\n  *\n  *   Originally based upon librte_pmd_pcap code:\n  *\n- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.\n  *   Copyright(c) 2014 6WIND S.A.\n  *   All rights reserved.\n  *\n@@ -656,8 +656,8 @@ rte_pmd_init_internals(const char *name,\n \t/*\n \t * now put it all together\n \t * - store queue data in internals,\n-\t * - store numa_node info in pci_driver\n-\t * - point eth_dev_data to internals and pci_driver\n+\t * - store numa_node in eth_dev\n+\t * - point eth_dev_data to internals\n \t * - and point eth_dev structure to new eth_dev_data structure\n \t */\n \n@@ -674,7 +674,11 @@ rte_pmd_init_internals(const char *name,\n \n \t(*eth_dev)->data = data;\n \t(*eth_dev)->dev_ops = &ops;\n-\t(*eth_dev)->pci_dev = pci_dev;\n+\t(*eth_dev)->driver = NULL;\n+\t(*eth_dev)->data->dev_flags = 0;\n+\t(*eth_dev)->data->drv_name = drivername;\n+\t(*eth_dev)->data->kdrv = RTE_KDRV_NONE;\n+\t(*eth_dev)->data->numa_node = numa_node;\n \n \treturn 0;\n \ndiff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c\nindex 92073df..34adbde 100644\n--- a/drivers/net/bonding/rte_eth_bond_api.c\n+++ b/drivers/net/bonding/rte_eth_bond_api.c\n@@ -44,6 +44,8 @@\n \n #define DEFAULT_POLLING_INTERVAL_10_MS (10)\n \n+const char pmd_bond_driver_name[] = \"rte_bond_pmd\";\n+\n int\n valid_bonded_ethdev(const struct rte_eth_dev *eth_dev)\n {\n@@ -163,8 +165,6 @@ number_of_sockets(void)\n \treturn ++sockets;\n }\n \n-const char pmd_bond_driver_name[] = \"rte_bond_pmd\";\n-\n static struct rte_pci_id pci_id_table = {\n \t.device_id = PCI_ANY_ID,\n \t.subsystem_device_id = PCI_ANY_ID,\n@@ -252,6 +252,13 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)\n \teth_dev->dev_ops = &default_dev_ops;\n \teth_dev->pci_dev = pci_dev;\n \n+\teth_dev->data->dev_flags = RTE_ETH_DEV_INTR_LSC |\n+\t\tRTE_ETH_DEV_DETACHABLE;\n+\teth_dev->driver = NULL;\n+\teth_dev->data->kdrv = RTE_KDRV_NONE;\n+\teth_dev->data->drv_name = pmd_bond_driver_name;\n+\teth_dev->data->numa_node =  socket_id;\n+\n \trte_spinlock_init(&internals->lock);\n \n \tinternals->port_id = eth_dev->data->port_id;\ndiff --git a/drivers/net/mpipe/mpipe_tilegx.c b/drivers/net/mpipe/mpipe_tilegx.c\nindex 6e3e304..4dc32f7 100644\n--- a/drivers/net/mpipe/mpipe_tilegx.c\n+++ b/drivers/net/mpipe/mpipe_tilegx.c\n@@ -80,6 +80,7 @@ struct mpipe_context {\n \n static struct mpipe_context mpipe_contexts[GXIO_MPIPE_INSTANCE_MAX];\n static int mpipe_instances;\n+static const char *drivername = \"MPIPE PMD\";\n \n /* Per queue statistics. */\n struct mpipe_queue_stats {\n@@ -1595,6 +1596,12 @@ rte_pmd_mpipe_devinit(const char *ifname,\n \teth_dev->pci_dev = &priv->pci_dev;\n \teth_dev->data->mac_addrs = &priv->mac_addr;\n \n+\teth_dev->data->dev_flags = 0;\n+\teth_dev->data->kdrv = RTE_KDRV_NONE;\n+\teth_dev->driver = NULL;\n+\teth_dev->data->drv_name = drivername;\n+\teth_dev->data->numa_node = instance;\n+\n \teth_dev->dev_ops      = &mpipe_dev_ops;\n \teth_dev->rx_pkt_burst = &mpipe_recv_pkts;\n \teth_dev->tx_pkt_burst = &mpipe_xmit_pkts;\ndiff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c\nindex 64e9000..11d6037 100644\n--- a/drivers/net/null/rte_eth_null.c\n+++ b/drivers/net/null/rte_eth_null.c\n@@ -540,8 +540,8 @@ eth_dev_null_create(const char *name,\n \n \t/* now put it all together\n \t * - store queue data in internals,\n-\t * - store numa_node info in pci_driver\n-\t * - point eth_dev_data to internals and pci_driver\n+\t * - store numa_node info in ethdev data\n+\t * - point eth_dev_data to internals\n \t * - and point eth_dev structure to new eth_dev_data structure\n \t */\n \t/* NOTE: we'll replace the data element, of originally allocated eth_dev\n@@ -571,10 +571,15 @@ eth_dev_null_create(const char *name,\n \n \teth_dev->data = data;\n \teth_dev->dev_ops = &ops;\n-\teth_dev->pci_dev = pci_dev;\n-\teth_dev->driver = &rte_null_pmd;\n+\n \tTAILQ_INIT(&eth_dev->link_intr_cbs);\n \n+\teth_dev->driver = NULL;\n+\teth_dev->data->dev_flags = RTE_ETH_DEV_DETACHABLE;\n+\teth_dev->data->kdrv = RTE_KDRV_NONE;\n+\teth_dev->data->drv_name = drivername;\n+\teth_dev->data->numa_node = numa_node;\n+\n \t/* finally assign rx and tx ops */\n \tif (packet_copy) {\n \t\teth_dev->rx_pkt_burst = eth_null_copy_rx;\ndiff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c\nindex f2e4634..850274c 100644\n--- a/drivers/net/pcap/rte_eth_pcap.c\n+++ b/drivers/net/pcap/rte_eth_pcap.c\n@@ -1,7 +1,7 @@\n /*-\n  *   BSD LICENSE\n  *\n- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.\n  *   Copyright(c) 2014 6WIND S.A.\n  *   All rights reserved.\n  *\n@@ -845,8 +845,8 @@ rte_pmd_init_internals(const char *name, const unsigned nb_rx_queues,\n \n \t/* now put it all together\n \t * - store queue data in internals,\n-\t * - store numa_node info in pci_driver\n-\t * - point eth_dev_data to internals and pci_driver\n+\t * - store numa_node info in eth_dev\n+\t * - point eth_dev_data to internals\n \t * - and point eth_dev structure to new eth_dev_data structure\n \t */\n \t/* NOTE: we'll replace the data element, of originally allocated eth_dev\n@@ -874,8 +874,11 @@ rte_pmd_init_internals(const char *name, const unsigned nb_rx_queues,\n \n \t(*eth_dev)->data = data;\n \t(*eth_dev)->dev_ops = &ops;\n-\t(*eth_dev)->pci_dev = pci_dev;\n-\t(*eth_dev)->driver = &rte_pcap_pmd;\n+\t(*eth_dev)->data->dev_flags = RTE_ETH_DEV_DETACHABLE;\n+\t(*eth_dev)->driver = NULL;\n+\t(*eth_dev)->data->kdrv = RTE_KDRV_NONE;\n+\t(*eth_dev)->data->drv_name = drivername;\n+\t(*eth_dev)->data->numa_node = numa_node;\n \n \treturn 0;\n \ndiff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c\nindex 0ba36d5..77ac23a 100644\n--- a/drivers/net/ring/rte_eth_ring.c\n+++ b/drivers/net/ring/rte_eth_ring.c\n@@ -304,11 +304,10 @@ rte_eth_from_rings(const char *name, struct rte_ring *const rx_queues[],\n \tif (eth_dev == NULL)\n \t\tgoto error;\n \n-\n \t/* now put it all together\n \t * - store queue data in internals,\n-\t * - store numa_node info in pci_driver\n-\t * - point eth_dev_data to internals and pci_driver\n+\t * - store numa_node info in eth_dev_data\n+\t * - point eth_dev_data to internals\n \t * - and point eth_dev structure to new eth_dev_data structure\n \t */\n \t/* NOTE: we'll replace the data element, of originally allocated eth_dev\n@@ -338,9 +337,13 @@ rte_eth_from_rings(const char *name, struct rte_ring *const rx_queues[],\n \tdata->mac_addrs = &internals->address;\n \n \teth_dev->data = data;\n-\teth_dev->driver = &rte_ring_pmd;\n+\teth_dev->driver = NULL;\n \teth_dev->dev_ops = &ops;\n-\teth_dev->pci_dev = pci_dev;\n+\teth_dev->data->dev_flags = RTE_ETH_DEV_DETACHABLE;\n+\teth_dev->data->kdrv = RTE_KDRV_NONE;\n+\teth_dev->data->drv_name = drivername;\n+\teth_dev->data->numa_node = numa_node;\n+\n \tTAILQ_INIT(&(eth_dev->link_intr_cbs));\n \n \t/* finally assign rx and tx ops */\ndiff --git a/drivers/net/xenvirt/rte_eth_xenvirt.c b/drivers/net/xenvirt/rte_eth_xenvirt.c\nindex b527552..6f9d96f 100644\n--- a/drivers/net/xenvirt/rte_eth_xenvirt.c\n+++ b/drivers/net/xenvirt/rte_eth_xenvirt.c\n@@ -67,7 +67,7 @@\n /* virtio_idx is increased after new device is created.*/\n static int virtio_idx = 0;\n \n-static const char *drivername = \"xen dummy virtio PMD\";\n+static const char *drivername = \"xen virtio PMD\";\n \n static struct rte_eth_link pmd_link = {\n \t\t.link_speed = 10000,\n@@ -688,8 +688,12 @@ eth_dev_xenvirt_create(const char *name, const char *params,\n \n \teth_dev->data = data;\n \teth_dev->dev_ops = &ops;\n+\n \teth_dev->data->dev_flags = RTE_PCI_DRV_DETACHABLE;\n-\teth_dev->pci_dev = pci_dev;\n+\teth_dev->data->kdrv = RTE_KDRV_NONE;\n+\teth_dev->data->drv_name = drivername;\n+\teth_dev->driver = NULL;\n+\teth_dev->data->numa_node = numa_node;\n \n \teth_dev->rx_pkt_burst = eth_xenvirt_rx;\n \teth_dev->tx_pkt_burst = eth_xenvirt_tx;\n",
    "prefixes": [
        "dpdk-dev",
        "v8",
        "03/11"
    ]
}