diff options
| author | Luigi Rizzo <luigi@FreeBSD.org> | 2014-06-05 21:12:41 +0000 |
|---|---|---|
| committer | Luigi Rizzo <luigi@FreeBSD.org> | 2014-06-05 21:12:41 +0000 |
| commit | 43ed1d3c768e40343ea3035369f0b578a037a227 (patch) | |
| tree | 6506e00e3f9b51d0780bfeb78bf83f75c03f51f4 /sys/dev/netmap/netmap_kern.h | |
| parent | c257f99e9b780a17756af5200ff895551f4f04fe (diff) | |
Notes
Diffstat (limited to 'sys/dev/netmap/netmap_kern.h')
| -rw-r--r-- | sys/dev/netmap/netmap_kern.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/netmap/netmap_kern.h b/sys/dev/netmap/netmap_kern.h index e6acd4d7ab16..dd5d058fafca 100644 --- a/sys/dev/netmap/netmap_kern.h +++ b/sys/dev/netmap/netmap_kern.h @@ -678,7 +678,7 @@ static inline uint32_t nm_kr_rxspace(struct netmap_kring *k) { int space = k->nr_hwtail - k->nr_hwcur; - if (space < 0) + if (space < 0) space += k->nkr_num_slots; ND("preserving %d rx slots %d -> %d", space, k->nr_hwcur, k->nr_hwtail); @@ -827,7 +827,7 @@ nm_txsync_finalize(struct netmap_kring *kring) { /* update ring tail to what the kernel knows */ kring->ring->tail = kring->rtail = kring->nr_hwtail; - + /* note, head/rhead/hwcur might be behind cur/rcur * if no carrier */ |
