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.

TDA4VM: CPSW2G Statistics: PORTMASK_DROP

Part Number: TDA4VM

Tool/software:

Hi TI,

TRM says

"Port mask drop frame is defined to be:
• Any data or MAC control frame
• Any length greater than 32 bytes
• Was dropped by the ALE due to PORT_MASK=0 (was not sent to any destination port)
• The frame could have been dropped due to error or other counted reason, so it could be counted elsewhere"

I have the following questions based on the TRM description above:

  1. What if the length of frame is less tha 32 bytes, will it be counted in Port mask drop?
  2. Will Portmask drop also count frames dropped due to CRC error/TX_MEMORY_PROTECT_ERROR?
  3. What are " other counted reason"?
  4. Is my understanding correct that "Portmask drop will count total number of frames dropped due to ALE, CRC error, or  any other reason at MAC Port (in case of egress from CPSW2G) and Host Port (in case of ingress at CPSW2G)" ?

Looking forward to hearing back from you.

Best regards,
Hasan

  • Hi,

    What if the length of frame is less tha 32 bytes, will it be counted in Port mask drop?

    No, if the length is less than 33 bytes, it is included in the undersize drop.

    Port mask Drop at ALE, above short frames drops at the MAC level.

    Will Portmask drop also count frames dropped due to CRC error/TX_MEMORY_PROTECT_ERROR?

    As mentioned above, Port Mask drops due to no destination Port found from the ALE entry.
    The MAC itself drops error frames.

    Is my understanding correct that "Portmask drop will count total number of frames dropped due to ALE, CRC error, or  any other reason at MAC Port (in case of egress from CPSW2G) and Host Port (in case of ingress at CPSW2G)" ?

    No. It is due to no destination port being identified via ALE Port Mask for Multicast and Port Number for Unicast packets (Ingress of Host or MAC Port).

    Best Regards,
    Sudheer

  • Hi Sudheer,

    undersize drop.

    Where can I find statistics for undersize and oversize drop for MAC Port and Host Port?

    I didn't find any register in TRM which gives drop statistics for undersize and oversize frames.
    What I find is CPSW_STAT1_RXUNDERSIZEDFRAMES and CPSW_STAT1_RXOVERSIZEDFRAMES. But they gives the no. of undersize and oversize frames received, not the dropped frames.

    Looking forward to hearing back from you.

    Best regrads,
    Hasan 

     

  • Hi,

    Undersize frames Drop is based on the MAC Port configuration, either to drop or accept.
    Statistics will only capture how many short frames are received. 

    Please refer to the below from TRM for a better understanding.


    As clarified above, the PORTMASK drop is at ALE based on destination port identification for the received packet.

    Best Regards,
    Sudheer

  • Hi Sudheer,

    Based on my configuration, I will drop oversized and undersized frames. Will the drop happen at MAC Port Portmask, as I can see PortMask statistics increasing for oversize drop?

    Best regards,
    Hasan

  • Hi,

    • The frame could have been dropped due to error or other counted reason, so it could be counted elsewhere"

    As per the description, it could count even error frames and oversized frames as well.
    Also, you have specific statistics for oversized frames and error frames received but drop will be counted in PortMask Drop.

    Best Regards,
    Sudheer

  • Hi Sudheer,


    As per the description, it could count even error frames and oversized frames as well.

    Dropping of which error frames are referred here? Is it dropping due to CRC/AlignmentCode/ECC Errors?

    Looking forward to hearing back from you.

    Best regards,
    Hasan

  • Hi.

    Dropping of which error frames are referred here? Is it dropping due to CRC/AlignmentCode/ECC Errors?

    ECC will not be dropped at the MAC Port. These will be sent from the MAC Port with at least one byte flip in the packet CRC.

    Other errors are also accounted for in Port Mask Drop.

    Best Regards,
    Sudheer

  • Hi Sudheer,


    Dropping of which error frames are referred here? Is it dropping due to CRC/AlignmentCode/ECC Errors?

    ECC will not be dropped at the MAC Port. These will be sent from the MAC Port with at least one byte flip in the packet CRC.

    Other errors are also accounted for in Port Mask Drop.

    As mentioned above, Port Mask drops due to no destination Port found from the ALE entry.
    The MAC itself drops error frames.



    Earlier as got the information that Portmask doesn't include error frames(CRC) at these will be dropped by MAC. But now I got the information that errors (like crc/aligncode..) are included in Portmask drop.

    I am a bit confused, can you please clarify what should I consider?

    Looking forward to hearing back from you.


    Best regards,
    Hasan

  • Hi,

    Sorry for the confusion, here.

    Earlier as got the information that Portmask doesn't include error frames(CRC) at these will be dropped by MAC. But now I got the information that errors (like crc/aligncode..) are included in Portmask drop.

    PortMask Drop will account for error frames as well.

    We have other statistics as ALE Drop, which accounts only for drops due to ALE.

    Best Regards,
    Sudheer

  • Hi Sudheer,

    No worries. Thank you for the clarification.

    Based on the discussuion which we had in this ticket we can conclude that Portmask drop includes the count of total frames dropped at a Port, right?

    It includes dropping count due to the following reasons at MAC Port ingress:

    1. ALE drop count
    2. Oversized frame drop count
    3. Undersized frame drop count
    4. CRC error drop Count
    5. Align/Code error drop count

    Will frames experiencing ECC CRC error on MAC Port egress are also counted in Portmask drop?



    Looking forward to hearing back from you.

    Best regards,
    Hasan

  • Hi,

    Based on the discussuion which we had in this ticket we can conclude that Portmask drop includes the count of total frames dropped at a Port, right?

    It includes dropping count due to the following reasons at MAC Port ingress:

    1. ALE drop count
    2. Oversized frame drop count
    3. Undersized frame drop count
    4. CRC error drop Count
    5. Align/Code error drop count

    Yes.

    Will frames experiencing ECC CRC error on MAC Port egress are also counted in Portmask drop?

    ECC error frames will not be dropped at the MAC Port, these will be sent out of the CPSW. As no drops, these will not be accounted for in PortMask Drop.

    Best Regards,
    Sudheer

  • Hi Sudheer,

    Thank you for clarification.


    ECC error frames will not be dropped at the MAC Port, these will be sent out of the CPSW. As no drops, these will not be accounted for in PortMask Drop.

    What will happen if an ECC CRC error frame is dropped at Host Port egress, will this drop be counted in Portmask drop at STAT0_PORTMASK drop or will it only counted in STAT0_TX_MEMORY_PROTECT_ERROR?

    Best regards,
    Hasan

  • Hi, 

    What will happen if an ECC CRC error frame is dropped at Host Port egress, will this drop be counted in Portmask drop at STAT0_PORTMASK drop or will it only counted in STAT0_TX_MEMORY_PROTECT_ERROR?

    It will be counted in Port mask Drop as per description, and STAT0_TX_MEMORY_PROTECT_ERROR also increments. 

    Best Regards, 

    Sudheer

  • Hi Sudheer,

    What will happen if an ECC CRC error frame is dropped at Host Port egress, will this drop be counted in Portmask drop at STAT0_PORTMASK drop or will it only counted in STAT0_TX_MEMORY_PROTECT_ERROR?

    It will be counted in Port mask Drop as per description, and STAT0_TX_MEMORY_PROTECT_ERROR also increments.

    In case of MAC Port egress, for an ECC CRC error frame, the STAT1_PORMASK drop will not increase as the frame is not dropped by MAC Port and transmitted with CRC error but STAT1_TX_MEMORY_PROTECT_ERROR will increment, right?

    Best regards,
    Hasan

  • Hi,

    In case of MAC Port egress, for an ECC CRC error frame, the STAT1_PORMASK drop will not increase as the frame is not dropped by MAC Port and transmitted with CRC error but STAT1_TX_MEMORY_PROTECT_ERROR will increment, right?

    Yes, your understanding is correct.

    Best Regards,
    Sudheer

  • Hi Sudheer,

    Thank you for the response.


    Best Regards,
    Hasan