]> git.samba.org - sfrench/cifs-2.6.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)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 5 Oct 2023 09:45:06 +0000 (11:45 +0200)
commitb2b000069a4c307b09548dc2243f31f3ca0eac9c
tree6a970dd16ef664bf807daf1232ae156745b9d0ea
parentd0f95894fda7d4f895b29c1097f92d7fee278cb2
net: mana: Fix TX CQE error handling

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>
drivers/net/ethernet/microsoft/mana/mana_en.c