[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <KU1P153MB016631EC4AEA02A8AB8822F2BF9F0@KU1P153MB0166.APCP153.PROD.OUTLOOK.COM>
Date: Thu, 3 Oct 2019 19:36:17 +0000
From: Dexuan Cui <decui@...rosoft.com>
To: Stefano Garzarella <sgarzare@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
KY Srinivasan <kys@...rosoft.com>,
Stefan Hajnoczi <stefanha@...hat.com>,
Sasha Levin <sashal@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
"virtualization@...ts.linux-foundation.org"
<virtualization@...ts.linux-foundation.org>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Jason Wang <jasowang@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Jorgen Hansen <jhansen@...are.com>
Subject: RE: [RFC PATCH 09/13] hv_sock: set VMADDR_CID_HOST in the
hvs_remote_addr_init()
> From: Stefano Garzarella <sgarzare@...hat.com>
> Sent: Friday, September 27, 2019 4:27 AM
> To: netdev@...r.kernel.org
> Cc: linux-hyperv@...r.kernel.org; KY Srinivasan <kys@...rosoft.com>; Stefan
> Hajnoczi <stefanha@...hat.com>; Sasha Levin <sashal@...nel.org>;
> linux-kernel@...r.kernel.org; kvm@...r.kernel.org; David S. Miller
> <davem@...emloft.net>; virtualization@...ts.linux-foundation.org; Stephen
> Hemminger <sthemmin@...rosoft.com>; Jason Wang
> <jasowang@...hat.com>; Michael S. Tsirkin <mst@...hat.com>; Haiyang
> Zhang <haiyangz@...rosoft.com>; Dexuan Cui <decui@...rosoft.com>;
> Jorgen Hansen <jhansen@...are.com>
> Subject: [RFC PATCH 09/13] hv_sock: set VMADDR_CID_HOST in the
> hvs_remote_addr_init()
>
> Remote peer is always the host, so we set VMADDR_CID_HOST as
> remote CID instead of VMADDR_CID_ANY.
>
> Signed-off-by: Stefano Garzarella <sgarzare@...hat.com>
> ---
> net/vmw_vsock/hyperv_transport.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/vmw_vsock/hyperv_transport.c
> b/net/vmw_vsock/hyperv_transport.c
> index 4f47af2054dd..306310794522 100644
> --- a/net/vmw_vsock/hyperv_transport.c
> +++ b/net/vmw_vsock/hyperv_transport.c
> @@ -186,7 +186,8 @@ static void hvs_remote_addr_init(struct sockaddr_vm
> *remote,
> static u32 host_ephemeral_port = MIN_HOST_EPHEMERAL_PORT;
> struct sock *sk;
>
> - vsock_addr_init(remote, VMADDR_CID_ANY, VMADDR_PORT_ANY);
> + /* Remote peer is always the host */
> + vsock_addr_init(remote, VMADDR_CID_HOST, VMADDR_PORT_ANY);
>
> while (1) {
> /* Wrap around ? */
> --
Looks good to me, since hv_sock doesn't really use the CID in the
transport layer.
Reviewed-by: Dexuan Cui <decui@...rosoft.com>
Powered by blists - more mailing lists