Skip to content

Commit e99de6d

Browse files
author
Octavian Purdila
authored
Merge pull request torvalds#199 from liuyuan10/fix
lkl: use le16toh on q->avail->idx
2 parents 071dc80 + 2431bb5 commit e99de6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/lkl/lib/virtio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void virtio_req_complete(struct virtio_req *req, uint32_t len)
111111
* q->last_avail_idx is incremented after calling virtio_req_complete(),
112112
* so here we need to add avail_used to it.
113113
*/
114-
if (q->last_avail_idx + avail_used == q->avail->idx)
114+
if (q->last_avail_idx + avail_used == le16toh(q->avail->idx))
115115
send_irq = 1;
116116

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

0 commit comments

Comments
 (0)