aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/netdevice.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2017-01-25 14:48:24 +0000
committerMichael Brown <mcb30@ipxe.org>2017-01-25 14:55:09 +0000
commit70fc25ad6e71a99b5802eb92b95c26407acbe990 (patch)
treeb5b399a427584f7a78258601fa3d645b3a7ae16d /src/include/ipxe/netdevice.h
parentf450c75dad04061f2d51401088f156e1226804ac (diff)
downloadipxe-70fc25ad6e71a99b5802eb92b95c26407acbe990.tar.gz
[netdevice] Limit MTU by hardware maximum frame length
Separate out the concept of "hardware maximum supported frame length" and "configured link MTU", and limit the latter according to the former. In networks where the DHCP-supplied link MTU is inconsistent with the hardware or driver capabilities (e.g. a network using jumbo frames), this will result in iPXE advertising a TCP MSS consistent with a size that can actually be received. Note that the term "MTU" is typically used to refer to the maximum length excluding the link-layer headers; we adopt this usage. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/netdevice.h')
-rw-r--r--src/include/ipxe/netdevice.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/include/ipxe/netdevice.h b/src/include/ipxe/netdevice.h
index a1d207ffc..d498ab697 100644
--- a/src/include/ipxe/netdevice.h
+++ b/src/include/ipxe/netdevice.h
@@ -397,9 +397,16 @@ struct net_device {
struct retry_timer link_block;
/** Maximum packet length
*
- * This length includes any link-layer headers.
+ * This is the maximum packet length (including any link-layer
+ * headers) supported by the hardware.
*/
size_t max_pkt_len;
+ /** Maximum transmission unit length
+ *
+ * This is the maximum transmission unit length (excluding any
+ * link-layer headers) configured for the link.
+ */
+ size_t mtu;
/** TX packet queue */
struct list_head tx_queue;
/** Deferred TX packet queue */