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 66BB32BCD for ; Wed, 30 Nov 2016 11:19:06 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 30 Nov 2016 02:19:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,573,1473145200"; d="scan'208";a="197349052" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by fmsmga004.fm.intel.com with ESMTP; 30 Nov 2016 02:19:04 -0800 Date: Wed, 30 Nov 2016 18:19:52 +0800 From: Yuanhan Liu To: "Pierre Pfister (ppfister)" Cc: "dev@dpdk.org" , Maxime Coquelin Message-ID: <20161130101952.GR5048@yliu-dev.sh.intel.com> References: <82834CFE-767C-41B0-9327-E64B8210E076@cisco.com> <46762894-5016-f634-c355-77af881685e6@redhat.com> <1FAE01C3-B03F-443A-A77C-579254A07E0E@cisco.com> <5c99bc35-839b-84b8-1df9-db80f288d7b7@redhat.com> <30923c66-8eaa-f7d4-2e6a-d65d8b254e8e@redhat.com> <6D3BD8A2-1567-42FA-9672-EE682D827A84@cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v2] virtio: tx with can_push when VERSION_1 is set 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, 30 Nov 2016 10:19:06 -0000 On Wed, Nov 30, 2016 at 09:18:42AM +0000, Pierre Pfister (ppfister) wrote: > Current virtio driver advertises VERSION_1 support, > but does not handle device's VERSION_1 support when > sending packets (it looks for ANY_LAYOUT feature, > which is absent). > > This patch enables 'can_push' in tx path when VERSION_1 > is advertised by the device. > > This significantly improves small packets forwarding rate > towards devices advertising VERSION_1 feature. > > Signed-off-by: Pierre Pfister >>From the virtio spec point of view, that VERSION_1 implies ANY_LAYOUT, this patch is right and I think we could apply this patch. No objections? --yliu > --- > drivers/net/virtio/virtio_rxtx.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c > index 22d97a4..1e5a6b9 100644 > --- a/drivers/net/virtio/virtio_rxtx.c > +++ b/drivers/net/virtio/virtio_rxtx.c > @@ -1015,7 +1015,8 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) > } > > /* optimize ring usage */ > - if (vtpci_with_feature(hw, VIRTIO_F_ANY_LAYOUT) && > + if ((vtpci_with_feature(hw, VIRTIO_F_ANY_LAYOUT) || > + vtpci_with_feature(hw, VIRTIO_F_VERSION_1)) && > rte_mbuf_refcnt_read(txm) == 1 && > RTE_MBUF_DIRECT(txm) && > txm->nb_segs == 1 && > -- > 2.7.4 (Apple Git-66)