I'm troubleshooting Ethernet issues we're having with our board and a C6655 DSP. See here for a related question I posted over in the DSP forums.
I have the following code executing every half second, printing the statistics using platform_write():
#include <stack/inc/rawethif.h> #include <stack/inc/rawif.h> #include <stack/inc/ipif.h> #include <stack/inc/tcpif.h> void half_second_debug() { platform_write("Raw Ethernet : Rx: %d RxDrop: %d Tx: %d TxFailMem: %d\n", raweths.RcvTotal, raweths.RcvDrops, raweths.SndTotal, raweths.SndNoPacket); platform_write("Raw Transport: Rx: %d RxFull: %d Tx: %d TxFail : %d\n", raws.RcvTotal, raws.RcvFull, raws.SndTotal, raws.SndNoPacket); platform_write("IP : TotalPkt: %d\n", ips.Total); platform_write("TCP : RxBytes: %d TxBytes: %d\n", tcps.RcvByte, tcps.SndByte); }
However, the raweths and raws statistics are not updating. This is the output after running for a bit:
Raw Ethernet : Rx: 0 RxDrop: 0 Tx: 0 TxFailMem: 0 Raw Transport: Rx: 0 RxFull: 0 Tx: 0 TxFail : 0 IP : TotalPkt: 974 TCP : RxBytes: 30330 TxBytes: 56521
Why aren't they updating? The network stack is operational and packets are being sent and received, as indicated by the ips and tcps stats.