From: Thomas Graf Date: Fri, 24 Jun 2005 03:59:51 +0000 (-0700) Subject: [NET]: Zerocopy sequential reading of skb data X-Git-Tag: v2.6.13-rc1~68^2~254^2~6 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=677e90eda3bd8cfde0b748daaa46476162a03950;p=pandora-kernel.git [NET]: Zerocopy sequential reading of skb data Implements sequential reading for both linear and non-linear skb data at zerocopy cost. The data is returned in chunks of arbitary length, therefore random access is not possible. Usage: from := 0 to := 128 state := undef data := undef len := undef consumed := 0 skb_prepare_seq_read(skb, from, to, &state) while (len = skb_seq_read(consumed, &data, &state)) != 0 do /* do something with 'data' of length 'len' */ if abort then /* abort read if we don't wait for * skb_seq_read() to return 0 */ skb_abort_seq_read(&state) return endif /* not necessary to consume all of 'len' */ consumed += len done Signed-off-by: Thomas Graf Signed-off-by: David S. Miller --- Reading git-diff-tree failed