]> www.infradead.org Git - users/jedix/linux-maple.git/commit
idpf: fix netdev Tx queue stop/wake
authorMichal Kubiak <michal.kubiak@intel.com>
Wed, 4 Sep 2024 15:47:47 +0000 (17:47 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 9 Sep 2024 20:15:37 +0000 (13:15 -0700)
commite4b398dd82f5d5867bc5f442c43abc8fba30ed2c
tree5625381691c683b3ff91f182b638e9012ae529f0
parent24eb35b15152ed6a2473019413b86b8f1c9714be
idpf: fix netdev Tx queue stop/wake

netif_txq_maybe_stop() returns -1, 0, or 1, while
idpf_tx_maybe_stop_common() says it returns 0 or -EBUSY. As a result,
there sometimes are Tx queue timeout warnings despite that the queue
is empty or there is at least enough space to restart it.
Make idpf_tx_maybe_stop_common() inline and returning true or false,
handling the return of netif_txq_maybe_stop() properly. Use a correct
goto in idpf_tx_maybe_stop_splitq() to avoid stopping the queue or
incrementing the stops counter twice.

Fixes: 6818c4d5b3c2 ("idpf: add splitq start_xmit")
Fixes: a5ab9ee0df0b ("idpf: add singleq start_xmit and napi poll")
Cc: stable@vger.kernel.org # 6.7+
Signed-off-by: Michal Kubiak <michal.kubiak@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c
drivers/net/ethernet/intel/idpf/idpf_txrx.c
drivers/net/ethernet/intel/idpf/idpf_txrx.h