diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-01-04 16:13:40 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-04 16:13:40 -0800 |
commit | 5d38a079ce3971f932bbdc0dc5b887806fabd5dc (patch) | |
tree | 79d948098add1f6c52ecd42c151ce6b6fa1dbc5a /net/unix | |
parent | b530256d2e0f1a75fab31f9821129fff1bb49faa (diff) |
gro: Add page frag support
This patch allows GRO to merge page frags (skb_shinfo(skb)->frags)
in one skb, rather than using the less efficient frag_list.
It also adds a new interface, napi_gro_frags to allow drivers
to inject page frags directly into the stack without allocating
an skb. This is intended to be the GRO equivalent for LRO's
lro_receive_frags interface.
The existing GSO interface can already handle page frags with
or without an appended frag_list so nothing needs to be changed
there.
The merging itself is rather simple. We store any new frag entries
after the last existing entry, without checking whether the first
new entry can be merged with the last existing entry. Making this
check would actually be easy but since no existing driver can
produce contiguous frags anyway it would just be mental masturbation.
If the total number of entries would exceed the capacity of a
single skb, we simply resort to using frag_list as we do now.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix')
0 files changed, 0 insertions, 0 deletions