Author: np Date: Mon Feb 3 23:30:39 2020 New Revision: 357476 URL: https://svnweb.freebsd.org/changeset/base/357476
Log: cxgbe(4): Do not use pack boundary > 512B unless it is explicitly requested. This is a tradeoff between PCIe efficiency during large packet rx and packing efficiency during small packet rx. MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Mon Feb 3 23:25:12 2020 (r357475) +++ head/sys/dev/cxgbe/t4_sge.c Mon Feb 3 23:30:39 2020 (r357476) @@ -589,6 +589,9 @@ t4_sge_extfree_refs(void) return (refs - rels); } +/* max 4096 */ +#define MAX_PACK_BOUNDARY 512 + static inline void setup_pad_and_pack_boundaries(struct adapter *sc) { @@ -635,7 +638,10 @@ setup_pad_and_pack_boundaries(struct adapter *sc) pack = fl_pack; if (fl_pack < 16 || fl_pack == 32 || fl_pack > 4096 || !powerof2(fl_pack)) { - pack = max(sc->params.pci.mps, CACHE_LINE_SIZE); + if (sc->params.pci.mps > MAX_PACK_BOUNDARY) + pack = MAX_PACK_BOUNDARY; + else + pack = max(sc->params.pci.mps, CACHE_LINE_SIZE); MPASS(powerof2(pack)); if (pack < 16) pack = 16; _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"