xen/pvcalls: implement connect command
authorStefano Stabellini <sstabellini@kernel.org>
Thu, 6 Jul 2017 18:01:06 +0000 (11:01 -0700)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 31 Aug 2017 13:45:55 +0000 (09:45 -0400)
commit5db4d286a8ef88a04247a005df9cdd4bce3c7673
tree770bd3fe65e1f840f94948c84f68c58c4ae4e6c5
parentfb0298754ab79f0aca1a8162f9aeb5b097c0a1b1
xen/pvcalls: implement connect command

Allocate a socket. Keep track of socket <-> ring mappings with a new data
structure, called sock_mapping. Implement the connect command by calling
inet_stream_connect, and mapping the new indexes page and data ring.
Allocate a workqueue and a work_struct, called ioworker, to perform
reads and writes to the socket.

When an active socket is closed (sk_state_change), set in_error to
-ENOTCONN and notify the other end, as specified by the protocol.

sk_data_ready and pvcalls_back_ioworker will be implemented later.

[ boris: fixed whitespaces ]

Signed-off-by: Stefano Stabellini <stefano@aporeto.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
CC: boris.ostrovsky@oracle.com
CC: jgross@suse.com
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
drivers/xen/pvcalls-back.c