For performance testing purpose, avoid touching the packet data when receiving packets.
Signed-off-by: Tiwei Bie <tiwei....@intel.com> --- 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