qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Or Gerlitz <ogerlitz@Voltaire.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Herbert Xu <herbert.xu@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] net: add raw backend
Date: Tue, 07 Jul 2009 17:45:39 +0300	[thread overview]
Message-ID: <4A535F93.7090305@Voltaire.com> (raw)
In-Reply-To: <20090702154354.GA27022@redhat.com>

Michael S. Tsirkin wrote:
>> +static void raw_send(void *opaque)
>> +	do {
>> +		size = recv(s->fd, s->buf, sizeof(s->buf), MSG_TRUNC);
>> +		if (size <= 0)
>> +			break;
 
> A couple of improvement suggestions here:
> - You might get size > sizeof(s->buf). Should not happen, but you might want to 
>   check for this condition and report it + discard the packet.

okay, will do

> - It might be a good idea to request aux data and verify that checksum is set, 
>   calculate it if not. this will make it possible to bind to a local device as well.

thanks for the heads up, I am still not sure to follow the documentation/logic wrt to checksum reporting of the af_packet kernel code. I'll look on this. What do you mean by "this will make it possible to bind to a local device as well"?

>> @@ -2348,6 +2500,41 @@ int net_client_init(Monitor *mon, const char *device, const char *p)
>> +    if (!strcmp(device, "raw")) {
>> +        int promisc = 1;
 
> promisc = 0 might be a safer default

I can do that, but I am not sure why its safer, e.g bridge always set all interfaces to promisc

>> +    "-net raw[,vlan=n][,name=str],ifname=name[,promisc=m]\n"
>> +    "                bound the host network interface to VLAN 'n' in a raw manner:\n"

> in a raw manner -> using a raw packet socket

okay

>> +    "                packets received on the interface are delivered to the vlan and\n"
>> +    "                packets delivered on the vlan are sent to the interface\n"

> document promisc option?

sure


Or.

  reply	other threads:[~2009-07-07 14:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01 15:46 [Qemu-devel] [PATCH] net: add raw backend Or Gerlitz
2009-07-01 16:21 ` Jamie Lokier
2009-07-02 12:25   ` Or Gerlitz
2009-07-03  2:39     ` Jamie Lokier
2009-07-07 13:33       ` Or Gerlitz
2009-07-07 14:57         ` Jamie Lokier
2009-07-08 14:45           ` Or Gerlitz
2009-07-14 13:54             ` Or Gerlitz
2009-07-15 20:38             ` Jamie Lokier
2009-07-15 21:06               ` Jan Kiszka
2009-07-15 21:52                 ` Jamie Lokier
2009-07-16  8:29               ` Or Gerlitz
2009-07-20 14:13               ` [Qemu-devel] [PATCH] net: add raw backend - some performance measurements Or Gerlitz
2009-07-20 15:53                 ` Herbert Xu
2009-07-20 18:20                   ` Michael S. Tsirkin
2009-07-21  1:46                     ` Herbert Xu
2009-07-21  7:03                   ` Or Gerlitz
2009-07-21  7:25                     ` Herbert Xu
2009-07-21 10:17                       ` Or Gerlitz
2009-07-21 10:27                       ` Michael S. Tsirkin
2009-07-21 11:05                         ` Or Gerlitz
2009-07-21 12:01                           ` Michael S. Tsirkin
2009-07-21 12:14                             ` Herbert Xu
2009-07-21 13:41                               ` Or Gerlitz
     [not found] ` <5b31733c0907011250i7afcdbcdnb844290de4ad64f2@mail.gmail.com>
2009-07-02 12:08   ` [Qemu-devel] [PATCH] net: add raw backend Or Gerlitz
2009-07-02 15:43 ` Michael S. Tsirkin
2009-07-07 14:45   ` Or Gerlitz [this message]
2009-07-07 14:49     ` Michael S. Tsirkin
2009-07-08 14:46       ` Or Gerlitz
2009-07-08 15:06       ` Or Gerlitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A535F93.7090305@Voltaire.com \
    --to=ogerlitz@voltaire.com \
    --cc=herbert.xu@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).