Skip to content

Commit 30f253f

Browse files
Michael Chankuba-moo
authored andcommitted
bnxt_en: Do not set EOP on RX AGG BDs on 5760X chips
With End-of-Packet padding (EOP) set, the chip will disable Relaxed Ordering (RO) of TPA data packets. A TPA segment with EOP set will be padded to the next cache boundary and can potentially overwrite the beginning bytes of the next TPA segment when RO is enabled on 5760X. To prevent that, the chip disables RO for TPA when EOP is set. To take advantge of RO and higher performance, do not set EOP on 5760X chips when TPA is enabled. Define a proper RX_BD_FLAGS_AGG_EOP constant to make it clear that we are setting EOP. Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20251126215648.1885936-6-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent b1e7f95 commit 30f253f

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4479,7 +4479,14 @@ static void bnxt_init_one_rx_agg_ring_rxbd(struct bnxt *bp,
44794479
ring->fw_ring_id = INVALID_HW_RING_ID;
44804480
if ((bp->flags & BNXT_FLAG_AGG_RINGS)) {
44814481
type = ((u32)BNXT_RX_PAGE_SIZE << RX_BD_LEN_SHIFT) |
4482-
RX_BD_TYPE_RX_AGG_BD | RX_BD_FLAGS_SOP;
4482+
RX_BD_TYPE_RX_AGG_BD;
4483+
4484+
/* On P7, setting EOP will cause the chip to disable
4485+
* Relaxed Ordering (RO) for TPA data. Disable EOP for
4486+
* potentially higher performance with RO.
4487+
*/
4488+
if (BNXT_CHIP_P5_AND_MINUS(bp) || !(bp->flags & BNXT_FLAG_TPA))
4489+
type |= RX_BD_FLAGS_AGG_EOP;
44834490

44844491
bnxt_init_rxbd_pages(ring, type);
44854492
}

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ struct rx_bd {
131131
#define RX_BD_TYPE_48B_BD_SIZE (2 << 4)
132132
#define RX_BD_TYPE_64B_BD_SIZE (3 << 4)
133133
#define RX_BD_FLAGS_SOP (1 << 6)
134+
#define RX_BD_FLAGS_AGG_EOP (1 << 6)
134135
#define RX_BD_FLAGS_EOP (1 << 7)
135136
#define RX_BD_FLAGS_BUFFERS (3 << 8)
136137
#define RX_BD_FLAGS_1_BUFFER_PACKET (0 << 8)

0 commit comments

Comments
 (0)