get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 8576,
    "url": "https://patches.dpdk.org/api/patches/8576/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1446555725-19540-3-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-3-git-send-email-bernard.iremonger@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1446555725-19540-3-git-send-email-bernard.iremonger@intel.com",
    "date": "2015-11-03T13:01:56",
    "name": "[dpdk-dev,v8,02/11] pdev: copy pci device info to eth_dev data",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e75df282d13118ad2f427676ae0ae23fe3e5efaa",
    "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-3-git-send-email-bernard.iremonger@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/8576/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/8576/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 454FD8F9C;\n\tTue,  3 Nov 2015 14:02:28 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 6F1008F9B\n\tfor <dev@dpdk.org>; Tue,  3 Nov 2015 14:02:26 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga103.jf.intel.com with ESMTP; 03 Nov 2015 05:02:12 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga001.jf.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\ttA3D2ACb011907; Tue, 3 Nov 2015 13:02:10 GMT",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id tA3D2AD6019606;\n\tTue, 3 Nov 2015 13:02:10 GMT",
            "(from bairemon@localhost)\n\tby sivswdev01.ir.intel.com with  id tA3D2AmT019602;\n\tTue, 3 Nov 2015 13:02:10 GMT"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.20,238,1444719600\"; d=\"scan'208\";a=\"810610806\"",
        "From": "Bernard Iremonger <bernard.iremonger@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue,  3 Nov 2015 13:01:56 +0000",
        "Message-Id": "<1446555725-19540-3-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 02/11] pdev: copy pci device info to eth_dev\n\tdata",
        "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": "use new function rte_eth_copy_pci_info.\ncopy device info for the following pdevs:\n\nixgbe\ne1000\ni40e\nfm10k\nbnx2x\ncxgbe\nenic\nmlx4\nvmxnet3\nvirtio\nmlx5\n\nSigned-off-by: Bernard Iremonger <bernard.iremonger@intel.com>\nAcked-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/net/bnx2x/bnx2x_ethdev.c     | 3 +++\n drivers/net/cxgbe/cxgbe_ethdev.c     | 3 +++\n drivers/net/e1000/em_ethdev.c        | 3 +++\n drivers/net/e1000/igb_ethdev.c       | 5 +++++\n drivers/net/enic/enic_ethdev.c       | 1 +\n drivers/net/fm10k/fm10k_ethdev.c     | 2 ++\n drivers/net/i40e/i40e_ethdev.c       | 3 +++\n drivers/net/i40e/i40e_ethdev_vf.c    | 2 ++\n drivers/net/ixgbe/ixgbe_ethdev.c     | 4 ++++\n drivers/net/mlx4/mlx4.c              | 3 +++\n drivers/net/mlx5/mlx5.c              | 3 +++\n drivers/net/virtio/virtio_ethdev.c   | 3 +++\n drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 ++\n 13 files changed, 37 insertions(+)",
    "diff": "diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c\nindex 09b5920..36779ea 100644\n--- a/drivers/net/bnx2x/bnx2x_ethdev.c\n+++ b/drivers/net/bnx2x/bnx2x_ethdev.c\n@@ -419,6 +419,9 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)\n \n \teth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : &bnx2x_eth_dev_ops;\n \tpci_dev = eth_dev->pci_dev;\n+\n+\trte_eth_copy_pci_info(eth_dev, pci_dev);\n+\n \tsc = eth_dev->data->dev_private;\n \tsc->pcie_bus    = pci_dev->addr.bus;\n \tsc->pcie_device = pci_dev->addr.devid;\ndiff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c\nindex 920e071..7884642 100644\n--- a/drivers/net/cxgbe/cxgbe_ethdev.c\n+++ b/drivers/net/cxgbe/cxgbe_ethdev.c\n@@ -801,6 +801,9 @@ static int eth_cxgbe_dev_init(struct rte_eth_dev *eth_dev)\n \t\treturn 0;\n \n \tpci_dev = eth_dev->pci_dev;\n+\n+\trte_eth_copy_pci_info(eth_dev, pci_dev);\n+\n \tsnprintf(name, sizeof(name), \"cxgbeadapter%d\", eth_dev->data->port_id);\n \tadapter = rte_zmalloc(name, sizeof(*adapter), 0);\n \tif (!adapter)\ndiff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c\nindex a009bc2..500985d 100644\n--- a/drivers/net/e1000/em_ethdev.c\n+++ b/drivers/net/e1000/em_ethdev.c\n@@ -243,6 +243,9 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)\n \t\tE1000_DEV_PRIVATE_TO_VFTA(eth_dev->data->dev_private);\n \n \tpci_dev = eth_dev->pci_dev;\n+\n+\trte_eth_copy_pci_info(eth_dev, pci_dev);\n+\n \teth_dev->dev_ops = &eth_em_ops;\n \teth_dev->rx_pkt_burst = (eth_rx_burst_t)&eth_em_recv_pkts;\n \teth_dev->tx_pkt_burst = (eth_tx_burst_t)&eth_em_xmit_pkts;\ndiff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c\nindex c2b92f8..42207e9 100644\n--- a/drivers/net/e1000/igb_ethdev.c\n+++ b/drivers/net/e1000/igb_ethdev.c\n@@ -546,6 +546,9 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)\n \tuint32_t ctrl_ext;\n \n \tpci_dev = eth_dev->pci_dev;\n+\n+\trte_eth_copy_pci_info(eth_dev, pci_dev);\n+\n \teth_dev->dev_ops = &eth_igb_ops;\n \teth_dev->rx_pkt_burst = &eth_igb_recv_pkts;\n \teth_dev->tx_pkt_burst = &eth_igb_xmit_pkts;\n@@ -754,6 +757,8 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)\n \n \tpci_dev = eth_dev->pci_dev;\n \n+\trte_eth_copy_pci_info(eth_dev, pci_dev);\n+\n \thw->device_id = pci_dev->id.device_id;\n \thw->vendor_id = pci_dev->id.vendor_id;\n \thw->hw_addr = (void *)pci_dev->mem_resource[0].addr;\ndiff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c\nindex f8f7817..1e1a5da 100644\n--- a/drivers/net/enic/enic_ethdev.c\n+++ b/drivers/net/enic/enic_ethdev.c\n@@ -603,6 +603,7 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)\n \teth_dev->tx_pkt_burst = &enicpmd_xmit_pkts;\n \n \tpdev = eth_dev->pci_dev;\n+\trte_eth_copy_pci_info(eth_dev, pdev);\n \tenic->pdev = pdev;\n \taddr = &pdev->addr;\n \ndiff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c\nindex f603c4e..a05cc05 100644\n--- a/drivers/net/fm10k/fm10k_ethdev.c\n+++ b/drivers/net/fm10k/fm10k_ethdev.c\n@@ -2423,6 +2423,8 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn 0;\n \n+\trte_eth_copy_pci_info(dev, dev->pci_dev);\n+\n \tmacvlan = FM10K_DEV_PRIVATE_TO_MACVLAN(dev->data->dev_private);\n \tmemset(macvlan, 0, sizeof(*macvlan));\n \t/* Vendor and Device ID need to be set before init of shared code */\ndiff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex 8381c8e..c30607d 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -468,6 +468,9 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)\n \t\treturn 0;\n \t}\n \tpci_dev = dev->pci_dev;\n+\n+\trte_eth_copy_pci_info(dev, pci_dev);\n+\n \tpf->adapter = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);\n \tpf->adapter->eth_dev = dev;\n \tpf->dev_data = dev->data;\ndiff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c\nindex 8142ff4..c7dc7a6 100644\n--- a/drivers/net/i40e/i40e_ethdev_vf.c\n+++ b/drivers/net/i40e/i40e_ethdev_vf.c\n@@ -1202,6 +1202,8 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)\n \t\treturn 0;\n \t}\n \n+\trte_eth_copy_pci_info(eth_dev, eth_dev->pci_dev);\n+\n \thw->vendor_id = eth_dev->pci_dev->id.vendor_id;\n \thw->device_id = eth_dev->pci_dev->id.device_id;\n \thw->subsystem_vendor_id = eth_dev->pci_dev->id.subsystem_vendor_id;\ndiff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c\nindex 38d44d4..06f819f 100644\n--- a/drivers/net/ixgbe/ixgbe_ethdev.c\n+++ b/drivers/net/ixgbe/ixgbe_ethdev.c\n@@ -910,6 +910,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev)\n \t}\n \tpci_dev = eth_dev->pci_dev;\n \n+\trte_eth_copy_pci_info(eth_dev, pci_dev);\n+\n \t/* Vendor and Device ID need to be set before init of shared code */\n \thw->device_id = pci_dev->id.device_id;\n \thw->vendor_id = pci_dev->id.vendor_id;\n@@ -1178,6 +1180,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)\n \n \tpci_dev = eth_dev->pci_dev;\n \n+\trte_eth_copy_pci_info(eth_dev, pci_dev);\n+\n \thw->device_id = pci_dev->id.device_id;\n \thw->vendor_id = pci_dev->id.vendor_id;\n \thw->hw_addr = (void *)pci_dev->mem_resource[0].addr;\ndiff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c\nindex 691e0e5..4198c04 100644\n--- a/drivers/net/mlx4/mlx4.c\n+++ b/drivers/net/mlx4/mlx4.c\n@@ -5138,6 +5138,9 @@ mlx4_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)\n \n \t\teth_dev->data->dev_private = priv;\n \t\teth_dev->pci_dev = pci_dev;\n+\n+\t\trte_eth_copy_pci_info(eth_dev, pci_dev);\n+\n \t\teth_dev->driver = &mlx4_driver;\n \t\teth_dev->data->rx_mbuf_alloc_failed = 0;\n \t\teth_dev->data->mtu = ETHER_MTU;\ndiff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex 9636588..e9f059c 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -444,6 +444,9 @@ mlx5_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)\n \n \t\teth_dev->data->dev_private = priv;\n \t\teth_dev->pci_dev = pci_dev;\n+\n+\t\trte_eth_copy_pci_info(eth_dev, pci_dev);\n+\n \t\teth_dev->driver = &mlx5_driver;\n \t\teth_dev->data->rx_mbuf_alloc_failed = 0;\n \t\teth_dev->data->mtu = ETHER_MTU;\ndiff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex 12fcc23..ef6330f 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -1184,6 +1184,9 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)\n \t}\n \n \tpci_dev = eth_dev->pci_dev;\n+\n+\trte_eth_copy_pci_info(eth_dev, pci_dev);\n+\n \tif (virtio_resource_init(pci_dev) < 0)\n \t\treturn -1;\n \ndiff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c\nindex 3745b7d..bcb4c9d 100644\n--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c\n+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c\n@@ -235,6 +235,8 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev)\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn 0;\n \n+\trte_eth_copy_pci_info(eth_dev, pci_dev);\n+\n \t/* Vendor and Device ID need to be set before init of shared code */\n \thw->device_id = pci_dev->id.device_id;\n \thw->vendor_id = pci_dev->id.vendor_id;\n",
    "prefixes": [
        "dpdk-dev",
        "v8",
        "02/11"
    ]
}