From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: Add qemu_send_raw() to vlan. Date: Thu, 15 Oct 2009 19:46:44 -0300 Message-ID: <20091015224644.GA17457@amt.cnet> References: <20090526100302.GS3948@redhat.com> <1255590285.2726.27.camel@blaa> <20091015073312.GC30889@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Mark McLoughlin , avi@redhat.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:3760 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758737AbZJOWr3 (ORCPT ); Thu, 15 Oct 2009 18:47:29 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9FMl3ei017606 for ; Thu, 15 Oct 2009 18:47:03 -0400 Content-Disposition: inline In-Reply-To: <20091015073312.GC30889@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Oct 15, 2009 at 09:33:12AM +0200, Gleb Natapov wrote: > On Thu, Oct 15, 2009 at 08:04:45AM +0100, Mark McLoughlin wrote: > > Hi Gleb, > > > > On Tue, 2009-05-26 at 13:03 +0300, Gleb Natapov wrote: > > > It gets packet without virtio header and adds it if needed. Allows to > > > inject packets to vlan from outside. To send gracious arp for instance. > > ... > > > diff --git a/net.h b/net.h > > > index 931133b..3d0b6f2 100644 > > > --- a/net.h > > > +++ b/net.h > > > ... > > > @@ -63,6 +64,7 @@ int qemu_can_send_packet(VLANClientState *vc); > > > ssize_t qemu_sendv_packet(VLANClientState *vc, const struct iovec *iov, > > > int iovcnt); > > > int qemu_send_packet(VLANClientState *vc, const uint8_t *buf, int size); > > > +void qemu_send_packet_raw(VLANClientState *vc, const uint8_t *buf, int size); > > > void qemu_format_nic_info_str(VLANClientState *vc, uint8_t macaddr[6]); > > > void qemu_check_nic_model(NICInfo *nd, const char *model); > > > void qemu_check_nic_model_list(NICInfo *nd, const char * const *models, > > > > I've only just now noticed that we never actually made announce_self() > > use this ... care to do that? > > > Something like this: > > --- > Use qemu_send_packet_raw to send gracious arp. This will ensure that > vnet header is handled properly. Applied, thanks.