]> www.infradead.org Git - users/hch/configfs.git/commitdiff
ice: fix ICE_LAST_OFFSET formula
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Wed, 7 Aug 2024 10:53:25 +0000 (12:53 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 20 Aug 2024 20:20:58 +0000 (13:20 -0700)
For bigger PAGE_SIZE archs, ice driver works on 3k Rx buffers.
Therefore, ICE_LAST_OFFSET should take into account ICE_RXBUF_3072, not
ICE_RXBUF_2048.

Fixes: 7237f5b0dba4 ("ice: introduce legacy Rx flag")
Suggested-by: Luiz Capitulino <luizcap@redhat.com>
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_txrx.c

index 50211188c1a7aac399842e357d45e9004cb4706e..4b690952bb403c40713db3cae61ec825e7500fe4 100644 (file)
@@ -842,7 +842,7 @@ ice_can_reuse_rx_page(struct ice_rx_buf *rx_buf)
                return false;
 #if (PAGE_SIZE >= 8192)
 #define ICE_LAST_OFFSET \
-       (SKB_WITH_OVERHEAD(PAGE_SIZE) - ICE_RXBUF_2048)
+       (SKB_WITH_OVERHEAD(PAGE_SIZE) - ICE_RXBUF_3072)
        if (rx_buf->page_offset > ICE_LAST_OFFSET)
                return false;
 #endif /* PAGE_SIZE >= 8192) */