summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ic/re.c4
-rw-r--r--sys/dev/pci/if_em.c4
-rw-r--r--sys/dev/pci/if_ixgb.c4
-rw-r--r--sys/dev/pci/if_xge.c4
-rw-r--r--sys/net/if.h4
-rw-r--r--sys/net/if_ethersubr.c12
-rw-r--r--sys/netinet/in.h7
-rw-r--r--sys/netinet/ip_output.c12
8 files changed, 22 insertions, 29 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c
index 843a7b542c7..49fd8ae857a 100644
--- a/sys/dev/ic/re.c
+++ b/sys/dev/ic/re.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: re.c,v 1.21 2006/05/20 03:47:56 brad Exp $ */
+/* $OpenBSD: re.c,v 1.22 2006/05/26 20:50:41 deraadt Exp $ */
/* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -877,7 +877,7 @@ re_attach_common(struct rl_softc *sc)
ifp->if_init = re_init;
if (sc->rl_type == RL_8169) {
ifp->if_baudrate = 1000000000;
- ifp->if_jumbo_mtu = RL_JUMBO_MTU;
+ ifp->if_hardmtu = RL_JUMBO_MTU;
ifp->if_capabilities |= IFCAP_JUMBO_MTU;
} else
ifp->if_baudrate = 100000000;
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index 185239cac06..57567c6c113 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.124 2006/05/25 18:27:34 brad Exp $ */
+/* $OpenBSD: if_em.c,v 1.125 2006/05/26 20:50:41 deraadt Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -1512,7 +1512,7 @@ em_setup_interface(struct em_softc *sc)
ifp->if_start = em_start;
ifp->if_watchdog = em_watchdog;
if (sc->hw.mac_type != em_82573) {
- ifp->if_jumbo_mtu =
+ ifp->if_hardmtu =
sc->hw.max_frame_size - ETHER_HDR_LEN - ETHER_CRC_LEN;
ifp->if_capabilities |= IFCAP_JUMBO_MTU;
}
diff --git a/sys/dev/pci/if_ixgb.c b/sys/dev/pci/if_ixgb.c
index 50a567d0d71..dc9e4129d00 100644
--- a/sys/dev/pci/if_ixgb.c
+++ b/sys/dev/pci/if_ixgb.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_ixgb.c,v 1.15 2006/05/20 03:47:56 brad Exp $ */
+/* $OpenBSD: if_ixgb.c,v 1.16 2006/05/26 20:50:41 deraadt Exp $ */
#include <dev/pci/if_ixgb.h>
@@ -1034,7 +1034,7 @@ ixgb_setup_interface(struct ixgb_softc *sc)
ifp->if_ioctl = ixgb_ioctl;
ifp->if_start = ixgb_start;
ifp->if_watchdog = ixgb_watchdog;
- ifp->if_jumbo_mtu =
+ ifp->if_hardmtu =
IXGB_MAX_JUMBO_FRAME_SIZE - ETHER_HDR_LEN - ETHER_CRC_LEN;
IFQ_SET_MAXLEN(&ifp->if_snd, sc->num_tx_desc - 1);
IFQ_SET_READY(&ifp->if_snd);
diff --git a/sys/dev/pci/if_xge.c b/sys/dev/pci/if_xge.c
index c780236ee4f..fdcb3da8ad5 100644
--- a/sys/dev/pci/if_xge.c
+++ b/sys/dev/pci/if_xge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xge.c,v 1.13 2006/05/20 03:47:56 brad Exp $ */
+/* $OpenBSD: if_xge.c,v 1.14 2006/05/26 20:50:41 deraadt Exp $ */
/* $NetBSD: if_xge.c,v 1.1 2005/09/09 10:30:27 ragge Exp $ */
/*
@@ -560,7 +560,7 @@ xge_attach(struct device *parent, struct device *self, void *aux)
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_ioctl = xge_ioctl;
ifp->if_start = xge_start;
- ifp->if_jumbo_mtu = XGE_MAX_MTU;
+ ifp->if_hardmtu = XGE_MAX_MTU;
IFQ_SET_MAXLEN(&ifp->if_snd, NTXDESCS - 1);
IFQ_SET_READY(&ifp->if_snd);
diff --git a/sys/net/if.h b/sys/net/if.h
index 3e882a01277..a9e067556ae 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.h,v 1.79 2006/05/19 19:50:23 reyk Exp $ */
+/* $OpenBSD: if.h,v 1.80 2006/05/26 20:50:41 deraadt Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
@@ -194,7 +194,7 @@ struct ifnet { /* and the entries */
short if_timer; /* time 'til if_watchdog called */
short if_flags; /* up/down, broadcast, etc. */
struct if_data if_data; /* stats and other data about if */
- u_int32_t if_jumbo_mtu; /* maximum jumbo transmission unit */
+ u_int32_t if_hardmtu; /* maximum MTU device supports */
int if_capabilities; /* interface capabilities */
char if_description[IFDESCRSIZE]; /* interface description */
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 3435929b1c7..d9f54680d0c 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.101 2006/05/19 19:50:23 reyk Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.102 2006/05/26 20:50:41 deraadt Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -833,14 +833,8 @@ ether_ifattach(ifp)
ifp->if_mtu = ETHERMTU;
ifp->if_output = ether_output;
- /*
- * If the device supports sending of jumbo frames,
- * either use the default maximum jumbo frame size
- * or the one specified by the driver.
- */
- if (ifp->if_capabilities & IFCAP_JUMBO_MTU &&
- ifp->if_jumbo_mtu == 0)
- ifp->if_jumbo_mtu = ETHERMTU_JUMBO;
+ if (ifp->if_hardmtu == 0)
+ ifp->if_hardmtu = ETHERMTU;
if_alloc_sadl(ifp);
bcopy((caddr_t)((struct arpcom *)ifp)->ac_enaddr,
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index a24968ca1e4..e9cf72408b8 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.h,v 1.68 2005/10/05 17:32:22 norby Exp $ */
+/* $OpenBSD: in.h,v 1.69 2006/05/26 20:50:41 deraadt Exp $ */
/* $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ */
/*
@@ -311,11 +311,6 @@ struct ip_mreq {
#define INET_ADDRSTRLEN 16
/*
- * JUMBO MTU
- */
-#define IP_JUMBO_MTU 9000
-
-/*
* Definitions for inet sysctl operations.
*
* Third level is protocol number.
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index a811e011339..ee15bd2cd43 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_output.c,v 1.176 2006/03/05 21:48:56 miod Exp $ */
+/* $OpenBSD: ip_output.c,v 1.177 2006/05/26 20:50:41 deraadt Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
@@ -693,9 +693,13 @@ sendit:
}
#endif
- /* Try to use jumbograms? */
- if (flags & IP_JUMBO && ro->ro_rt && ro->ro_rt->rt_flags & RTF_JUMBO)
- mtu = IP_JUMBO_MTU;
+ /* XXX
+ * Try to use jumbograms based on socket option, or the route
+ * or... for other reasons later on.
+ */
+ if ((flags & IP_JUMBO) && ro->ro_rt && (ro->ro_rt->rt_flags & RTF_JUMBO) &&
+ ro->ro_rt->rt_ifp)
+ mtu = ro->ro_rt->rt_ifp->if_hardmtu;
/*
* If small enough for interface, can just send directly.