lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 9 Mar 2022 07:15:41 +0100
From:   Christoph Hellwig <hch@....de>
To:     Mingbao Sun <sunmingbao@....com>
Cc:     Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...com>,
        Christoph Hellwig <hch@....de>,
        Sagi Grimberg <sagi@...mberg.me>,
        Chaitanya Kulkarni <kch@...dia.com>,
        linux-nvme@...ts.infradead.org, linux-kernel@...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 v2 1/2] nvmet-tcp: support specifying the
 congestion-control

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?

> +	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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ