From: visa Date: Thu, 29 Jun 2017 10:56:18 +0000 (+0000) Subject: Always use the maximum permissible frame size for Rx size limit. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4861ac411f2c5605d4736cda5b201c92867ee40a;p=openbsd Always use the maximum permissible frame size for Rx size limit. This lets a change of interface MTU take effect immediately without link cycling and brings cnmac(4) into line with other jumbo frame capable NIC drivers. Prompted by Joe Holden on misc@ OK dlg@ --- diff --git a/sys/arch/octeon/dev/cn30xxgmx.c b/sys/arch/octeon/dev/cn30xxgmx.c index af8dd1eb71a..4dd98a8ff9a 100644 --- a/sys/arch/octeon/dev/cn30xxgmx.c +++ b/sys/arch/octeon/dev/cn30xxgmx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cn30xxgmx.c,v 1.34 2017/05/02 13:26:49 visa Exp $ */ +/* $OpenBSD: cn30xxgmx.c,v 1.35 2017/06/29 10:56:18 visa Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -578,7 +578,7 @@ cn30xxgmx_rx_frm_ctl_enable(struct cn30xxgmx_port_softc *sc, struct ifnet *ifp = &sc->sc_port_ac->ac_if; unsigned int maxlen; - maxlen = roundup(ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + + maxlen = roundup(ifp->if_hardmtu + ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN, 8); _GMX_PORT_WR8(sc, GMX0_RX0_JABBER, maxlen);