Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Drivers: hv: vmbus: Permit sending of packets without payload

The guest may have to send a completion packet back to the host.
To support this usage, permit sending a packet without a payload -
we would be only sending the descriptor in this case.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

K. Y. Srinivasan and committed by
Greg Kroah-Hartman
b81658cf b6ddeae1

+3 -1
+3 -1
drivers/hv/channel.c
··· 601 601 u64 aligned_data = 0; 602 602 int ret; 603 603 bool signal = false; 604 + int num_vecs = ((bufferlen != 0) ? 3 : 1); 604 605 605 606 606 607 /* Setup the descriptor */ ··· 619 618 bufferlist[2].iov_base = &aligned_data; 620 619 bufferlist[2].iov_len = (packetlen_aligned - packetlen); 621 620 622 - ret = hv_ringbuffer_write(&channel->outbound, bufferlist, 3, &signal); 621 + ret = hv_ringbuffer_write(&channel->outbound, bufferlist, num_vecs, 622 + &signal); 623 623 624 624 /* 625 625 * Signalling the host is conditional on many factors: