DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tiwei Bie <tiwei.bie@intel.com>
To: dev@dpdk.org, jfreiman@redhat.com
Subject: [dpdk-dev] [RFC 4/6] net/virtio: revert the changes in 18dc1b1ac
Date: Tue, 18 Jul 2017 23:40:19 +0800	[thread overview]
Message-ID: <1500392421-76672-5-git-send-email-tiwei.bie@intel.com> (raw)
In-Reply-To: <1500392421-76672-1-git-send-email-tiwei.bie@intel.com>

Revert the changes in 18dc1b1ac, because we want to test the
performance similar to the real world case.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
 drivers/net/virtio/virtio_rxtx.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 3983626..7be9aae 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -139,9 +139,7 @@ virtqueue_dequeue_burst_rx(struct virtqueue *vq, struct rte_mbuf **rx_pkts,
 		}
 
 		rte_prefetch0(cookie);
-#if 0
 		rte_packet_prefetch(rte_pktmbuf_mtod(cookie, void *));
-#endif
 		rx_pkts[i]  = cookie;
 		vq->vq_used_cons_idx++;
 		vq_ring_free_chain(vq, desc_idx);
@@ -512,9 +510,7 @@ static void
 virtio_update_packet_stats(struct virtnet_stats *stats, struct rte_mbuf *mbuf)
 {
 	uint32_t s = mbuf->pkt_len;
-#if 0
 	struct ether_addr *ea;
-#endif
 
 	if (s == 64) {
 		stats->size_bins[1]++;
@@ -533,7 +529,6 @@ virtio_update_packet_stats(struct virtnet_stats *stats, struct rte_mbuf *mbuf)
 			stats->size_bins[7]++;
 	}
 
-#if 0
 	ea = rte_pktmbuf_mtod(mbuf, struct ether_addr *);
 	if (is_multicast_ether_addr(ea)) {
 		if (is_broadcast_ether_addr(ea))
@@ -541,7 +536,6 @@ virtio_update_packet_stats(struct virtnet_stats *stats, struct rte_mbuf *mbuf)
 		else
 			stats->multicast++;
 	}
-#endif
 }
 
 /* Optionally fill offload information in structure */
@@ -664,6 +658,9 @@ virtio_recv_pkts_1_1(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts
 
 		dxp = &vq->vq_descx[used_idx & (vq->vq_nentries - 1)];
 
+		rte_packet_prefetch(rte_pktmbuf_mtod(
+				(struct rte_mbuf *)dxp->cookie, void *));
+
 		len = desc->len;
 		rxm = dxp->cookie;
 		dxp->cookie = nmb;
-- 
2.7.4

  parent reply	other threads:[~2017-07-18 15:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18 15:40 [dpdk-dev] [RFC 0/6] virtio1.1 prototype updates Tiwei Bie
2017-07-18 15:40 ` [dpdk-dev] [RFC 1/6] net/virtio: optimize the rx path Tiwei Bie
2017-07-18 15:40 ` [dpdk-dev] [RFC 2/6] vhost: optimize enqueue path Tiwei Bie
2017-07-18 15:40 ` [dpdk-dev] [RFC 3/6] net/virtio: optimize the tx path Tiwei Bie
2017-07-18 15:40 ` Tiwei Bie [this message]
2017-07-18 15:40 ` [dpdk-dev] [RFC 5/6] vhost: minor refinement Tiwei Bie
2017-07-18 15:40 ` [dpdk-dev] [RFC 6/6] virtio1.1: introduce the DESC_WB flag Tiwei Bie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1500392421-76672-5-git-send-email-tiwei.bie@intel.com \
    --to=tiwei.bie@intel.com \
    --cc=dev@dpdk.org \
    --cc=jfreiman@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).