diff mbox series

[net-next] net/smc: Call trace_smc_tx_sendmsg when data corked

Message ID 20220225073420.84025-1-tonylu@linux.alibaba.com (mailing list archive)
State Accepted
Commit 6900de507cd471492d83aabd48f13abb9c016d4d
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net/smc: Call trace_smc_tx_sendmsg when data corked | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 23 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Tony Lu Feb. 25, 2022, 7:34 a.m. UTC
This also calls trace_smc_tx_sendmsg() even if data is corked. For ease
of understanding, if statements are not expanded here.

Link: https://lore.kernel.org/all/f4166712-9a1e-51a0-409d-b7df25a66c52@linux.ibm.com/
Fixes: 139653bc6635 ("net/smc: Remove corked dealyed work")
Suggested-by: Stefan Raspl <raspl@linux.ibm.com>
Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
---
 net/smc/smc_tx.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 28, 2022, 11:40 a.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

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.
> 
> Link: https://lore.kernel.org/all/f4166712-9a1e-51a0-409d-b7df25a66c52@linux.ibm.com/
> Fixes: 139653bc6635 ("net/smc: Remove corked dealyed work")
> Suggested-by: Stefan Raspl <raspl@linux.ibm.com>
> Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
> 
> [...]

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!
diff mbox series

Patch

diff --git a/net/smc/smc_tx.c b/net/smc/smc_tx.c
index 5df3940d4543..436ac836f363 100644
--- a/net/smc/smc_tx.c
+++ b/net/smc/smc_tx.c
@@ -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)) */