get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 123218,
    "url": "http://patchwork.dpdk.org/api/patches/123218/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230207104532.2370869-6-david.marchand@redhat.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20230207104532.2370869-6-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230207104532.2370869-6-david.marchand@redhat.com",
    "date": "2023-02-07T10:45:28",
    "name": "[v6,5/9] vhost: annotate async accesses",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "536a06c4eecbc1b7068bb1c67c598a01bb92fb05",
    "submitter": {
        "id": 1173,
        "url": "http://patchwork.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230207104532.2370869-6-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 26843,
            "url": "http://patchwork.dpdk.org/api/series/26843/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=26843",
            "date": "2023-02-07T10:45:23",
            "name": "Lock annotations",
            "version": 6,
            "mbox": "http://patchwork.dpdk.org/series/26843/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/123218/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/123218/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 2703641C2D;\n\tTue,  7 Feb 2023 11:46:23 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7CA8E42D5A;\n\tTue,  7 Feb 2023 11:46:07 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id D482742D0B\n for <dev@dpdk.org>; Tue,  7 Feb 2023 11:46:05 +0100 (CET)",
            "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-561-NlU3FG7zNtKWuGjnL5Cjkg-1; Tue, 07 Feb 2023 05:46:02 -0500",
            "from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com\n [10.11.54.1])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9004F18E524F;\n Tue,  7 Feb 2023 10:46:00 +0000 (UTC)",
            "from dmarchan.redhat.com (ovpn-195-46.brq.redhat.com [10.40.195.46])\n by smtp.corp.redhat.com (Postfix) with ESMTP id C03CF401014C;\n Tue,  7 Feb 2023 10:45:58 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1675766765;\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=T9jHugDeC06gTAM10GQyEJV4zZkZz8c/o7BUQ+efIDM=;\n b=Nzk7v4W39kuPN4VkXEije0sQ9bnAjKsktbOFlSw0p/3gxeHQDSPdxuvBv/7vqQdgX2I7MN\n S1TqFvC5loDXMRDFdXlnWjbQ/HDZeuJ5sppeMcmYPDin3MOOdTmRRba/3+iUu5ClF86Vro\n CFUbFOcG8lMDBdmXX+USG7XLbi0Ti70=",
        "X-MC-Unique": "NlU3FG7zNtKWuGjnL5Cjkg-1",
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "maxime.coquelin@redhat.com, stephen@networkplumber.org,\n chenbo.xia@intel.com, jiayu.hu@intel.com, yuanx.wang@intel.com,\n xuan.ding@intel.com, mb@smartsharesystems.com",
        "Subject": "[PATCH v6 5/9] vhost: annotate async accesses",
        "Date": "Tue,  7 Feb 2023 11:45:28 +0100",
        "Message-Id": "<20230207104532.2370869-6-david.marchand@redhat.com>",
        "In-Reply-To": "<20230207104532.2370869-1-david.marchand@redhat.com>",
        "References": "<20220328121758.26632-1-david.marchand@redhat.com>\n <20230207104532.2370869-1-david.marchand@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.1 on 10.11.54.1",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "vq->async is initialised and must be accessed under vq->access_lock.\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\nAcked-by: Morten Brørup <mb@smartsharesystems.com>\nReviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\nChanges since v5:\n- rebased after packed support was added to async code,\n\nChanges since RFC v3:\n- rebased,\n- fixed annotations vq->access_lock -> &vq->access_lock,\n- reworked free_vq,\n\n---\n lib/vhost/vhost.c      |  4 ++++\n lib/vhost/vhost.h      |  2 +-\n lib/vhost/vhost_user.c | 10 +++++++---\n lib/vhost/virtio_net.c | 41 +++++++++++++++++++++++++++++++++++++++++\n 4 files changed, 53 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c\nindex 8cd727ca2f..8bccdd8584 100644\n--- a/lib/vhost/vhost.c\n+++ b/lib/vhost/vhost.c\n@@ -369,6 +369,7 @@ cleanup_device(struct virtio_net *dev, int destroy)\n \n static void\n vhost_free_async_mem(struct vhost_virtqueue *vq)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tif (!vq->async)\n \t\treturn;\n@@ -393,7 +394,9 @@ free_vq(struct virtio_net *dev, struct vhost_virtqueue *vq)\n \telse\n \t\trte_free(vq->shadow_used_split);\n \n+\trte_spinlock_lock(&vq->access_lock);\n \tvhost_free_async_mem(vq);\n+\trte_spinlock_unlock(&vq->access_lock);\n \trte_free(vq->batch_copy_elems);\n \tvhost_user_iotlb_destroy(vq);\n \trte_free(vq->log_cache);\n@@ -1669,6 +1672,7 @@ rte_vhost_extern_callback_register(int vid,\n \n static __rte_always_inline int\n async_channel_register(struct virtio_net *dev, struct vhost_virtqueue *vq)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tstruct vhost_async *async;\n \tint node = vq->numa_node;\ndiff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h\nindex 82fe9b5fda..c05313cf37 100644\n--- a/lib/vhost/vhost.h\n+++ b/lib/vhost/vhost.h\n@@ -326,7 +326,7 @@ struct vhost_virtqueue {\n \tstruct rte_vhost_resubmit_info *resubmit_inflight;\n \tuint64_t\t\tglobal_counter;\n \n-\tstruct vhost_async\t*async;\n+\tstruct vhost_async\t*async __rte_guarded_var;\n \n \tint\t\t\tnotif_enable;\n #define VIRTIO_UNINITIALIZED_NOTIF\t(-1)\ndiff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c\nindex 70d221b9f6..8c1d60b76b 100644\n--- a/lib/vhost/vhost_user.c\n+++ b/lib/vhost/vhost_user.c\n@@ -2168,6 +2168,7 @@ vhost_user_set_vring_enable(struct virtio_net **pdev,\n \t\t\tint main_fd __rte_unused)\n {\n \tstruct virtio_net *dev = *pdev;\n+\tstruct vhost_virtqueue *vq;\n \tbool enable = !!ctx->msg.payload.state.num;\n \tint index = (int)ctx->msg.payload.state.index;\n \n@@ -2175,15 +2176,18 @@ vhost_user_set_vring_enable(struct virtio_net **pdev,\n \t\t\"set queue enable: %d to qp idx: %d\\n\",\n \t\tenable, index);\n \n-\tif (enable && dev->virtqueue[index]->async) {\n-\t\tif (dev->virtqueue[index]->async->pkts_inflight_n) {\n+\tvq = dev->virtqueue[index];\n+\t/* vhost_user_lock_all_queue_pairs locked all qps */\n+\tvq_assert_lock(dev, vq);\n+\tif (enable && vq->async) {\n+\t\tif (vq->async->pkts_inflight_n) {\n \t\t\tVHOST_LOG_CONFIG(dev->ifname, ERR,\n \t\t\t\t\"failed to enable vring. Inflight packets must be completed first\\n\");\n \t\t\treturn RTE_VHOST_MSG_RESULT_ERR;\n \t\t}\n \t}\n \n-\tdev->virtqueue[index]->enabled = enable;\n+\tvq->enabled = enable;\n \n \treturn RTE_VHOST_MSG_RESULT_OK;\n }\ndiff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c\nindex f2ab6dba15..6672caac49 100644\n--- a/lib/vhost/virtio_net.c\n+++ b/lib/vhost/virtio_net.c\n@@ -102,6 +102,7 @@ static __rte_always_inline int64_t\n vhost_async_dma_transfer_one(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\tint16_t dma_id, uint16_t vchan_id, uint16_t flag_idx,\n \t\tstruct vhost_iov_iter *pkt)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tstruct async_dma_vchan_info *dma_info = &dma_copy_track[dma_id].vchans[vchan_id];\n \tuint16_t ring_mask = dma_info->ring_mask;\n@@ -151,6 +152,7 @@ static __rte_always_inline uint16_t\n vhost_async_dma_transfer(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\tint16_t dma_id, uint16_t vchan_id, uint16_t head_idx,\n \t\tstruct vhost_iov_iter *pkts, uint16_t nr_pkts)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tstruct async_dma_vchan_info *dma_info = &dma_copy_track[dma_id].vchans[vchan_id];\n \tint64_t ret, nr_copies = 0;\n@@ -434,6 +436,7 @@ static __rte_always_inline void\n vhost_async_shadow_enqueue_packed_batch(struct vhost_virtqueue *vq,\n \t\t\t\t uint64_t *lens,\n \t\t\t\t uint16_t *ids)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint16_t i;\n \tstruct vhost_async *async = vq->async;\n@@ -450,6 +453,7 @@ vhost_async_shadow_enqueue_packed_batch(struct vhost_virtqueue *vq,\n \n static __rte_always_inline void\n vhost_async_shadow_dequeue_packed_batch(struct vhost_virtqueue *vq, uint16_t *ids)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint16_t i;\n \tstruct vhost_async *async = vq->async;\n@@ -611,6 +615,7 @@ vhost_async_shadow_enqueue_packed(struct vhost_virtqueue *vq,\n \t\t\t\t   uint16_t *id,\n \t\t\t\t   uint16_t *count,\n \t\t\t\t   uint16_t num_buffers)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint16_t i;\n \tstruct vhost_async *async = vq->async;\n@@ -1118,6 +1123,7 @@ static __rte_always_inline int\n async_fill_seg(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\tstruct rte_mbuf *m, uint32_t mbuf_offset,\n \t\tuint64_t buf_iova, uint32_t cpy_len, bool to_desc)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tstruct vhost_async *async = vq->async;\n \tuint64_t mapped_len;\n@@ -1195,6 +1201,7 @@ static __rte_always_inline int\n mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\tstruct rte_mbuf *m, struct buf_vector *buf_vec,\n \t\tuint16_t nr_vec, uint16_t num_buffers, bool is_async)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint32_t vec_idx = 0;\n \tuint32_t mbuf_offset, mbuf_avail;\n@@ -1323,6 +1330,7 @@ vhost_enqueue_single_packed(struct virtio_net *dev,\n \t\t\t    struct rte_mbuf *pkt,\n \t\t\t    struct buf_vector *buf_vec,\n \t\t\t    uint16_t *nr_descs)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint16_t nr_vec = 0;\n \tuint16_t avail_idx = vq->last_avail_idx;\n@@ -1383,6 +1391,7 @@ vhost_enqueue_single_packed(struct virtio_net *dev,\n static __rte_noinline uint32_t\n virtio_dev_rx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tstruct rte_mbuf **pkts, uint32_t count)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint32_t pkt_idx = 0;\n \tuint16_t num_buffers;\n@@ -1610,6 +1619,7 @@ static __rte_always_inline int16_t\n virtio_dev_rx_single_packed(struct virtio_net *dev,\n \t\t\t    struct vhost_virtqueue *vq,\n \t\t\t    struct rte_mbuf *pkt)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tstruct buf_vector buf_vec[BUF_VECTOR_MAX];\n \tuint16_t nr_descs = 0;\n@@ -1634,6 +1644,7 @@ virtio_dev_rx_packed(struct virtio_net *dev,\n \t\t     struct vhost_virtqueue *__rte_restrict vq,\n \t\t     struct rte_mbuf **__rte_restrict pkts,\n \t\t     uint32_t count)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint32_t pkt_idx = 0;\n \n@@ -1733,6 +1744,7 @@ rte_vhost_enqueue_burst(int vid, uint16_t queue_id,\n \n static __rte_always_inline uint16_t\n async_get_first_inflight_pkt_idx(struct vhost_virtqueue *vq)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tstruct vhost_async *async = vq->async;\n \n@@ -1761,6 +1773,7 @@ store_dma_desc_info_split(struct vring_used_elem *s_ring, struct vring_used_elem\n static __rte_noinline uint32_t\n virtio_dev_rx_async_submit_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tstruct rte_mbuf **pkts, uint32_t count, int16_t dma_id, uint16_t vchan_id)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tstruct buf_vector buf_vec[BUF_VECTOR_MAX];\n \tuint32_t pkt_idx = 0;\n@@ -1867,6 +1880,7 @@ vhost_enqueue_async_packed(struct virtio_net *dev,\n \t\t\t    struct buf_vector *buf_vec,\n \t\t\t    uint16_t *nr_descs,\n \t\t\t    uint16_t *nr_buffers)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint16_t nr_vec = 0;\n \tuint16_t avail_idx = vq->last_avail_idx;\n@@ -1925,6 +1939,7 @@ vhost_enqueue_async_packed(struct virtio_net *dev,\n static __rte_always_inline int16_t\n virtio_dev_rx_async_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t\t    struct rte_mbuf *pkt, uint16_t *nr_descs, uint16_t *nr_buffers)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tstruct buf_vector buf_vec[BUF_VECTOR_MAX];\n \n@@ -1947,6 +1962,7 @@ virtio_dev_rx_async_packed_batch_enqueue(struct virtio_net *dev,\n \t\t\t   struct rte_mbuf **pkts,\n \t\t\t   uint64_t *desc_addrs,\n \t\t\t   uint64_t *lens)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint32_t buf_offset = sizeof(struct virtio_net_hdr_mrg_rxbuf);\n \tstruct virtio_net_hdr_mrg_rxbuf *hdrs[PACKED_BATCH_SIZE];\n@@ -2007,6 +2023,7 @@ virtio_dev_rx_async_packed_batch(struct virtio_net *dev,\n \t\t\t   struct vhost_virtqueue *vq,\n \t\t\t   struct rte_mbuf **pkts,\n \t\t\t   int16_t dma_id, uint16_t vchan_id)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint64_t desc_addrs[PACKED_BATCH_SIZE];\n \tuint64_t lens[PACKED_BATCH_SIZE];\n@@ -2022,6 +2039,7 @@ virtio_dev_rx_async_packed_batch(struct virtio_net *dev,\n static __rte_always_inline void\n dma_error_handler_packed(struct vhost_virtqueue *vq, uint16_t slot_idx,\n \t\t\tuint32_t nr_err, uint32_t *pkt_idx)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint16_t descs_err = 0;\n \tuint16_t buffers_err = 0;\n@@ -2052,6 +2070,7 @@ dma_error_handler_packed(struct vhost_virtqueue *vq, uint16_t slot_idx,\n static __rte_noinline uint32_t\n virtio_dev_rx_async_submit_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tstruct rte_mbuf **pkts, uint32_t count, int16_t dma_id, uint16_t vchan_id)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint32_t pkt_idx = 0;\n \tuint16_t n_xfer;\n@@ -2124,6 +2143,7 @@ virtio_dev_rx_async_submit_packed(struct virtio_net *dev, struct vhost_virtqueue\n \n static __rte_always_inline void\n write_back_completed_descs_split(struct vhost_virtqueue *vq, uint16_t n_descs)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tstruct vhost_async *async = vq->async;\n \tuint16_t nr_left = n_descs;\n@@ -2156,6 +2176,7 @@ write_back_completed_descs_split(struct vhost_virtqueue *vq, uint16_t n_descs)\n static __rte_always_inline void\n write_back_completed_descs_packed(struct vhost_virtqueue *vq,\n \t\t\t\tuint16_t n_buffers)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tstruct vhost_async *async = vq->async;\n \tuint16_t from = async->last_buffer_idx_packed;\n@@ -2220,6 +2241,7 @@ write_back_completed_descs_packed(struct vhost_virtqueue *vq,\n static __rte_always_inline uint16_t\n vhost_poll_enqueue_completed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tstruct rte_mbuf **pkts, uint16_t count, int16_t dma_id, uint16_t vchan_id)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tstruct vhost_async *async = vq->async;\n \tstruct async_inflight_info *pkts_info = async->pkts_info;\n@@ -2824,6 +2846,7 @@ desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t  struct buf_vector *buf_vec, uint16_t nr_vec,\n \t\t  struct rte_mbuf *m, struct rte_mempool *mbuf_pool,\n \t\t  bool legacy_ol_flags, uint16_t slot_idx, bool is_async)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint32_t buf_avail, buf_offset, buf_len;\n \tuint64_t buf_addr, buf_iova;\n@@ -3029,6 +3052,7 @@ static uint16_t\n virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tstruct rte_mempool *mbuf_pool, struct rte_mbuf **pkts, uint16_t count,\n \tbool legacy_ol_flags)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint16_t i;\n \tuint16_t avail_entries;\n@@ -3132,6 +3156,7 @@ static uint16_t\n virtio_dev_tx_split_legacy(struct virtio_net *dev,\n \tstruct vhost_virtqueue *vq, struct rte_mempool *mbuf_pool,\n \tstruct rte_mbuf **pkts, uint16_t count)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \treturn virtio_dev_tx_split(dev, vq, mbuf_pool, pkts, count, true);\n }\n@@ -3141,6 +3166,7 @@ static uint16_t\n virtio_dev_tx_split_compliant(struct virtio_net *dev,\n \tstruct vhost_virtqueue *vq, struct rte_mempool *mbuf_pool,\n \tstruct rte_mbuf **pkts, uint16_t count)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \treturn virtio_dev_tx_split(dev, vq, mbuf_pool, pkts, count, false);\n }\n@@ -3341,6 +3367,7 @@ vhost_dequeue_single_packed(struct virtio_net *dev,\n \t\t\t    uint16_t *buf_id,\n \t\t\t    uint16_t *desc_count,\n \t\t\t    bool legacy_ol_flags)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tstruct buf_vector buf_vec[BUF_VECTOR_MAX];\n \tuint32_t buf_len;\n@@ -3389,6 +3416,7 @@ virtio_dev_tx_single_packed(struct virtio_net *dev,\n \t\t\t    struct rte_mempool *mbuf_pool,\n \t\t\t    struct rte_mbuf *pkts,\n \t\t\t    bool legacy_ol_flags)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \n \tuint16_t buf_id, desc_count = 0;\n@@ -3419,6 +3447,7 @@ virtio_dev_tx_packed(struct virtio_net *dev,\n \t\t     struct rte_mbuf **__rte_restrict pkts,\n \t\t     uint32_t count,\n \t\t     bool legacy_ol_flags)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint32_t pkt_idx = 0;\n \n@@ -3462,6 +3491,7 @@ static uint16_t\n virtio_dev_tx_packed_legacy(struct virtio_net *dev,\n \tstruct vhost_virtqueue *__rte_restrict vq, struct rte_mempool *mbuf_pool,\n \tstruct rte_mbuf **__rte_restrict pkts, uint32_t count)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \treturn virtio_dev_tx_packed(dev, vq, mbuf_pool, pkts, count, true);\n }\n@@ -3471,6 +3501,7 @@ static uint16_t\n virtio_dev_tx_packed_compliant(struct virtio_net *dev,\n \tstruct vhost_virtqueue *__rte_restrict vq, struct rte_mempool *mbuf_pool,\n \tstruct rte_mbuf **__rte_restrict pkts, uint32_t count)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \treturn virtio_dev_tx_packed(dev, vq, mbuf_pool, pkts, count, false);\n }\n@@ -3588,6 +3619,7 @@ static __rte_always_inline uint16_t\n async_poll_dequeue_completed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\tstruct rte_mbuf **pkts, uint16_t count, int16_t dma_id,\n \t\tuint16_t vchan_id, bool legacy_ol_flags)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint16_t start_idx, from, i;\n \tuint16_t nr_cpl_pkts = 0;\n@@ -3634,6 +3666,7 @@ static __rte_always_inline uint16_t\n virtio_dev_tx_async_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\tstruct rte_mempool *mbuf_pool, struct rte_mbuf **pkts, uint16_t count,\n \t\tint16_t dma_id, uint16_t vchan_id, bool legacy_ol_flags)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tstatic bool allocerr_warned;\n \tbool dropped = false;\n@@ -3780,6 +3813,7 @@ virtio_dev_tx_async_split_legacy(struct virtio_net *dev,\n \t\tstruct vhost_virtqueue *vq, struct rte_mempool *mbuf_pool,\n \t\tstruct rte_mbuf **pkts, uint16_t count,\n \t\tint16_t dma_id, uint16_t vchan_id)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \treturn virtio_dev_tx_async_split(dev, vq, mbuf_pool,\n \t\t\t\tpkts, count, dma_id, vchan_id, true);\n@@ -3791,6 +3825,7 @@ virtio_dev_tx_async_split_compliant(struct virtio_net *dev,\n \t\tstruct vhost_virtqueue *vq, struct rte_mempool *mbuf_pool,\n \t\tstruct rte_mbuf **pkts, uint16_t count,\n \t\tint16_t dma_id, uint16_t vchan_id)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \treturn virtio_dev_tx_async_split(dev, vq, mbuf_pool,\n \t\t\t\tpkts, count, dma_id, vchan_id, false);\n@@ -3799,6 +3834,7 @@ virtio_dev_tx_async_split_compliant(struct virtio_net *dev,\n static __rte_always_inline void\n vhost_async_shadow_dequeue_single_packed(struct vhost_virtqueue *vq,\n \t\t\t\tuint16_t buf_id, uint16_t count)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tstruct vhost_async *async = vq->async;\n \tuint16_t idx = async->buffer_idx_packed;\n@@ -3820,6 +3856,7 @@ virtio_dev_tx_async_single_packed(struct virtio_net *dev,\n \t\t\tstruct rte_mbuf *pkts,\n \t\t\tuint16_t slot_idx,\n \t\t\tbool legacy_ol_flags)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tint err;\n \tuint16_t buf_id, desc_count = 0;\n@@ -3871,6 +3908,7 @@ virtio_dev_tx_async_packed_batch(struct virtio_net *dev,\n \t\t\t   struct vhost_virtqueue *vq,\n \t\t\t   struct rte_mbuf **pkts, uint16_t slot_idx,\n \t\t\t   uint16_t dma_id, uint16_t vchan_id)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint16_t avail_idx = vq->last_avail_idx;\n \tuint32_t buf_offset = sizeof(struct virtio_net_hdr_mrg_rxbuf);\n@@ -3927,6 +3965,7 @@ static __rte_always_inline uint16_t\n virtio_dev_tx_async_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\tstruct rte_mempool *mbuf_pool, struct rte_mbuf **pkts,\n \t\tuint16_t count, uint16_t dma_id, uint16_t vchan_id, bool legacy_ol_flags)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \tuint32_t pkt_idx = 0;\n \tuint16_t slot_idx = 0;\n@@ -4036,6 +4075,7 @@ static uint16_t\n virtio_dev_tx_async_packed_legacy(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\tstruct rte_mempool *mbuf_pool, struct rte_mbuf **pkts,\n \t\tuint16_t count, uint16_t dma_id, uint16_t vchan_id)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \treturn virtio_dev_tx_async_packed(dev, vq, mbuf_pool,\n \t\t\t\tpkts, count, dma_id, vchan_id, true);\n@@ -4046,6 +4086,7 @@ static uint16_t\n virtio_dev_tx_async_packed_compliant(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\tstruct rte_mempool *mbuf_pool, struct rte_mbuf **pkts,\n \t\tuint16_t count, uint16_t dma_id, uint16_t vchan_id)\n+\t__rte_exclusive_locks_required(&vq->access_lock)\n {\n \treturn virtio_dev_tx_async_packed(dev, vq, mbuf_pool,\n \t\t\t\tpkts, count, dma_id, vchan_id, false);\n",
    "prefixes": [
        "v6",
        "5/9"
    ]
}