svn commit: r358980 - stable/12/sys/dev/cxgbe
Navdeep Parhar
np at FreeBSD.org
Sat Mar 14 01:53:59 UTC 2020
Author: np
Date: Sat Mar 14 01:53:58 2020
New Revision: 358980
URL: https://svnweb.freebsd.org/changeset/base/358980
Log:
MFC r357476:
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.
Sponsored by: Chelsio Communications
Modified:
stable/12/sys/dev/cxgbe/t4_sge.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- stable/12/sys/dev/cxgbe/t4_sge.c Sat Mar 14 01:52:38 2020 (r358979)
+++ stable/12/sys/dev/cxgbe/t4_sge.c Sat Mar 14 01:53:58 2020 (r358980)
@@ -584,6 +584,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)
{
@@ -630,7 +633,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;
More information about the svn-src-stable-12
mailing list