mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 16:11:45 +00:00
neigh: increase queue_len_bytes to match wmem_default
Florian reported UDP xmit drops that could be root caused to the too small neigh limit. Current limit is 64 KB, meaning that even a single UDP socket would hit it, since its default sk_sndbuf comes from net.core.wmem_default (~212992 bytes on 64bit arches). Once ARP/ND resolution is in progress, we should allow a little more packets to be queued, at least for one producer. Once neigh arp_queue is filled, a rogue socket should hit its sk_sndbuf limit and either block in sendmsg() or return -EAGAIN. Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0dd5759dbb
commit
eaa72dc474
7 changed files with 19 additions and 16 deletions
|
@ -307,16 +307,6 @@ static struct lock_class_key af_wlock_keys[AF_MAX];
|
|||
static struct lock_class_key af_elock_keys[AF_MAX];
|
||||
static struct lock_class_key af_kern_callback_keys[AF_MAX];
|
||||
|
||||
/* Take into consideration the size of the struct sk_buff overhead in the
|
||||
* determination of these values, since that is non-constant across
|
||||
* platforms. This makes socket queueing behavior and performance
|
||||
* not depend upon such differences.
|
||||
*/
|
||||
#define _SK_MEM_PACKETS 256
|
||||
#define _SK_MEM_OVERHEAD SKB_TRUESIZE(256)
|
||||
#define SK_WMEM_MAX (_SK_MEM_OVERHEAD * _SK_MEM_PACKETS)
|
||||
#define SK_RMEM_MAX (_SK_MEM_OVERHEAD * _SK_MEM_PACKETS)
|
||||
|
||||
/* Run time adjustable parameters. */
|
||||
__u32 sysctl_wmem_max __read_mostly = SK_WMEM_MAX;
|
||||
EXPORT_SYMBOL(sysctl_wmem_max);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue