svn commit: r228281 - in head/sys/dev: e1000 re

Marius Strobl marius at alchemy.franken.de
Mon Dec 5 18:38:56 UTC 2011


On Mon, Dec 05, 2011 at 03:33:14PM +0000, Luigi Rizzo wrote:
> Author: luigi
> Date: Mon Dec  5 15:33:13 2011
> New Revision: 228281
> URL: http://svn.freebsd.org/changeset/base/228281
> 
> Log:
>   add netmap support for "em", "lem", "igb" and "re".
>   
>   On my hardware, "em" in netmap mode does about 1.388 Mpps
>   on one card (on an Asus motherboard), and 1.1 Mpps on another
>   card (PCIe bus). Both seem to be NIC-limited, because
>   i have the same rate even with the CPU running at 150 MHz.
>   
>   On the "re" driver the tx throughput is around 420-450 Kpps
>   on various (8111C and the like) chipsets. On the Rx side
>   performance seems much better, and i can receive the full
>   load generated by the "em" cards.
>   
>   "igb" is untested as i don't have the hardware.
> 

<...>

> +#ifdef DEV_NETMAP
> +		if (slot) {
> +			int si = i + na->tx_rings[txr->me].nkr_hwofs;
> +			void *addr;
> +
> +			if (si >= na->num_tx_desc)
> +				si -= na->num_tx_desc;
> +			addr = NMB(slot + si);
> +			txr->tx_base[i].buffer_addr =
> +			    htole64(vtophys(addr));
> +			/* reload the map for netmap mode */
> +			netmap_load_map(txr->txtag,
> +			    txbuf->map, addr, na->buff_size);
> +		}
> +#endif /* DEV_NETMAP */

Can these vtophys(9) usages be fixed to use bus_dma(9) instead so netmap
works with bounce buffers, IOMMUs etc?

Marius



More information about the svn-src-head mailing list