diff options
| author | Luigi Rizzo <luigi@FreeBSD.org> | 2014-01-10 16:01:44 +0000 |
|---|---|---|
| committer | Luigi Rizzo <luigi@FreeBSD.org> | 2014-01-10 16:01:44 +0000 |
| commit | 0c7ba37e01bc17028ff248079bc493e7d9aef00e (patch) | |
| tree | d32667728a42d5ab55fd26fc23273cd0a3f811c2 /sys/dev/netmap/netmap_vale.c | |
| parent | f6c2a31f72d1c733189827461dfa6cc8dfbf622e (diff) | |
Notes
Diffstat (limited to 'sys/dev/netmap/netmap_vale.c')
| -rw-r--r-- | sys/dev/netmap/netmap_vale.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/netmap/netmap_vale.c b/sys/dev/netmap/netmap_vale.c index f988b84e78b2..cec2ac15a7e9 100644 --- a/sys/dev/netmap/netmap_vale.c +++ b/sys/dev/netmap/netmap_vale.c @@ -1835,12 +1835,15 @@ netmap_bwrap_register(struct netmap_adapter *na, int onoff) hostna->up.na_lut_objtotal = na->na_lut_objtotal; } - /* cross-link the netmap rings */ - for (i = 0; i <= na->num_tx_rings; i++) { + /* cross-link the netmap rings + * The original number of rings comes from hwna, + * rx rings on one side equals tx rings on the other. + */ + for (i = 0; i <= na->num_rx_rings; i++) { hwna->tx_rings[i].nkr_num_slots = na->rx_rings[i].nkr_num_slots; hwna->tx_rings[i].ring = na->rx_rings[i].ring; } - for (i = 0; i <= na->num_rx_rings; i++) { + for (i = 0; i <= na->num_tx_rings; i++) { hwna->rx_rings[i].nkr_num_slots = na->tx_rings[i].nkr_num_slots; hwna->rx_rings[i].ring = na->tx_rings[i].ring; } |
