Page MenuHomeFreeBSD

D62444.1796512653.diff
No OneTemporary

Authored By
Unknown
Size
972 B
Referenced Files
None
Subscribers
None

D62444.1796512653.diff

diff --git a/sys/net/iflib.c b/sys/net/iflib.c
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -5629,6 +5629,20 @@
scctx->isc_tx_tso_segments_max = max(1,
num_txd / MAX_SINGLE_PACKET_FRACTION);
+ /*
+ * The TSO segment count given to the stack below leaves room for
+ * the m_pullup(9)'s in iflib_parse_header(). A ring this small has
+ * nothing left after that, so don't offer TSO on it.
+ */
+ if (scctx->isc_tx_tso_segments_max <= 3 &&
+ (if_getcapabilities(ifp) & IFCAP_TSO) != 0) {
+ device_printf(dev, "TX ring too small for TSO, disabling it\n");
+ scctx->isc_capabilities &= ~(IFCAP_TSO | IFCAP_VLAN_HWTSO);
+ scctx->isc_capenable &= ~(IFCAP_TSO | IFCAP_VLAN_HWTSO);
+ if_setcapabilitiesbit(ifp, 0, IFCAP_TSO | IFCAP_VLAN_HWTSO);
+ if_setcapenablebit(ifp, 0, IFCAP_TSO | IFCAP_VLAN_HWTSO);
+ }
+
/* TSO parameters - dig these out of the data sheet - simply correspond to tag setup */
if (if_getcapabilities(ifp) & IFCAP_TSO) {
/*

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 5, 11:17 PM (21 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42238141
Default Alt Text
D62444.1796512653.diff (972 B)

Event Timeline