get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87312,
    "url": "https://patches.dpdk.org/api/patches/87312/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210126101639.250481-25-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-25-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210126101639.250481-25-maxime.coquelin@redhat.com",
    "date": "2021-01-26T10:16:19",
    "name": "[v4,24/44] net/virtio: remove last PCI refs in non-PCI code",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "368909bfe30b39b73cee2711c03d7c0fb0e704fa",
    "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-25-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/87312/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/87312/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 D15D0A052A;\n\tTue, 26 Jan 2021 11:21:00 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 01BF71413C0;\n\tTue, 26 Jan 2021 11:18:06 +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 E04851413B1\n for <dev@dpdk.org>; Tue, 26 Jan 2021 11:18:00 +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-287-plPtQ7ueNWaeU0uHIffiqg-1; Tue, 26 Jan 2021 05:17:56 -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 0DD1E873019;\n Tue, 26 Jan 2021 10:17:55 +0000 (UTC)",
            "from max-t490s.redhat.com (unknown [10.36.110.31])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 928BD6F45C;\n Tue, 26 Jan 2021 10:17:53 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1611656280;\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=WM4VKnL8MgNKEAbEZ/Hmfykt8bF8WC95SGxOWiTKyEc=;\n b=Emg9tWs9fVMAG148uMLvankJjEtmm5XI7CzoznGIVU7HlZge6qQQNAYaDVFreJBgPbbxWO\n Bo+yUc3NSdLWdO5JRMt60wQ/I/CS9TUGE/j6mWBNs0uAiokFhSIBBfZYAcbuUzn5aOFxP4\n Lnw7Vre3z+VQZni7nbmGCQV0xUCjRS8=",
        "X-MC-Unique": "plPtQ7ueNWaeU0uHIffiqg-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:19 +0100",
        "Message-Id": "<20210126101639.250481-25-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 24/44] net/virtio: remove last PCI refs in\n non-PCI code",
        "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 finalizes the bus isolation part of this\nrefactoring.\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_ethdev.c           | 21 +++++++++-----------\n drivers/net/virtio/virtio_rxtx.c             | 18 ++++++++---------\n drivers/net/virtio/virtio_rxtx_packed.h      |  2 +-\n drivers/net/virtio/virtio_rxtx_packed_avx.h  |  2 +-\n drivers/net/virtio/virtio_rxtx_packed_neon.h |  2 +-\n drivers/net/virtio/virtio_user/vhost.h       |  4 +++-\n drivers/net/virtio/virtqueue.c               |  2 +-\n drivers/net/virtio/virtqueue.h               |  8 ++++----\n 8 files changed, 29 insertions(+), 30 deletions(-)",
    "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex a2195bdda8..5f7ea390c8 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 728085e99b..b5657d5c83 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.h b/drivers/net/virtio/virtio_rxtx_packed.h\nindex 8d99caeead..3037c8c871 100644\n--- a/drivers/net/virtio/virtio_rxtx_packed.h\n+++ b/drivers/net/virtio/virtio_rxtx_packed.h\n@@ -15,7 +15,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_rxtx_packed_avx.h b/drivers/net/virtio/virtio_rxtx_packed_avx.h\nindex 2c610d57de..49e845d02a 100644\n--- a/drivers/net/virtio/virtio_rxtx_packed_avx.h\n+++ b/drivers/net/virtio/virtio_rxtx_packed_avx.h\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 \"virtio_rxtx_packed.h\"\n #include \"virtqueue.h\"\n \ndiff --git a/drivers/net/virtio/virtio_rxtx_packed_neon.h b/drivers/net/virtio/virtio_rxtx_packed_neon.h\nindex ae2d099c0b..af9dede41b 100644\n--- a/drivers/net/virtio/virtio_rxtx_packed_neon.h\n+++ b/drivers/net/virtio/virtio_rxtx_packed_neon.h\n@@ -12,7 +12,7 @@\n #include <rte_vect.h>\n \n #include \"virtio_ethdev.h\"\n-#include \"virtio_pci.h\"\n+#include \"virtio.h\"\n #include \"virtio_rxtx_packed.h\"\n #include \"virtqueue.h\"\n \ndiff --git a/drivers/net/virtio/virtio_user/vhost.h b/drivers/net/virtio/virtio_user/vhost.h\nindex be286173b0..8ec3a6a62c 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 f419c0aa99..71b66f3208 100644\n--- a/drivers/net/virtio/virtqueue.h\n+++ b/drivers/net/virtio/virtqueue.h\n@@ -259,7 +259,7 @@ struct virtqueue {\n \t */\n \tuint16_t  vq_desc_head_idx;\n \tuint16_t  vq_desc_tail_idx;\n-\tuint16_t  vq_queue_index;   /**< PCI queue index */\n+\tuint16_t  vq_queue_index;\n \tuint16_t offset; /**< relative offset to obtain addr in mbuf */\n \tuint16_t  *notify_addr;\n \tstruct rte_mbuf **sw_ring;  /**< RX software ring. */\n@@ -448,11 +448,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": [
        "v4",
        "24/44"
    ]
}