Change the type of 'ndesc' from 'int' to 'uint16_t' so that descriptor index

wraparound is handled correctly.

The gory details are available here:
http://lists.freebsd.org/pipermail/freebsd-virtualization/2013-March/001119.html

This fixes a regression introduced in r247871.

Pointed out by:	Bruce Evans, Chris Torek
This commit is contained in:
Neel Natu 2013-03-16 05:40:29 +00:00
parent a2dee2ad37
commit 1e7d750c75
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=248368

View File

@ -170,7 +170,7 @@ pci_vtnet_iosize(struct pci_devinst *pi)
static int
hq_num_avail(struct vring_hqueue *hq)
{
int ndesc;
uint16_t ndesc;
/*
* We're just computing (a-b) in GF(216).