aboutsummaryrefslogtreecommitdiffstats
path: root/vpp/dpdk/dpdk-16.11_patches/0001-virtio-tx-with-can_push-when-VERSION_1-is-set.patch
diff options
context:
space:
mode:
authorsreejith <sreejith.surendrannair@linaro.org>2017-03-29 01:15:02 -0400
committersreejith <sreejith.surendrannair@linaro.org>2017-03-29 02:23:59 -0400
commita23197980e40d4d9414bcfaf59005a1dc2a89251 (patch)
treeda3fc5410a9cda99e05d2e0f6dae06072a0c50b8 /vpp/dpdk/dpdk-16.11_patches/0001-virtio-tx-with-can_push-when-VERSION_1-is-set.patch
parent746b57564deede624261ab8a96c94f562f24d22c (diff)
Added vpp intial source code from master branch 17.01.1
Change-Id: I81bdace6f330825a1746a853766779dfb24765fd Signed-off-by: sreejith <sreejith.surendrannair@linaro.org>
Diffstat (limited to 'vpp/dpdk/dpdk-16.11_patches/0001-virtio-tx-with-can_push-when-VERSION_1-is-set.patch')
-rw-r--r--vpp/dpdk/dpdk-16.11_patches/0001-virtio-tx-with-can_push-when-VERSION_1-is-set.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/vpp/dpdk/dpdk-16.11_patches/0001-virtio-tx-with-can_push-when-VERSION_1-is-set.patch b/vpp/dpdk/dpdk-16.11_patches/0001-virtio-tx-with-can_push-when-VERSION_1-is-set.patch
new file mode 100644
index 00000000..c2693568
--- /dev/null
+++ b/vpp/dpdk/dpdk-16.11_patches/0001-virtio-tx-with-can_push-when-VERSION_1-is-set.patch
@@ -0,0 +1,38 @@
+From b002b56c0c8a1790549c23d93f3d57ffc212c6da Mon Sep 17 00:00:00 2001
+From: Pierre Pfister <ppfister@cisco.com>
+Date: Tue, 8 Nov 2016 10:24:48 +0100
+Subject: [PATCH] virtio: tx with can_push when VERSION_1 is set
+
+Current virtio driver advertises VERSION_1 support,
+but does not handle device's VERSION_1 support when
+sending packets (it looks for ANY_LAYOUT feature,
+which is absent).
+
+This patch enables 'can_push' in tx path when VERSION_1
+is advertised by the device.
+
+This significantly improves small packets forwarding rate
+towards devices advertising VERSION_1 feature.
+
+Signed-off-by: Pierre Pfister <ppfister@cisco.com>
+---
+ drivers/net/virtio/virtio_rxtx.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
+index 22d97a4..1e5a6b9 100644
+--- a/drivers/net/virtio/virtio_rxtx.c
++++ b/drivers/net/virtio/virtio_rxtx.c
+@@ -1015,7 +1015,8 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+ }
+
+ /* optimize ring usage */
+- if (vtpci_with_feature(hw, VIRTIO_F_ANY_LAYOUT) &&
++ if ((vtpci_with_feature(hw, VIRTIO_F_ANY_LAYOUT) ||
++ vtpci_with_feature(hw, VIRTIO_F_VERSION_1)) &&
+ rte_mbuf_refcnt_read(txm) == 1 &&
+ RTE_MBUF_DIRECT(txm) &&
+ txm->nb_segs == 1 &&
+--
+2.7.4 (Apple Git-66)
+