get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 85537,
    "url": "http://patches.dpdk.org/api/patches/85537/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201220211405.313012-14-maxime.coquelin@redhat.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": "<20201220211405.313012-14-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201220211405.313012-14-maxime.coquelin@redhat.com",
    "date": "2020-12-20T21:13:38",
    "name": "[13/40] net/virtio: move PCI-specific fields to PCI device",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "7bbf06d64a120de26595b688981a24b8dac8847f",
    "submitter": {
        "id": 512,
        "url": "http://patches.dpdk.org/api/people/512/?format=api",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201220211405.313012-14-maxime.coquelin@redhat.com/mbox/",
    "series": [
        {
            "id": 14390,
            "url": "http://patches.dpdk.org/api/series/14390/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=14390",
            "date": "2020-12-20T21:13:25",
            "name": "net/virtio: Virtio PMD rework",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/14390/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/85537/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/85537/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 5C880A09FD;\n\tSun, 20 Dec 2020 22:18:40 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1DB25CD2D;\n\tSun, 20 Dec 2020 22:15:13 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [63.128.21.124])\n by dpdk.org (Postfix) with ESMTP id 0E35CCD25\n for <dev@dpdk.org>; Sun, 20 Dec 2020 22:15:11 +0100 (CET)",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-18-0PAeColfPaKtVhA8Vw2vDA-1; Sun, 20 Dec 2020 16:15:08 -0500",
            "from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com\n [10.5.11.12])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AEDDE10054FF;\n Sun, 20 Dec 2020 21:15:07 +0000 (UTC)",
            "from max-t490s.redhat.com (unknown [10.36.110.43])\n by smtp.corp.redhat.com (Postfix) with ESMTP id CEC8B60C62;\n Sun, 20 Dec 2020 21:15:05 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1608498910;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=8QNHCmszE1CECd69yinvjTJG4GNJ3VJ+jeWWxHnJjgE=;\n b=DPNuglp3YfvgEzmF5QgVTJeigVentXiCX5OIJN0nZRDUkvB9wS9xcJzopIr/KAYOl0Gudn\n AIENdPjxMDVNwoa45FvqmqPCa5jE4JhCfKosAMeXF7zuHc+8nFIDaYo01GqD9mnIiDlfF7\n 9g3bqScuqoH/6h54o91txzjg5+83NdI=",
        "X-MC-Unique": "0PAeColfPaKtVhA8Vw2vDA-1",
        "From": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "To": "dev@dpdk.org, chenbo.xia@intel.com, olivier.matz@6wind.com,\n amorenoz@redhat.com, david.marchand@redhat.com",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Date": "Sun, 20 Dec 2020 22:13:38 +0100",
        "Message-Id": "<20201220211405.313012-14-maxime.coquelin@redhat.com>",
        "In-Reply-To": "<20201220211405.313012-1-maxime.coquelin@redhat.com>",
        "References": "<20201220211405.313012-1-maxime.coquelin@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.12",
        "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"",
        "Subject": "[dpdk-dev] [PATCH 13/40] net/virtio: move PCI-specific fields to\n\tPCI device",
        "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": "This patch moves the fields from virtio_hw structure that\nare PCI-specific to virtio_pci_dev_struct.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n drivers/net/virtio/virtio_pci.c | 139 ++++++++++++++++++--------------\n drivers/net/virtio/virtio_pci.h |  10 +--\n 2 files changed, 85 insertions(+), 64 deletions(-)",
    "diff": "diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c\nindex f9331e37d7..8c62507a0a 100644\n--- a/drivers/net/virtio/virtio_pci.c\n+++ b/drivers/net/virtio/virtio_pci.c\n@@ -287,18 +287,19 @@ static void\n modern_read_dev_config(struct virtio_hw *hw, size_t offset,\n \t\t       void *dst, int length)\n {\n+\tstruct virtio_pci_dev *dev = virtio_pci_get_dev(hw);\n \tint i;\n \tuint8_t *p;\n \tuint8_t old_gen, new_gen;\n \n \tdo {\n-\t\told_gen = rte_read8(&hw->common_cfg->config_generation);\n+\t\told_gen = rte_read8(&dev->common_cfg->config_generation);\n \n \t\tp = dst;\n \t\tfor (i = 0;  i < length; i++)\n-\t\t\t*p++ = rte_read8((uint8_t *)hw->dev_cfg + offset + i);\n+\t\t\t*p++ = rte_read8((uint8_t *)dev->dev_cfg + offset + i);\n \n-\t\tnew_gen = rte_read8(&hw->common_cfg->config_generation);\n+\t\tnew_gen = rte_read8(&dev->common_cfg->config_generation);\n \t} while (old_gen != new_gen);\n }\n \n@@ -306,23 +307,25 @@ static void\n modern_write_dev_config(struct virtio_hw *hw, size_t offset,\n \t\t\tconst void *src, int length)\n {\n+\tstruct virtio_pci_dev *dev = virtio_pci_get_dev(hw);\n \tint i;\n \tconst uint8_t *p = src;\n \n \tfor (i = 0;  i < length; i++)\n-\t\trte_write8((*p++), (((uint8_t *)hw->dev_cfg) + offset + i));\n+\t\trte_write8((*p++), (((uint8_t *)dev->dev_cfg) + offset + i));\n }\n \n static uint64_t\n modern_get_features(struct virtio_hw *hw)\n {\n+\tstruct virtio_pci_dev *dev = virtio_pci_get_dev(hw);\n \tuint32_t features_lo, features_hi;\n \n-\trte_write32(0, &hw->common_cfg->device_feature_select);\n-\tfeatures_lo = rte_read32(&hw->common_cfg->device_feature);\n+\trte_write32(0, &dev->common_cfg->device_feature_select);\n+\tfeatures_lo = rte_read32(&dev->common_cfg->device_feature);\n \n-\trte_write32(1, &hw->common_cfg->device_feature_select);\n-\tfeatures_hi = rte_read32(&hw->common_cfg->device_feature);\n+\trte_write32(1, &dev->common_cfg->device_feature_select);\n+\tfeatures_hi = rte_read32(&dev->common_cfg->device_feature);\n \n \treturn ((uint64_t)features_hi << 32) | features_lo;\n }\n@@ -330,13 +333,15 @@ modern_get_features(struct virtio_hw *hw)\n static void\n modern_set_features(struct virtio_hw *hw, uint64_t features)\n {\n-\trte_write32(0, &hw->common_cfg->guest_feature_select);\n+\tstruct virtio_pci_dev *dev = virtio_pci_get_dev(hw);\n+\n+\trte_write32(0, &dev->common_cfg->guest_feature_select);\n \trte_write32(features & ((1ULL << 32) - 1),\n-\t\t    &hw->common_cfg->guest_feature);\n+\t\t    &dev->common_cfg->guest_feature);\n \n-\trte_write32(1, &hw->common_cfg->guest_feature_select);\n+\trte_write32(1, &dev->common_cfg->guest_feature_select);\n \trte_write32(features >> 32,\n-\t\t    &hw->common_cfg->guest_feature);\n+\t\t    &dev->common_cfg->guest_feature);\n }\n \n static int\n@@ -353,46 +358,59 @@ modern_features_ok(struct virtio_hw *hw)\n static uint8_t\n modern_get_status(struct virtio_hw *hw)\n {\n-\treturn rte_read8(&hw->common_cfg->device_status);\n+\tstruct virtio_pci_dev *dev = virtio_pci_get_dev(hw);\n+\n+\treturn rte_read8(&dev->common_cfg->device_status);\n }\n \n static void\n modern_set_status(struct virtio_hw *hw, uint8_t status)\n {\n-\trte_write8(status, &hw->common_cfg->device_status);\n+\tstruct virtio_pci_dev *dev = virtio_pci_get_dev(hw);\n+\n+\trte_write8(status, &dev->common_cfg->device_status);\n }\n \n static uint8_t\n modern_get_isr(struct virtio_hw *hw)\n {\n-\treturn rte_read8(hw->isr);\n+\tstruct virtio_pci_dev *dev = virtio_pci_get_dev(hw);\n+\n+\treturn rte_read8(dev->isr);\n }\n \n static uint16_t\n modern_set_config_irq(struct virtio_hw *hw, uint16_t vec)\n {\n-\trte_write16(vec, &hw->common_cfg->msix_config);\n-\treturn rte_read16(&hw->common_cfg->msix_config);\n+\tstruct virtio_pci_dev *dev = virtio_pci_get_dev(hw);\n+\n+\trte_write16(vec, &dev->common_cfg->msix_config);\n+\treturn rte_read16(&dev->common_cfg->msix_config);\n }\n \n static uint16_t\n modern_set_queue_irq(struct virtio_hw *hw, struct virtqueue *vq, uint16_t vec)\n {\n-\trte_write16(vq->vq_queue_index, &hw->common_cfg->queue_select);\n-\trte_write16(vec, &hw->common_cfg->queue_msix_vector);\n-\treturn rte_read16(&hw->common_cfg->queue_msix_vector);\n+\tstruct virtio_pci_dev *dev = virtio_pci_get_dev(hw);\n+\n+\trte_write16(vq->vq_queue_index, &dev->common_cfg->queue_select);\n+\trte_write16(vec, &dev->common_cfg->queue_msix_vector);\n+\treturn rte_read16(&dev->common_cfg->queue_msix_vector);\n }\n \n static uint16_t\n modern_get_queue_num(struct virtio_hw *hw, uint16_t queue_id)\n {\n-\trte_write16(queue_id, &hw->common_cfg->queue_select);\n-\treturn rte_read16(&hw->common_cfg->queue_size);\n+\tstruct virtio_pci_dev *dev = virtio_pci_get_dev(hw);\n+\n+\trte_write16(queue_id, &dev->common_cfg->queue_select);\n+\treturn rte_read16(&dev->common_cfg->queue_size);\n }\n \n static int\n modern_setup_queue(struct virtio_hw *hw, struct virtqueue *vq)\n {\n+\tstruct virtio_pci_dev *dev = virtio_pci_get_dev(hw);\n \tuint64_t desc_addr, avail_addr, used_addr;\n \tuint16_t notify_off;\n \n@@ -405,20 +423,20 @@ modern_setup_queue(struct virtio_hw *hw, struct virtqueue *vq)\n \t\t\t\t\t\t\t ring[vq->vq_nentries]),\n \t\t\t\t   VIRTIO_PCI_VRING_ALIGN);\n \n-\trte_write16(vq->vq_queue_index, &hw->common_cfg->queue_select);\n+\trte_write16(vq->vq_queue_index, &dev->common_cfg->queue_select);\n \n-\tio_write64_twopart(desc_addr, &hw->common_cfg->queue_desc_lo,\n-\t\t\t\t      &hw->common_cfg->queue_desc_hi);\n-\tio_write64_twopart(avail_addr, &hw->common_cfg->queue_avail_lo,\n-\t\t\t\t       &hw->common_cfg->queue_avail_hi);\n-\tio_write64_twopart(used_addr, &hw->common_cfg->queue_used_lo,\n-\t\t\t\t      &hw->common_cfg->queue_used_hi);\n+\tio_write64_twopart(desc_addr, &dev->common_cfg->queue_desc_lo,\n+\t\t\t\t      &dev->common_cfg->queue_desc_hi);\n+\tio_write64_twopart(avail_addr, &dev->common_cfg->queue_avail_lo,\n+\t\t\t\t       &dev->common_cfg->queue_avail_hi);\n+\tio_write64_twopart(used_addr, &dev->common_cfg->queue_used_lo,\n+\t\t\t\t      &dev->common_cfg->queue_used_hi);\n \n-\tnotify_off = rte_read16(&hw->common_cfg->queue_notify_off);\n-\tvq->notify_addr = (void *)((uint8_t *)hw->notify_base +\n-\t\t\t\tnotify_off * hw->notify_off_multiplier);\n+\tnotify_off = rte_read16(&dev->common_cfg->queue_notify_off);\n+\tvq->notify_addr = (void *)((uint8_t *)dev->notify_base +\n+\t\t\t\tnotify_off * dev->notify_off_multiplier);\n \n-\trte_write16(1, &hw->common_cfg->queue_enable);\n+\trte_write16(1, &dev->common_cfg->queue_enable);\n \n \tPMD_INIT_LOG(DEBUG, \"queue %u addresses:\", vq->vq_queue_index);\n \tPMD_INIT_LOG(DEBUG, \"\\t desc_addr: %\" PRIx64, desc_addr);\n@@ -433,16 +451,18 @@ modern_setup_queue(struct virtio_hw *hw, struct virtqueue *vq)\n static void\n modern_del_queue(struct virtio_hw *hw, struct virtqueue *vq)\n {\n-\trte_write16(vq->vq_queue_index, &hw->common_cfg->queue_select);\n+\tstruct virtio_pci_dev *dev = virtio_pci_get_dev(hw);\n+\n+\trte_write16(vq->vq_queue_index, &dev->common_cfg->queue_select);\n \n-\tio_write64_twopart(0, &hw->common_cfg->queue_desc_lo,\n-\t\t\t\t  &hw->common_cfg->queue_desc_hi);\n-\tio_write64_twopart(0, &hw->common_cfg->queue_avail_lo,\n-\t\t\t\t  &hw->common_cfg->queue_avail_hi);\n-\tio_write64_twopart(0, &hw->common_cfg->queue_used_lo,\n-\t\t\t\t  &hw->common_cfg->queue_used_hi);\n+\tio_write64_twopart(0, &dev->common_cfg->queue_desc_lo,\n+\t\t\t\t  &dev->common_cfg->queue_desc_hi);\n+\tio_write64_twopart(0, &dev->common_cfg->queue_avail_lo,\n+\t\t\t\t  &dev->common_cfg->queue_avail_hi);\n+\tio_write64_twopart(0, &dev->common_cfg->queue_used_lo,\n+\t\t\t\t  &dev->common_cfg->queue_used_hi);\n \n-\trte_write16(0, &hw->common_cfg->queue_enable);\n+\trte_write16(0, &dev->common_cfg->queue_enable);\n }\n \n static void\n@@ -607,18 +627,19 @@ get_cfg_addr(struct rte_pci_device *dev, struct virtio_pci_cap *cap)\n #define PCI_MSIX_ENABLE 0x8000\n \n static int\n-virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)\n+virtio_read_caps(struct rte_pci_device *pci_dev, struct virtio_hw *hw)\n {\n+\tstruct virtio_pci_dev *dev = virtio_pci_get_dev(hw);\n \tuint8_t pos;\n \tstruct virtio_pci_cap cap;\n \tint ret;\n \n-\tif (rte_pci_map_device(dev)) {\n+\tif (rte_pci_map_device(pci_dev)) {\n \t\tPMD_INIT_LOG(DEBUG, \"failed to map pci device!\");\n \t\treturn -1;\n \t}\n \n-\tret = rte_pci_read_config(dev, &pos, 1, PCI_CAPABILITY_LIST);\n+\tret = rte_pci_read_config(pci_dev, &pos, 1, PCI_CAPABILITY_LIST);\n \tif (ret != 1) {\n \t\tPMD_INIT_LOG(DEBUG,\n \t\t\t     \"failed to read pci capability list, ret %d\", ret);\n@@ -626,7 +647,7 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)\n \t}\n \n \twhile (pos) {\n-\t\tret = rte_pci_read_config(dev, &cap, 2, pos);\n+\t\tret = rte_pci_read_config(pci_dev, &cap, 2, pos);\n \t\tif (ret != 2) {\n \t\t\tPMD_INIT_LOG(DEBUG,\n \t\t\t\t     \"failed to read pci cap at pos: %x ret %d\",\n@@ -642,7 +663,7 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)\n \t\t\t */\n \t\t\tuint16_t flags;\n \n-\t\t\tret = rte_pci_read_config(dev, &flags, sizeof(flags),\n+\t\t\tret = rte_pci_read_config(pci_dev, &flags, sizeof(flags),\n \t\t\t\t\tpos + 2);\n \t\t\tif (ret != sizeof(flags)) {\n \t\t\t\tPMD_INIT_LOG(DEBUG,\n@@ -664,7 +685,7 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)\n \t\t\tgoto next;\n \t\t}\n \n-\t\tret = rte_pci_read_config(dev, &cap, sizeof(cap), pos);\n+\t\tret = rte_pci_read_config(pci_dev, &cap, sizeof(cap), pos);\n \t\tif (ret != sizeof(cap)) {\n \t\t\tPMD_INIT_LOG(DEBUG,\n \t\t\t\t     \"failed to read pci cap at pos: %x ret %d\",\n@@ -678,24 +699,24 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)\n \n \t\tswitch (cap.cfg_type) {\n \t\tcase VIRTIO_PCI_CAP_COMMON_CFG:\n-\t\t\thw->common_cfg = get_cfg_addr(dev, &cap);\n+\t\t\tdev->common_cfg = get_cfg_addr(pci_dev, &cap);\n \t\t\tbreak;\n \t\tcase VIRTIO_PCI_CAP_NOTIFY_CFG:\n-\t\t\tret = rte_pci_read_config(dev,\n-\t\t\t\t\t&hw->notify_off_multiplier,\n+\t\t\tret = rte_pci_read_config(pci_dev,\n+\t\t\t\t\t&dev->notify_off_multiplier,\n \t\t\t\t\t4, pos + sizeof(cap));\n \t\t\tif (ret != 4)\n \t\t\t\tPMD_INIT_LOG(DEBUG,\n \t\t\t\t\t\"failed to read notify_off_multiplier, ret %d\",\n \t\t\t\t\tret);\n \t\t\telse\n-\t\t\t\thw->notify_base = get_cfg_addr(dev, &cap);\n+\t\t\t\tdev->notify_base = get_cfg_addr(pci_dev, &cap);\n \t\t\tbreak;\n \t\tcase VIRTIO_PCI_CAP_DEVICE_CFG:\n-\t\t\thw->dev_cfg = get_cfg_addr(dev, &cap);\n+\t\t\tdev->dev_cfg = get_cfg_addr(pci_dev, &cap);\n \t\t\tbreak;\n \t\tcase VIRTIO_PCI_CAP_ISR_CFG:\n-\t\t\thw->isr = get_cfg_addr(dev, &cap);\n+\t\t\tdev->isr = get_cfg_addr(pci_dev, &cap);\n \t\t\tbreak;\n \t\t}\n \n@@ -703,19 +724,19 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)\n \t\tpos = cap.cap_next;\n \t}\n \n-\tif (hw->common_cfg == NULL || hw->notify_base == NULL ||\n-\t    hw->dev_cfg == NULL    || hw->isr == NULL) {\n+\tif (dev->common_cfg == NULL || dev->notify_base == NULL ||\n+\t    dev->dev_cfg == NULL    || dev->isr == NULL) {\n \t\tPMD_INIT_LOG(INFO, \"no modern virtio pci device found.\");\n \t\treturn -1;\n \t}\n \n \tPMD_INIT_LOG(INFO, \"found modern virtio pci device.\");\n \n-\tPMD_INIT_LOG(DEBUG, \"common cfg mapped at: %p\", hw->common_cfg);\n-\tPMD_INIT_LOG(DEBUG, \"device cfg mapped at: %p\", hw->dev_cfg);\n-\tPMD_INIT_LOG(DEBUG, \"isr cfg mapped at: %p\", hw->isr);\n+\tPMD_INIT_LOG(DEBUG, \"common cfg mapped at: %p\", dev->common_cfg);\n+\tPMD_INIT_LOG(DEBUG, \"device cfg mapped at: %p\", dev->dev_cfg);\n+\tPMD_INIT_LOG(DEBUG, \"isr cfg mapped at: %p\", dev->isr);\n \tPMD_INIT_LOG(DEBUG, \"notify base: %p, notify off multiplier: %u\",\n-\t\thw->notify_base, hw->notify_off_multiplier);\n+\t\tdev->notify_base, dev->notify_off_multiplier);\n \n \treturn 0;\n }\ndiff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h\nindex a60edc4a93..5629b37050 100644\n--- a/drivers/net/virtio/virtio_pci.h\n+++ b/drivers/net/virtio/virtio_pci.h\n@@ -264,13 +264,8 @@ struct virtio_hw {\n \tbool        has_rx_offload;\n \tuint16_t    port_id;\n \tuint8_t     mac_addr[RTE_ETHER_ADDR_LEN];\n-\tuint32_t    notify_off_multiplier;\n \tuint32_t    speed;  /* link speed in MB */\n \tuint8_t     duplex;\n-\tuint8_t     *isr;\n-\tuint16_t    *notify_base;\n-\tstruct virtio_pci_common_cfg *common_cfg;\n-\tstruct virtio_net_config *dev_cfg;\n \t/*\n \t * App management thread and virtio interrupt handler thread\n \t * both can change device state, this lock is meant to avoid\n@@ -286,6 +281,11 @@ struct virtio_hw {\n struct virtio_pci_dev {\n \tstruct virtio_hw hw;\n \tstruct rte_pci_device *pci_dev;\n+\tstruct virtio_pci_common_cfg *common_cfg;\n+\tstruct virtio_net_config *dev_cfg;\n+\tuint8_t *isr;\n+\tuint16_t *notify_base;\n+\tuint32_t notify_off_multiplier;\n \tbool modern;\n };\n \n",
    "prefixes": [
        "13/40"
    ]
}