Commit 6900de50 authored by Tony Lu's avatar Tony Lu Committed by David S. Miller

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.

Link: https://lore.kernel.org/all/f4166712-9a1e-51a0-409d-b7df25a66c52@linux.ibm.com/
Fixes: 139653bc ("net/smc: Remove corked dealyed work")
Suggested-by: default avatarStefan Raspl <raspl@linux.ibm.com>
Signed-off-by: default avatarTony Lu <tonylu@linux.alibaba.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c4eb058e
...@@ -235,15 +235,14 @@ int smc_tx_sendmsg(struct smc_sock *smc, struct msghdr *msg, size_t len) ...@@ -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) if ((msg->msg_flags & MSG_OOB) && !send_remaining)
conn->urg_tx_pend = true; conn->urg_tx_pend = true;
if ((msg->msg_flags & MSG_MORE || smc_tx_is_corked(smc) || /* for a corked socket defer the RDMA writes if
msg->msg_flags & MSG_SENDPAGE_NOTLAST) && * sndbuf_space is still available. The applications
(atomic_read(&conn->sndbuf_space))) * should known how/when to uncork it.
/* for a corked socket defer the RDMA writes if */
* sndbuf_space is still available. The applications if (!((msg->msg_flags & MSG_MORE || smc_tx_is_corked(smc) ||
* should known how/when to uncork it. msg->msg_flags & MSG_SENDPAGE_NOTLAST) &&
*/ atomic_read(&conn->sndbuf_space)))
continue; smc_tx_sndbuf_nonempty(conn);
smc_tx_sndbuf_nonempty(conn);
trace_smc_tx_sendmsg(smc, copylen); trace_smc_tx_sendmsg(smc, copylen);
} /* while (msg_data_left(msg)) */ } /* while (msg_data_left(msg)) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment