Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754060Ab1EDQPA (ORCPT ); Wed, 4 May 2011 12:15:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1450 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751008Ab1EDQO7 (ORCPT ); Wed, 4 May 2011 12:14:59 -0400 Date: Wed, 4 May 2011 19:14:40 +0300 From: "Michael S. Tsirkin" To: Shirley Ma Cc: David Miller , Eric Dumazet , Avi Kivity , Arnd Bergmann , netdev@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V4 5/8]macvtap: macvtap TX zero-copy support Message-ID: <20110504161440.GD15648@redhat.com> References: <1304496893.20660.88.camel@localhost.localdomain> <20110504145819.GA15648@redhat.com> <1304523449.7076.30.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1304523449.7076.30.camel@localhost.localdomain> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1647 Lines: 49 On Wed, May 04, 2011 at 08:37:29AM -0700, Shirley Ma wrote: > On Wed, 2011-05-04 at 17:58 +0300, Michael S. Tsirkin wrote: > > On Wed, May 04, 2011 at 01:14:53AM -0700, Shirley Ma wrote: > > > Only when buffer size is greater than GOODCOPY_LEN (256), macvtap > > > enables zero-copy. > > > > > > Signed-off-by: Shirley Ma > > > > > > Looks good. Some thoughts below. > > > > > --- > > > > > > drivers/net/macvtap.c | 126 > > ++++++++++++++++++++++++++++++++++++++++++++---- > > > 1 files changed, 115 insertions(+), 11 deletions(-) > > > > > > diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c > > > index 6696e56..e8bc5ff 100644 > > > --- a/drivers/net/macvtap.c > > > +++ b/drivers/net/macvtap.c > > > @@ -60,6 +60,7 @@ static struct proto macvtap_proto = { > > > */ > > > static dev_t macvtap_major; > > > #define MACVTAP_NUM_DEVS 65536 > > > +#define GOODCOPY_LEN 256 > > > > Scope with MACVTAP_ please. > Ok. > > > For small packets, is it better to copy in vhost > > and skip all the back and forth with callbacks? If yes, does > > it make sense to put the constant above in some header > > shared with vhost-net? > > skb is created in macvtap, the small packet copy is in skb, so I don't > think we can do it in vhost here. BTW this is not very important, it might or might not result in some speedup. Let's focus on getting it working right. -- MST -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/