This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

KeyStone II Gigabit Ethernet Switch Subsystem stat registers

Hi all,

I am using XTCIEVMK2X EVM. 

Developing environment is: CCS ver  5.4.0.00091; MCSDK Packages: 3_00_01_12

Bootmode:  ARM SPI Little Endian mode.

Our application code is running on DSP is able to send out pkts from Gigabit Ethernet Switch Subsystem.

We could able to see these pkts on Wireshark.

We want to check these statistics through the registers of Gigabit Ethernet Switch Subsystem.

We have enabled 'portStatCfg' as below:

{

    CSL_CPSW_5GF_PORTSTAT               portStatCfg;

    portStatCfg.p0AStatEnable   =   1;
    portStatCfg.p0BStatEnable   =   1;
    portStatCfg.p1StatEnable    =   1;
    portStatCfg.p2StatEnable    =   1;
    CSL_CPSW_nGF_setPortStatsEnableReg (&portStatCfg);

}

After this, we could able see the proper value (0x000F) in the address space( 0x0209080C) of CPSW_STAT_PORT_EN i.e. GbE switch Statistics Port Enable Register.

But now the problem is we are not able see the stat values in the respective registers of STATSA and STATSB.

STATSA    TXGOODFRAMES - Total number of good frames transmitted - 0x02090B34

STATSB   TXGOODFRAMES Total number of good frames transmitted - 0x02090C34

All values in different registers are showing zeros only.

Though we are able to see pkts on Wireshark, Why we are not able to see stat values in the stat registers of GB E Switch ?

Also, we are sending pkts to EVM from an external tool and again we are not able to see stat values in the GBE Rx stat registers.

Please provide your inputs.

Thanks in advance.

Best regards,

Rajanikanth.

 

 

Total number of good frames transmitted

  • Rajanikanth,

    Which is the port(SGMII)of phy configured in your application?
    You can try to configure for STATSC and STATSD, check it.
    Checked your config for STATSA and STATSB, this should be work.
    In addition that, check on your side as per the below sequence.
    STATSA/B statistics are visible in the address range when stat_sel is cleared to 0 in the Stat_Port Register.

    STATSC/D statistics are visible in the address range when stat_sel is set to 1 in the Stat_Port Register.

    Please go through the section "2.3.4.1 Accessing Statistics Registers" in the GbE User Guide.

  • Hi Pubesh,

    Thanks for the reply.

    We have configured Switch Port 0 (Host Port) and Switch Port 1 (SGMII 0) in our application.

    As we are not using Port 2 and 3, so STATSC and STATSD are not configured.

    We have checked 'stat_sel'  value in the Stat_Port Register which is already cleared to 0, so STATSA/B statistics should be visible in the address space but this is not happening.

    The value of  CPSW_STAT_PORT_EN register in the address space( 0x0209080C) is 0x000F.

    As per your suggestion, we have gone through the section "2.3.4.1 Accessing Statistics Registers" in the GbE User Guide, but there are no suspicious things found there.

    We have an observation that if we run the emac example code on 'No-Boot 'mode then we are able to see stats in the Gb E stat registers.

    Can you please let us know are we missing anything (any global setting) to get stat through ARM SPI boot mode ?

     

    Thanks in advance.

     

    Thanks & Best regards,

    Rajanikanth.

     

     


  • Hi,

    We are using ARM SPI boot mode, so is there any possibility of ARM doing something for zero values in stats ?

    Please provide your inputs.

    Thanks,

    Rajanikanth.

  • Rajanikanth,

    I am not sure about SPI boot mode for ARM, which is cause the issue for STATSA/STATSB.
    Please go through this wiki, may will help you.
    http://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Tools#Loading_and_Running_Application_on_the_target

  • Hi,

    Can anybody help me here ? 

    Is there any command to see stats by changing configuration through Sysfs User Interface ?

    Thanks in advance.

    Thanks & Best regards,

    Rajanikanth.