From: "David S. Miller" <davem@redhat.com>
To: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: herbert@gondor.apana.org.au, jmorris@redhat.com, netdev@oss.sgi.com
Subject: Re: af_packet & CHECKSUM_HW
Date: Tue, 18 Nov 2003 17:46:12 -0800 [thread overview]
Message-ID: <20031118174612.48c0854e.davem@redhat.com> (raw)
In-Reply-To: <20031118132137.GA23732@vana.vc.cvut.cz>
On Tue, 18 Nov 2003 14:21:37 +0100
Petr Vandrovec <vandrove@vc.cvut.cz> wrote:
> On Mon, Nov 17, 2003 at 12:30:47PM -0800, David S. Miller wrote:
> > Remind me again why the vmnet driver can't just run skb_checksum()
> > on packets that have CHECKSUM_HW set?
>
> Because vmnet driver (for bridged networking) is hooked through dev_add_pack.
> Place where to put checksum is defined as skb->h.raw + skb->csum, and what
> to checksum as skb->h.raw ... skb->data + skb->len. But unfortunately
> dev_queue_xmit_nit replaces skb2->h.raw with skb2->nh.raw - and so hook
> has to look at the packet contents to compute h.raw from packet data and
> protocol type.
Thanks so much for reminding me.
I'd like to resolve this. One solution is evident, let me know
what you think about the following idea.
How about we add a flag the the packet_type structure, called
PTYPE_FLAG_NEEDCHECKSUM. If it is set, we run skb_checksum() on
CHECKSUM_HW SKBs and do not mangle the skb2->h.raw etc. pointers, then
we pass it into ptype->func().
In this way all existing ptype->func() implementations get what
they expect. Only if the flag is set will the new behavior occur.
Comments?
next prev parent reply other threads:[~2003-11-19 1:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-15 2:44 af_packet & CHECKSUM_HW Herbert Xu
2003-11-16 13:44 ` James Morris
2003-11-16 20:51 ` Herbert Xu
2003-11-17 19:44 ` Petr Vandrovec
2003-11-17 20:30 ` David S. Miller
2003-11-18 13:21 ` Petr Vandrovec
2003-11-19 1:46 ` David S. Miller [this message]
2003-11-19 3:34 ` James Morris
2003-11-19 12:35 ` Petr Vandrovec
2003-11-19 15:01 ` jamal
2003-11-19 15:11 ` Petr Vandrovec
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=20031118174612.48c0854e.davem@redhat.com \
--to=davem@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=jmorris@redhat.com \
--cc=netdev@oss.sgi.com \
--cc=vandrove@vc.cvut.cz \
/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).