Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/42062/?format=api
http://patches.dpdk.org/api/patches/42062/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180702135642.52577-9-yong.liu@intel.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": "<20180702135642.52577-9-yong.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180702135642.52577-9-yong.liu@intel.com", "date": "2018-07-02T13:56:41", "name": "[v5,8/9] net/virtio: add in-order Rx/Tx into selection", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "cd1324ed64e3811d955e1c618ed8eaf369005c94", "submitter": { "id": 17, "url": "http://patches.dpdk.org/api/people/17/?format=api", "name": "Marvin Liu", "email": "yong.liu@intel.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/20180702135642.52577-9-yong.liu@intel.com/mbox/", "series": [ { "id": 345, "url": "http://patches.dpdk.org/api/series/345/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=345", "date": "2018-07-02T13:56:33", "name": "support in-order feature", "version": 5, "mbox": "http://patches.dpdk.org/series/345/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/42062/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/42062/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id BA9825B3E;\n\tMon, 2 Jul 2018 08:11:22 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 890165689\n\tfor <dev@dpdk.org>; Mon, 2 Jul 2018 08:11:16 +0200 (CEST)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t01 Jul 2018 23:11:16 -0700", "from dpdk-test32.sh.intel.com ([10.67.119.193])\n\tby orsmga005.jf.intel.com with ESMTP; 01 Jul 2018 23:11:15 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.51,298,1526367600\"; d=\"scan'208\";a=\"237141607\"", "From": "Marvin Liu <yong.liu@intel.com>", "To": "maxime.coquelin@redhat.com,\n\ttiwei.bie@intel.com", "Cc": "zhihong.wang@intel.com,\n\tdev@dpdk.org,\n\tMarvin Liu <yong.liu@intel.com>", "Date": "Mon, 2 Jul 2018 21:56:41 +0800", "Message-Id": "<20180702135642.52577-9-yong.liu@intel.com>", "X-Mailer": "git-send-email 2.17.0", "In-Reply-To": "<20180702135642.52577-1-yong.liu@intel.com>", "References": "<20180702135642.52577-1-yong.liu@intel.com>", "Subject": "[dpdk-dev] [PATCH v5 8/9] net/virtio: add in-order Rx/Tx into\n\tselection", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "After IN_ORDER Rx/Tx paths added, need to update Rx/Tx path selection\nlogic.\n\nRx path select logic: If IN_ORDER and merge-able are enabled will select\nIN_ORDER Rx path. If IN_ORDER is enabled, Rx offload and merge-able are\ndisabled will select simple Rx path. Otherwise will select normal Rx\npath.\n\nTx path select logic: If IN_ORDER is enabled will select IN_ORDER Tx\npath. Otherwise will select default Tx path.\n\nSigned-off-by: Marvin Liu <yong.liu@intel.com>\nReviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>", "diff": "diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst\nindex 46e292c4d..7c099fb7c 100644\n--- a/doc/guides/nics/virtio.rst\n+++ b/doc/guides/nics/virtio.rst\n@@ -201,7 +201,7 @@ The packet transmission flow is:\n Virtio PMD Rx/Tx Callbacks\n --------------------------\n \n-Virtio driver has 3 Rx callbacks and 2 Tx callbacks.\n+Virtio driver has 4 Rx callbacks and 3 Tx callbacks.\n \n Rx callbacks:\n \n@@ -215,6 +215,9 @@ Rx callbacks:\n Vector version without mergeable Rx buffer support, also fixes the available\n ring indexes and uses vector instructions to optimize performance.\n \n+#. ``virtio_recv_mergeable_pkts_inorder``:\n+ In-order version with mergeable Rx buffer support.\n+\n Tx callbacks:\n \n #. ``virtio_xmit_pkts``:\n@@ -223,6 +226,8 @@ Tx callbacks:\n #. ``virtio_xmit_pkts_simple``:\n Vector version fixes the available ring indexes to optimize performance.\n \n+#. ``virtio_xmit_pkts_inorder``:\n+ In-order version.\n \n By default, the non-vector callbacks are used:\n \n@@ -254,6 +259,12 @@ Example of using the vector version of the virtio poll mode driver in\n \n testpmd -l 0-2 -n 4 -- -i --tx-offloads=0x0 --rxq=1 --txq=1 --nb-cores=1\n \n+In-order callbacks only work on simulated virtio user vdev.\n+\n+* For Rx: If mergeable Rx buffers is enabled and in-order is enabled then\n+ ``virtio_xmit_pkts_inorder`` is used.\n+\n+* For Tx: If in-order is enabled then ``virtio_xmit_pkts_inorder`` is used.\n \n Interrupt mode\n --------------\ndiff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex df50a571a..df7981ddb 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -1320,6 +1320,11 @@ set_rxtx_funcs(struct rte_eth_dev *eth_dev)\n \t\tPMD_INIT_LOG(INFO, \"virtio: using simple Rx path on port %u\",\n \t\t\teth_dev->data->port_id);\n \t\teth_dev->rx_pkt_burst = virtio_recv_pkts_vec;\n+\t} else if (hw->use_inorder_rx) {\n+\t\tPMD_INIT_LOG(INFO,\n+\t\t\t\"virtio: using inorder mergeable buffer Rx path on port %u\",\n+\t\t\teth_dev->data->port_id);\n+\t\teth_dev->rx_pkt_burst = &virtio_recv_mergeable_pkts_inorder;\n \t} else if (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {\n \t\tPMD_INIT_LOG(INFO,\n \t\t\t\"virtio: using mergeable buffer Rx path on port %u\",\n@@ -1335,6 +1340,10 @@ set_rxtx_funcs(struct rte_eth_dev *eth_dev)\n \t\tPMD_INIT_LOG(INFO, \"virtio: using simple Tx path on port %u\",\n \t\t\teth_dev->data->port_id);\n \t\teth_dev->tx_pkt_burst = virtio_xmit_pkts_simple;\n+\t} else if (hw->use_inorder_tx) {\n+\t\tPMD_INIT_LOG(INFO, \"virtio: using inorder Tx path on port %u\",\n+\t\t\teth_dev->data->port_id);\n+\t\teth_dev->tx_pkt_burst = virtio_xmit_pkts_inorder;\n \t} else {\n \t\tPMD_INIT_LOG(INFO, \"virtio: using standard Tx path on port %u\",\n \t\t\teth_dev->data->port_id);\n@@ -1874,20 +1883,27 @@ virtio_dev_configure(struct rte_eth_dev *dev)\n \thw->use_simple_rx = 1;\n \thw->use_simple_tx = 1;\n \n+\tif (vtpci_with_feature(hw, VIRTIO_F_IN_ORDER)) {\n+\t\t/* Simple Tx not compatible with in-order ring */\n+\t\thw->use_inorder_tx = 1;\n+\t\thw->use_simple_tx = 0;\n+\t\tif (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {\n+\t\t\thw->use_inorder_rx = 1;\n+\t\t\thw->use_simple_rx = 0;\n+\t\t} else {\n+\t\t\thw->use_inorder_rx = 0;\n+\t\t\tif (rx_offloads & (DEV_RX_OFFLOAD_UDP_CKSUM |\n+\t\t\t\t\t DEV_RX_OFFLOAD_TCP_CKSUM))\n+\t\t\t\thw->use_simple_rx = 0;\n+\t\t}\n+\t}\n+\n #if defined RTE_ARCH_ARM64 || defined RTE_ARCH_ARM\n \tif (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_NEON)) {\n \t\thw->use_simple_rx = 0;\n \t\thw->use_simple_tx = 0;\n \t}\n #endif\n-\tif (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {\n-\t\thw->use_simple_rx = 0;\n-\t\thw->use_simple_tx = 0;\n-\t}\n-\n-\tif (rx_offloads & (DEV_RX_OFFLOAD_UDP_CKSUM |\n-\t\t\t DEV_RX_OFFLOAD_TCP_CKSUM))\n-\t\thw->use_simple_rx = 0;\n \n \treturn 0;\n }\n", "prefixes": [ "v5", "8/9" ] }{ "id": 42062, "url": "