From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by dpdk.org (Postfix) with ESMTP id 62AB5569A for ; Fri, 26 Feb 2016 16:01:52 +0100 (CET) Received: by mail-lb0-f182.google.com with SMTP id ep2so16148292lbb.0 for ; Fri, 26 Feb 2016 07:01:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfware-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=FvEaUogPom/MLUNfftJUaZ+uLA5iZIasGxm/qs9Gojc=; b=mKKkTv9VPhyCad3m7AwLmLbAu0pZhTi+HFnwkA0/6BhE7/8dzG3L08y91cjUtQo8KY 3gAoHimjX74gKSaDtlbX38xpEUZipAtVEc1Sl8Wx/XkUpLufPBfis9Bq58ImeCNoPMWe xDTluG9qH18Xsk3u+Th912wZPSE/XO1EyqLjvzIIAYaN2SvjFlpfSoNSmUSDxAFlYD6T Yx3MXhMtMgTnOGCwYoNCrdASvxi3me1p1PWtcyobNnkCYLSy1jCpljX/E5yMHMKKAt3f QJY4UCMFx/OYqXeLa4tl3mZTdO8jh34KuyqeyNALit6FrDLu/bJp/LeLI5IOsvi940DS BLaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=FvEaUogPom/MLUNfftJUaZ+uLA5iZIasGxm/qs9Gojc=; b=UZgh5seJT2ehGPwlrpdHfKbgiem9cfS8ZO5HN02H27lwBljHlwMw5bcA42joAmFSwv XPrLzDC3SQVcv5igQDJpaFqfR6K2/c4F5yD+NQPC3LOg7VohYESH164MzUlvWlzhVaRt 4B+Eo+Yi6Bs7P4xW41D4vGqe4fbsM4NLUVIelC4sDqkz7tVXCJYvrDLTtuqCXi5S0TRL eVn95YxtQQZzt3y2grzy0qR7j61ocmsuVC0qy8sPWxOL+wNFw7DE4ch89EurSlNIJaEh P9E74LTiw3Ec4pZJmQG+o8Ef+mFoD4ZN8VCMQoBNWjMUPVe7vXd19Vvsuo/Ydfh5qyZM brKg== X-Gm-Message-State: AD7BkJJKxrT1kPjgbcGcGYXc9p33sXwUC1aPOd615wVgEo6PQKEALXUG7OMie74hXBUGlQ== X-Received: by 10.112.91.38 with SMTP id cb6mr798823lbb.35.1456498912121; Fri, 26 Feb 2016 07:01:52 -0800 (PST) Received: from localhost.localdomain (vpn.arccn.ru. [95.182.74.2]) by smtp.gmail.com with ESMTPSA id rt10sm1878083lbb.35.2016.02.26.07.01.51 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 26 Feb 2016 07:01:51 -0800 (PST) From: Igor Ryzhov To: dev@dpdk.org Date: Fri, 26 Feb 2016 18:01:23 +0300 Message-Id: <1456498883-58648-1-git-send-email-iryzhov@nfware.com> X-Mailer: git-send-email 2.6.4 Subject: [dpdk-dev] [PATCH] virtio: don't count broadcast packets in multicast packets counter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2016 15:01:52 -0000 Signed-off-by: Igor Ryzhov --- 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