All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gao Feng <fgao@ikuai8.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: [PATCH net 1/1] net: sock: Use double send/recv buff value to compare with max value
Date: Thu, 9 Feb 2017 17:08:57 +0800	[thread overview]
Message-ID: <CA+6hz4q+S5_LyVMp9OSD24U=REymv+ciur9ZaT9wH0mhSvo_cw@mail.gmail.com> (raw)
In-Reply-To: <1486569601.7793.83.camel@edumazet-glaptop3.roam.corp.google.com>

On Thu, Feb 9, 2017 at 12:00 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Wed, 2017-02-08 at 21:07 +0800, fgao@ikuai8.com wrote:
>> From: Gao Feng <fgao@ikuai8.com>
>>
>> Because the value of SO_SNDBUF and SO_RCVBUF is doubled before
>> assignment, so the real value of send and recv buffer could be more
>> than the max sysctl config sysctl_wmem_max and sysctl_rmem_max.
>>
>> Now use doulbe send/recv buffer value to compare with sysctl_wmem_max
>> and sysctl_rmem_max, and it keeps consistence with SOCK_MIN_SNDBUF
>> and SOCK_MIN_RCVBUF.
>>
>> Signed-off-by: Gao Feng <fgao@ikuai8.com>
>> ---
>
> Looks completely bogus, based on your comprehension of this code.

It is a config param, user could config any value.
So why give it one bogus?
If need more, user could config it by himself.

>
> If you need to, fix the doc, not this code.

The current codes mean the buffer could exceed the sysctl max value.
It seems inconsistent.

Regards
Feng

>
> Unless you give more details of course, why we should take your patch.
>
>
>
>

  reply	other threads:[~2017-02-09  9:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08 13:07 [PATCH net 1/1] net: sock: Use double send/recv buff value to compare with max value fgao
2017-02-08 16:00 ` Eric Dumazet
2017-02-09  9:08   ` Gao Feng [this message]
2017-02-09 14:34     ` Eric Dumazet
2017-02-15  1:46 ` [lkp-robot] [net] 0148239373: ltp.test_1_to_1_sockopt.fail kernel test robot
2017-02-15  1:46   ` kernel test robot
2017-02-15  1:46   ` [LTP] " kernel test robot
2017-02-15  2:02   ` Gao Feng
2017-02-15  2:02     ` [LTP] " Gao Feng

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='CA+6hz4q+S5_LyVMp9OSD24U=REymv+ciur9ZaT9wH0mhSvo_cw@mail.gmail.com' \
    --to=fgao@ikuai8.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.