[PATCH net-next v10 04/11] net: ti: prueth: Adds link detection, RX and TX support.
Parvathi Pudi
parvathi at couthit.com
Wed Jul 16 06:11:11 PDT 2025
Hi,
>>> + qid = icssm_prueth_get_tx_queue_id(emac->prueth, skb);
>>> + ret = icssm_prueth_tx_enqueue(emac, skb, qid);
>>> + if (ret) {
>>> + if (ret != -ENOBUFS && netif_msg_tx_err(emac) &&
>>> + net_ratelimit())
>>> + netdev_err(ndev, "packet queue failed: %d\n", ret);
>>> + goto fail_tx;
>>> + }
>>
>>> + if (ret == -ENOBUFS) {
>>> + ret = NETDEV_TX_BUSY;
>>
>>
>> Something needs to stop the queue, right? Otherwise the stack will
>> send the frame right back to the driver.
>>
>
> Yes, we will notify upper layer with “netif_tx_stop_queue()” when returning
> “NETDEV_TX_BUSY” to not push again immediately.
>
We reviewed the flow and found that the reason for NETDEV_TX_BUSY being
notified to the upper layers is due lack of support for reliably detecting
the TX completion event.
In case of ICSSM PRU Ethernet, we do not have support for TX complete
notification back to the driver from firmware and its like store and
forget approach. So it will be tricky to enable back/resume the queue
if we stop it when we see busy status.
Returning NETDEV_TX_BUSY seems to be the best option so that the stack can
retry as soon as possible.
Thanks and Regards,
Parvathi.
More information about the linux-arm-kernel
mailing list