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.

DRA829J: Configure CPSW9G TX Priority Queues with Traffic Control

Part Number: DRA829J

Tool/software:

Hello,

I enabled all 8 TX queues and configured the switch ports of CPSW9G with traffic control to use a multiqueue priority qdisc. Using 'ethtool -S swp1', I can see the correct counter going up, based on my configured VLAN priorities (i.e. tx_pri0 - tx_pri7).

Looking at these statistics, I can also see the host port p0* not using the priorities. The host port only uses 'p0_tx_pri0' to send data. Is there a possibility to configure the host port to also use the priorities? 

I can't use tc for that, since the host port doesn't show up in my interface list (ip link).

Regards,

Matthias

  • Hello Matthias,

    We understand you are trying the "ethtool" command on Linux A72; however, can you tell us which CPSW9G driver you are using? Is this a native driver or a virtual client with EthFW?

    Thanks.

  • Hello Praveen,

    I use 'tc' to configure the mqprio qdiscs on the switch ports and I use 'ethtool' to look at the statistics of the ports.

    The driver used by the switch is 'am65-cpsw-nuss'.

    The switch ports I can configure, seem to work with my configuration. I'm just not able to configure the host port p0_*.

    Regards,

    Matthias

  • Hello Matthias,

    Though your description does not specify whether it is a native CPSW9G or a virtual client, we will assume it is a virtual client to continue support. I have to re-assign this thread to my colleague to provide his feedback. 

    Thanks.

  • Hello Praveen,

    Sorry, no. We use the native ethernet switch configuration. Currently we use MAC mode but plan to switch to switch mode.

    Regards,

    Matthias

  • Hi Matthias, 

    Host port tx is Rx is to application and network stack, which is receiving data to external ports from outside network. 

    The application transfer ia Host port is receiving will be forwarded to the external ports and sent to outside network.

    Probably above might be reason where we may not be able to configure host port tx priority.

    Best Regards, 

    Sudheer

  • Hi Sudheer,

    Thanks, I was looking at the wrong counters. The default behavior of the host port tx seems to be as expected. VLAN packets with priority 6 are queued on 'p0_tx_pri6'.

    But this is not the reason why I can't configure it with 'tc'. iproute2 only shows the external switch ports ('ip l'). So I can only use these with 'tc'. The host port 'p0' has no fitting device to use in 'tc'.

    Additionally, 'ethtool --set-priv-flags swp1 p0-rx-ptype-rrobin off' only controls the behavior of the host port p0 (3.2.2.9.3.1. CPSW3g — Processor SDK AM64X Documentation "Controls TX DMA channels processing mode: round-robin or priority mode. In case priority mode is enabled, the high number channel will have higher priority: TX 7 - prio 7 … TX 0 - prio 0."). Is this also the case for the external switch ports? How would I go about to configure those? If that's not possible, what is the default behavior? Do the external switch ports use rrobin?

    Regards,

    Matthias

  • Come to think of it, do we have the private flag 'p0-rx-ptype-rrobin' only as configuration for the host port and with tc we can configure the external switch ports?

    Regards,

    Matthias

  • Hi,

    Come to think of it, do we have the private flag 'p0-rx-ptype-rrobin' only as configuration for the host port and with tc we can configure the external switch ports?

    It is for Tx DMA channels to access CPSW for submission of packets. Applicable only for Host Port.

    s this also the case for the external switch ports? How would I go about to configure those? If that's not possible, what is the default behavior? Do the external switch ports use rrobin?

    No, External Ports data will be sent out from High Priority queue and then low priority queue. So, not in a round robin fashion.
    The priority queue selection will be based on VLAN priority in packet.

    Best Regards,
    Sudheer