From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 403482A58 for ; Tue, 1 Nov 2016 09:15:09 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP; 01 Nov 2016 01:14:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,579,1473145200"; d="scan'208";a="26381026" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga004.jf.intel.com with ESMTP; 01 Nov 2016 01:14:53 -0700 Date: Tue, 1 Nov 2016 16:15:44 +0800 From: Yuanhan Liu To: Maxime Coquelin Message-ID: <20161101081544.GP16751@yliu-dev.sh.intel.com> References: <70cc3b89-d680-1519-add3-f38b228e65b5@redhat.com> <20161017132121.GG16751@yliu-dev.sh.intel.com> <8F6C2BD409508844A0EFC19955BE09414E7D8BDF@SHSMSX103.ccr.corp.intel.com> <7a987be6-feec-0639-211a-462cf2b44514@redhat.com> <8F6C2BD409508844A0EFC19955BE09414E7D8C3B@SHSMSX103.ccr.corp.intel.com> <79DA8EFC-215C-4075-8D1A-FF81EC3CBB21@cisco.com> <108f3c0a-bef5-5124-fde6-01fa9870c970@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <108f3c0a-bef5-5124-fde6-01fa9870c970@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "mst@redhat.com" , "dev@dpdk.org" , "vkaplans@redhat.com" Subject: Re: [dpdk-dev] [PATCH v4] vhost: Add indirect descriptors support to the TX path 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: Tue, 01 Nov 2016 08:15:09 -0000 On Fri, Oct 28, 2016 at 09:58:51AM +0200, Maxime Coquelin wrote: > >From my experience, and as Michael pointed out, the best mode for small packets is obviously > >ANY_LAYOUT so it uses a single descriptor per packet. > Of course, having a single descriptor is in theory the best way. > But, in current Virtio PMD implementation, with no offload supported, we > never access the virtio header at transmit time, it is allocated and > zeroed at startup. > > For ANY_LAYOUT case, the virtio header is prepended to the packet, and > need to be zeroed at packet transmit time. The performance impact is > quite important, as show the measurements I made one month ago (txonly): > - 2 descs per packet: 11.6Mpps > - 1 desc per packet: 9.6Mpps > > As Michael suggested, I tried to replace the memset by direct > fields assignation, but it only recovers a small part of the drop. > > What I suggested is to introduce a new feature, so that we can skip the > virtio header when no offload is negotiated. > > Maybe you have other ideas? > > >So, disabling indirect descriptors may give you better pps for 64 bytes packets, but that doesn't mean you should not implement, or enable, it in your driver. That just means that the guest is not taking the right decision, and uses indirect while it should actually use any_layout. > +1, it really depends on the use-case. > > > >Given virtio/vhost design (most decision comes from the guest), the host should be liberal in what it accepts, and not try to influence guest implementation by carefully picking the features it supports. Otherwise guests will never get a chance to make the right decisions either. > Agree, what we need is to be able to disable Virtio PMD features > without having to rebuild the PMD. I want this feature (or more precisely, ability) long times ago. For example, I'd wish there is an option like "force_legacy" when both legacy and modern exist. > It will certainly require an new API change to add this option. I don't think it will work. Firstly, generally, as discussed before, it's not a good idea to introduce some PMD specific APIs. Secondly, even if it's okay to do so, you need to let the application (say testpmd) invoke it. Once you have done that, you need introduce some CLI options to make sure that part is invoked. And as stated before, it's also not a good idea to add virtio PMD specific CLI options to testpmd. For this case, however, I think it makes more sense if test provides some commands to enable/disable csum and tso stuff. With that, we could enable it dynamically. It has "tso set/show" commands though: it just doesn't look like the right interface to me to enable/disable tso. --yliu