DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] virtio: tx with can_push when VERSION_1 is set
@ 2016-11-08  9:31 Pierre Pfister (ppfister)
  2016-11-08  9:44 ` Maxime Coquelin
  0 siblings, 1 reply; 11+ messages in thread
From: Pierre Pfister (ppfister) @ 2016-11-08  9:31 UTC (permalink / raw)
  To: dev

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 724517e..2fe0338 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -925,7 +925,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)

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-12-07  9:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-08  9:31 [dpdk-dev] [PATCH] virtio: tx with can_push when VERSION_1 is set Pierre Pfister (ppfister)
2016-11-08  9:44 ` Maxime Coquelin
2016-11-09 12:42   ` Pierre Pfister (ppfister)
2016-11-09 14:42     ` Maxime Coquelin
2016-11-09 14:51     ` Maxime Coquelin
2016-11-22  9:54       ` Pierre Pfister (ppfister)
2016-11-22 13:17         ` Maxime Coquelin
2016-11-30  9:09           ` Pierre Pfister (ppfister)
2016-11-30  9:18             ` [dpdk-dev] [PATCH v2] " Pierre Pfister (ppfister)
2016-11-30 10:19               ` Yuanhan Liu
2016-12-07  9:42               ` Yuanhan Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).