Author: luigi Date: Fri Jan 10 16:01:44 2014 New Revision: 260516 URL: http://svnweb.freebsd.org/changeset/base/260516
Log: Fix netmap emulation when NICs attached to a VALE switch have a different number of tx and rx rings Submitted by: Vincenzo Maffione Modified: head/sys/dev/netmap/netmap_vale.c Modified: head/sys/dev/netmap/netmap_vale.c ============================================================================== --- head/sys/dev/netmap/netmap_vale.c Fri Jan 10 16:00:27 2014 (r260515) +++ head/sys/dev/netmap/netmap_vale.c Fri Jan 10 16:01:44 2014 (r260516) @@ -1835,12 +1835,15 @@ netmap_bwrap_register(struct netmap_adap 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; } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"