Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - ifconfig stats not getting updated properly: (4 Items)
   
ifconfig stats not getting updated properly  
Hi All,

 

    I'm working on omapl137 board, after the network driver gets loaded,

If I try to see the stats through the ifconfig -v option, the stats are
not 

getting updated properly(input and output both 0 packets). 

But if I run the nicinfo, I can see the stats updated correctly.

 

Actually its an io-net driver, io-pkt-v4 loads it using the devnp-shim,

any idea why this behaviour ? is it the shim layer causing the 

problem or with the io-pkt am I missing something,

Thanks in advance. 

 

Here is the sequence:

 

# io-pkt-v4 -ddm644x-l137 -ptcpip  

# ifconfig en0 10.90.74.246/24 up

# 

# ifconfig 

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192

        inet 127.0.0.1 netmask 0xff000000

en0: flags=80008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,SHIM> mtu
1500

        address: 00:0e:99:02:f9:4e

        inet 10.90.74.246 netmask 0xffffff00 broadcast 10.90.74.255

 

# ifconfig -v

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192

        input: 0 packets, 0 bytes

        output: 0 packets, 0 bytes

        inet 127.0.0.1 netmask 0xff000000

en0: flags=80008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,SHIM> mtu
1500

        address: 00:0e:99:02:f9:4e

        input: 0 packets, 2661 bytes, 32 multicasts

        output: 0 packets, 42 bytes

        inet 10.90.74.246 netmask 0xffffff00 broadcast 10.90.74.255

 

# ping -c 3 10.90.74.1

PING 10.90.74.1 (10.90.74.1): 56 data bytes

64 bytes from 10.90.74.1: icmp_seq=0 ttl=255 time=8 ms

64 bytes from 10.90.74.1: icmp_seq=1 ttl=255 time=3 ms

64 bytes from 10.90.74.1: icmp_seq=2 ttl=255 time=3 ms

 

----10.90.74.1 PING Statistics----

3 packets transmitted, 3 packets received, 0% packet loss

round-trip min/avg/max = 3/4/8 ms   variance = 17 ms^2

# ifconfig -v

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192

        input: 6 packets, 306 bytes

        output: 6 packets, 306 bytes

        inet 127.0.0.1 netmask 0xff000000

en0: flags=80008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,SHIM> mtu
1500

        address: 00:0e:99:02:f9:4e

        input: 0 packets, 5094 bytes, 57 multicasts

        output: 0 packets, 378 bytes

        inet 10.90.74.246 netmask 0xffffff00 broadcast 10.90.74.255

# nicinfo 

en0: 

  TI DM644x EMAC Ethernet Controller

 

  Physical Node ID ........................... 000E99 02F94E

  Current Physical Node ID ................... 000E99 02F94E

  Current Operation Rate ..................... 100.00 Mb/s half-duplex

  Active Interface Type ...................... MII

    Active PHY address ....................... 1

  Maximum Transmittable data Unit ............ 1514

  Maximum Receivable data Unit ............... 1514

  Hardware Interrupt ......................... 0x22

  Hardware Interrupt ......................... 0x23

  I/O Aperture ............................... 0x1e20000 - 0x1e24fff

  Promiscuous Mode ........................... Off

  Multicast Support .......................... Enabled

 

  Packets Transmitted OK ..................... 5

  Bytes Transmitted OK ....................... 434

  Broadcast Packets Transmitted OK ........... 2

  Multicast Packets Transmitted OK ........... 0

 

  Packets Received OK ........................ 80

  Bytes Received OK .......................... 6936

  Broadcast Packets Received OK .............. 76

  Multicast Packets Received OK .............. 0

 

  Single Collisions on Transmit .............. 0

  Multiple Collisions on Transmit ............ 0

  Deferred Transmits ......................... 0

  Late Collision on Transmit errors .......... 0

  Transmits aborted (excessive collisions) ... 0

  No Carrier on Transmit ..................... 0

  Jabber detected ............................ 0

  Receive Alignment errors ......................
View Full Message
RE: ifconfig stats not getting updated properly  
I looked at the source to the shim, and it does the
right thing - it increments the ifp fields.

However, I then did an "svn log" of shim/transmit.c and
sure enough, I see a commit on 2008-12-17 that I fixed
this.

Executive Summary: 

1) This was broken.  
2) You need a newer shim to fix this.  
3) PR 61874 applies.

--
aboyd
RE: ifconfig stats not getting updated properly  
Hi Andrew,

Thanks for all the info,
I tried building the devnp-shim from the trunk, 
but its failing, my environment being qnx 6.4.0 for arm.le,
applied the srcversion patch  for QNX 6.4.0 from the link 
http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/So
urce_Guide

Please find the build error logfile attached.


Thanks,
Ganesh


-----Original Message-----
From: Andrew Boyd [mailto:community-noreply@qnx.com] 
Sent: Tuesday, January 05, 2010 8:12 PM
To: drivers-networking
Subject: RE: ifconfig stats not getting updated properly


I looked at the source to the shim, and it does the
right thing - it increments the ifp fields.

However, I then did an "svn log" of shim/transmit.c and
sure enough, I see a commit on 2008-12-17 that I fixed
this.

Executive Summary: 

1) This was broken.  
2) You need a newer shim to fix this.  
3) PR 61874 applies.

--
aboyd




_______________________________________________

Networking Drivers
http://community.qnx.com/sf/go/post44568

Attachment: Text qnx640_shim_log.txt 25.39 KB
RE: ifconfig stats not getting updated properly  
> applied the srcversion patch

I have the sinking feeling that changing your
system header files has created more problems
than it solved  :-(

IIRC an easier way to fix the srcversion headache:

#define __SRCVERSION(x)

which I think I put at the end of sys/platform.h

--
aboyd