Message ID | 20220512031156.74054-2-guangguan.wang@linux.alibaba.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net/smc: two fixes for using smc with io_uring | expand |
On Thu, May 12, 2022 at 11:11:55AM +0800, Guangguan Wang wrote: > Non blocking sendmsg will return -EAGAIN when any signal pending > and no send space left, while non blocking recvmsg return -EINTR > when signal pending and no data received. This may makes confused. > As TCP returns -EAGAIN in the conditions described above. Align the > behavior of smc with TCP. > > Fixes: 846e344eb722 ("net/smc: add receive timeout check") > Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com> > Reviewed-by: Tony Lu <tonylu@linux.alibaba.com> I see that you have already sent this patch to net, so this patch is a duplicate. There is no need to send it again to net-next. Thanks, Tony Lu
On 2022/5/12 11:43, Tony Lu wrote: > On Thu, May 12, 2022 at 11:11:55AM +0800, Guangguan Wang wrote: >> Non blocking sendmsg will return -EAGAIN when any signal pending >> and no send space left, while non blocking recvmsg return -EINTR >> when signal pending and no data received. This may makes confused. >> As TCP returns -EAGAIN in the conditions described above. Align the >> behavior of smc with TCP. >> >> Fixes: 846e344eb722 ("net/smc: add receive timeout check") >> Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com> >> Reviewed-by: Tony Lu <tonylu@linux.alibaba.com> > > I see that you have already sent this patch to net, so this patch is a > duplicate. There is no need to send it again to net-next. > > Thanks, > Tony Lu Ok, just ignore it. Thanks!
On Thu, 12 May 2022 11:51:22 +0800 Guangguan Wang wrote: > On 2022/5/12 11:43, Tony Lu wrote: > > On Thu, May 12, 2022 at 11:11:55AM +0800, Guangguan Wang wrote: > >> Non blocking sendmsg will return -EAGAIN when any signal pending > >> and no send space left, while non blocking recvmsg return -EINTR > >> when signal pending and no data received. This may makes confused. > >> As TCP returns -EAGAIN in the conditions described above. Align the > >> behavior of smc with TCP. > >> > >> Fixes: 846e344eb722 ("net/smc: add receive timeout check") > >> Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com> > >> Reviewed-by: Tony Lu <tonylu@linux.alibaba.com> > > > > I see that you have already sent this patch to net, so this patch is a > > duplicate. There is no need to send it again to net-next. > > Ok, just ignore it. Thanks! You gotta repost just patch 2, then. Please wait until net and net-next get merged before sending (or 12h if you don't know how to figure out if that already happened ;))
diff --git a/net/smc/smc_rx.c b/net/smc/smc_rx.c index 51e8eb2933ff..338b9ef806e8 100644 --- a/net/smc/smc_rx.c +++ b/net/smc/smc_rx.c @@ -355,12 +355,12 @@ int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg, } break; } + if (!timeo) + return -EAGAIN; if (signal_pending(current)) { read_done = sock_intr_errno(timeo); break; } - if (!timeo) - return -EAGAIN; } if (!smc_rx_data_available(conn)) {