get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87303,
    "url": "https://patches.dpdk.org/api/patches/87303/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210126101639.250481-16-maxime.coquelin@redhat.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": "<20210126101639.250481-16-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210126101639.250481-16-maxime.coquelin@redhat.com",
    "date": "2021-01-26T10:16:10",
    "name": "[v4,15/44] net/virtio: move PCI-specific fields to PCI device",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ab57d65e4b73e2051be52d11ed2e03d6c229f80c",
    "submitter": {
        "id": 512,
        "url": "https://patches.dpdk.org/api/people/512/?format=api",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "delegate": {
        "id": 2642,
        "url": "https://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210126101639.250481-16-maxime.coquelin@redhat.com/mbox/",
    "series": [
        {
            "id": 14950,
            "url": "https://patches.dpdk.org/api/series/14950/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14950",
            "date": "2021-01-26T10:15:55",
            "name": "net/virtio: Virtio PMD rework",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/14950/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/87303/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/87303/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id C79DAA052A;\n\tTue, 26 Jan 2021 11:19:22 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 98599141370;\n\tTue, 26 Jan 2021 11:17:37 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [216.205.24.124])\n by mails.dpdk.org (Postfix) with ESMTP id 111B4141364\n for <dev@dpdk.org>; Tue, 26 Jan 2021 11:17:35 +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-237-Wdt-Y5YbNgWzT6DyavRRQw-1; Tue, 26 Jan 2021 05:17:33 -0500",
            "from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com\n [10.5.11.11])\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 74AF9B8101;\n Tue, 26 Jan 2021 10:17:32 +0000 (UTC)",
            "from max-t490s.redhat.com (unknown [10.36.110.31])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 07C3C6F45C;\n Tue, 26 Jan 2021 10:17:30 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1611656255;\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=sImnCRbsKlgcd0f1e3JuxERMIAPxEayimP0jbb1TCyY=;\n b=Rn5JH0VPG/VUJ6hYNle4QIOkkQCRlugt6TFewjmTyCmd/YrKX3qy/DCysc0tycOXifY/pg\n TzaIWA58rd+YL1LKnu78cL7sEivZ320T5T7SNcEF0gIgf7b3bJ8Bxkh7Xi6/Uh7VvtjQmf\n c9LWDPY/9oJxi9J4sy/AsORpzEnLi6I=",
        "X-MC-Unique": "Wdt-Y5YbNgWzT6DyavRRQw-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": "Tue, 26 Jan 2021 11:16:10 +0100",
        "Message-Id": "<20210126101639.250481-16-maxime.coquelin@redhat.com>",
        "In-Reply-To": "<20210126101639.250481-1-maxime.coquelin@redhat.com>",
        "References": "<20210126101639.250481-1-maxime.coquelin@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.11",
        "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 v4 15/44] net/virtio: move PCI-specific fields to\n PCI device",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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>\nReviewed-by: Chenbo Xia <chenbo.xia@intel.com>\nReviewed-by: David Marchand <david.marchand@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 20599774a7..b347e5fbc0 100644\n--- a/drivers/net/virtio/virtio_pci.c\n+++ b/drivers/net/virtio/virtio_pci.c\n@@ -344,18 +344,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@@ -363,23 +364,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@@ -387,13 +390,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@@ -410,46 +415,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@@ -462,20 +480,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@@ -490,16 +508,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@@ -671,18 +691,19 @@ get_cfg_addr(struct rte_pci_device *dev, struct virtio_pci_cap *cap)\n }\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@@ -690,7 +711,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@@ -706,7 +727,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@@ -728,7 +749,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@@ -742,24 +763,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@@ -767,19 +788,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 2cede4a100..4f3690032b 100644\n--- a/drivers/net/virtio/virtio_pci.h\n+++ b/drivers/net/virtio/virtio_pci.h\n@@ -265,13 +265,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@@ -287,6 +282,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": [
        "v4",
        "15/44"
    ]
}