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]++;
> +     }
> +}
> +

Reply via email to