qemu with two ne2k_isa devices
denis
denistelum2 at gmail.com
Wed Jul 9 08:27:58 UTC 2014
Hi.
I'm trying to run rtems in qemu (version 1.0) with two ne2k_isa devices.
Second interface (netdriver_config_2) works fine. But first interface
(netdriver_config_1) appears with mac-address FF:FF:FF:FF:FF:FF and
completely inoperable.
Any advice to fix first interface?
Qemu command:
qemu-system-i386 -m 512M -nodefaults -nographic -vga none -serial stdio
-no-reboot -kernel myapp \
-device ne2k_isa,irq=11,iobase=0x301,mac=10:10:10:10:01:01,vlan=1 -net
tap,vlan=1,ifname="if1",script=no,downscript=no \
-device ne2k_isa,irq=12,iobase=0x302,mac=10:10:10:10:01:02,vlan=2 -net
tap,vlan=2,ifname="if2",script=no,downscript=no &
Interface configuration from myapp.c:
static struct rtems_bsdnet_ifconfig netdriver_config_2 = {
.name = "ne2",
.attach = rtems_ne_driver_attach,
.port = 0x302,
.irno = 12,
.ip_address = "192.168.12.1",
.ip_netmask = "255.255.255.0",
};
static struct rtems_bsdnet_ifconfig netdriver_config_1 = {
.name = "ne1",
.attach = rtems_ne_driver_attach,
.port = 0x301,
.irno = 11,
.next = &netdriver_config_2,
.ip_address = "192.168.11.1",
.ip_netmask = "255.255.255.0",
};
struct rtems_bsdnet_config rtems_bsdnet_config = {
.ifconfig = &netdriver_config_1,
};
Output from rtems_bsdnet_show_if_stats:
***** ne1 *****
Ethernet Address: FF:FF:FF:FF:FF:FF
Address:192.168.11.1 Broadcast Address:192.168.11.255 Net
mask:255.255.255.0
Flags: Up Broadcast Running Simplex Multicast
Send queue limit:50 length:0 Dropped:0
Received packets: 0 Transmitted packets: 1
Receive acks: 0 Transmit acks: 0
Packet overruns: 0 Frame errors: 0
CRC errors: 0 Missed packets: 0
Interrupts: 0
***** ne2 *****
Ethernet Address: 10:10:10:10:01:02
Address:192.168.12.1 Broadcast Address:192.168.12.255 Net
mask:255.255.255.0
Flags: Up Broadcast Running Simplex Multicast
Send queue limit:50 length:0 Dropped:0
Received packets: 0 Transmitted packets: 1
Receive acks: 0 Transmit acks: 1
Packet overruns: 0 Frame errors: 0
CRC errors: 0 Missed packets: 0
Interrupts: 1
More information about the users
mailing list