Search Linux Wireless

Re: S/G operation, skb checksums, data copying

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
Date: Sun, 04 May 2008 20:28:45 +0200

> 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?

No, this doesn't work.

There is a correctness reason why we don't allow SG without HW
checksum support.

Those scatter-gather pages could be in the page cache for a sendfile()
or similar operation.

Any process in the system can write into and change the contents of
those pages while the packet is still in flight to the device.

So the only way to always generate correct checksums is to enforce
that the hardware do it once the full packet is in the device FIFO
after being DMA'd.

If you do the checksum in software, we'll generate incorrect checksums
if another process is writing into the page at the same time, so we
must not allow this.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux