Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178333513
D62444.1796512653.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
972 B
Referenced Files
None
Subscribers
None
D62444.1796512653.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D62444: iflib: Don't offer TSO on a TX ring too small for it
Attached
Detach File
Event Timeline