From: Igor Ryzhov Date: Fri, 26 Feb 2016 15:01:23 +0000 (+0300) Subject: virtio: remove broadcast packets from multicast statistics X-Git-Tag: spdx-start~7287 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=64a7619ee82a8215db060bcf9b6e04fed51f794f;p=dpdk.git virtio: remove broadcast packets from multicast statistics Signed-off-by: Igor Ryzhov Acked-by: Harry van Haaren Acked-by: Yuanhan Liu Applied with coding standards fixes: Signed-off-by: Bruce Richardson --- diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index a7a58be630..12da0aa839 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -557,8 +557,12 @@ 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