From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBPnM-0001An-WA for qemu-devel@nongnu.org; Thu, 06 Feb 2014 09:19:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBPnE-0000rS-Bj for qemu-devel@nongnu.org; Thu, 06 Feb 2014 09:19:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBPnE-0000rC-3i for qemu-devel@nongnu.org; Thu, 06 Feb 2014 09:19:04 -0500 Date: Thu, 6 Feb 2014 15:18:45 +0100 From: Stefan Hajnoczi Message-ID: <20140206141845.GA29457@stefanha-thinkpad.brq.redhat.com> References: <1390237625-29304-1-git-send-email-v.maffione@gmail.com> <1390237625-29304-4-git-send-email-v.maffione@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1390237625-29304-4-git-send-email-v.maffione@gmail.com> Subject: Re: [Qemu-devel] [PATCH v3 3/5] net: TAP uses NetClientInfo offloading callbacks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vincenzo Maffione Cc: marcel.a@redhat.com, jasowang@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, aliguori@amazon.com, dmitry@daynix.com, pbonzini@redhat.com, g.lettieri@iet.unipi.it, rizzo@iet.unipi.it On Mon, Jan 20, 2014 at 06:07:03PM +0100, Vincenzo Maffione wrote: > The TAP NetClientInfo structure is inizialized with the TAP-specific > functions that manipulates offloading features. > > Signed-off-by: Vincenzo Maffione > --- > net/tap.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/net/tap.c b/net/tap.c > index c805f3c..d34ec88 100644 > --- a/net/tap.c > +++ b/net/tap.c > @@ -314,6 +314,12 @@ static NetClientInfo net_tap_info = { > .receive_iov = tap_receive_iov, > .poll = tap_poll, > .cleanup = tap_cleanup, > + .has_ufo = tap_has_ufo, > + .has_vnet_hdr = tap_has_vnet_hdr, > + .has_vnet_hdr_len = tap_has_vnet_hdr_len, > + .using_vnet_hdr = tap_using_vnet_hdr, > + .set_offload = tap_set_offload, > + .set_vnet_hdr_len = tap_set_vnet_hdr_len, > }; > > static TAPState *net_tap_fd_init(NetClientState *peer, Please make these tap_*() functions static. They do not need to be accessed from outside this source file. I also noticed that you didn't touch tap-win32.c. I guess it should also assign its tap_has_ufo() and similar functions. (tap-win32.c declares its own net_tap_info struct.) Here, we can also make the functions static.