From: Rusty Russell <rusty@rustcorp.com.au>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: anthony@codemonkey.ws, netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: csum offload and af_packet
Date: Tue, 12 Aug 2008 12:27:43 +1000 [thread overview]
Message-ID: <200808121227.43732.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20080812003244.GA18230@gondor.apana.org.au>
On Tuesday 12 August 2008 10:32:44 Herbert Xu wrote:
> On Mon, Aug 11, 2008 at 11:50:25PM +1000, Rusty Russell wrote:
> > I think this is deeper than that. This case is actually unusual, in that
> > the packet really does arrive with a partial csum. But usually, we're
> > exposing an internal detail of our stack at this point. Seems like we
> > shouldn't if we know the user can't deal with it. dhcpd just makes this
> > case less academic.
>
> I disagree. If you're using AF_PACKET you're asking to see the
> bare details. If you want to see the censored version you can
> always go through the IP stack.
Then should we insist the user set PACKET_AUXDATA? Even then, the format of
that cmsg will have to be enhanced as we change kernel internals. Which is
probably why you *don't* get to see the bare details: you get a flag
saying "oh, I know the checksum is bad". Without the csum_start/csum_offset
fields you can't even calculate what it will be.
The dhcp client thing is a symptom which can be fixed, but are we doing the
right thing? (Tho for lguest this is a new problem with the current kernel,
so fixing it now means it really wouldn't be a problem).
> > We can trivially disable it in the guest or host; that's not the problem.
> > We can even disable csum offload just for UDP in the host. But should
> > we really?
>
> It's not about disabling it, it's about enabling it dynamically
> once guest user-space is sure that *it* can handle this.
Oh, I see. I'd have to think harder; I'm not sure if we have all the pieces
at the moment for virtio or would need a boutique mechanism for this (usually
the host doesn't change the features it offers, even if device resets). May
be easier to suppress csum offload for dhcp packets in the host...
Rusty.
next prev parent reply other threads:[~2008-08-12 2:27 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-24 11:46 [PATCH 0/9][RFC] KVM virtio_net performance Mark McLoughlin
2008-07-24 11:46 ` [PATCH 1/9] kvm: qemu: Set MIN_TIMER_REARM_US to 150us Mark McLoughlin
2008-07-24 11:46 ` [PATCH 2/9] kvm: qemu: Fix virtio_net tx timer Mark McLoughlin
2008-07-24 11:46 ` [PATCH 3/9] kvm: qemu: Remove virtio_net tx ring-full heuristic Mark McLoughlin
2008-07-24 11:46 ` [PATCH 4/9] kvm: qemu: Add VIRTIO_F_NOTIFY_ON_EMPTY Mark McLoughlin
2008-07-24 11:46 ` [PATCH 5/9] kvm: qemu: Disable recv notifications until avail buffers exhausted Mark McLoughlin
2008-07-24 11:46 ` [PATCH 6/9] kvm: qemu: Add support for partial csums and GSO Mark McLoughlin
2008-07-24 11:46 ` [PATCH 7/9] kvm: qemu: Increase size of virtio_net rings Mark McLoughlin
2008-07-24 11:46 ` [PATCH 8/9] kvm: qemu: Drop the mutex while reading from tapfd Mark McLoughlin
2008-07-24 11:46 ` [PATCH 9/9] kvm: qemu: Eliminate extra virtio_net copy Mark McLoughlin
2008-07-24 23:33 ` [PATCH 8/9] kvm: qemu: Drop the mutex while reading from tapfd Dor Laor
2008-07-25 17:25 ` Mark McLoughlin
2008-07-24 23:22 ` [PATCH 3/9] kvm: qemu: Remove virtio_net tx ring-full heuristic Dor Laor
2008-07-25 0:30 ` Rusty Russell
2008-07-25 17:30 ` Mark McLoughlin
2008-07-25 17:23 ` Mark McLoughlin
2008-07-24 23:56 ` Dor Laor
2008-07-26 9:48 ` [PATCH 2/9] kvm: qemu: Fix virtio_net tx timer Avi Kivity
2008-07-26 12:08 ` Mark McLoughlin
2008-07-24 11:55 ` [PATCH 0/9][RFC] KVM virtio_net performance Herbert Xu
2008-07-24 16:53 ` Mark McLoughlin
2008-07-24 18:29 ` Anthony Liguori
2008-07-25 16:36 ` Mark McLoughlin
2008-07-24 20:56 ` Anthony Liguori
2008-07-25 17:17 ` Mark McLoughlin
2008-07-25 21:29 ` Dor Laor
2008-07-26 19:09 ` Bill Davidsen
2008-07-27 7:52 ` Avi Kivity
2008-07-27 12:52 ` Bill Davidsen
2008-07-27 13:17 ` Bill Davidsen
2008-07-28 6:42 ` Mark McLoughlin
2008-08-11 7:44 ` Rusty Russell
2008-08-11 9:51 ` Herbert Xu
2008-08-11 13:50 ` csum offload and af_packet Rusty Russell
2008-08-12 0:32 ` Herbert Xu
2008-08-12 0:51 ` David Miller
2008-08-12 0:58 ` Herbert Xu
2008-08-12 16:17 ` Ingo Oeser
2008-08-12 23:37 ` Herbert Xu
2008-08-13 0:55 ` David Miller
2008-08-13 1:09 ` Herbert Xu
2008-08-13 1:17 ` David Miller
2008-08-13 1:21 ` Herbert Xu
2008-08-13 1:25 ` David Miller
2008-08-13 1:37 ` Herbert Xu
2008-08-13 11:26 ` Patrick McHardy
2008-08-17 23:08 ` David Miller
2008-08-18 1:10 ` Herbert Xu
2008-08-18 1:12 ` David Miller
[not found] ` <48A8CCBF.3020408@trash.net>
2008-08-18 1:15 ` David Miller
2008-08-18 2:12 ` David Miller
2008-08-18 11:17 ` Patrick McHardy
2008-08-12 2:27 ` Rusty Russell [this message]
2008-07-26 9:45 ` [PATCH 0/9][RFC] KVM virtio_net performance Avi Kivity
2008-07-27 6:48 ` Rusty Russell
2008-07-27 6:48 ` Rusty Russell
2008-08-11 19:56 ` Mark McLoughlin
2008-08-12 13:35 ` Avi Kivity
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=200808121227.43732.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=anthony@codemonkey.ws \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.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 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.