Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/7991/?format=api
https://patches.dpdk.org/api/patches/7991/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1445787304-18267-8-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": "<1445787304-18267-8-git-send-email-huawei.xie@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1445787304-18267-8-git-send-email-huawei.xie@intel.com", "date": "2015-10-25T15:35:04", "name": "[dpdk-dev,v5,7/7] virtio: pick simple rx/tx func", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "da95d1a85569e2fa6a331d2273d697f37ce6fb4a", "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/1445787304-18267-8-git-send-email-huawei.xie@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/7991/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/7991/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 949378DA9;\n\tSun, 25 Oct 2015 16:35:31 +0100 (CET)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 864F88D95\n\tfor <dev@dpdk.org>; Sun, 25 Oct 2015 16:35:29 +0100 (CET)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga101.fm.intel.com with ESMTP; 25 Oct 2015 08:35:29 -0700", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 25 Oct 2015 08:35:29 -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 t9PFZQUP016133;\n\tSun, 25 Oct 2015 23:35:26 +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 t9PFZNvk018354; Sun, 25 Oct 2015 23:35:25 +0800", "(from hxie5@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t9PFZN3q018350; \n\tSun, 25 Oct 2015 23:35:23 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.20,196,1444719600\"; d=\"scan'208\";a=\"819022529\"", "From": "Huawei Xie <huawei.xie@intel.com>", "To": "dev@dpdk.org", "Date": "Sun, 25 Oct 2015 23:35:04 +0800", "Message-Id": "<1445787304-18267-8-git-send-email-huawei.xie@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1445787304-18267-1-git-send-email-huawei.xie@intel.com>", "References": "<1443537953-23917-1-git-send-email-huawei.xie@intel.com>\n\t<1445787304-18267-1-git-send-email-huawei.xie@intel.com>", "Subject": "[dpdk-dev] [PATCH v5 7/7] virtio: pick simple rx/tx func", "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": "Changes in v4:\nCheck merge-able feature when select simple rx/tx functions.\n\nsimple rx/tx func is chose when merge-able rx is disabled and user specifies single segment and\nno offload support.\n\nSigned-off-by: Huawei Xie <huawei.xie@intel.com>\n---\n drivers/net/virtio/virtio_rxtx.c | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)", "diff": "diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c\nindex 947fc46..0f1daf2 100644\n--- a/drivers/net/virtio/virtio_rxtx.c\n+++ b/drivers/net/virtio/virtio_rxtx.c\n@@ -53,6 +53,7 @@\n \n #include \"virtio_logs.h\"\n #include \"virtio_ethdev.h\"\n+#include \"virtio_pci.h\"\n #include \"virtqueue.h\"\n #include \"virtio_rxtx.h\"\n \n@@ -62,6 +63,10 @@\n #define VIRTIO_DUMP_PACKET(m, len) do { } while (0)\n #endif\n \n+\n+#define VIRTIO_SIMPLE_FLAGS ((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \\\n+\tETH_TXQ_FLAGS_NOOFFLOADS)\n+\n static int use_simple_rxtx;\n \n static void\n@@ -459,6 +464,7 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,\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+\tstruct virtio_hw *hw = dev->data->dev_private;\n \tstruct virtqueue *vq;\n \tuint16_t tx_free_thresh;\n \tint ret;\n@@ -471,6 +477,15 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,\n \t\treturn -EINVAL;\n \t}\n \n+\t/* Use simple rx/tx func if single segment and no offloads */\n+\tif ((tx_conf->txq_flags & VIRTIO_SIMPLE_FLAGS) == VIRTIO_SIMPLE_FLAGS &&\n+\t !vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {\n+\t\tPMD_INIT_LOG(INFO, \"Using simple rx/tx path\");\n+\t\tdev->tx_pkt_burst = virtio_xmit_pkts_simple;\n+\t\tdev->rx_pkt_burst = virtio_recv_pkts_vec;\n+\t\tuse_simple_rxtx = 1;\n+\t}\n+\n \tret = virtio_dev_queue_setup(dev, VTNET_TQ, queue_idx, vtpci_queue_idx,\n \t\t\tnb_desc, socket_id, &vq);\n \tif (ret < 0) {\n", "prefixes": [ "dpdk-dev", "v5", "7/7" ] }{ "id": 7991, "url": "