From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tiwei Bie Subject: [RFC 16/29] net/virtio: avoid touching packet data Date: Wed, 21 Jun 2017 10:57:52 +0800 Message-ID: <1498013885-102779-17-git-send-email-tiwei.bie@intel.com> References: <1498013885-102779-1-git-send-email-tiwei.bie@intel.com> To: dev@dpdk.org Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id A44945599 for ; Wed, 21 Jun 2017 04:59:38 +0200 (CEST) In-Reply-To: <1498013885-102779-1-git-send-email-tiwei.bie@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" For performance testing purpose, avoid touching the packet data when receiving packets. Signed-off-by: Tiwei Bie --- drivers/net/virtio/virtio_rxtx.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 3be64da..93d564f 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -139,7 +139,9 @@ virtqueue_dequeue_burst_rx_1_0(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); @@ -174,7 +176,9 @@ virtqueue_dequeue_burst_rx_1_1(struct virtqueue *vq, struct rte_mbuf **rx_pkts, vq->vq_descx[used_idx].cookie = NULL; rte_prefetch0(cookie); +#if 0 rte_packet_prefetch(rte_pktmbuf_mtod(cookie, void *)); +#endif rx_pkts[i] = cookie; vq->vq_used_cons_idx++; @@ -568,7 +572,9 @@ 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]++; @@ -587,6 +593,7 @@ 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)) @@ -594,6 +601,7 @@ virtio_update_packet_stats(struct virtnet_stats *stats, struct rte_mbuf *mbuf) else stats->multicast++; } +#endif } /* Optionally fill offload information in structure */ -- 2.7.4