From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkvnB-00083c-BM for qemu-devel@nongnu.org; Fri, 07 Jun 2013 08:29:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkvnA-0006V4-7m for qemu-devel@nongnu.org; Fri, 07 Jun 2013 08:29:17 -0400 Received: from mail-ea0-x22f.google.com ([2a00:1450:4013:c01::22f]:49658) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkvnA-0006V0-1W for qemu-devel@nongnu.org; Fri, 07 Jun 2013 08:29:16 -0400 Received: by mail-ea0-f175.google.com with SMTP id d15so3504104eaj.34 for ; Fri, 07 Jun 2013 05:29:15 -0700 (PDT) Date: Fri, 7 Jun 2013 14:29:12 +0200 From: Stefan Hajnoczi Message-ID: <20130607122912.GB11350@stefanha-thinkpad.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] difference between receive_raw() and receive() NetClientInfo methods ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luigi Rizzo Cc: Giuseppe Lettieri , qemu-devel , Vincenzo Maffione On Thu, Jun 06, 2013 at 11:40:37AM +0200, Luigi Rizzo wrote: > Can someone clarify what is the difference between the two methods > r > eceive_raw() and receive() in NetClientInfo ? receive_raw() builds an empty vnet header, if necessary. It is used to send a gratuitous ARP reply from inside QEMU. In the case where the NIC and its peer use vnet headers, packets generated by QEMU internally cannot use ->receive() since they don't know how to use the vnet header. ->receive_raw() takes care of that. Stefan