DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] virtio: don't count broadcast packets in multicast packets counter
@ 2016-02-26 15:01 Igor Ryzhov
  2016-02-26 15:14 ` Van Haaren, Harry
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Igor Ryzhov @ 2016-02-26 15:01 UTC (permalink / raw)
  To: dev

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
---
 drivers/net/virtio/virtio_rxtx.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 41a1366..fe18e1d 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -543,8 +543,13 @@ virtio_update_packet_stats(struct virtqueue *vq, struct rte_mbuf *mbuf)
 	}
 
 	ea = rte_pktmbuf_mtod(mbuf, struct ether_addr *);
-	vq->multicast += is_multicast_ether_addr(ea);
-	vq->broadcast += is_broadcast_ether_addr(ea);
+	if (is_multicast_ether_addr(ea)) {
+		if (is_broadcast_ether_addr(ea)) {
+			vq->broadcast++;
+		} else {
+			vq->multicast++;
+		}
+	}
 }
 
 #define VIRTIO_MBUF_BURST_SZ 64
-- 
2.6.4

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

end of thread, other threads:[~2016-03-09 15:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-26 15:01 [dpdk-dev] [PATCH] virtio: don't count broadcast packets in multicast packets counter Igor Ryzhov
2016-02-26 15:14 ` Van Haaren, Harry
2016-02-29  3:52 ` Yuanhan Liu
2016-03-09 15:12 ` Bruce Richardson

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).