netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lu <tonylu@linux.alibaba.com>
To: "D. Wythe" <alibuda@linux.alibaba.com>
Cc: kgraul@linux.ibm.com, kuba@kernel.org, davem@davemloft.net,
	netdev@vger.kernel.org, linux-s390@vger.kernel.org,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH net-next v5 5/5] net/smc: Add global configure for auto fallback by netlink
Date: Wed, 9 Feb 2022 17:16:51 +0800	[thread overview]
Message-ID: <YgOGg9Ud5N7LOOV6@TonyMac-Alibaba> (raw)
In-Reply-To: <f54ee9f30898b998edf8f07dabccc84efaa2ab8b.1644323503.git.alibuda@linux.alibaba.com>

On Tue, Feb 08, 2022 at 08:53:13PM +0800, D. Wythe wrote:
> From: "D. Wythe" <alibuda@linux.alibaba.com>
> 
> @@ -248,6 +248,8 @@ int smc_nl_get_sys_info(struct sk_buff *skb, struct netlink_callback *cb)
>  		goto errattr;
>  	if (nla_put_u8(skb, SMC_NLA_SYS_IS_SMCR_V2, true))
>  		goto errattr;
> +	if (nla_put_u8(skb, SMC_NLA_SYS_AUTO_FALLBACK, smc_auto_fallback))

READ_ONCE(smc_auto_fallback) ?

> +		goto errattr;
>  	smc_clc_get_hostname(&host);
>  	if (host) {
>  		memcpy(hostname, host, SMC_MAX_HOSTNAME_LEN);
> diff --git a/net/smc/smc_netlink.c b/net/smc/smc_netlink.c
> index f13ab06..a7de517 100644
> --- a/net/smc/smc_netlink.c
> +++ b/net/smc/smc_netlink.c
> @@ -111,6 +111,16 @@
>  		.flags = GENL_ADMIN_PERM,
>  		.doit = smc_nl_disable_seid,
>  	},
> +	{
> +		.cmd = SMC_NETLINK_ENABLE_AUTO_FALLBACK,
> +		.flags = GENL_ADMIN_PERM,
> +		.doit = smc_enable_auto_fallback,
> +	},
> +	{
> +		.cmd = SMC_NETLINK_DISABLE_AUTO_FALLBACK,
> +		.flags = GENL_ADMIN_PERM,
> +		.doit = smc_disable_auto_fallback,
> +	},
>  };

Consider adding the separated cmd to query the status of this config,
just as SEID does?

It is common to check this value after user-space setted. Combined with
sys_info maybe a little heavy in this scene.

Thanks,
Tony Lu

  reply	other threads:[~2022-02-09  9:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 12:53 [PATCH net-next v5 0/5] net/smc: Optimizing performance in short-lived scenarios D. Wythe
2022-02-08 12:53 ` [PATCH net-next v5 1/5] net/smc: Make smc_tcp_listen_work() independent D. Wythe
2022-02-08 17:06   ` Karsten Graul
2022-02-09  6:24     ` D. Wythe
2022-02-08 12:53 ` [PATCH net-next v5 2/5] net/smc: Limit backlog connections D. Wythe
2022-02-08 17:13   ` Karsten Graul
2022-02-09  7:11     ` D. Wythe
2022-02-09  7:56       ` Karsten Graul
2022-02-08 12:53 ` [PATCH net-next v5 3/5] net/smc: Fallback when handshake workqueue congested D. Wythe
2022-02-08 12:53 ` [PATCH net-next v5 4/5] net/smc: Dynamic control auto fallback by socket options D. Wythe
2022-02-08 17:08   ` Karsten Graul
2022-02-09  6:41     ` D. Wythe
2022-02-09  7:59       ` Karsten Graul
2022-02-09  9:01         ` D. Wythe
2022-02-08 12:53 ` [PATCH net-next v5 5/5] net/smc: Add global configure for auto fallback by netlink D. Wythe
2022-02-09  9:16   ` Tony Lu [this message]
2022-02-09  9:53     ` D. Wythe
2022-02-09 11:37       ` Tony Lu
2022-02-09  9:33   ` Tony Lu
2022-02-09  9:41     ` D. Wythe
2022-02-09  9:54       ` Tony Lu
2022-02-09 10:56         ` D. Wythe
2022-02-08 17:04 ` [PATCH net-next v5 0/5] net/smc: Optimizing performance in short-lived scenarios Karsten Graul

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=YgOGg9Ud5N7LOOV6@TonyMac-Alibaba \
    --to=tonylu@linux.alibaba.com \
    --cc=alibuda@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=kgraul@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).