Skip to contentSkip to conversation

net/smc: Call trace_smc_tx_sendmsg when data corked

PATCH Applied Tony Lu 2 participants 2 messages Feb 25, 2022 – Feb 28, 2022

Subsystems (4)
lore
Share & tools
lore

Tony Lu

author reviewer
#0 lore raw

PATCH 1/1 net/smc: Call trace_smc_tx_sendmsg when data corked

This also calls trace_smc_tx_sendmsg() even if data is corked. For ease of understanding, if statements are not expanded here.

Fixes 139653bc6635 ("net/smc: Remove corked dealyed work")
---
 net/smc/smc_tx.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
net/smc/smc_tx.c +8 -9
index 5df3940d4543..436ac836f363 100644
@@ -235,15 +235,14 @@ int smc_tx_sendmsg(struct smc_sock *smc, struct msghdr *msg, size_t len)
 		 */
 		if ((msg->msg_flags & MSG_OOB) && !send_remaining)
 			conn->urg_tx_pend = true;
-		if ((msg->msg_flags & MSG_MORE || smc_tx_is_corked(smc) ||
-		     msg->msg_flags & MSG_SENDPAGE_NOTLAST) &&
-		    (atomic_read(&conn->sndbuf_space)))
-			/* for a corked socket defer the RDMA writes if
-			 * sndbuf_space is still available. The applications
-			 * should known how/when to uncork it.
-			 */
-			continue;
-		smc_tx_sndbuf_nonempty(conn);
+		/* for a corked socket defer the RDMA writes if
+		 * sndbuf_space is still available. The applications
+		 * should known how/when to uncork it.
+		 */
+		if (!((msg->msg_flags & MSG_MORE || smc_tx_is_corked(smc) ||
+		       msg->msg_flags & MSG_SENDPAGE_NOTLAST) &&
+		      atomic_read(&conn->sndbuf_space)))
+			smc_tx_sndbuf_nonempty(conn);
 
 		trace_smc_tx_sendmsg(smc, copylen);
 	} /* while (msg_data_left(msg)) */
Signature · 1 line
2.32.0.3.g01195cf9f
#1 lore raw
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 9 lines · On Fri, 25 Feb 2022 15:34:21 +0800 you wrote:

This also calls trace_smc_tx_sendmsg() even if data is corked. For ease of understanding, if statements are not expanded here.

Fixes 139653bc6635 ("net/smc: Remove corked dealyed work")

[...]

Here is the summary with links:
- [net-next] net/smc: Call trace_smc_tx_sendmsg when data corked

    https://git.kernel.org/netdev/net-next/c/6900de507cd4

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html