netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Karcher <jaka@linux.ibm.com>
To: Dmitry Antipov <dmantipov@yandex.ru>, Wen Gu <guwen@linux.alibaba.com>
Cc: Wenjia Zhang <wenjia@linux.ibm.com>,
	"D. Wythe" <alibuda@linux.alibaba.com>,
	linux-s390@vger.kernel.org, netdev@vger.kernel.org,
	lvc-project@linuxtesting.org
Subject: Re: Reaching official SMC maintainers
Date: Wed, 6 Mar 2024 11:36:57 +0100	[thread overview]
Message-ID: <a53bfd1b-c54d-49de-96fb-b687e6e97533@linux.ibm.com> (raw)
In-Reply-To: <625c9519-7ae6-43a3-a5d0-81164ad7fd0e@yandex.ru>



On 05/03/2024 17:39, Dmitry Antipov wrote:
> On 3/4/24 13:51, Wen Gu wrote:
> 
>> IMHO, if we want to address the problem of fasync_struct entries being
>> incorrectly inserted to old socket, we may have to change the general 
>> code.
> 
> BTW what about using shared wait queue? Just to illustrate an idea:

I'm sorry but could we please clean up the e-mail threads?
This one here is a question if we are still alive: Yes, we are.

The other one i currently treat as an RFC and gracefully ignore the 
PATCH tag. If you want to post it as an patch please come up with a 
solution, clean it up and re-post it.
See patchwork errors for example: 
https://patchwork.kernel.org/project/netdevbpf/patch/20240221051608.43241-1-dmantipov@yandex.ru/

For the general RFC discussion we are going to comment on it as soon as 
we have something to say about it.
Feel free to re-post your idea regarding a shared wait queue there.

Thank you for your interest in smc and the ideas!
- Jan

> 
> diff --git a/include/linux/net.h b/include/linux/net.h
> index c9b4a63791a4..02df64747db7 100644
> --- a/include/linux/net.h
> +++ b/include/linux/net.h
> @@ -126,6 +126,7 @@ struct socket {
>       const struct proto_ops    *ops; /* Might change with IPV6_ADDRFORM 
> or MPTCP. */
> 
>       struct socket_wq    wq;
> +    struct socket_wq    *shared_wq;
>   };
> 
>   /*
> diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
> index 0f53a5c6fd9d..f04d61e316b2 100644
> --- a/net/smc/af_smc.c
> +++ b/net/smc/af_smc.c
> @@ -3360,6 +3360,9 @@ static int __smc_create(struct net *net, struct 
> socket *sock, int protocol,
>           smc->clcsock = clcsock;
>       }
> 
> +    sock->shared_wq = &smc->shared_wq;
> +    smc->clcsock->shared_wq = &smc->shared_wq;
> +
>   out:
>       return rc;
>   }
> diff --git a/net/smc/smc.h b/net/smc/smc.h
> index df64efd2dee8..26e66c289d4f 100644
> --- a/net/smc/smc.h
> +++ b/net/smc/smc.h
> @@ -287,6 +287,7 @@ struct smc_sock {                /* smc sock 
> container */
>                           /* protects clcsock of a listen
>                            * socket
>                            * */
> +    struct socket_wq    shared_wq;
>   };
> 
>   #define smc_sk(ptr) container_of_const(ptr, struct smc_sock, sk)
> diff --git a/net/socket.c b/net/socket.c
> index ed3df2f749bf..9b9e6932906f 100644
> --- a/net/socket.c
> +++ b/net/socket.c
> @@ -1437,7 +1437,8 @@ static int sock_fasync(int fd, struct file *filp, 
> int on)
>   {
>       struct socket *sock = filp->private_data;
>       struct sock *sk = sock->sk;
> -    struct socket_wq *wq = &sock->wq;
> +    struct socket_wq *wq = (unlikely(sock->shared_wq) ?
> +                sock->shared_wq : &sock->wq);
> 
>       if (sk == NULL)
>           return -EINVAL;
> 
> Dmitry
> 

  reply	other threads:[~2024-03-06 10:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04 10:31 Reaching official SMC maintainers Dmitry Antipov
2024-03-04 10:51 ` Wen Gu
2024-03-05 16:39   ` Dmitry Antipov
2024-03-06 10:36     ` Jan Karcher [this message]
2024-03-04 12:35 ` Wenjia Zhang

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=a53bfd1b-c54d-49de-96fb-b687e6e97533@linux.ibm.com \
    --to=jaka@linux.ibm.com \
    --cc=alibuda@linux.alibaba.com \
    --cc=dmantipov@yandex.ru \
    --cc=guwen@linux.alibaba.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=netdev@vger.kernel.org \
    --cc=wenjia@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).