[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241226122217.1125-1-liqiang64@huawei.com>
Date: Thu, 26 Dec 2024 20:22:16 +0800
From: liqiang <liqiang64@...wei.com>
To: <wenjia@...ux.ibm.com>, <jaka@...ux.ibm.com>, <alibuda@...ux.alibaba.com>,
<tonylu@...ux.alibaba.com>, <guwen@...ux.alibaba.com>
CC: <linux-s390@...r.kernel.org>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <luanjianhai@...wei.com>,
<zhangxuzhou4@...wei.com>, <dengguangxing@...wei.com>,
<gaochao24@...wei.com>, <liqiang64@...wei.com>
Subject: [PATCH net-next 0/1] net/smc: An issue of smc sending messages
This problem can be reproduced using netperf and netserver.
On server:
smc_run netserver
On client:
smc_run netperf -H 127.0.0.1 -l 1
[]# smc_run netperf -H 127.0.0.1 -l 1
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) ...
Recv Send Send
Socket ... Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
131072 131072 131072 0.00 1723.79
This is because netperf obtains the smc sndbuf size as 131072
through getsockopt. It calls sendmsg to send 131072 bytes of
data at a time, but smc actually returns after only sending
65504 bytes (65536 - sizeof(cdc head)), and then netperf
terminates the test.
In smc_tx_sendmsg, the processing after the sending ring buf
is full is to return directly, so the above phenomenon is caused.
I would like to ask if here after the sending ring buf is full,
enter smc_tx_wait and wait for the peer to read before continuing
to send.
When I delete the judgment of send_done in front of smc_tx_wait,
it seems to work normally:
[]# smc_run netperf -H 127.0.0.1 -l 1
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) ...
Recv Send Send
Socket ... Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
131072 131072 131072 1.00 11543.80
liqiang (1):
Enter smc_tx_wait when the tx length exceeds the available space
net/smc/smc_tx.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
--
2.43.0
Powered by blists - more mailing lists