Skip to content

Commit

Permalink
net: increase frag hash size
Browse files Browse the repository at this point in the history
Increase fragmentation hash bucket size to 1024 from old 64 elems.

After we increased the frag mem limits commit c2a9366 (net: increase
fragment memory usage limits) the hash size of 64 elements is simply
too small.  Also considering the mem limit is per netns and the hash
table is shared for all netns.

For the embedded people, note that this increase will change the hash
table/array from using approx 1 Kbytes to 16 Kbytes.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jesper Dangaard Brouer authored and David S. Miller committed Apr 29, 2013
1 parent f0911aa commit a4c4009
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/net/inet_frag.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct inet_frag_queue {
struct netns_frags *net;
};

#define INETFRAGS_HASHSZ 64
#define INETFRAGS_HASHSZ 1024

/* averaged:
* max_depth = default ipfrag_high_thresh / INETFRAGS_HASHSZ /
Expand Down

0 comments on commit a4c4009

Please sign in to comment.