summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_rlreg.h
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2008-08-04 02:05:09 +0000
committeryongari <yongari@FreeBSD.org>2008-08-04 02:05:09 +0000
commita36e7d5b67d8bfe0250a789e5c39a2b037658682 (patch)
treeb1dcbd3450bbae6407dfdcd9e2323b1ff1e8c277 /sys/pci/if_rlreg.h
parent45f0d08992efea87dbc15433e392afdeabec2270 (diff)
downloadFreeBSD-src-a36e7d5b67d8bfe0250a789e5c39a2b037658682.zip
FreeBSD-src-a36e7d5b67d8bfe0250a789e5c39a2b037658682.tar.gz
The number of bits reserved for MSS in RealTek controllers is
11bits. This limits the maximum interface MTU size in TSO case as upper stack should not generate TCP segments with MSS greater than the limit. Armed with this information, disable TSO if interface MTU is greater than the limit.
Diffstat (limited to 'sys/pci/if_rlreg.h')
-rw-r--r--sys/pci/if_rlreg.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/pci/if_rlreg.h b/sys/pci/if_rlreg.h
index 9456433..a5e5f12 100644
--- a/sys/pci/if_rlreg.h
+++ b/sys/pci/if_rlreg.h
@@ -750,6 +750,14 @@ struct rl_stats {
#define RL_ADDR_LO(y) ((uint64_t) (y) & 0xFFFFFFFF)
#define RL_ADDR_HI(y) ((uint64_t) (y) >> 32)
+/*
+ * The number of bits reserved for MSS in RealTek controllers is
+ * 11bits. This limits the maximum interface MTU size in TSO case
+ * as upper stack should not generate TCP segments with MSS greater
+ * than the limit.
+ */
+#define RL_TSO_MTU (2047 - ETHER_HDR_LEN - ETHER_CRC_LEN)
+
/* see comment in dev/re/if_re.c */
#define RL_JUMBO_FRAMELEN 7440
#define RL_JUMBO_MTU (RL_JUMBO_FRAMELEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
OpenPOWER on IntegriCloud