get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 85546,
    "url": "http://patches.dpdk.org/api/patches/85546/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201220211405.313012-23-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-23-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201220211405.313012-23-maxime.coquelin@redhat.com",
    "date": "2020-12-20T21:13:47",
    "name": "[22/40] net/virtio: remove last PCI refs in non-PCI code",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5a4a10e4d005cfabfe7d8f4efe374297f0ce46a4",
    "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-23-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/85546/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/85546/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 9EB71A09FD;\n\tSun, 20 Dec 2020 22:21:35 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id AA585CC77;\n\tSun, 20 Dec 2020 22:15:51 +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 85106CC79\n for <dev@dpdk.org>; Sun, 20 Dec 2020 22:15:49 +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-112-x6FR57KPONi21B6i6CLyZg-1; Sun, 20 Dec 2020 16:15:44 -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 3C023801817;\n Sun, 20 Dec 2020 21:15:43 +0000 (UTC)",
            "from max-t490s.redhat.com (unknown [10.36.110.43])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 4822560C43;\n Sun, 20 Dec 2020 21:15:41 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1608498948;\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=kswVOWoXWw151wtuBQEQ8Mwox5x940jXmK4aDotjVbk=;\n b=T+9+a/sZJhrLCC763LgYc1J+4A30XtOH8wHnd58ZkA8x4M5Im0yrLTKJDGTyiy82tpYhwD\n UT/ZCltXEVcNhomF8mfwPZ8nBB8FXCYM8F835NwmHRD9XK6LItJADz0rZNoD8/mvRcRloa\n ihSX8uATw2rDXN8/HpQAD1jpjNQaKqk=",
        "X-MC-Unique": "x6FR57KPONi21B6i6CLyZg-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:47 +0100",
        "Message-Id": "<20201220211405.313012-23-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 22/40] net/virtio: remove last PCI refs in\n\tnon-PCI code",
        "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 finalizes the bus isolation part of this\nrefactoring.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n drivers/net/virtio/virtio_ethdev.c          | 21 +++++++++------------\n drivers/net/virtio/virtio_rxtx.c            | 18 +++++++++---------\n drivers/net/virtio/virtio_rxtx_packed_avx.c |  2 +-\n drivers/net/virtio/virtio_user/vhost.h      |  4 +++-\n drivers/net/virtio/virtqueue.c              |  2 +-\n drivers/net/virtio/virtqueue.h              |  6 +++---\n 6 files changed, 26 insertions(+), 27 deletions(-)",
    "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex 1ca8715832..96871b7b70 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -9,14 +9,11 @@\n #include <unistd.h>\n \n #include <rte_ethdev_driver.h>\n-#include <rte_ethdev_pci.h>\n #include <rte_memcpy.h>\n #include <rte_string_fns.h>\n #include <rte_memzone.h>\n #include <rte_malloc.h>\n #include <rte_branch_prediction.h>\n-#include <rte_pci.h>\n-#include <rte_bus_pci.h>\n #include <rte_ether.h>\n #include <rte_ip.h>\n #include <rte_arp.h>\n@@ -32,7 +29,7 @@\n #include <rte_kvargs.h>\n \n #include \"virtio_ethdev.h\"\n-#include \"virtio_pci.h\"\n+#include \"virtio.h\"\n #include \"virtio_logs.h\"\n #include \"virtqueue.h\"\n #include \"virtio_rxtx.h\"\n@@ -422,7 +419,7 @@ virtio_init_vring(struct virtqueue *vq)\n }\n \n static int\n-virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)\n+virtio_init_queue(struct rte_eth_dev *dev, uint16_t queue_idx)\n {\n \tchar vq_name[VIRTQUEUE_MAX_NAME_SZ];\n \tchar vq_hdr_name[VIRTQUEUE_MAX_NAME_SZ];\n@@ -435,18 +432,18 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)\n \tstruct virtqueue *vq;\n \tsize_t sz_hdr_mz = 0;\n \tvoid *sw_ring = NULL;\n-\tint queue_type = virtio_get_queue_type(hw, vtpci_queue_idx);\n+\tint queue_type = virtio_get_queue_type(hw, queue_idx);\n \tint ret;\n \tint numa_node = dev->device->numa_node;\n \n \tPMD_INIT_LOG(INFO, \"setting up queue: %u on NUMA node %d\",\n-\t\t\tvtpci_queue_idx, numa_node);\n+\t\t\tqueue_idx, numa_node);\n \n \t/*\n \t * Read the virtqueue size from the Queue Size field\n \t * Always power of 2 and if 0 virtqueue does not exist\n \t */\n-\tvq_size = VIRTIO_OPS(hw)->get_queue_num(hw, vtpci_queue_idx);\n+\tvq_size = VIRTIO_OPS(hw)->get_queue_num(hw, queue_idx);\n \tPMD_INIT_LOG(DEBUG, \"vq_size: %u\", vq_size);\n \tif (vq_size == 0) {\n \t\tPMD_INIT_LOG(ERR, \"virtqueue does not exist\");\n@@ -459,7 +456,7 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)\n \t}\n \n \tsnprintf(vq_name, sizeof(vq_name), \"port%d_vq%d\",\n-\t\t dev->data->port_id, vtpci_queue_idx);\n+\t\t dev->data->port_id, queue_idx);\n \n \tsize = RTE_ALIGN_CEIL(sizeof(*vq) +\n \t\t\t\tvq_size * sizeof(struct vq_desc_extra),\n@@ -481,10 +478,10 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)\n \t\tPMD_INIT_LOG(ERR, \"can not allocate vq\");\n \t\treturn -ENOMEM;\n \t}\n-\thw->vqs[vtpci_queue_idx] = vq;\n+\thw->vqs[queue_idx] = vq;\n \n \tvq->hw = hw;\n-\tvq->vq_queue_index = vtpci_queue_idx;\n+\tvq->vq_queue_index = queue_idx;\n \tvq->vq_nentries = vq_size;\n \tif (virtio_with_packed_queue(hw)) {\n \t\tvq->vq_packed.used_wrap_counter = 1;\n@@ -527,7 +524,7 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)\n \n \tif (sz_hdr_mz) {\n \t\tsnprintf(vq_hdr_name, sizeof(vq_hdr_name), \"port%d_vq%d_hdr\",\n-\t\t\t dev->data->port_id, vtpci_queue_idx);\n+\t\t\t dev->data->port_id, queue_idx);\n \t\thdr_mz = rte_memzone_reserve_aligned(vq_hdr_name, sz_hdr_mz,\n \t\t\t\tnuma_node, RTE_MEMZONE_IOVA_CONTIG,\n \t\t\t\tRTE_CACHE_LINE_SIZE);\ndiff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c\nindex 10989118b0..aca6eb9cd0 100644\n--- a/drivers/net/virtio/virtio_rxtx.c\n+++ b/drivers/net/virtio/virtio_rxtx.c\n@@ -27,7 +27,7 @@\n \n #include \"virtio_logs.h\"\n #include \"virtio_ethdev.h\"\n-#include \"virtio_pci.h\"\n+#include \"virtio.h\"\n #include \"virtqueue.h\"\n #include \"virtio_rxtx.h\"\n #include \"virtio_rxtx_simple.h\"\n@@ -628,9 +628,9 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,\n \t\t\tconst struct rte_eth_rxconf *rx_conf,\n \t\t\tstruct rte_mempool *mp)\n {\n-\tuint16_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_RQ_QUEUE_IDX;\n+\tuint16_t vq_idx = 2 * queue_idx + VTNET_SQ_RQ_QUEUE_IDX;\n \tstruct virtio_hw *hw = dev->data->dev_private;\n-\tstruct virtqueue *vq = hw->vqs[vtpci_queue_idx];\n+\tstruct virtqueue *vq = hw->vqs[vq_idx];\n \tstruct virtnet_rx *rxvq;\n \tuint16_t rx_free_thresh;\n \n@@ -678,9 +678,9 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,\n int\n virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)\n {\n-\tuint16_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_RQ_QUEUE_IDX;\n+\tuint16_t vq_idx = 2 * queue_idx + VTNET_SQ_RQ_QUEUE_IDX;\n \tstruct virtio_hw *hw = dev->data->dev_private;\n-\tstruct virtqueue *vq = hw->vqs[vtpci_queue_idx];\n+\tstruct virtqueue *vq = hw->vqs[vq_idx];\n \tstruct virtnet_rx *rxvq = &vq->rxq;\n \tstruct rte_mbuf *m;\n \tuint16_t desc_idx;\n@@ -779,9 +779,9 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,\n \t\t\tunsigned int socket_id __rte_unused,\n \t\t\tconst struct rte_eth_txconf *tx_conf)\n {\n-\tuint8_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;\n+\tuint8_t vq_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;\n \tstruct virtio_hw *hw = dev->data->dev_private;\n-\tstruct virtqueue *vq = hw->vqs[vtpci_queue_idx];\n+\tstruct virtqueue *vq = hw->vqs[vq_idx];\n \tstruct virtnet_tx *txvq;\n \tuint16_t tx_free_thresh;\n \n@@ -823,9 +823,9 @@ int\n virtio_dev_tx_queue_setup_finish(struct rte_eth_dev *dev,\n \t\t\t\tuint16_t queue_idx)\n {\n-\tuint8_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;\n+\tuint8_t vq_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;\n \tstruct virtio_hw *hw = dev->data->dev_private;\n-\tstruct virtqueue *vq = hw->vqs[vtpci_queue_idx];\n+\tstruct virtqueue *vq = hw->vqs[vq_idx];\n \n \tPMD_INIT_FUNC_TRACE();\n \ndiff --git a/drivers/net/virtio/virtio_rxtx_packed_avx.c b/drivers/net/virtio/virtio_rxtx_packed_avx.c\nindex c272766a9f..a3dcc01a43 100644\n--- a/drivers/net/virtio/virtio_rxtx_packed_avx.c\n+++ b/drivers/net/virtio/virtio_rxtx_packed_avx.c\n@@ -12,7 +12,7 @@\n \n #include \"virtio_logs.h\"\n #include \"virtio_ethdev.h\"\n-#include \"virtio_pci.h\"\n+#include \"virtio.h\"\n #include \"virtqueue.h\"\n \n #define BYTE_SIZE 8\ndiff --git a/drivers/net/virtio/virtio_user/vhost.h b/drivers/net/virtio/virtio_user/vhost.h\nindex 210a3704e7..9d2a8505b3 100644\n--- a/drivers/net/virtio/virtio_user/vhost.h\n+++ b/drivers/net/virtio/virtio_user/vhost.h\n@@ -9,7 +9,9 @@\n #include <linux/types.h>\n #include <linux/ioctl.h>\n \n-#include \"../virtio_pci.h\"\n+#include <rte_errno.h>\n+\n+#include \"../virtio.h\"\n #include \"../virtio_logs.h\"\n #include \"../virtqueue.h\"\n \ndiff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c\nindex 59a2cb6599..1f9af3c31b 100644\n--- a/drivers/net/virtio/virtqueue.c\n+++ b/drivers/net/virtio/virtqueue.c\n@@ -7,7 +7,7 @@\n \n #include \"virtqueue.h\"\n #include \"virtio_logs.h\"\n-#include \"virtio_pci.h\"\n+#include \"virtio.h\"\n #include \"virtio_rxtx_simple.h\"\n \n /*\ndiff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h\nindex 6c1df6f8e5..9274c48080 100644\n--- a/drivers/net/virtio/virtqueue.h\n+++ b/drivers/net/virtio/virtqueue.h\n@@ -449,11 +449,11 @@ virtqueue_full(const struct virtqueue *vq)\n }\n \n static inline int\n-virtio_get_queue_type(struct virtio_hw *hw, uint16_t vtpci_queue_idx)\n+virtio_get_queue_type(struct virtio_hw *hw, uint16_t vq_idx)\n {\n-\tif (vtpci_queue_idx == hw->max_queue_pairs * 2)\n+\tif (vq_idx == hw->max_queue_pairs * 2)\n \t\treturn VTNET_CQ;\n-\telse if (vtpci_queue_idx % 2 == 0)\n+\telse if (vq_idx % 2 == 0)\n \t\treturn VTNET_RQ;\n \telse\n \t\treturn VTNET_TQ;\n",
    "prefixes": [
        "22/40"
    ]
}