Skip navigation.
Home
The QNX Community Portal

View topic - Missing wm1 interface

Missing wm1 interface

anything that doesn't fit to other groups.

Missing wm1 interface

Postby Eiswuerfel » Wed Oct 30, 2013 1:19 pm

Hi,

I'm using QNX 6.5 SP1 on a board with two ethernet controllers, which are supported by the e1000 driver. Only one (wm0) is auto detected and working fine.

If I want to use both controllers I have to stop io-pkt-v4-hc and to restart it as follows:
---
slay io-pkt-v4-hc
wait 2
io-pkt-v4-hc -de1000 verbose=1,pci=0x0,vid=0x8086,did=0x10d3 -ptcpip
io-pkt-v4-hc -de1000 verbose=1,pci=0x0,vid=0x8086,did=0x1502 -ptcpip prefix=/dev/socket2
wait 2
ifconfig en0 172.16.205.31 netmask 255.255.0.0
SOCK=/dev/socket2 ifconfig en0 172.16.205.36 netmask 255.255.0.0
---



# pidin -p io-pkt-v4-hc
pid tid name prio STATE Blocked
1871895 1 sbin/io-pkt-v4-hc 21r SIGWAITINFO
1871895 2 sbin/io-pkt-v4-hc 10r RECEIVE 1
1871895 3 sbin/io-pkt-v4-hc 21r RECEIVE 25
1871895 4 sbin/io-pkt-v4-hc 21r RECEIVE 28
1876007 1 sbin/io-pkt-v4-hc 21r SIGWAITINFO
1876007 2 sbin/io-pkt-v4-hc 21r RECEIVE 1
1876007 3 sbin/io-pkt-v4-hc 21r RECEIVE 24
1876007 4 sbin/io-pkt-v4-hc 21r RECEIVE 27
#



# ls -l /dev/sock*

/dev/socket:
total 0
srw-rw-rw- 1 root root 0 Oct 30 13:58 1
srw-rw-rw- 1 root root 0 Oct 30 13:58 17
srw-rw-rw- 1 root root 0 Oct 30 13:58 2
nrw-rw-rw- 1 root root 0 Oct 30 13:58 autoconnect
nrw-rw-rw- 1 root root 0 Oct 30 13:58 config
nrw-rw-rw- 1 root root 0 Oct 30 13:58 netmanager
-rw-r--r-- 1 root root 0 Oct 30 13:42 pppmgr

/dev/socket2:
total 0
dr-xr-xr-x 2 root root 0 Oct 30 13:58 dev
#



# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
wm0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
capabilities=1f<IP4CSUM,TCP4CSUM,UDP4CSUM,TCP6CSUM,UDP6CSUM>
enabled=0
address: 00:19:99:c1:5d:1b
media: Ethernet autoselect (100baseTX full-duplex,flowcontrol,rxpause,tx
pause)
status: active
inet 172.16.205.31 netmask 0xffff0000 broadcast 172.16.255.255
#



# SOCK=/dev/socket2 ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
wm0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
capabilities=1f<IP4CSUM,TCP4CSUM,UDP4CSUM,TCP6CSUM,UDP6CSUM>
enabled=0
address: 00:19:99:c6:60:e2
media: Ethernet autoselect (100baseTX full-duplex,flowcontrol,rxpause,tx
pause)
status: active
inet 172.16.205.36 netmask 0xffff0000 broadcast 172.16.255.255
#



# ping -c 3 172.16.205.6
PING 172.16.205.6 (172.16.205.6): 56 data bytes
64 bytes from 172.16.205.6: icmp_seq=0 ttl=255 time=0 ms
64 bytes from 172.16.205.6: icmp_seq=1 ttl=255 time=0 ms
64 bytes from 172.16.205.6: icmp_seq=2 ttl=255 time=0 ms

----172.16.205.6 PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms variance = 0 ms^2
#



# SOCK=/dev/socket2 ping -c 3 172.16.205.6
PING 172.16.205.6 (172.16.205.6): 56 data bytes
64 bytes from 172.16.205.6: icmp_seq=0 ttl=255 time=0 ms
64 bytes from 172.16.205.6: icmp_seq=1 ttl=255 time=0 ms
64 bytes from 172.16.205.6: icmp_seq=2 ttl=255 time=0 ms

----172.16.205.6 PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms variance = 0 ms^2
#


So everything seems to be fine, but it is not. :-(


As you see in the attached jpg the system only knows wm0, but not wm1, which I would expect.
Therefor I can't use the second ethernet port via my own program, because I have to use "wm1"
to address the second port, otherwise (and without "setsockopt()") I would get the first port:

int iSocketHandle;
struct ifreq ifr;

iSocketHandle = socket(AF_INET, SOCK_DGRAM, 0);
memset(&ifr, 0 , sizeof(ifr));
snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "wm1");
if(setsockopt(iSocketHandle, SOL_SOCKET, SO_BINDTODEVICE, (void*)&ifr, sizeof(ifr)) < 0)
printf("setsockopt(SO_BINDTODEVICE): %s\n", strerror(errno));


Even if I combine

io-pkt-v4-hc -de1000 verbose=1,pci=0x0,vid=0x8086,did=0x10d3 -ptcpip
io-pkt-v4-hc -de1000 verbose=1,pci=0x0,vid=0x8086,did=0x1502 -ptcpip prefix=/dev/socket2

to

io-pkt-v4-hc -de1000 verbose=1,pci=0x0,vid=0x8086,did=0x10d3 -ptcpip -de1000 \ verbose=1,pci=0x0,vid=0x8086,did=0x1502 -ptcpip prefix=/dev/socket2

or to

io-pkt-v4-hc -i1 -de1000 verbose=1,pci=0x0,vid=0x8086,did=0x10d3 -ptcpip -i2 -de1000 \ verbose=1,pci=0x0,vid=0x8086,did=0x1502 -ptcpip prefix=/dev/socket2

I always get only /dev/socket2 and no errors in sloginfo:
---
# sloginfo
Time Sev Major Minor Args
Oct 30 14:14:20 5 10 0 devnp-e1000: i82544_stop() called, disable = 1

Oct 30 14:14:34 5 10 0 devnp-e1000: i82544_stop() called, disable = 1

Oct 30 14:16:15 5 14 0 tcpip starting
Oct 30 14:16:15 3 14 0 Using pseudo random generator. See "random" op
tion
Oct 30 14:16:15 5 14 0 initializing IPsec... done
Oct 30 14:16:15 5 14 0 IPsec: Initialized Security Association Process
ing.
Oct 30 14:16:15 5 10 0 Link down
Oct 30 14:16:15 5 14 0 INTEL PRO/1000 Gigabit (Copper)
Oct 30 14:16:15 5 14 0 Vendor .............. 0x8086
Oct 30 14:16:15 5 14 0 Device .............. 0x1502
Oct 30 14:16:15 5 14 0 Revision ............ 0x0
Oct 30 14:16:15 5 14 0 Memory base ......... 0xfe600000
Oct 30 14:16:15 5 14 0 Interrupt ........... 0xa
Oct 30 14:16:15 5 14 0 MAC address ......... 001999 c660e2
Oct 30 14:16:28 5 14 0 tcpip starting
Oct 30 14:16:28 3 14 0 Using pseudo random generator. See "random" op
tion
Oct 30 14:16:28 5 14 0 initializing IPsec... done
Oct 30 14:16:28 5 14 0 IPsec: Initialized Security Association Process
ing.
Oct 30 14:16:29 5 10 0 Link down
Oct 30 14:16:29 5 14 0 INTEL PRO/1000 Gigabit (Copper)
Oct 30 14:16:29 5 14 0 Vendor .............. 0x8086
Oct 30 14:16:29 5 14 0 Device .............. 0x10d3
Oct 30 14:16:29 5 14 0 Revision ............ 0x0
Oct 30 14:16:29 5 14 0 Memory base ......... 0xfe500000
Oct 30 14:16:29 5 14 0 Interrupt ........... 0xa
Oct 30 14:16:29 5 14 0 MAC address ......... 001999 c15d1b
#
---


I believe some time ago I had two interfaces to be seen in the network configurator, but I can't remember when and for what reason the second one disappeared. :-(


How do I get the second interface correctly back in the system?

Kind regards

Martin
Attachments
Network.jpg
(57.43 KiB) Not downloaded yet
Eiswuerfel
Active Member
 
Posts: 11
Joined: Wed Oct 12, 2005 12:33 pm

Re: Missing wm1 interface

Postby Eiswuerfel » Wed Oct 30, 2013 1:24 pm

I've missed some data:

After
# ifconfig en0 172.16.205.31 netmask 255.255.0.0
# SOCK=/dev/socket2 ifconfig en0 172.16.205.36 netmask 255.255.0.0
#

I get more sloginfo


Oct 30 14:17:06 5 10 0 devnp-e1000: i82544_stop() called, disable = 0

Oct 30 14:17:06 6 10 0 ITR set to 20000
Oct 30 14:17:06 5 10 0 Link down
Oct 30 14:17:06 5 10 0 Link down
Oct 30 14:17:08 5 10 0 TSO disabled for link speed < 1G
Oct 30 14:17:08 5 10 0 update_link_status CTRL 18100248
Oct 30 14:17:08 5 10 0 Link up speed 100 Mbps - duplex Full
Oct 30 14:17:11 5 10 0 devnp-e1000: i82544_stop() called, disable = 0

Oct 30 14:17:11 6 10 0 ITR set to 20000
Oct 30 14:17:11 5 10 0 Link down
Oct 30 14:17:14 5 10 0 TSO disabled for link speed < 1G
Oct 30 14:17:14 5 10 0 update_link_status CTRL 18100240
Oct 30 14:17:14 5 10 0 Link up speed 100 Mbps - duplex Full
Eiswuerfel
Active Member
 
Posts: 11
Joined: Wed Oct 12, 2005 12:33 pm

Re: Missing wm1 interface

Postby maschoen » Wed Oct 30, 2013 5:51 pm

I'm not sure if you have a complex problem or a simple one. What happens if you run:


# io-pkt-v4-hc -de1000 vid=0x8086,did=0x10d3 -de1000 vid=0x8086,did=0x1502 -ptcpip

and then run

# ifconfig

to see if wm0 and wm1 appear. If they do try:

# ifconfig wm0 192.168.1.1
# ifconfig wm1 192.168.1.2

# ping 192.168.1.1
# ping 192.168.1.2
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: Missing wm1 interface

Postby Eiswuerfel » Mon Nov 04, 2013 9:47 am

The second interface is not responding:

# io-pkt-v4-hc -de1000 vid=0x8086,did=0x10d3 -de1000 vid=0x8086,did=0x1502 -ptcp
#
# ifconfig wm0 192.168.1.1
# ifconfig wm1 192.168.1.2
# ping -c 3 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: icmp_seq=0 ttl=255 time=0 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=255 time=0 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=255 time=0 ms

----192.168.1.1 PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms variance = 0 ms^2
# ping -c 3 192.168.1.2
PING 192.168.1.2 (192.168.1.2): 56 data bytes

----192.168.1.2 PING Statistics----
3 packets transmitted, 0 packets received, 100% packet loss
#


If I exchange the device ids against each other, then I get the second interface working, but NOT the first one:

# io-pkt-v4-hc -de1000 vid=0x8086,did=0x1502 -de1000 vid=0x8086,did=0x10d3 -ptcp
# ifconfig wm0 192.168.1.1
# ifconfig wm1 192.168.1.2
# ping -c 3 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: icmp_seq=0 ttl=255 time=0 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=255 time=0 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=255 time=0 ms

----192.168.1.1 PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms variance = 0 ms^2
# ping -c 3 192.168.1.2
PING 192.168.1.2 (192.168.1.2): 56 data bytes

----192.168.1.2 PING Statistics----
3 packets transmitted, 0 packets received, 100% packet loss
#


So, what to try next? ;-)
Eiswuerfel
Active Member
 
Posts: 11
Joined: Wed Oct 12, 2005 12:33 pm

Re: Missing wm1 interface

Postby maschoen » Mon Nov 04, 2013 10:58 am

Well this suggests that did=0x1502 is not working. The next thing I would try is just running with this interface, eg.

# io-pkt-v-hc -de1000 vid=0x8086,did=0x1502 -ptcp

If wm0 doesn't work, then the next thing I'd try (if possible) is to remove the 0x10d3 card and try one more time.

If it still doesn't work, then the verdict is bad or unsupported hardware, or possibly something in the BIOS not working right.
If at any point the did=0x1502 does work, then you know there is some interaction problem related to getting both working. I'm not sure what this could be but I'd be thinking about interrupts.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: Missing wm1 interface

Postby Eiswuerfel » Mon Nov 11, 2013 7:52 am

ATTENTION; this ist NOT my post, my post from 11.11.2013 ist LOST, the following text is NOT MINE!


While I can't tell you where to go next, it is clear that both should work together.
The obvious next step if you have a support contract is to go to QNX.
If you haven't tried Mario's suggestion, different networks or sub-nets, I would try that.



Who corrupted/killed my reply?
Are there more postings which are missing in this forum?
...?

Martin, shaking his head
Last edited by Eiswuerfel on Tue Nov 12, 2013 3:14 pm, edited 1 time in total.
Eiswuerfel
Active Member
 
Posts: 11
Joined: Wed Oct 12, 2005 12:33 pm

Re: Missing wm1 interface

Postby mario » Mon Nov 11, 2013 10:13 am

Warning, you cannot give two interfaces ip address that are in the same subnet.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Re: Missing wm1 interface

Postby Eiswuerfel » Tue Nov 12, 2013 3:26 pm

My originally reply (see the red lines above) was roughly like this:

Sorry for my late answer, but I was ill for some days.

I can't remove any of the two ethernet interfaces because it's a mainboard with two onboard ethernet interfaces.
I exchanged the 0x10d3 and 0x1502 vice versa to find out if both interfaces can work as they are the first mentioned interface in the io-pkt-v4-hc call. And indeed both interfaces can work as the first parameter in the io-pkt-v4-hc call. The second parameter, whether it is 0x10d3 or 0x1502, in the io-pkt-v4-hc call will not work.

In other words:

io-pkt-v4-hc -de1000 vid=0x8086,did=0x10d3 -de1000 vid=0x8086,did=0x1502 -ptcpip => 0x10d3 is working, 0x1502 NOT

io-pkt-v4-hc -de1000 vid=0x8086,did=0x1502 -de1000 vid=0x8086,did=0x10d3 -ptcpip => 0x1502 is working, 0x10d3 NOT

Martin
Eiswuerfel
Active Member
 
Posts: 11
Joined: Wed Oct 12, 2005 12:33 pm

Re: Missing wm1 interface

Postby mario » Tue Nov 12, 2013 3:35 pm

Eiswuerfel wrote:ATTENTION; this ist NOT my post, my post from 11.11.2013 ist LOST, the following text is NOT MINE!


While I can't tell you where to go next, it is clear that both should work together.
The obvious next step if you have a support contract is to go to QNX.
If you haven't tried Mario's suggestion, different networks or sub-nets, I would try that.



Who corrupted/killed my reply?
Are there more postings which are missing in this forum?
...?

Martin, shaking his head


Can`t tell you want happened, but this site is free, and as far as I know all based on volunteered work. Hence you waived your right to bitch. Good luck with your problem.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Re: Missing wm1 interface

Postby maschoen » Tue Nov 12, 2013 6:15 pm

This is all quite strange. The words in red are my words, but I did not post them in large letters or in red.
I did not delete or corrupt any postings, although I can. I don't know why my original posting seems to be gone.

At the risk of repeating myself, I would suggest that Mario's answer about different subnets should be tried.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm


Return to General Programming

Who is online

Users browsing this forum: No registered users and 4 guests