From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id F2DB2374E for ; Wed, 21 Sep 2016 12:56:41 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP; 21 Sep 2016 03:56:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,373,1470726000"; d="scan'208";a="764054986" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by FMSMGA003.fm.intel.com with ESMTP; 21 Sep 2016 03:56:39 -0700 Date: Wed, 21 Sep 2016 18:57:09 +0800 From: Yuanhan Liu To: Zhiyong Yang Cc: dev@dpdk.org, harry.van.haaren@intel.com, thomas.monjalon@6wind.com, pmatilai@redhat.com Message-ID: <20160921105709.GE23158@yliu-dev.sh.intel.com> References: <1474364205-111569-2-git-send-email-zhiyong.yang@intel.com> <1474452355-57106-1-git-send-email-zhiyong.yang@intel.com> <1474452355-57106-3-git-send-email-zhiyong.yang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1474452355-57106-3-git-send-email-zhiyong.yang@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v4 2/2] net/vhost: add pmd xstats 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: Wed, 21 Sep 2016 10:56:42 -0000 On Wed, Sep 21, 2016 at 06:05:55PM +0800, Zhiyong Yang wrote: > +static inline void > +vhost_count_multicast_broadcast(struct vhost_queue *vq, > + struct rte_mbuf **bufs, > + uint16_t count) Hmm.. why not just passing "struct rte_mbuf *mbuf"? --yliu > +{ > + struct ether_addr *ea = NULL; > + struct vhost_stats *pstats = &vq->stats; > + > + ea = rte_pktmbuf_mtod(bufs[count], struct ether_addr *); > + if (is_multicast_ether_addr(ea)) { > + if (is_broadcast_ether_addr(ea)) > + pstats->xstats[VHOST_BROADCAST_PKT]++; > + else > + pstats->xstats[VHOST_MULTICAST_PKT]++; > + } > +} > +