[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1371636132.3252.292.camel@edumazet-glaptop>
Date: Wed, 19 Jun 2013 03:02:12 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Daniel Borkmann <dborkman@...hat.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: sock: adapt SOCK_MIN_RCVBUF and
SOCK_MIN_SNDBUF
On Wed, 2013-06-19 at 11:57 +0200, Daniel Borkmann wrote:
> Ok, if you prefer, I can send an update.
>
Yes please.
By the way, I used exactly :
-#define SOCK_MIN_SNDBUF 2048
+/* minimum tcp skb truesize is 2048 + sizeof(struct sk_buff) */
+#define TCP_SKB_MIN_TRUESIZE (2048 + sizeof(struct sk_buff))
+
+#define SOCK_MIN_SNDBUF (2 * TCP_SKB_MIN_TRUESIZE)
because SKB_TRUESIZE(2048) adds
SKB_DATA_ALIGN(sizeof(struct skb_shared_info))
But in case of TCP skbs, the skb_shared_info is part of the 2048 bytes
allocation for skb->head
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists