OSDN Git Service

vsock: use local transport when it is loaded
authorStefano Garzarella <sgarzare@redhat.com>
Tue, 10 Dec 2019 10:43:06 +0000 (11:43 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Dec 2019 23:01:23 +0000 (15:01 -0800)
commit408624af4c89989117bb2c6517bd50b7708a2fcd
tree142a06268b10d4066e8315b857c299ebc5c1cba6
parent077263fba10011d7e1d17dc7691ff20c15c56081
vsock: use local transport when it is loaded

Now that we have a transport that can handle the local communication,
we can use it when it is loaded.

A socket will use the local transport (loopback) when the remote
CID is:
- equal to VMADDR_CID_LOCAL
- or equal to transport_g2h->get_local_cid(), if transport_g2h
  is loaded (this allows us to keep the same behavior implemented
  by virtio and vmci transports)
- or equal to VMADDR_CID_HOST, if transport_g2h is not loaded

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/vmw_vsock/af_vsock.c