public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Daniel Borkmann <dborkman@redhat.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: sock: adapt SOCK_MIN_RCVBUF and SOCK_MIN_SNDBUF
Date: Wed, 19 Jun 2013 03:02:12 -0700	[thread overview]
Message-ID: <1371636132.3252.292.camel@edumazet-glaptop> (raw)
In-Reply-To: <51C18098.60709@redhat.com>

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

  reply	other threads:[~2013-06-19 10:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19  9:18 [PATCH net-next] net: sock: adapt SOCK_MIN_RCVBUF and SOCK_MIN_SNDBUF Daniel Borkmann
2013-06-19  9:51 ` Eric Dumazet
2013-06-19  9:57   ` Daniel Borkmann
2013-06-19 10:02     ` Eric Dumazet [this message]
2013-06-19  9:58   ` Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371636132.3252.292.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox