[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220311164748.00000217@tom.com>
Date: Fri, 11 Mar 2022 16:47:48 +0800
From: Mingbao Sun <sunmingbao@....com>
To: Christoph Hellwig <hch@....de>
Cc: Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...com>,
Sagi Grimberg <sagi@...mberg.me>,
Chaitanya Kulkarni <kch@...dia.com>,
linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org,
Eric Dumazet <edumazet@...gle.com>,
"David S . Miller" <davem@...emloft.net>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
David Ahern <dsahern@...nel.org>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
tyler.sun@...l.com, ping.gan@...l.com, yanxiu.cai@...l.com,
libin.zhang@...l.com, ao.sun@...l.com
Subject: Re: [PATCH 2/3] nvme-tcp: support specifying the congestion-control
On Fri, 11 Mar 2022 08:15:18 +0100
Christoph Hellwig <hch@....de> wrote:
> On Fri, Mar 11, 2022 at 11:01:12AM +0800, Mingbao Sun wrote:
> > + case NVMF_OPT_TCP_CONGESTION:
> > + p = match_strdup(args);
> > + if (!p) {
> > + ret = -ENOMEM;
> > + goto out;
> > + }
> > +
> > + kfree(opts->tcp_congestion);
> > + opts->tcp_congestion = p;
>
> We'll need to check that the string is no loner than TCP_CA_NAME_MAX
> somewhere.
>
accept.
will do that in the next version.
this would also be applied for the target side.
> >
> > + if (nctrl->opts->mask & NVMF_OPT_TCP_CONGESTION) {
> > + ret = tcp_set_congestion_control(queue->sock->sk,
> > + nctrl->opts->tcp_congestion,
> > + true, true);
>
> This needs to be called under lock_sock() protection. Maybe also
> add an assert to tcp_set_congestion_control to enforce that.
accept.
will handle it in the next version.
this would also be applied for the target side.
Many thanks for reminding.
as for the assertion, I failed to find a conventional way to do that.
would you like to give me a suggestion?
Powered by blists - more mailing lists