All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: xming <xmingske@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCHv2] vhost-net: add dhclient work-around from userspace
Date: Sun, 26 Sep 2010 20:01:30 +0200	[thread overview]
Message-ID: <20100926180130.GB24196@redhat.com> (raw)
In-Reply-To: <AANLkTik=oqTBf7QzFzmh_gu=4Dog=m2JhCdMbmsEVetS@mail.gmail.com>

On Tue, Sep 21, 2010 at 10:27:45AM +0200, xming wrote:
> > Newer versions of dhclient should also be OK: they detect
> > that checksum is missing in the packet. Try it e.g. with
> > a recent fedora guest as a client.
> 
> I don't have fedora, but with the latest release (4.1.1-P1) on isc.org
> it still behaves the same (see output at the bottom).
> 
> > To solve the problem for old clients, recent kernels and iptables have
> > support for CHECKSUM target.
> >
> > You can use this target to compute and fill in the checksum in
> > a packet that lacks a checksum.
> >
> > Typical expected use:
> > iptables -A POSTROUTING -t mangle -p udp --dport bootpc \
> > -j CHECKSUM --checksum-fill
> 
> Nice trick :D

Does it help?

> > libvirt will program these for you if it sets up the server,
> > maybe there needs a flag to tell it that server is local.
> 
> I don't use libvirt.

Does it help if you program the rule above?

> My point is, there doesn't seem to be much working client and the only
> working client is a ver very old one (pump), newer client do not work,
> as opposite to what you have explained.

Sorry if I misled you. dhclient in Fedora is ok and has been for
a long while but the bugfix does not appear to be present in released
clients from isc.org, or so it seems from examining the source.
I don't know why and whether is was ever sent their way:
it might be a good idea to talk to them on why they don't
use the PACKET_AUXDATA checksum API linux has had since 2007.
Meanwhile, you can try adding the patch from fedora.

> To repeat myself, here is the situation:
> 
> - DHCP server with vhost_net, all client w/o vhost_net work, clients
> with vhost_net do not work except pump
> - DHCP server w/o vhost_net, all clients work

Hmm are you sure? I expect vhost net client to still not work.
At least, the hack in qemu (that vhost-net disables) is for dhcp response
packets, I do not see how it will help the server ...

> - physical DHCP server, client with vhost *do* work.
> 

Yes, qemu has a hack that catches typical use and will
attach a checksum on receive. Unfortunately keeping
that around made it all too easy for vendors to keep
shipping buggy clients (and I presume server has a similar
issue).

So the only quick solution I have is to work around this
in kernel: in this case by programming the iptables rule.

-- 
MST

  reply	other threads:[~2010-09-26 18:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-28 10:08 [PATCHv2] vhost-net: add dhclient work-around from userspace Michael S. Tsirkin
2010-06-28 10:08 ` Michael S. Tsirkin
2010-06-28 15:30 ` Michael S. Tsirkin
2010-06-28 22:19 ` Sridhar Samudrala
2010-06-29  6:55   ` Michael S. Tsirkin
2010-06-29  7:36 ` David Miller
2010-06-29 13:04   ` Michael S. Tsirkin
2010-06-30 21:30     ` David Miller
2010-06-30 22:08     ` Anthony Liguori
2010-06-30 22:31       ` Michael S. Tsirkin
2010-06-30 23:24         ` Anthony Liguori
2010-06-30 23:24           ` Anthony Liguori
2010-09-20 12:12           ` xming
2010-09-20 20:59             ` Michael S. Tsirkin
2010-09-21  8:27               ` xming
2010-09-26 18:01                 ` Michael S. Tsirkin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-06-28 10:08 Michael S. Tsirkin
2010-06-28 10:08 Michael S. Tsirkin

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=20100926180130.GB24196@redhat.com \
    --to=mst@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=xmingske@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.