Re: [PATCH] net: sparx5: Fix return type of sparx5_port_xmit_impl

From: Jakub Kicinski
Date: Tue Sep 20 2022 - 10:30:09 EST


On Tue, 13 Sep 2022 10:15:48 +0200 Casper Andersson wrote:
> I noticed that the functions that assign the return value inside
> sparx5_port_xmit_impl also have return type int, which would ideally
> also be changed. But a bigger issue might be that
> sparx5_ptp_txtstamp_request and sparx5_inject (called inside
> sparx5_port_xmit_impl) returns -EBUSY (-16),

Yes, that seems off. IIUC error codes are treated as drops,
but the driver doesn't free the frame. So it's likely a leak.

> when they should return NETDEV_TX_BUSY (16). If this is an issue then
> it also needs to be fixed.