]> Gentwo Git Trees - linux/.git/commitdiff
bnxt_en: Do not set EOP on RX AGG BDs on 5760X chips
authorMichael Chan <michael.chan@broadcom.com>
Wed, 26 Nov 2025 21:56:46 +0000 (13:56 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 28 Nov 2025 02:59:28 +0000 (18:59 -0800)
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>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h

index a267bb49ed887ce438f0473835e4ce584d72d587..d226a411795845eb4383c740939ecd487a379c49 100644 (file)
@@ -4479,7 +4479,14 @@ static void bnxt_init_one_rx_agg_ring_rxbd(struct bnxt *bp,
        ring->fw_ring_id = INVALID_HW_RING_ID;
        if ((bp->flags & BNXT_FLAG_AGG_RINGS)) {
                type = ((u32)BNXT_RX_PAGE_SIZE << RX_BD_LEN_SHIFT) |
-                       RX_BD_TYPE_RX_AGG_BD | RX_BD_FLAGS_SOP;
+                       RX_BD_TYPE_RX_AGG_BD;
+
+               /* On P7, setting EOP will cause the chip to disable
+                * Relaxed Ordering (RO) for TPA data.  Disable EOP for
+                * potentially higher performance with RO.
+                */
+               if (BNXT_CHIP_P5_AND_MINUS(bp) || !(bp->flags & BNXT_FLAG_TPA))
+                       type |= RX_BD_FLAGS_AGG_EOP;
 
                bnxt_init_rxbd_pages(ring, type);
        }
index aedb059f4ce55d3414f43e9df1877d8ab0dd6038..bb12cebd40e147e2b482272af96c75a004a82600 100644 (file)
@@ -131,6 +131,7 @@ struct rx_bd {
         #define RX_BD_TYPE_48B_BD_SIZE                          (2 << 4)
         #define RX_BD_TYPE_64B_BD_SIZE                          (3 << 4)
        #define RX_BD_FLAGS_SOP                                 (1 << 6)
+       #define RX_BD_FLAGS_AGG_EOP                             (1 << 6)
        #define RX_BD_FLAGS_EOP                                 (1 << 7)
        #define RX_BD_FLAGS_BUFFERS                             (3 << 8)
         #define RX_BD_FLAGS_1_BUFFER_PACKET                     (0 << 8)