Skip to content

Commit

Permalink
Merge pull request torvalds#199 from liuyuan10/fix
Browse files Browse the repository at this point in the history
lkl: use le16toh on q->avail->idx
  • Loading branch information
Octavian Purdila authored Aug 12, 2016
2 parents 071dc80 + 2431bb5 commit e99de6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/lkl/lib/virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void virtio_req_complete(struct virtio_req *req, uint32_t len)
* q->last_avail_idx is incremented after calling virtio_req_complete(),
* so here we need to add avail_used to it.
*/
if (q->last_avail_idx + avail_used == q->avail->idx)
if (q->last_avail_idx + avail_used == le16toh(q->avail->idx))
send_irq = 1;

/* There are two rings: q->avail and q->used for each of the rx and tx
Expand Down

0 comments on commit e99de6d

Please sign in to comment.