Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| summerofcode2015:ne2000emulationforbhyve [2015/05/17 16:48] – AlexTeaca | summerofcode2015:ne2000emulationforbhyve [2015/08/23 20:17] (current) – AlexTeaca | ||
|---|---|---|---|
| Line 42: | Line 42: | ||
| Test the NE2000 module implementation, | Test the NE2000 module implementation, | ||
| - | ===== Test Plan ===== | + | ===== Final Results |
| + | I've implemented the NE2000 emulation in the bhyve hypervisor under both PCI and LPC attachments. The full implementation is located in: | ||
| + | /// | ||
| - | (List of steps you plan to use to test your work, as discussed with your mentor) | + | In order to use the device in bhyve, you need to configure it in the parameters list as: |
| + | * under lpc: -l ne2k0,/ | ||
| + | * under pci: -s 4: | ||
| - | ===== The Code ===== | + | Under the LPC bus, you can add at most two ne2000 devices which are ne2k0 and ne2k1. If you want to add two interfaces at the same time you will configure it like: |
| + | * -l ne2k0,/ | ||
| - | * https:// | + | In the guest operating system you will see the network interfaces as: |
| - | ===== Useful links ===== | + | < |
| + | ed0 at port 0x310-0x32f irq 10 on isa0 | ||
| + | ed0: Ethernet address: 00: | ||
| + | ed1 at port 0x330-0x34f irq 11 on isa0 | ||
| + | ed1: Ethernet address: 00: | ||
| - | * [0] http:// | + | ed0: flags=8802< |
| - | * [1] https:// | + | ether 00: |
| - | * [2] http:// | + | nd6 options=29< |
| + | media: Ethernet 10baseT/UTP < | ||
| + | ed1: flags=8802< | ||
| + | ether 00: | ||
| + | nd6 options=29< | ||
| + | media: Ethernet 10baseT/UTP < | ||
| + | |||
| + | Any ne2000 device attached under the PCI bus will be probed as the ed2, ed3 ... network interfaces. | ||
| + | |||
| + | ''' | ||
| + | hint.ed.0.at=" | ||
| + | hint.ed.0.port=" | ||
| + | hint.ed.0.irq=" | ||
| + | hint.ed.1.at=" | ||
| + | hint.ed.1.port=" | ||
| + | hint.ed.1.irq=" | ||
| + | |||
| + | == Test Plan == | ||
| + | All these tests have passed successfully: | ||
| + | * transmit/ | ||
| + | * stop, start the ED interface during the traffic is running | ||
| + | * transmit/ | ||
| + | * enable promiscuous mode with the tcpdump enabled, so all packets are accepted | ||
| + | |||
| + | == Performance Tests == | ||
| + | In order to measure the N2000 emulation performance I've used the iperf tool running as server and client in two virtual machine instances.{{{ | ||
| + | guest1: ifconfig ed0 inet 192.168.0.1 | ||
| + | guest2: ifconfig ed1 inet 192.168.0.2}}} | ||
| + | |||
| + | In order to make connectivity between them, I've attached their tap interfaces in a bridge. For example: | ||
| + | ifconfig bridge create | ||
| + | ifconfig bridge0 addm tap0 addm tap1 | ||
| + | ifconfig bridge0 inet 192.168.0.10}}} | ||
| + | |||
| + | For the UDP traffic I've run these iperf commands: | ||
| + | guest2: iperf -s -u | ||
| + | guest1: iperf -c 192.168.0.2 -f Mbyte -u -b 7m | ||
| + | ------------------------------------------------------------ | ||
| + | Client connecting to 192.168.0.2, | ||
| + | Sending 1470 byte datagrams | ||
| + | UDP buffer size: 0.01 MByte (default) | ||
| + | ------------------------------------------------------------ | ||
| + | [ 3] local 192.168.0.1 port 54052 connected with 192.168.0.2 port 5001 | ||
| + | [ ID] Interval | ||
| + | [ 3] 0.0-10.0 sec 7.09 MBytes | ||
| + | [ 3] Sent 5057 datagrams | ||
| + | [ 3] Server Report: | ||
| + | [ 3] 0.0-10.0 sec 7.09 MBytes | ||
| + | [ 3] 0.0-10.0 sec 1 datagrams received out-of-order}}} | ||
| + | |||
| + | For the TCP traffic I've run these iperf commands: | ||
| + | guest2: iperf -s | ||
| + | guest1: iperf -c 192.168.0.2 -f Mbyte | ||
| + | ------------------------------------------------------------ | ||
| + | Client connecting to 192.168.0.2, | ||
| + | TCP window size: 0.03 MByte (default) | ||
| + | ------------------------------------------------------------ | ||
| + | [ 3] local 192.168.0.1 port 31221 connected with 192.168.0.2 port 5001 | ||
| + | [ ID] Interval | ||
| + | [ 3] 0.0-10.0 sec 6.75 MBytes | ||
| + | |||
| + | ''' | ||
| + | |||
| + | == The Code == | ||
| + | |||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | == Useful links == | ||
| + | |||
| + | * [0] http:// | ||
| + | * [1] https:// | ||
| + | * [2] http:// | ||
| + | |||
| + | </ | ||