Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/75333/?format=api
http://patches.dpdk.org/api/patches/75333/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200810141103.8015-2-eperezma@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": "<20200810141103.8015-2-eperezma@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200810141103.8015-2-eperezma@redhat.com", "date": "2020-08-10T14:11:03", "name": "[1/1] vhost: fix iotlb mempool single-consumer flag", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "1b77a13768e9f718ad23ae7cc64eabd4c17a6f86", "submitter": { "id": 1579, "url": "http://patches.dpdk.org/api/people/1579/?format=api", "name": "Eugenio Perez Martin", "email": "eperezma@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/20200810141103.8015-2-eperezma@redhat.com/mbox/", "series": [ { "id": 11566, "url": "http://patches.dpdk.org/api/series/11566/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11566", "date": "2020-08-10T14:11:03", "name": "vhost: fix iotlb mempool single-consumer flag", "version": 1, "mbox": "http://patches.dpdk.org/series/11566/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/75333/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/75333/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 0C951A04C3;\n\tMon, 10 Aug 2020 16:11:20 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5E7853195;\n\tMon, 10 Aug 2020 16:11:18 +0200 (CEST)", "from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com\n [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 67FEC2986\n for <dev@dpdk.org>; Mon, 10 Aug 2020 16:11:17 +0200 (CEST)", "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-479-Hu0SQP-gM9O4RLoOvpKqww-1; Mon, 10 Aug 2020 10:11:15 -0400", "from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com\n [10.5.11.15])\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 CC59D800470;\n Mon, 10 Aug 2020 14:11:13 +0000 (UTC)", "from eperezma.remote.csb (ovpn-113-5.ams2.redhat.com [10.36.113.5])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 1E23171922;\n Mon, 10 Aug 2020 14:11:11 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1597068676;\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=Y+MFWbqbTXA8s2P0rmzwex4HgnuyC4BVyXyhzavwhps=;\n b=hAUYsI9Lf2vb3/TSjY/YnnGvH+w0YW5VYlCKuexv6futSDu6tuKaftNT1Dl4P56QsTbTKI\n i5IVe5jk8jFj+43mUa/2ksL7ucVfNHrYtsmYr8qPp/ziLlQW1mQBktQb6Z4uytlRyhIvmQ\n u3derbIbykCjQBBTmf3XYbL4wdQ0BSQ=", "X-MC-Unique": "Hu0SQP-gM9O4RLoOvpKqww-1", "From": "=?utf-8?q?Eugenio_P=C3=A9rez?= <eperezma@redhat.com>", "To": "dev@dpdk.org", "Cc": "Adrian Moreno Zapata <amorenoz@redhat.com>,\n Maxime Coquelin <maxime.coquelin@redhat.com>, stable@dpdk.org,\n Zhihong Wang <zhihong.wang@intel.com>, Chenbo Xia <chenbo.xia@intel.com>", "Date": "Mon, 10 Aug 2020 16:11:03 +0200", "Message-Id": "<20200810141103.8015-2-eperezma@redhat.com>", "In-Reply-To": "<20200810141103.8015-1-eperezma@redhat.com>", "References": "<20200810141103.8015-1-eperezma@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.15", "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eperezma@redhat.com", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 1/1] vhost: fix iotlb mempool single-consumer flag", "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": "Bugzilla bug: 523\n\nUsing testpmd as a vhost-user with iommu:\n\n/home/dpdk/build/app/dpdk-testpmd -l 1,3 \\\n --vdev net_vhost0,iface=/tmp/vhost-user1,queues=1,iommu-support=1 \\\n -- --auto-start --stats-period 5 --forward-mode=txonly\n\nAnd qemu with packed virtqueue:\n\n <interface type='vhostuser'>\n <mac address='88:67:11:5f:dd:02'/>\n <source type='unix' path='/tmp/vhost-user1' mode='client'/>\n <model type='virtio'/>\n <driver name='vhost' rx_queue_size='1024' iommu='on' ats='on'/>\n <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>\n </interface>\n...\n\n <qemu:commandline>\n <qemu:arg value='-set'/>\n <qemu:arg value='device.net1.packed=on'/>\n </qemu:commandline>\n\n--\n\nIs it possible to consume the iotlb's entries of the mempoo from different\nthreads. Thread sanitizer example output (after change rwlocks to POSIX ones):\n\nWARNING: ThreadSanitizer: data race (pid=76927)\n Write of size 8 at 0x00017ffd5628 by thread T5:\n #0 vhost_user_iotlb_cache_insert ../lib/librte_vhost/iotlb.c:181 (dpdk-testpmd+0x769343)\n #1 vhost_user_iotlb_msg ../lib/librte_vhost/vhost_user.c:2380 (dpdk-testpmd+0x78e4bf)\n #2 vhost_user_msg_handler ../lib/librte_vhost/vhost_user.c:2848 (dpdk-testpmd+0x78fcf8)\n #3 vhost_user_read_cb ../lib/librte_vhost/socket.c:311 (dpdk-testpmd+0x770162)\n #4 fdset_event_dispatch ../lib/librte_vhost/fd_man.c:286 (dpdk-testpmd+0x7591c2)\n #5 ctrl_thread_init ../lib/librte_eal/common/eal_common_thread.c:193 (dpdk-testpmd+0xa2890b)\n #6 <null> <null> (libtsan.so.0+0x2a68d)\n\n Previous read of size 8 at 0x00017ffd5628 by thread T3:\n #0 vhost_user_iotlb_cache_find ../lib/librte_vhost/iotlb.c:252 (dpdk-testpmd+0x76ee96)\n #1 __vhost_iova_to_vva ../lib/librte_vhost/vhost.c:42 (dpdk-testpmd+0x77488c)\n #2 vhost_iova_to_vva ../lib/librte_vhost/vhost.h:753 (dpdk-testpmd+0x7abeb3)\n #3 map_one_desc ../lib/librte_vhost/virtio_net.c:497 (dpdk-testpmd+0x7abeb3)\n #4 fill_vec_buf_packed ../lib/librte_vhost/virtio_net.c:751 (dpdk-testpmd+0x7abeb3)\n #5 vhost_enqueue_single_packed ../lib/librte_vhost/virtio_net.c:1170 (dpdk-testpmd+0x7abeb3)\n #6 virtio_dev_rx_single_packed ../lib/librte_vhost/virtio_net.c:1346 (dpdk-testpmd+0x7abeb3)\n #7 virtio_dev_rx_packed ../lib/librte_vhost/virtio_net.c:1384 (dpdk-testpmd+0x7abeb3)\n #8 virtio_dev_rx ../lib/librte_vhost/virtio_net.c:1435 (dpdk-testpmd+0x7b0654)\n #9 rte_vhost_enqueue_burst ../lib/librte_vhost/virtio_net.c:1465 (dpdk-testpmd+0x7b0654)\n #10 eth_vhost_tx ../drivers/net/vhost/rte_eth_vhost.c:470 (dpdk-testpmd+0x1ddfbd8)\n #11 rte_eth_tx_burst ../lib/librte_ethdev/rte_ethdev.h:4800 (dpdk-testpmd+0x505fdb)\n #12 pkt_burst_transmit ../app/test-pmd/txonly.c:365 (dpdk-testpmd+0x5106ad)\n #13 run_pkt_fwd_on_lcore ../app/test-pmd/testpmd.c:2080 (dpdk-testpmd+0x4f8951)\n #14 start_pkt_forward_on_core ../app/test-pmd/testpmd.c:2106 (dpdk-testpmd+0x4f89d7)\n #15 eal_thread_loop ../lib/librte_eal/linux/eal_thread.c:127 (dpdk-testpmd+0xa5b20a)\n #16 <null> <null> (libtsan.so.0+0x2a68d)\n\n Location is global '<null>' at 0x000000000000 (rtemap_0+0x00003ffd5628)\n\n Thread T5 'vhost-events' (tid=76933, running) created by main thread at:\n #0 pthread_create <null> (libtsan.so.0+0x2cd42)\n #1 rte_ctrl_thread_create ../lib/librte_eal/common/eal_common_thread.c:216 (dpdk-testpmd+0xa289e7)\n #2 rte_vhost_driver_start ../lib/librte_vhost/socket.c:1190 (dpdk-testpmd+0x7728ef)\n #3 vhost_driver_setup ../drivers/net/vhost/rte_eth_vhost.c:1028 (dpdk-testpmd+0x1de233d)\n #4 eth_dev_configure ../drivers/net/vhost/rte_eth_vhost.c:1126 (dpdk-testpmd+0x1de29cc)\n #5 rte_eth_dev_configure ../lib/librte_ethdev/rte_ethdev.c:1439 (dpdk-testpmd+0x991ce2)\n #6 start_port ../app/test-pmd/testpmd.c:2450 (dpdk-testpmd+0x4f9b45)\n #7 main ../app/test-pmd/testpmd.c:3777 (dpdk-testpmd+0x4fe1ac)\n\n Thread T3 'lcore-slave-3' (tid=76931, running) created by main thread at:\n #0 pthread_create <null> (libtsan.so.0+0x2cd42)\n #1 rte_eal_init ../lib/librte_eal/linux/eal.c:1244 (dpdk-testpmd+0xa46e2b)\n #2 main ../app/test-pmd/testpmd.c:3673 (dpdk-testpmd+0x4fdd75)\n\n--\n\nOr:\nWARNING: ThreadSanitizer: data race (pid=76927)\n Write of size 1 at 0x00017ffd00f8 by thread T5:\n #0 vhost_user_iotlb_cache_insert ../lib/librte_vhost/iotlb.c:182 (dpdk-testpmd+0x769370)\n #1 vhost_user_iotlb_msg ../lib/librte_vhost/vhost_user.c:2380 (dpdk-testpmd+0x78e4bf)\n #2 vhost_user_msg_handler ../lib/librte_vhost/vhost_user.c:2848 (dpdk-testpmd+0x78fcf8)\n #3 vhost_user_read_cb ../lib/librte_vhost/socket.c:311 (dpdk-testpmd+0x770162)\n #4 fdset_event_dispatch ../lib/librte_vhost/fd_man.c:286 (dpdk-testpmd+0x7591c2)\n #5 ctrl_thread_init ../lib/librte_eal/common/eal_common_thread.c:193 (dpdk-testpmd+0xa2890b)\n #6 <null> <null> (libtsan.so.0+0x2a68d)\n\n Previous write of size 1 at 0x00017ffd00f8 by thread T3:\n #0 vhost_user_iotlb_pending_insert ../lib/librte_vhost/iotlb.c:86 (dpdk-testpmd+0x75eb0c)\n #1 __vhost_iova_to_vva ../lib/librte_vhost/vhost.c:58 (dpdk-testpmd+0x774926)\n #2 vhost_iova_to_vva ../lib/librte_vhost/vhost.h:753 (dpdk-testpmd+0x7a79d1)\n #3 virtio_dev_rx_batch_packed ../lib/librte_vhost/virtio_net.c:1295 (dpdk-testpmd+0x7a79d1)\n #4 virtio_dev_rx_packed ../lib/librte_vhost/virtio_net.c:1376 (dpdk-testpmd+0x7a79d1)\n #5 virtio_dev_rx ../lib/librte_vhost/virtio_net.c:1435 (dpdk-testpmd+0x7b0654)\n #6 rte_vhost_enqueue_burst ../lib/librte_vhost/virtio_net.c:1465 (dpdk-testpmd+0x7b0654)\n #7 eth_vhost_tx ../drivers/net/vhost/rte_eth_vhost.c:470 (dpdk-testpmd+0x1ddfbd8)\n #8 rte_eth_tx_burst ../lib/librte_ethdev/rte_ethdev.h:4800 (dpdk-testpmd+0x505fdb)\n #9 pkt_burst_transmit ../app/test-pmd/txonly.c:365 (dpdk-testpmd+0x5106ad)\n #10 run_pkt_fwd_on_lcore ../app/test-pmd/testpmd.c:2080 (dpdk-testpmd+0x4f8951)\n #11 start_pkt_forward_on_core ../app/test-pmd/testpmd.c:2106 (dpdk-testpmd+0x4f89d7)\n #12 eal_thread_loop ../lib/librte_eal/linux/eal_thread.c:127 (dpdk-testpmd+0xa5b20a)\n #13 <null> <null> (libtsan.so.0+0x2a68d)\n\n--\n\nAs a consequence, the two threads can modify the same entry of the mempool.\nUsually, this cause a loop in iotlb_pending_entries list.\n\nFixes: d012d1f293f4 (\"vhost: add IOTLB helper functions\")\nSigned-off-by: Eugenio Pérez <eperezma@redhat.com>\n---\n lib/librte_vhost/iotlb.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)", "diff": "diff --git a/lib/librte_vhost/iotlb.c b/lib/librte_vhost/iotlb.c\nindex 5b3a0c090..e0b67721b 100644\n--- a/lib/librte_vhost/iotlb.c\n+++ b/lib/librte_vhost/iotlb.c\n@@ -321,8 +321,7 @@ vhost_user_iotlb_init(struct virtio_net *dev, int vq_index)\n \t\t\tIOTLB_CACHE_SIZE, sizeof(struct vhost_iotlb_entry), 0,\n \t\t\t0, 0, NULL, NULL, NULL, socket,\n \t\t\tMEMPOOL_F_NO_CACHE_ALIGN |\n-\t\t\tMEMPOOL_F_SP_PUT |\n-\t\t\tMEMPOOL_F_SC_GET);\n+\t\t\tMEMPOOL_F_SP_PUT);\n \tif (!vq->iotlb_pool) {\n \t\tVHOST_LOG_CONFIG(ERR,\n \t\t\t\t\"Failed to create IOTLB cache pool (%s)\\n\",\n", "prefixes": [ "1/1" ] }{ "id": 75333, "url": "