virtio: remove broadcast packets from multicast statistics
authorIgor Ryzhov <iryzhov@nfware.com>
Fri, 26 Feb 2016 15:01:23 +0000 (18:01 +0300)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 16 Mar 2016 17:52:18 +0000 (18:52 +0100)
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Applied with coding standards fixes:
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
drivers/net/virtio/virtio_rxtx.c

index a7a58be..12da0aa 100644 (file)
@@ -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