diff options
Diffstat (limited to 'drivers/vhost/net.c')
-rw-r--r-- | drivers/vhost/net.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index d415d69dc237..9484d5652ca5 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c | |||
@@ -650,8 +650,10 @@ static void handle_rx(struct vhost_net *net) | |||
650 | break; | 650 | break; |
651 | } | 651 | } |
652 | /* TODO: Should check and handle checksum. */ | 652 | /* TODO: Should check and handle checksum. */ |
653 | |||
654 | hdr.num_buffers = cpu_to_vhost16(vq, headcount); | ||
653 | if (likely(mergeable) && | 655 | if (likely(mergeable) && |
654 | memcpy_toiovecend(nvq->hdr, (unsigned char *)&headcount, | 656 | memcpy_toiovecend(nvq->hdr, (void *)&hdr.num_buffers, |
655 | offsetof(typeof(hdr), num_buffers), | 657 | offsetof(typeof(hdr), num_buffers), |
656 | sizeof hdr.num_buffers)) { | 658 | sizeof hdr.num_buffers)) { |
657 | vq_err(vq, "Failed num_buffers write"); | 659 | vq_err(vq, "Failed num_buffers write"); |