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.

I want to send undersize packets through the c6678 switch

Hi All,

I discovered an issue where ethernet packets less than 64 bytes in length (including CRC) are not getting thorugh the switch as the core transmits these packets out of the DSP. I am looking at the statsA module i.e. 0x2090b20 and it increments whenever i get the DSP core to send out a packet less than 64 bytes in length. I tried setting the MAC for both ports 1 and 2 on the EVM with the following call which was missing earlier

CSL_CPGMAC_SL_enableRxCSF (macPortNum)

which I assumed would allow me to send short frames yet I do not see any packets going out of the DSP.

How can I go about transmitting short frames fom the DSP and how can I see those stats incrementing in the statsB module? Would it just show up in 0x2090c64 or somewhere else too?

Thanks, Aamir

  • Hi, Amair:

    I believe that it is illegal to send short frame which is less than 64 bytes over Ethernet.  The CPSW will discard all egress short frame. The control Macro CSL_CPGMAC_SL_enableRxCSF (macPortNum) will disable ingress short frame drop, but it does not affect the egress operation.

    The application or EMAC driver should perform tx padding for every L2 packet which is less than 60 bytes. If the application sends egress packet through PASS, then the L2 padding bit can be set at the final next route command as described below:

    /**
     *  @def  pa_NEXT_ROUTE_TX_L2_PADDING
     *        Control Info -- Set: Perform MAC padding for packet with size smaller than 60
     *                        Clear: Do not perform MAC padding
     *  @note: This option is only valid in the transmit (to-network) direction     
     */
    #define pa_NEXT_ROUTE_TX_L2_PADDING              0x0008
    /

    Best regards,

    Eric

     

  • Eric,

    Thanks for your reply. I will try out your suggestion to pad it. Why the asymetric behaviour?

  • Hi, Aamir:

    In the communication network, it is a good principle to be very conservative in the Tx direction and be forgiving in the Rx direction. In other words, you want to make sure that you do not send any packets that the receiver may drop and you want to process the Rx packets even if there is minor error.

    Best regards,

    Eric