[dpdk-stable] [PATCH 20.11] net/bnxt: detect bad opaque in Rx completion

Luca Boccassi bluca at debian.org
Fri Jul 16 13:08:41 CEST 2021


On Fri, 2021-07-16 at 11:59 +0530, Somnath Kotur wrote:
>  [ upstream commit 03c8f2fe111c2b4c4fddc960dc82253ac7e6c5c5 ]
> 
> There is a rare hardware bug that can cause a bad opaque value in the RX
> or TPA start completion. When this happens, the hardware may have used the
> same buffer twice for 2 Rx packets.  In addition, the driver might also
> crash later using the bad opaque as an index into the ring.
> 
> The Rx opaque value is predictable and is always monotonically increasing.
> The workaround is to keep track of the expected next opaque value and
> compare it with the one returned by hardware during RX and TPA start
> completions. If they miscompare, log it, discard the completion,
> schedule a ring reset and move on to the next one.
> 
> Fixes: 0958d8b6435d ("net/bnxt: support LRO")
> 
> Signed-off-by: Somnath Kotur <somnath.kotur at broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
> ---
>  drivers/net/bnxt/bnxt_hwrm.c | 19 +++++++
>  drivers/net/bnxt/bnxt_hwrm.h |  1 +
>  drivers/net/bnxt/bnxt_rxq.h  |  1 +
>  drivers/net/bnxt/bnxt_rxr.c  | 99 +++++++++++++++++++++++++++++++++++-
>  drivers/net/bnxt/bnxt_rxr.h  |  1 +
>  5 files changed, 119 insertions(+), 2 deletions(-)

Thanks, applied and pushed.

-- 
Kind regards,
Luca Boccassi


More information about the stable mailing list