]> git.baikalelectronics.ru Git - kernel.git/commit
net: mana: Fix TX CQE error handling
authorHaiyang Zhang <haiyangz@microsoft.com>
Fri, 29 Sep 2023 20:42:25 +0000 (13:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Oct 2023 21:08:49 +0000 (23:08 +0200)
commitb67d7b1bfc46d05c1a58b172516454698e8d5004
tree4bc8641bf5f2bc05e073f8d75fecc36cc194a2ca
parentadc4d740ad9ec780657327c69ab966fa4fdf0e8e
net: mana: Fix TX CQE error handling

[ Upstream commit b2b000069a4c307b09548dc2243f31f3ca0eac9c ]

For an unknown TX CQE error type (probably from a newer hardware),
still free the SKB, update the queue tail, etc., otherwise the
accounting will be wrong.

Also, TX errors can be triggered by injecting corrupted packets, so
replace the WARN_ONCE to ratelimited error logging.

Cc: stable@vger.kernel.org
Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)")
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/microsoft/mana/mana_en.c