git: 9c3ad5ba932b - main - cxgbe: don't support MJUMPAGESIZE != MCLBYTES

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Wed, 24 Aug 2022 17:36:00 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=9c3ad5ba932b5ed8d176a498155925cef69f7d62

commit 9c3ad5ba932b5ed8d176a498155925cef69f7d62
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2022-08-24 17:34:25 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2022-08-24 17:34:25 +0000

    cxgbe: don't support MJUMPAGESIZE != MCLBYTES
    
    This could only happen on systems with PAGE_SIZE < 4K and FreeBSD
    doesn't support such systems.
    
    Reviewed by:    np, imp, jhb
    Sponsored by:   DARPA, AFRL
    Differential Revision:  https://reviews.freebsd.org/D36321
---
 sys/dev/cxgbe/adapter.h | 4 ----
 sys/dev/cxgbe/t4_sge.c  | 8 --------
 2 files changed, 12 deletions(-)

diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h
index 555f8b36531d..66074749044a 100644
--- a/sys/dev/cxgbe/adapter.h
+++ b/sys/dev/cxgbe/adapter.h
@@ -108,11 +108,7 @@ enum {
 	CTRL_EQ_QSIZE = 1024,
 	TX_EQ_QSIZE = 1024,
 
-#if MJUMPAGESIZE != MCLBYTES
 	SW_ZONE_SIZES = 4,	/* cluster, jumbop, jumbo9k, jumbo16k */
-#else
-	SW_ZONE_SIZES = 3,	/* cluster, jumbo9k, jumbo16k */
-#endif
 	CL_METADATA_SIZE = CACHE_LINE_SIZE,
 
 	SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in desc */
diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
index 163ba0ed8c26..8def1e6122cb 100644
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -567,9 +567,7 @@ t4_sge_modload(void)
 	}
 
 	if (largest_rx_cluster != MCLBYTES &&
-#if MJUMPAGESIZE != MCLBYTES
 	    largest_rx_cluster != MJUMPAGESIZE &&
-#endif
 	    largest_rx_cluster != MJUM9BYTES &&
 	    largest_rx_cluster != MJUM16BYTES) {
 		printf("Invalid hw.cxgbe.largest_rx_cluster value (%d),"
@@ -578,9 +576,7 @@ t4_sge_modload(void)
 	}
 
 	if (safest_rx_cluster != MCLBYTES &&
-#if MJUMPAGESIZE != MCLBYTES
 	    safest_rx_cluster != MJUMPAGESIZE &&
-#endif
 	    safest_rx_cluster != MJUM9BYTES &&
 	    safest_rx_cluster != MJUM16BYTES) {
 		printf("Invalid hw.cxgbe.safest_rx_cluster value (%d),"
@@ -719,9 +715,7 @@ t4_tweak_chip_settings(struct adapter *sc)
 	uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE);
 	static int sw_buf_sizes[] = {
 		MCLBYTES,
-#if MJUMPAGESIZE != MCLBYTES
 		MJUMPAGESIZE,
-#endif
 		MJUM9BYTES,
 		MJUM16BYTES
 	};
@@ -858,9 +852,7 @@ t4_init_rx_buf_info(struct adapter *sc)
 	int i, j, n;
 	static int sw_buf_sizes[] = {	/* Sorted by size */
 		MCLBYTES,
-#if MJUMPAGESIZE != MCLBYTES
 		MJUMPAGESIZE,
-#endif
 		MJUM9BYTES,
 		MJUM16BYTES
 	};