net: Always allocate at least 16 skb frags regardless of page size

When analysing performance of the cxgb3 on a ppc64 box I noticed that
we weren't doing much GRO merging. It turns out we are limited by the
number of SKB frags:

#define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2)

With a 4kB page size we have 18 frags, but with a 64kB page size we
only have 3 frags.

I ran a single stream TCP bandwidth test to compare the performance of

Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Anton Blanchard and committed by David S. Miller a715dea3 4910ac6c

+7 -1
+7 -1
include/linux/skbuff.h
··· 122 122 123 123 struct sk_buff; 124 124 125 - /* To allow 64K frame to be packed as single skb without frag_list */ 125 + /* To allow 64K frame to be packed as single skb without frag_list. Since 126 + * GRO uses frags we allocate at least 16 regardless of page size. 127 + */ 128 + #if (65536/PAGE_SIZE + 2) < 16 129 + #define MAX_SKB_FRAGS 16 130 + #else 126 131 #define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2) 132 + #endif 127 133 128 134 typedef struct skb_frag_struct skb_frag_t; 129 135