• Arseny Krasnov's avatar
    vhost/vsock: support SEQPACKET for transport · ced7b713
    Arseny Krasnov authored
    When received packet is copied to guests's rx queue, data buffers
    of rx queue could be smaller that data buffer of input packet, so
    data of input packet is copied to each rx buffer, thus each rx
    buffer will be a packet with dynamically created header. Fields
    of such header are initialized from header of input packet(except
    length field which value is depends on number of bytes copied to
    rx buffer). But in SEQPACKET case, we also need to take care of
    record delimeter bit: if input packet has this bit set, we don't
    copy it to header of packet in rx buffer, except case when such
    rx buffer is last part of input packet. Otherwise, we will get
    sequence of packets with delimeter bit set, thus braking record
    bounds.
    Also remove ignore of non-stream type of packets, handle SEQPACKET
    feature bit.
    Signed-off-by: default avatarArseny Krasnov <arseny.krasnov@kaspersky.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ced7b713
vsock.c 24.4 KB