diff options
author | Changli Gao <xiaosuo@gmail.com> | 2010-06-29 08:39:37 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-01 00:44:29 +0400 |
commit | d6bebca92c663fb216c072193945946f3807ca7f (patch) | |
tree | fd797f062fa19d2ee470cf33c9b475bff08e2545 /include/net/inet_frag.h | |
parent | 4ce3c183fcade7f4b30a33dae90cd774c3d9e094 (diff) | |
download | linux-d6bebca92c663fb216c072193945946f3807ca7f.tar.xz |
fragment: add fast path for in-order fragments
add fast path for in-order fragments
As the fragments are sent in order in most of OSes, such as Windows, Darwin and
FreeBSD, it is likely the new fragments are at the end of the inet_frag_queue.
In the fast path, we check if the skb at the end of the inet_frag_queue is the
prev we expect.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
include/net/inet_frag.h | 1 +
net/ipv4/ip_fragment.c | 12 ++++++++++++
net/ipv6/reassembly.c | 11 +++++++++++
3 files changed, 24 insertions(+)
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_frag.h')
-rw-r--r-- | include/net/inet_frag.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index 39f2dc943908..16ff29a7bb30 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@ -20,6 +20,7 @@ struct inet_frag_queue { atomic_t refcnt; struct timer_list timer; /* when will this queue expire? */ struct sk_buff *fragments; /* list of received fragments */ + struct sk_buff *fragments_tail; ktime_t stamp; int len; /* total length of orig datagram */ int meat; |