diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2014-03-13 03:42:24 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2014-03-13 03:42:24 +0000 |
commit | b245f96c44c5c3b395480706327250c29f8d19cc (patch) | |
tree | 23c54b335bf31cd906e8cf3bad37e838d9a80c2d /sys/net/if_bridge.c | |
parent | 3d31c75401c066d17bb3d3baef0a2a7c4ffe7708 (diff) | |
download | src-b245f96c44c5c3b395480706327250c29f8d19cc.tar.gz src-b245f96c44c5c3b395480706327250c29f8d19cc.zip |
Since 32-bit if_baudrate isn't enough to describe a baud rate of a 10 Gbit
interface, in the r241616 a crutch was provided. It didn't work well, and
finally we decided that it is time to break ABI and simply make if_baudrate
a 64-bit value. Meanwhile, the entire struct if_data was reviewed.
o Remove the if_baudrate_pf crutch.
o Make all fields of struct if_data fixed machine independent size. The
notion of data (packet counters, etc) are by no means MD. And it is a
bug that on amd64 we've got a 64-bit counters, while on i386 32-bit,
which at modern speeds overflow within a second.
This also removes quite a lot of COMPAT_FREEBSD32 code.
o Give 16 bit for the ifi_datalen field. This field was provided to
make future changes to if_data less ABI breaking. Unfortunately the
8 bit size of it had effectively limited sizeof if_data to 256 bytes.
o Give 32 bits to ifi_mtu and ifi_metric.
o Give 64 bits to the rest of fields, since they are counters.
__FreeBSD_version bumped.
Discussed with: emax
Sponsored by: Netflix
Sponsored by: Nginx, Inc.
Notes
Notes:
svn path=/head/; revision=263102
Diffstat (limited to 'sys/net/if_bridge.c')
-rw-r--r-- | sys/net/if_bridge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index a44596034979..4e085731feea 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -817,7 +817,7 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) BRIDGE_LOCK(sc); LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { if (bif->bif_ifp->if_mtu != ifr->ifr_mtu) { - log(LOG_NOTICE, "%s: invalid MTU: %lu(%s)" + log(LOG_NOTICE, "%s: invalid MTU: %u(%s)" " != %d\n", sc->sc_ifp->if_xname, bif->bif_ifp->if_mtu, bif->bif_ifp->if_xname, ifr->ifr_mtu); @@ -1107,7 +1107,7 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg) if (LIST_EMPTY(&sc->sc_iflist)) sc->sc_ifp->if_mtu = ifs->if_mtu; else if (sc->sc_ifp->if_mtu != ifs->if_mtu) { - if_printf(sc->sc_ifp, "invalid MTU: %lu(%s) != %lu\n", + if_printf(sc->sc_ifp, "invalid MTU: %u(%s) != %u\n", ifs->if_mtu, ifs->if_xname, sc->sc_ifp->if_mtu); return (EINVAL); } |