public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/1] net/smc: An issue of smc sending messages
@ 2024-12-26 12:22 liqiang
  2024-12-26 12:22 ` [PATCH net-next 1/1] Enter smc_tx_wait when the tx length exceeds the available space liqiang
  0 siblings, 1 reply; 4+ messages in thread
From: liqiang @ 2024-12-26 12:22 UTC (permalink / raw)
  To: wenjia, jaka, alibuda, tonylu, guwen
  Cc: linux-s390, netdev, linux-kernel, luanjianhai, zhangxuzhou4,
	dengguangxing, gaochao24, liqiang64

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-12-27  7:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-26 12:22 [PATCH net-next 0/1] net/smc: An issue of smc sending messages liqiang
2024-12-26 12:22 ` [PATCH net-next 1/1] Enter smc_tx_wait when the tx length exceeds the available space liqiang
2024-12-26 13:20   ` Wen Gu
2024-12-27  7:53     ` Li Qiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox