From: Tony Lu <tonylu@linux.alibaba.com>
To: kgraul@linux.ibm.com, davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
linux-rdma@vger.kernel.org, jacob.qi@linux.alibaba.com,
xuanzhuo@linux.alibaba.com, guwen@linux.alibaba.com,
dust.li@linux.alibaba.com
Subject: [PATCH net v2 1/2] net/smc: Fix smc_link->llc_testlink_time overflow
Date: Thu, 28 Oct 2021 15:13:45 +0800 [thread overview]
Message-ID: <20211028071344.11168-2-tonylu@linux.alibaba.com> (raw)
In-Reply-To: <20211028071344.11168-1-tonylu@linux.alibaba.com>
The value of llc_testlink_time is set to the value stored in
net->ipv4.sysctl_tcp_keepalive_time when linkgroup init. The value of
sysctl_tcp_keepalive_time is already jiffies, so we don't need to
multiply by HZ, which would cause smc_link->llc_testlink_time overflow,
and test_link send flood.
Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Reviewed-by: Wen Gu <guwen@linux.alibaba.com>
---
v1->v2:
- fix wrong email address.
---
net/smc/smc_llc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c
index 72f4b72eb175..f1d323439a2a 100644
--- a/net/smc/smc_llc.c
+++ b/net/smc/smc_llc.c
@@ -1822,7 +1822,7 @@ void smc_llc_link_active(struct smc_link *link)
link->smcibdev->ibdev->name, link->ibport);
link->state = SMC_LNK_ACTIVE;
if (link->lgr->llc_testlink_time) {
- link->llc_testlink_time = link->lgr->llc_testlink_time * HZ;
+ link->llc_testlink_time = link->lgr->llc_testlink_time;
schedule_delayed_work(&link->llc_testlink_wrk,
link->llc_testlink_time);
}
--
2.19.1.6.gb485710b
next prev parent reply other threads:[~2021-10-28 7:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-28 7:13 [PATCH net v2 0/2] Fixes for SMC Tony Lu
2021-10-28 7:13 ` Tony Lu [this message]
2021-10-28 7:13 ` [PATCH net v2 2/2] net/smc: Correct spelling mistake to TCPF_SYN_RECV Tony Lu
2021-10-28 12:10 ` [PATCH net v2 0/2] Fixes for SMC patchwork-bot+netdevbpf
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=20211028071344.11168-2-tonylu@linux.alibaba.com \
--to=tonylu@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=dust.li@linux.alibaba.com \
--cc=guwen@linux.alibaba.com \
--cc=jacob.qi@linux.alibaba.com \
--cc=kgraul@linux.ibm.com \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=xuanzhuo@linux.alibaba.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