net/bnxt: fix Rx buffer posting
authorLance Richardson <lance.richardson@broadcom.com>
Thu, 18 Mar 2021 19:52:13 +0000 (15:52 -0400)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Fri, 19 Mar 2021 19:29:56 +0000 (20:29 +0100)
commitbb4f70d275045647db78df48aa1f2456c37cf5fd
tree07fa948efad570754b5bd8aba5efefbd027b2aec
parentab15dd5a1c4d563e80b10e42e39c4d2f010fa389
net/bnxt: fix Rx buffer posting

Remove early buffer posting logic from burst receive loop to address
several issues:
   - Posting receive descriptors without first posting completion
     entries risks overflowing the completion queue.
   - Posting receive descriptors without updating rx_raw_prod
     creates the possibility that the receive descriptor doorbell
     can be written twice with the same value.
   - Having this logic in the inner descriptor processing loop
     can impact performance.

Fixes: 637e34befd9c ("net/bnxt: optimize Rx processing")
Fixes: 04067844a3e9 ("net/bnxt: reduce CQ queue size without aggregation ring")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_rxr.c
drivers/net/bnxt/bnxt_rxr.h