Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/7780/?format=api
https://patches.dpdk.org/api/patches/7780/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1445355007-4613-5-git-send-email-huawei.xie@intel.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": "<1445355007-4613-5-git-send-email-huawei.xie@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1445355007-4613-5-git-send-email-huawei.xie@intel.com", "date": "2015-10-20T15:30:04", "name": "[dpdk-dev,v3,4/7] virtio: fill RX avail ring with blank mbufs", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "e568406f3588a1e7d1bc6a76d90b4ac94eede300", "submitter": { "id": 16, "url": "https://patches.dpdk.org/api/people/16/?format=api", "name": "Huawei Xie", "email": "huawei.xie@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1445355007-4613-5-git-send-email-huawei.xie@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/7780/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/7780/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id A98C58E8E;\n\tTue, 20 Oct 2015 17:31:15 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 60A298E8D\n\tfor <dev@dpdk.org>; Tue, 20 Oct 2015 17:31:14 +0200 (CEST)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga101.fm.intel.com with ESMTP; 20 Oct 2015 08:30:49 -0700", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby FMSMGA003.fm.intel.com with ESMTP; 20 Oct 2015 08:30:48 -0700", "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t9KFUjJ4004630;\n\tTue, 20 Oct 2015 23:30:45 +0800", "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t9KFUg1e004675; Tue, 20 Oct 2015 23:30:44 +0800", "(from hxie5@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t9KFUgxV004671; \n\tTue, 20 Oct 2015 23:30:42 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.17,707,1437462000\"; d=\"scan'208\";a=\"584634486\"", "From": "Huawei Xie <huawei.xie@intel.com>", "To": "dev@dpdk.org", "Date": "Tue, 20 Oct 2015 23:30:04 +0800", "Message-Id": "<1445355007-4613-5-git-send-email-huawei.xie@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1445355007-4613-1-git-send-email-huawei.xie@intel.com>", "References": "<1443537953-23917-1-git-send-email-huawei.xie@intel.com>\n\t<1445355007-4613-1-git-send-email-huawei.xie@intel.com>", "Subject": "[dpdk-dev] [PATCH v3 4/7] virtio: fill RX avail ring with blank\n\tmbufs", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "fill avail ring with blank mbufs in virtio_dev_vring_start\n\nSigned-off-by: Huawei Xie <huawei.xie@intel.com>\n---\n drivers/net/virtio/Makefile | 2 +-\n drivers/net/virtio/virtio_rxtx.c | 6 ++-\n drivers/net/virtio/virtio_rxtx.h | 3 ++\n drivers/net/virtio/virtio_rxtx_simple.c | 84 +++++++++++++++++++++++++++++++++\n 4 files changed, 92 insertions(+), 3 deletions(-)\n create mode 100644 drivers/net/virtio/virtio_rxtx_simple.c", "diff": "diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile\nindex 930b60f..43835ba 100644\n--- a/drivers/net/virtio/Makefile\n+++ b/drivers/net/virtio/Makefile\n@@ -50,7 +50,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtqueue.c\n SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_pci.c\n SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx.c\n SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_ethdev.c\n-\n+SRCS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio_rxtx_simple.c\n \n # this lib depends upon:\n DEPDIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += lib/librte_eal lib/librte_ether\ndiff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c\nindex 7c82a6a..5162ce6 100644\n--- a/drivers/net/virtio/virtio_rxtx.c\n+++ b/drivers/net/virtio/virtio_rxtx.c\n@@ -320,8 +320,10 @@ virtio_dev_vring_start(struct virtqueue *vq, int queue_type)\n \t\t\t/******************************************\n \t\t\t* Enqueue allocated buffers *\n \t\t\t*******************************************/\n-\t\t\terror = virtqueue_enqueue_recv_refill(vq, m);\n-\n+\t\t\tif (use_simple_rxtx)\n+\t\t\t\terror = virtqueue_enqueue_recv_refill_simple(vq, m);\n+\t\t\telse\n+\t\t\t\terror = virtqueue_enqueue_recv_refill(vq, m);\n \t\t\tif (error) {\n \t\t\t\trte_pktmbuf_free(m);\n \t\t\t\tbreak;\ndiff --git a/drivers/net/virtio/virtio_rxtx.h b/drivers/net/virtio/virtio_rxtx.h\nindex a10aa69..7d2d8fe 100644\n--- a/drivers/net/virtio/virtio_rxtx.h\n+++ b/drivers/net/virtio/virtio_rxtx.h\n@@ -32,3 +32,6 @@\n */\n \n #define RTE_PMD_VIRTIO_RX_MAX_BURST 64\n+\n+int virtqueue_enqueue_recv_refill_simple(struct virtqueue *vq,\n+\tstruct rte_mbuf *m);\ndiff --git a/drivers/net/virtio/virtio_rxtx_simple.c b/drivers/net/virtio/virtio_rxtx_simple.c\nnew file mode 100644\nindex 0000000..cac5b9f\n--- /dev/null\n+++ b/drivers/net/virtio/virtio_rxtx_simple.c\n@@ -0,0 +1,84 @@\n+/*-\n+ * BSD LICENSE\n+ *\n+ * Copyright(c) 2010-2015 Intel Corporation. All rights reserved.\n+ * All rights reserved.\n+ *\n+ * Redistribution and use in source and binary forms, with or without\n+ * modification, are permitted provided that the following conditions\n+ * are met:\n+ *\n+ * * Redistributions of source code must retain the above copyright\n+ * notice, this list of conditions and the following disclaimer.\n+ * * Redistributions in binary form must reproduce the above copyright\n+ * notice, this list of conditions and the following disclaimer in\n+ * the documentation and/or other materials provided with the\n+ * distribution.\n+ * * Neither the name of Intel Corporation nor the names of its\n+ * contributors may be used to endorse or promote products derived\n+ * from this software without specific prior written permission.\n+ *\n+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#include <stdint.h>\n+#include <stdio.h>\n+#include <stdlib.h>\n+#include <string.h>\n+#include <errno.h>\n+\n+#include <tmmintrin.h>\n+\n+#include <rte_cycles.h>\n+#include <rte_memory.h>\n+#include <rte_memzone.h>\n+#include <rte_branch_prediction.h>\n+#include <rte_mempool.h>\n+#include <rte_malloc.h>\n+#include <rte_mbuf.h>\n+#include <rte_ether.h>\n+#include <rte_ethdev.h>\n+#include <rte_prefetch.h>\n+#include <rte_string_fns.h>\n+#include <rte_errno.h>\n+#include <rte_byteorder.h>\n+\n+#include \"virtio_logs.h\"\n+#include \"virtio_ethdev.h\"\n+#include \"virtqueue.h\"\n+#include \"virtio_rxtx.h\"\n+\n+int __attribute__((cold))\n+virtqueue_enqueue_recv_refill_simple(struct virtqueue *vq,\n+\tstruct rte_mbuf *cookie)\n+{\n+\tstruct vq_desc_extra *dxp;\n+\tstruct vring_desc *start_dp;\n+\tuint16_t desc_idx;\n+\n+\tdesc_idx = vq->vq_avail_idx & (vq->vq_nentries - 1);\n+\tdxp = &vq->vq_descx[desc_idx];\n+\tdxp->cookie = (void *)cookie;\n+\tvq->sw_ring[desc_idx] = cookie;\n+\n+\tstart_dp = vq->vq_ring.desc;\n+\tstart_dp[desc_idx].addr = (uint64_t)((uintptr_t)cookie->buf_physaddr +\n+\t\tRTE_PKTMBUF_HEADROOM - sizeof(struct virtio_net_hdr));\n+\tstart_dp[desc_idx].len = cookie->buf_len -\n+\t\tRTE_PKTMBUF_HEADROOM + sizeof(struct virtio_net_hdr);\n+\n+\tvq->vq_free_cnt--;\n+\tvq->vq_avail_idx++;\n+\n+\treturn 0;\n+}\n", "prefixes": [ "dpdk-dev", "v3", "4/7" ] }{ "id": 7780, "url": "