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: Using threaded NAPI with CPSW9G in switch mode

Part Number: DRA829J

Hi,

Is it possible to to use threaded NAPI (NAPI — The Linux Kernel documentation) with CPSW in switch mode?

I only seem to have IRQs for the switch device itself, not for the switch ports. So trying to set 'echo 1 > /sys/class/net/{switch_port}/threaded' returns with 'Operation not supported'.

Is this by desin or are we missing a configuration to enable this feature?

Thanks,

Matthias

  • HI Matthias,

    AS CPSW is a switch, it has has an internal facing port (host port) from which all communication with any of the cores occur. So any data received on any of the external ports (switch ports) will go to host port and then to the cores (if the rx packet is routed to host port). The IRQ being used in the stack with the cores will be the interrupts provided by the host port and not the switch port.

    Hence, we cannot get IRQs from the individual switch ports and hence no NAPI threading is possible.

    Regards,
    Tanmay

  • Hi Tanmay,

    Thank you for your reply. Is it possible to get NAPI threading on the host port?

    Regards,

    Matthias

  • Hi Matthias,

    The problem here would be that there are not multiple interrupts to tie to the NAPI threads. I am not aware if there can be software workaround for this.

    Let me check this with the development team and get back to you.

    Regards,
    Tanmay

  • Hi Matthias,

    From hardware perspective, this can be done for tx base on priority of the data as we have 8 hardware queues for 8 priorities, but only one for rx.

    But this is not implemented in software and there isn't any plan currently to implement this.

    Regards,
    Tanmay