Netdev List
 help / color / mirror / Atom feed
* S/G operation, skb checksums, data copying
@ 2008-05-04 18:28 Johannes Berg
       [not found] ` <1209925725.3655.15.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
  2008-05-04 22:50 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Johannes Berg @ 2008-05-04 18:28 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Herbert Xu, linux-wireless

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-04 22:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-04 18:28 S/G operation, skb checksums, data copying Johannes Berg
     [not found] ` <1209925725.3655.15.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-04 18:58   ` Johannes Berg
2008-05-04 22:50 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox