Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org, smfrench@gmail.com,
	senozhatsky@chromium.org, tom@talpey.com,
	atteh.mailbox@gmail.com
Subject: Re: [PATCH] ksmbd-tools: add max connections parameter to global section
Date: Fri, 30 Dec 2022 11:54:50 +0900	[thread overview]
Message-ID: <Y65S+r6PtXWjvmmx@google.com> (raw)
In-Reply-To: <20221227150213.9842-1-linkinjeon@kernel.org>

On (22/12/28 00:02), Namjae Jeon wrote:
[..]
> @@ -175,6 +175,7 @@ static int ipc_ksmbd_starting_up(void)
>  	ev->smb2_max_write = global_conf.smb2_max_write;
>  	ev->smb2_max_trans = global_conf.smb2_max_trans;
>  	ev->smbd_max_io_size = global_conf.smbd_max_io_size;
> +	ev->max_connections = global_conf.max_connections;
>  	ev->share_fake_fscaps = global_conf.share_fake_fscaps;
>  	memcpy(ev->sub_auth, global_conf.gen_subauth, sizeof(ev->sub_auth));
>  	ev->smb2_max_credits = global_conf.smb2_max_credits;
> diff --git a/tools/config_parser.c b/tools/config_parser.c
> index 2dc6b34..5f36606 100644
> --- a/tools/config_parser.c
> +++ b/tools/config_parser.c
> @@ -548,6 +548,11 @@ static gboolean global_group_kv(gpointer _k, gpointer _v, gpointer user_data)
>  		return TRUE;
>  	}
>  
> +	if (!cp_key_cmp(_k, "max connections")) {
> +		global_conf.max_connections = memparse(_v);
> +		return TRUE;
> +	}
> +

I'd say that it'll make sense to me if ksmbd will impose a default
limit on the number of connections, which people can overwrite. Yes,
I know that samba doesn't limit by default, but ksmbd is a kernel
module and the price of unlimited resource consumption is higher.
We can't probably easily apply the "samba does it" rule here. What
do you think?

How about:
- default `max connections`, say, of 512. max possible value, say, 64k?
- `max connections` cannot be zero

  reply	other threads:[~2022-12-30  2:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-27 15:02 [PATCH] ksmbd-tools: add max connections parameter to global section Namjae Jeon
2022-12-30  2:54 ` Sergey Senozhatsky [this message]
2022-12-30  3:56   ` Namjae Jeon

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=Y65S+r6PtXWjvmmx@google.com \
    --to=senozhatsky@chromium.org \
    --cc=atteh.mailbox@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=smfrench@gmail.com \
    --cc=tom@talpey.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox