From owner-freebsd-net@FreeBSD.ORG Mon Jan 5 17:00:46 2015 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E803886; Mon, 5 Jan 2015 17:00:46 +0000 (UTC) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 1DF5764028; Mon, 5 Jan 2015 17:00:45 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A74047300A; Mon, 5 Jan 2015 18:05:30 +0100 (CET) Date: Mon, 5 Jan 2015 18:05:30 +0100 From: Luigi Rizzo To: Adrian Chadd Subject: Re: netmap over virtio giving packets with extra 12 bytes Message-ID: <20150105170530.GB22916@onelab2.iet.unipi.it> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Avinash Sridharan , Vincenzo Maffione , "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2015 17:00:46 -0000 On Mon, Jan 05, 2015 at 08:33:17AM -0800, Adrian Chadd wrote: > ... surely virtio should be skipping over those bytes in the netmap rx > side before handing them up? > > (It won't be the only hardware that puts the RX descriptor status in > the RX frame itself..) it is not the rx descriptor, those 12 bytes are also present on the tx side. Think of them as an encapsulation whose presence is negotiated when KVM connects to the TAP port, and after that is present on all packets bidirectionally. Now, surely we could add/remove those bytes in the virtio-netmap code (at the price of an additional data copy). I need to investigate further. Avinash, could you tell us exactly your configuration -- what is the network backend for QEMU/KVM, and whether you are using virtio in native or emulated netmap mode ? cheers luigi