search for: virtio_transport_get_max_pkt_len

Displaying 1 result from an estimated 1 matches for "virtio_transport_get_max_pkt_len".

2018 Dec 12
0
[PATCH v2 4/5] VSOCK: increase send pkt len in mergeable mode to improve performance
...t/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index 148b58a..809085a 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -222,6 +222,22 @@ static int virtio_transport_send_pkt_loopback(struct virtio_vsock *vsock, return len; } +static u32 +virtio_transport_get_max_pkt_len(u32 cid) +{ + int len = VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE; + struct virtio_vsock *vsock; + + vsock = virtio_vsock_get(); + if (!vsock) + return len; + + if (vsock->mergeable) + len = VIRTIO_VSOCK_MAX_PKT_BUF_SIZE; + + return len; +} + static int virtio_transport_cancel_pkt(struct vsock_sock *...