• Stefano Stabellini's avatar
    xen/pvcalls: implement connect command · 5db4d286
    Stefano Stabellini authored
    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: default avatarStefano Stabellini <stefano@aporeto.com>
    Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
    CC: boris.ostrovsky@oracle.com
    CC: jgross@suse.com
    Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
    5db4d286
pvcalls-back.c 14.7 KB