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: TDA4VM: CPSW2G: Ingress Port Priority

Part Number: TDA4VM


Tool/software:

Hi TI,

I am developing my own cpsw2g driver using bare metal. I am only transmitting/receiving non-Vlan tagged packets and CPSW is in VLAN Unaware mode .

I have a few questions about CPSW2G Ingress Port Priority which are as follows:

  1. Consider a case where I have received an ethernet packet from external network to MAC Port. The Packet is a non-VLAN tagged packets. The packet priority is selected based on Ingress Port priority.
    What is the Ingress MAC Port Priority in the case explained above?

    Furthermore, ALE is in VLAN Aware mode and both the ports are member of ALE VLAN, I believe the VLAN id of HOST Port and MAC Port is 0 and 1 respectively. Are these VLAN id are connected to Port Ingress priority? If yes, how?


  2. Consider a case where I have received an ethernet packet from OCRAM to HOST Port. The Packet is a non-VLAN tagged packets. The packet priority is selected based on Ingress Port priority.
    What is the Ingress HOST Port Priority in the case explained above?

Looking forward to your response?

Best regards,

Hasan

  • Hi,

    Consider a case where I have received an ethernet packet from external network to MAC Port. The Packet is a non-VLAN tagged packets. The packet priority is selected based on Ingress Port priority.
    What is the Ingress MAC Port Priority in the case explained above?

    Please refer to TRM register Spec has Port VLAN  (CPSW_PN_PORT_VLAN_REG) register.
    The priority value in PORT VLAN register is ingress prot priority.

    Furthermore, ALE is in VLAN Aware mode and both the ports are member of ALE VLAN, I believe the VLAN id of HOST Port and MAC Port is 0 and 1 respectively. Are these VLAN id are connected to Port Ingress priority? If yes, how?

    Your understanding of VLAN ID of port is ingress port priority. but VLAN ID of Host and MAC port is not 0, 1.
    You need to set in VLAN ID value into registers of Host & MAC Ports.


    • Consider a case where I have received an ethernet packet from OCRAM to HOST Port. The Packet is a non-VLAN tagged packets. The packet priority is selected based on Ingress Port priority.
      What is the Ingress HOST Port Priority in the case explained above?

    Priority value in Host Port's VLAN ID register (CPSW_P0_PORT_VLAN_REG)

    Best Regards,
    Sudheer

  • Hi Sudheer,

    Furthermore, ALE is in VLAN Aware mode and both the ports are member of ALE VLAN, I believe the VLAN id of HOST Port and MAC Port is 0 and 1 respectively. Are these VLAN id are connected to Port Ingress priority? If yes, how?

    Your understanding of VLAN ID of port is ingress port priority. but VLAN ID of Host and MAC port is not 0, 1.

    If Ingress priority of HOST port is set by CPSW_P0_PORT_VLAN_REG: PORT_PRI then how is my understanding of above concerning ALE UVLAN member is ingress priority? 

    Best regards,
    Hasan

  • Hi,

    Furthermore, ALE is in VLAN Aware mode and both the ports are member of ALE VLAN, I believe the VLAN id of HOST Port and MAC Port is 0 and 1 respectively. Are these VLAN id are connected to Port Ingress priority? If yes, how?

    Your understanding of VLAN ID of port is ingress port priority. but VLAN ID of Host and MAC port is not 0, 1.

    If Ingress priority of HOST port is set by CPSW_P0_PORT_VLAN_REG: PORT_PRI then how is my understanding of above concerning ALE UVLAN member is ingress priority? 

    In case of CPSW2G as MAC Port has 8 TX FIFO based on Ingress priority of Host Port the packet forward to External Port TX Priority Queue.
    The ingress packet of External Port will always to single Tx FIFO of Host Port.

    What is the concern in this case. are you observing any packet loss?

    Best Regards,
    Sudheer

  • Hi Sudheer,

    I am not observing any packet loss.

    My conern is when I am setting the following using CPSW_P0_PORT_VLAN_REG register:

    Priority of Port using PORT_PRI (13-15 bits)

    Vlan ID of port using PORT_VID (0-11 bits)

    then how it port priority is set by making  MAC Port  and HOST Port member of ALE Unknown VLAN (ALE is in VLAN Aware mode)?

    Best regards,
    Hasan

  • Hi,

    Priority of Port using PORT_PRI (13-15 bits)

    Vlan ID of port using PORT_VID (0-11 bits)

    then how it port priority is set by making  MAC Port  and HOST Port member of ALE Unknown VLAN (ALE is in VLAN Aware mode)?

    CPSW should be in VLAN Aware mode to add/remove VLAN tag while ingress and egress of packet to any Port.
    ALE VLAN aware mode will handle the packet forwarding.

    In your case it is CPSW2G, you can keep ALE and CPSW in VLAN unaware mode so, all packets will go through MAC Port Tx priority Queue 0.

    Best Regards,
    Sudheer