Netdev List
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: netdev <netdev@vger.kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: S/G operation, skb checksums, data copying
Date: Sun, 04 May 2008 20:28:45 +0200	[thread overview]
Message-ID: <1209925725.3655.15.camel@johannes.berg> (raw)

[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]

Hi,

Another thought I had while looking into this: many wireless devices are
actually able to do s/g operation but are not able to checksum IP (they
already have to checksum 802.11.)

Right now, we don't announce S/G support to the netstack, but as far as
I know it wouldn't help us anyway since we cannot checksum packets, cf.
register_netdevice:

        /* Fix illegal SG+CSUM combinations. */
        if ((dev->features & NETIF_F_SG) &&
            !(dev->features & NETIF_F_ALL_CSUM)) {
                printk(KERN_NOTICE "%s: Dropping NETIF_F_SG since no checksum feature.\n",
                       dev->name);
                dev->features &= ~NETIF_F_SG;


However, mac80211 needs to change the skb header before the skb is
handed to the hardware. Often enough, the skb it will get is cloned, so
it has to copy the header. Hence, it would benefit from having the
actual skb data not be in the header, but that is unavoidable currently
since we have no checksum features.


Should we do IP checksumming in software within mac80211, announce s/g
support and hardware checksumming to the rest of the networking layer
and hope that we only have to copy the header instead of the data for
many packets then, if the underlying hardware is capable enough?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

             reply	other threads:[~2008-05-04 18:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-04 18:28 Johannes Berg [this message]
     [not found] ` <1209925725.3655.15.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-04 18:58   ` S/G operation, skb checksums, data copying Johannes Berg
2008-05-04 22:50 ` David Miller

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=1209925725.3655.15.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-wireless@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox