From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48083) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4086-0008Pd-0f for qemu-devel@nongnu.org; Thu, 16 Jan 2014 22:30:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W407z-0001WW-Jh for qemu-devel@nongnu.org; Thu, 16 Jan 2014 22:29:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W407z-0001WQ-3h for qemu-devel@nongnu.org; Thu, 16 Jan 2014 22:29:51 -0500 Date: Fri, 17 Jan 2014 11:29:39 +0800 From: Stefan Hajnoczi Message-ID: <20140117032939.GD16061@stefanha-thinkpad.redhat.com> References: <1389697190-6198-1-git-send-email-v.maffione@gmail.com> <1389697190-6198-3-git-send-email-v.maffione@gmail.com> <20140116092933.GA21761@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140116092933.GA21761@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 2/6] net: removing tap_using_vnet_hdr() function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: marcel.a@redhat.com, jasowang@redhat.com, qemu-devel@nongnu.org, Vincenzo Maffione , lcapitulino@redhat.com, aliguori@amazon.com, dmitry@daynix.com, pbonzini@redhat.com, g.lettieri@iet.unipi.it, rizzo@iet.unipi.it On Thu, Jan 16, 2014 at 11:29:34AM +0200, Michael S. Tsirkin wrote: > On Tue, Jan 14, 2014 at 11:59:46AM +0100, Vincenzo Maffione wrote: > > This function was used to set the using_vnet_hdr field into the > > TAPState struct. However, it is always called immediately before > > (see virtio-net.c) or immediately after (see vmxnet3.c) the function > > tap_set_vnet_hdr_len(). It's therefore possible to set the > > using_vnet_hdr field directly in tap_set_vnet_hdr_len() and remove > > tap_using_vnet_hdr(), making the code simpler. > > > > Signed-off-by: Vincenzo Maffione > > > virtio net only calls tap_set_vnet_hdr_len if tap_has_vnet_hdr_len > returns true. > I think this patch will break old linux hosts which don't support > modifying vnet_hdr_len. This is a good point. Let's leave the API alone then. Stefan