linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arseny Krasnov <arseny.krasnov@kaspersky.com>
To: Stefano Garzarella <sgarzare@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	"virtualization@lists.linux-foundation.org" 
	<virtualization@lists.linux-foundation.org>,
	"David S. Miller" <davem@davemloft.net>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 2/3] vsock: rename vsock_wait_data()
Date: Fri, 18 Jun 2021 17:50:51 +0300	[thread overview]
Message-ID: <b048c733-2fa7-943d-1380-ce277f020250@kaspersky.com> (raw)
In-Reply-To: <20210618133526.300347-3-sgarzare@redhat.com>


On 18.06.2021 16:35, Stefano Garzarella wrote:
> vsock_wait_data() is used only by STREAM and SEQPACKET sockets,
> so let's rename it to vsock_connectible_wait_data(), using the same
> nomenclature (connectible) used in other functions after the
> introduction of SEQPACKET.
>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> ---
>  net/vmw_vsock/af_vsock.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
> index de8249483081..21ccf450e249 100644
> --- a/net/vmw_vsock/af_vsock.c
> +++ b/net/vmw_vsock/af_vsock.c
> @@ -1866,10 +1866,11 @@ static int vsock_connectible_sendmsg(struct socket *sock, struct msghdr *msg,
>  	return err;
>  }
>  
> -static int vsock_wait_data(struct sock *sk, struct wait_queue_entry *wait,
> -			   long timeout,
> -			   struct vsock_transport_recv_notify_data *recv_data,
> -			   size_t target)
> +static int vsock_connectible_wait_data(struct sock *sk,
> +				       struct wait_queue_entry *wait,
> +				       long timeout,
> +				       struct vsock_transport_recv_notify_data *recv_data,
> +				       size_t target)
>  {
>  	const struct vsock_transport *transport;
>  	struct vsock_sock *vsk;
> @@ -1967,7 +1968,8 @@ static int __vsock_stream_recvmsg(struct sock *sk, struct msghdr *msg,
>  	while (1) {
>  		ssize_t read;
>  
> -		err = vsock_wait_data(sk, &wait, timeout, &recv_data, target);
> +		err = vsock_connectible_wait_data(sk, &wait, timeout,
> +						  &recv_data, target);
>  		if (err <= 0)
>  			break;
>  
> @@ -2022,7 +2024,7 @@ static int __vsock_seqpacket_recvmsg(struct sock *sk, struct msghdr *msg,
>  
>  	timeout = sock_rcvtimeo(sk, flags & MSG_DONTWAIT);
>  
> -	err = vsock_wait_data(sk, &wait, timeout, NULL, 0);
> +	err = vsock_connectible_wait_data(sk, &wait, timeout, NULL, 0);
>  	if (err <= 0)
>  		goto out;
>  
LGTM

  reply	other threads:[~2021-06-18 14:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 13:35 [PATCH net-next 0/3] vsock: small fixes for seqpacket support Stefano Garzarella
2021-06-18 13:35 ` [PATCH net-next 1/3] vsock: rename vsock_has_data() Stefano Garzarella
2021-06-18 14:50   ` Arseny Krasnov
2021-06-18 13:35 ` [PATCH net-next 2/3] vsock: rename vsock_wait_data() Stefano Garzarella
2021-06-18 14:50   ` Arseny Krasnov [this message]
2021-06-18 13:35 ` [PATCH net-next 3/3] vsock/virtio: remove redundant `copy_failed` variable Stefano Garzarella
2021-06-18 14:55   ` Arseny Krasnov
2021-06-18 20:10 ` [PATCH net-next 0/3] vsock: small fixes for seqpacket support patchwork-bot+netdevbpf

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=b048c733-2fa7-943d-1380-ce277f020250@kaspersky.com \
    --to=arseny.krasnov@kaspersky.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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).