From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v4 2/2] net/vhost: add pmd xstats Date: Thu, 22 Sep 2016 10:09:03 +0800 Message-ID: <20160922020903.GG23158@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> <20160921105709.GE23158@yliu-dev.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev@dpdk.org" , "Van Haaren, Harry" , "thomas.monjalon@6wind.com" , "pmatilai@redhat.com" To: "Yang, Zhiyong" Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 02DAA5585 for ; Thu, 22 Sep 2016 04:08:27 +0200 (CEST) Content-Disposition: inline In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Sep 22, 2016 at 01:42:14AM +0000, Yang, Zhiyong wrote: > hi, yuanhan: > > > -----Original Message----- > > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com] > > Sent: Wednesday, September 21, 2016 6:57 PM > > To: Yang, Zhiyong > > Cc: dev@dpdk.org; Van Haaren, Harry ; > > thomas.monjalon@6wind.com; pmatilai@redhat.com > > Subject: Re: [PATCH v4 2/2] net/vhost: add pmd xstats > > > > 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"? > > > > Passing "struct rte_mbuf *mbuf" can reduce one parameter. But the function is small > and frequently invoked. So, I define it as the inline function, I think the two > types of definitions should have the same performance for inline function. > Should I modify it in next patch? Yes, since it's simpler. Besides, "count" doesn't make sense, judging that you just do one mbuf counting here. --yliu