• Arseniy Krasnov's avatar
    vsock: enable setting SO_ZEROCOPY · e0718bd8
    Arseniy Krasnov authored
    For AF_VSOCK, zerocopy tx mode depends on transport, so this option must
    be set in AF_VSOCK implementation where transport is accessible (if
    transport is not set during setting SO_ZEROCOPY: for example socket is
    not connected, then SO_ZEROCOPY will be enabled, but once transport will
    be assigned, support of this type of transmission will be checked).
    
    To handle SO_ZEROCOPY, AF_VSOCK implementation uses SOCK_CUSTOM_SOCKOPT
    bit, thus handling SOL_SOCKET option operations, but all of them except
    SO_ZEROCOPY will be forwarded to the generic handler by calling
    'sock_setsockopt()'.
    Signed-off-by: default avatarArseniy Krasnov <avkrasnov@salutedevices.com>
    Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e0718bd8
af_vsock.c 61.7 KB