[ECOS] Fwd: Packet size limit on TCP/IP stack ?

Andrew Lunn andrew@lunn.ch
Tue Sep 9 10:52:00 GMT 2003


> For reading the counters I tried to insert this code after call to TxMachine
> {
>    cyg_uint32  my_ioaddr = p_i82559->io_address;
>    unsigned char stat_counters[20] = { 0x00 };
>    unsigned char i;
>    OUTL(VIRT_TO_BUS(stat_counters), my_ioaddr + SCBPointer);
>    OUTW(CU_SHOWSTATS, my_ioaddr + SCBCmd);
> 
>    for(i = 0; i < sizeof(stat_counters); i++)
>        os_printf("%02x ", stat_counters[i]);
>    os_printf("\n");
> }
> 
> But I was unable to read anything. It was showing all zeros. I haven't
> interfaced with hardware device earlier. I thought, issuing CU_SHOWSTATS to
> NIC will fill statistical counter values to address stat_counters. Could you
> please help me in reading statistical counters?

The variable stat_counters[] need to be in the PCI window otherwise
the device cannot access it over the PCI bus. Allocate the memory for
it using pciwindow_mem_alloc().  

   Andrew

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list