All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	santosh.shilimkar@oracle.com, eric.dumazet@gmail.com
Subject: Re: [PATCH net-next v3 1/2] RDS: TCP: Add sysctl tunables for sndbuf/rcvbuf on rds-tcp socket
Date: Wed, 16 Mar 2016 12:26:40 +0100	[thread overview]
Message-ID: <56E942F0.90201@stressinduktion.org> (raw)
In-Reply-To: <20160316111055.GB21307@oracle.com>

On 16.03.2016 12:10, Sowmini Varadhan wrote:
> On (03/16/16 11:29), Hannes Frederic Sowa wrote:
>> Normally we kmemdup a table per netns and update its data pointer,
>> so we can reuse the proc_doint_minmax functions.
>
> I remembered one more thing.. in this particular case, I need to
> have my one ->proc_handler, because I need to rds_tcp_sysctl_reset()
> existing connections to make them use the new tunable.

My hope was actually that by using the ->data pointer in netns you don't 
need to provide the two functions, just simply use something like the 
following for both cases.

static int rds_skbuf_handler(...) {
	int err;

	err = proc_dointvec(...);
	if (err)
		return err;

	if (write)
		rds_tcp_sysctl_reset(...);

	return err;
}

If you use proc_dointvec_min(max) you can already sanitize the input 
values even more.

Do I understand it correctly that all connections of a namespace will be 
dropped if you modify those sysctls?

Thanks,
Hannes

  reply	other threads:[~2016-03-16 11:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-15 18:53 [PATCH net-next v3 0/2] RDS: TCP: tunable socket buffer parameters Sowmini Varadhan
2016-03-15 18:53 ` [PATCH net-next v3 1/2] RDS: TCP: Add sysctl tunables for sndbuf/rcvbuf on rds-tcp socket Sowmini Varadhan
2016-03-15 19:21   ` santosh shilimkar
2016-03-16 10:29   ` Hannes Frederic Sowa
2016-03-16 11:06     ` Sowmini Varadhan
2016-03-16 11:10     ` Sowmini Varadhan
2016-03-16 11:26       ` Hannes Frederic Sowa [this message]
2016-03-16 11:32         ` Sowmini Varadhan
2016-03-15 18:53 ` [PATCH net-next v3 2/2] RDS: TCP: Remove unused constant Sowmini Varadhan
2016-03-15 19:22   ` santosh shilimkar

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=56E942F0.90201@stressinduktion.org \
    --to=hannes@stressinduktion.org \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=santosh.shilimkar@oracle.com \
    --cc=sowmini.varadhan@oracle.com \
    /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.