]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bnxt_en: Modify RX ring indexing logic.
authorMichael Chan <michael.chan@broadcom.com>
Mon, 20 Nov 2023 23:44:03 +0000 (15:44 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 22 Nov 2023 01:32:49 +0000 (17:32 -0800)
commitc09d22674b9420abaaaf946bab471c63369c6509
tree5b7430a5a748a34aa3b6f00e1f07d36ebe967c32
parent6d1add95536bafe585c500ad8114af7ed4225a0f
bnxt_en: Modify RX ring indexing logic.

Modify the RX indexing logic for both RX ring and RX aggregation ring just
like the TX logic.  Change it so that the index increments unbounded and
mask it only when needed.

Modify the existing RX macros so that the index is not masked.  Add new
macros RING_RX()/RING_RX_AGG() to mask it only when needed to get the
index of rxr->rx_buf_ring[] and rxr->rx_agg_ring[].

Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20231120234405.194542-12-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h