From: Mingbao Sun <sunmingbao@tom.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@fb.com>,
Sagi Grimberg <sagi@grimberg.me>,
Chaitanya Kulkarni <kch@nvidia.com>,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
tyler.sun@dell.com, ping.gan@dell.com, yanxiu.cai@dell.com,
libin.zhang@dell.com, ao.sun@dell.com
Subject: Re: [PATCH v2 1/2] nvmet-tcp: support specifying the congestion-control
Date: Wed, 9 Mar 2022 17:52:03 +0800 [thread overview]
Message-ID: <20220309175203.00006ee2@tom.com> (raw)
In-Reply-To: <20220309061541.GB31316@lst.de>
On Wed, 9 Mar 2022 07:15:41 +0100
Christoph Hellwig <hch@lst.de> wrote:
> On Wed, Mar 09, 2022 at 01:37:11PM +0800, Mingbao Sun wrote:
> > + if (port->nport->tcp_congestion) {
> > + icsk_new = inet_csk(newsock->sk);
> > + if (icsk_new->icsk_ca_ops != icsk->icsk_ca_ops) {
> > + pr_warn("congestion abnormal: expected %s, actual %s.\n",
> > + icsk->icsk_ca_ops->name,
> > + icsk_new->icsk_ca_ops->name);
> > + }
> > + }
>
> What is the point of having this code?
Well, this could happen in certain circumstances.
Take the result from my test as an example:
- The congestion of the listening socket of the target was set to
‘dctcp’.
- But the congestion of the socket of the host side was set to
‘cubic’.
- Then the congestion of the socket of the new connection at the
target side would automatically be altered to ‘dctcp-reno’.
In case tcp_congestion was explicitly set for the target, it can be
supposed that the user attaches great importance to performance.
So we’d better make the users aware that the system is not working
in the way they expect.
Thus the checking and warning was added here.
>
> > + if (nport->tcp_congestion) {
> > + strncpy(ca_name, nport->tcp_congestion, TCP_CA_NAME_MAX-1);
> > + optval = KERNEL_SOCKPTR(ca_name);
> > + ret = sock_common_setsockopt(port->sock, IPPROTO_TCP,
> > + TCP_CONGESTION, optval,
> > + strlen(ca_name));
> > + if (ret) {
> > + pr_err("failed to set port socket's congestion to %s: %d\n",
> > + ca_name, ret);
> > + goto err_sock;
> > + }
> > + }
>
> Same comment as for the host side.
This will be handled as the host side in the next version.
next prev parent reply other threads:[~2022-03-09 9:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-09 5:37 [PATCH v2 1/2] nvmet-tcp: support specifying the congestion-control Mingbao Sun
2022-03-09 6:02 ` Mingbao Sun
2022-03-09 6:15 ` Christoph Hellwig
2022-03-09 9:52 ` Mingbao Sun [this message]
2022-03-10 8:38 ` Christoph Hellwig
2022-03-10 11:06 ` Mingbao Sun
2022-03-10 11:35 ` Mingbao Sun
2022-03-10 14:20 ` Christoph Hellwig
2022-03-10 15:13 ` Mingbao Sun
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=20220309175203.00006ee2@tom.com \
--to=sunmingbao@tom.com \
--cc=ao.sun@dell.com \
--cc=axboe@fb.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=kch@nvidia.com \
--cc=libin.zhang@dell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=ping.gan@dell.com \
--cc=sagi@grimberg.me \
--cc=tyler.sun@dell.com \
--cc=yanxiu.cai@dell.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