mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: liqiang <liqiang64@huawei.com>
To: <wenjia@linux.ibm.com>, <jaka@linux.ibm.com>,
	<alibuda@linux.alibaba.com>, <tonylu@linux.alibaba.com>,
	<guwen@linux.alibaba.com>
Cc: <linux-s390@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <luanjianhai@huawei.com>,
	<zhangxuzhou4@huawei.com>, <dengguangxing@huawei.com>,
	<gaochao24@huawei.com>, <liqiang64@huawei.com>
Subject: [PATCH net-next 0/1] net/smc: An issue of smc sending messages
Date: Thu, 26 Dec 2024 20:22:16 +0800	[thread overview]
Message-ID: <20241226122217.1125-1-liqiang64@huawei.com> (raw)

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


             reply	other threads:[~2024-12-26 12:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-26 12:22 liqiang [this message]
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

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=20241226122217.1125-1-liqiang64@huawei.com \
    --to=liqiang64@huawei.com \
    --cc=alibuda@linux.alibaba.com \
    --cc=dengguangxing@huawei.com \
    --cc=gaochao24@huawei.com \
    --cc=guwen@linux.alibaba.com \
    --cc=jaka@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=luanjianhai@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=tonylu@linux.alibaba.com \
    --cc=wenjia@linux.ibm.com \
    --cc=zhangxuzhou4@huawei.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

all inboxes | Powered by JetHome®