Chris Liang(deleted)
|
How to retrieve PHY status, counter up/down to debug network issue
|
Chris Liang(deleted)
10/30/2018 12:49 PM
post119262
|
How to retrieve PHY status, counter up/down to debug network issue
Hi all,
Currently, I have an issue of network controller eth0 that suddenly becomes non-responsive, cannot ping, no UDP/TCP. It
disappears from network.
Our product is running on QNX(6.4). At the power up, after proper configuring stage, our product is sending UDP
broadcasting packages to the network. Everything is fine. I saw UDP/TCP on the
wireshark trace and I can ping the system within the network. Suddenly, it disappears from network. I cannot
ping it, no more UDP/TCP showing on the wireshark. Instead remote machines sends ARP to the network. It can be fixed
just be pull out the Ethernet cable and plug back in. I don't know what is causing it. it seems the network driver goes
to some weird state.
I would like to debug deeper on the network stack. How should I get the PHY status, counter up/down, etc?
Hope I can get some help from this site.
Thanks in advance..
|
|
|
Hugh Brown
|
Re: How to retrieve PHY status, counter up/down to debug network issue
|
Hugh Brown
10/30/2018 12:59 PM
post119263
|
Re: How to retrieve PHY status, counter up/down to debug network issue
If you run "nicinfo" it should tell you whether the link is up or down. It will also show you the send and receive
packet counters. Which driver is this?
On 2018-10-30, 12:34 PM, "Chris Liang" <community-noreply@qnx.com> wrote:
Hi all,
Currently, I have an issue of network controller eth0 that suddenly becomes non-responsive, cannot ping, no UDP/TCP.
It disappears from network.
Our product is running on QNX(6.4). At the power up, after proper configuring stage, our product is sending UDP
broadcasting packages to the network. Everything is fine. I saw UDP/TCP on the
wireshark trace and I can ping the system within the network. Suddenly, it disappears from network. I cannot
ping it, no more UDP/TCP showing on the wireshark. Instead remote machines sends ARP to the network. It can be fixed
just be pull out the Ethernet cable and plug back in. I don't know what is causing it. it seems the network driver goes
to some weird state.
I would like to debug deeper on the network stack. How should I get the PHY status, counter up/down, etc?
Hope I can get some help from this site.
Thanks in advance..
_______________________________________________
General
http://community.qnx.com/sf/go/post119262
To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
|
|
|
Chris Liang(deleted)
|
Re: How to retrieve PHY status, counter up/down to debug network issue
|
Chris Liang(deleted)
10/30/2018 1:11 PM
post119264
|
Re: How to retrieve PHY status, counter up/down to debug network issue
Hi Hugh,
Thanks for replying.
driver is ppc405-ep440c which is special made for us by qnx.
if I do
# nicinfo -vr en0
it gives
en0:
PPC4xx on-chip EMAC Ethernet Controller
Physical Node ID ........................... 0002B3 8AF300
Current Physical Node ID ................... 001747 20027E
Current Operation Rate ..................... 100.00 Mb/s full-duplex
Active Interface Type ...................... MII
Active PHY address ....................... 0
Maximum Transmittable data Unit ............ 1514
Maximum Receivable data Unit ............... 0
Hardware Interrupt ......................... 0xb
Promiscuous Mode ........................... Off
Multicast Support .......................... Enabled
Packets Transmitted OK ..................... 417532444
Bytes Transmitted OK ....................... 602801382921
Memory Allocation Failures on Transmit ..... 0
Packets Received OK ........................ 313016415
Bytes Received OK .......................... 131288086572
Broadcast Packets Received OK .............. 0
Multicast Packets Received OK .............. 0
Memory Allocation Failures on Receive ...... 0
Single Collisions on Transmit .............. 0
Late Collision on Transmit errors .......... 0
Transmits aborted (excessive collisions) ... 0
Transmit Underruns ......................... 0
No Carrier on Transmit ..................... 0
Receive Alignment errors ................... 0
Received packets with CRC errors ........... 0
Packets Dropped on receive ................. 0
Oversized Packets received ................. 0
Short packets .............................. 0
Squelch Test errors ........................ 0
as you see, there is no showing link up/down info.
BTW, is there any API or system call i can use to retrieve those information in my program?
Thank you again.
|
|
|
Hugh Brown
|
Re: How to retrieve PHY status, counter up/down to debug network issue
|
Hugh Brown
10/30/2018 1:19 PM
post119265
|
Re: How to retrieve PHY status, counter up/down to debug network issue
Hi Chris,
The nicinfo output shows that the link is up (100.00 Mb/s full-duplex). If the link was down, the nicinfo output should
show 0 Mb/s. You can prove this by unplugging the link and then running nicinfo again.
As far as getting this information in your program, you would have to send the driver certain devctls, so I will have to
see if there is some documentation on this.
Hugh.
On 2018-10-30, 12:56 PM, "Chris Liang" <community-noreply@qnx.com> wrote:
Hi Hugh,
Thanks for replying.
driver is ppc405-ep440c which is special made for us by qnx.
if I do
# nicinfo -vr en0
it gives
en0:
PPC4xx on-chip EMAC Ethernet Controller
Physical Node ID ........................... 0002B3 8AF300
Current Physical Node ID ................... 001747 20027E
Current Operation Rate ..................... 100.00 Mb/s full-duplex
Active Interface Type ...................... MII
Active PHY address ....................... 0
Maximum Transmittable data Unit ............ 1514
Maximum Receivable data Unit ............... 0
Hardware Interrupt ......................... 0xb
Promiscuous Mode ........................... Off
Multicast Support .......................... Enabled
Packets Transmitted OK ..................... 417532444
Bytes Transmitted OK ....................... 602801382921
Memory Allocation Failures on Transmit ..... 0
Packets Received OK ........................ 313016415
Bytes Received OK .......................... 131288086572
Broadcast Packets Received OK .............. 0
Multicast Packets Received OK .............. 0
Memory Allocation Failures on Receive ...... 0
Single Collisions on Transmit .............. 0
Late Collision on Transmit errors .......... 0
Transmits aborted (excessive collisions) ... 0
Transmit Underruns ......................... 0
No Carrier on Transmit ..................... 0
Receive Alignment errors ................... 0
Received packets with CRC errors ........... 0
Packets Dropped on receive ................. 0
Oversized Packets received ................. 0
Short packets .............................. 0
Squelch Test errors ........................ 0
as you see, there is no showing link up/down info.
BTW, is there any API or system call i can use to retrieve those information in my program?
Thank you again.
_______________________________________________
General
http://community.qnx.com/sf/go/post119264
To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
|
|
|
Hugh Brown
|
Re: How to retrieve PHY status, counter up/down to debug network issue
|
Hugh Brown
10/30/2018 1:34 PM
post119266
|
Re: How to retrieve PHY status, counter up/down to debug network issue
I have attached the source code for nicinfo to this email.
Hugh.
On 2018-10-30, 12:56 PM, "Chris Liang" <community-noreply@qnx.com> wrote:
Hi Hugh,
Thanks for replying.
driver is ppc405-ep440c which is special made for us by qnx.
if I do
# nicinfo -vr en0
it gives
en0:
PPC4xx on-chip EMAC Ethernet Controller
Physical Node ID ........................... 0002B3 8AF300
Current Physical Node ID ................... 001747 20027E
Current Operation Rate ..................... 100.00 Mb/s full-duplex
Active Interface Type ...................... MII
Active PHY address ....................... 0
Maximum Transmittable data Unit ............ 1514
Maximum Receivable data Unit ............... 0
Hardware Interrupt ......................... 0xb
Promiscuous Mode ........................... Off
Multicast Support .......................... Enabled
Packets Transmitted OK ..................... 417532444
Bytes Transmitted OK ....................... 602801382921
Memory Allocation Failures on Transmit ..... 0
Packets Received OK ........................ 313016415
Bytes Received OK .......................... 131288086572
Broadcast Packets Received OK .............. 0
Multicast Packets Received OK .............. 0
Memory Allocation Failures on Receive ...... 0
Single Collisions on Transmit .............. 0
Late Collision on Transmit errors .......... 0
Transmits aborted (excessive collisions) ... 0
Transmit Underruns ......................... 0
No Carrier on Transmit ..................... 0
Receive Alignment errors ................... 0
Received packets with CRC errors ........... 0
Packets Dropped on receive ................. 0
Oversized Packets received ................. 0
Short packets .............................. 0
Squelch Test errors ........................ 0
as you see, there is no showing link up/down info.
BTW, is there any API or system call i can use to retrieve those information in my program?
Thank you again.
_______________________________________________
General
http://community.qnx.com/sf/go/post119264
To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
|
|
|
Chris Liang(deleted)
|
Re: How to retrieve PHY status, counter up/down to debug network issue
|
Chris Liang(deleted)
10/30/2018 1:47 PM
post119267
|
Re: How to retrieve PHY status, counter up/down to debug network issue
Thank you very much.
I saw the link is still up during the fault state(suddenly no ping, no udp/tcp). Once I unplug ethernet cable and plug
back in. everything works fine.
Any idea what could cause it or what should I look for?
Thanks
|
|
|
Hugh Brown
|
Re: How to retrieve PHY status, counter up/down to debug network issue
|
Hugh Brown
10/30/2018 1:49 PM
post119268
|
Re: How to retrieve PHY status, counter up/down to debug network issue
Take a look at the mdi_callback routine, which gets called for PHY up/down events. This routine is most probably poking
some registers.
On 2018-10-30, 1:32 PM, "Chris Liang" <community-noreply@qnx.com> wrote:
Thank you very much.
I saw the link is still up during the fault state(suddenly no ping, no udp/tcp). Once I unplug ethernet cable and
plug back in. everything works fine.
Any idea what could cause it or what should I look for?
Thanks
_______________________________________________
General
http://community.qnx.com/sf/go/post119267
To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
|
|
|
Chris Liang(deleted)
|
Re: How to retrieve PHY status, counter up/down to debug network issue
|
Chris Liang(deleted)
10/30/2018 1:57 PM
post119269
|
Re: How to retrieve PHY status, counter up/down to debug network issue
what source code is this mdi_callback?
|
|
|
Hugh Brown
|
Re: How to retrieve PHY status, counter up/down to debug network issue
|
Hugh Brown
10/30/2018 1:59 PM
post119270
|
Re: How to retrieve PHY status, counter up/down to debug network issue
It should be in the driver source code.
On 2018-10-30, 1:42 PM, "Chris Liang" <community-noreply@qnx.com> wrote:
what source code is this mdi_callback?
_______________________________________________
General
http://community.qnx.com/sf/go/post119269
To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
|
|
|
Chris Liang(deleted)
|
Re: How to retrieve PHY status, counter up/down to debug network issue
|
Chris Liang(deleted)
10/30/2018 2:23 PM
post119271
|
Re: How to retrieve PHY status, counter up/down to debug network issue
unfortunately, I don't have the driver source code. Is possible retrieve the those register status from devctls call?
Thanks
|
|
|
Hugh Brown
|
Re: How to retrieve PHY status, counter up/down to debug network issue
|
Hugh Brown
10/30/2018 2:25 PM
post119272
|
Re: How to retrieve PHY status, counter up/down to debug network issue
No, it isn't possible.
On 2018-10-30, 2:08 PM, "Chris Liang" <community-noreply@qnx.com> wrote:
unfortunately, I don't have the driver source code. Is possible retrieve the those register status from devctls call
?
Thanks
_______________________________________________
General
http://community.qnx.com/sf/go/post119271
To cancel your subscription to this discussion, please e-mail general-networking-unsubscribe@community.qnx.com
|
|
|
|