diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2023-04-22 04:39:47 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2023-04-22 04:39:47 +0000 |
commit | 3383e0b7ca66cbd8b3c49dd73d6f43fd683e437c (patch) | |
tree | 713479495b8b4162b2a77c74e25319d4584fcfc7 /sys/net | |
parent | acf8e9001694134e840a5ee5c100efe6e1e9d5d0 (diff) |
revert vlan(4) inherits TSO flags
tb reports amd64 RAMDISK doesn't build with it.
also, vlan_flags_from_parent doesn't look right right. it iterates
over ifnetlist, which is all interfaces in the system, but appears
to assume they're all vlan interfaces and so uses a vlan_softc *
to inspect their if_softc pointers.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 7 | ||||
-rw-r--r-- | sys/net/if_vlan.c | 32 | ||||
-rw-r--r-- | sys/net/if_vlan_var.h | 3 |
3 files changed, 3 insertions, 39 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index b53416655e9..e06e8e8b769 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.691 2023/04/21 14:31:41 jan Exp $ */ +/* $OpenBSD: if.c,v 1.692 2023/04/22 04:39:46 dlg Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -92,7 +92,6 @@ #include <net/if.h> #include <net/if_dl.h> #include <net/if_types.h> -#include <net/if_vlan_var.h> #include <net/route.h> #include <net/netisr.h> @@ -3150,10 +3149,6 @@ ifsettso(struct ifnet *ifp, int on) else goto out; - /* Change TSO flag also on attached vlan(4)/svlan(4) interfaces. */ - vlan_flags_from_parent(ifp, IFXF_TSO); - - /* restart interface */ if (ISSET(ifp->if_flags, IFF_UP)) { /* go down for a moment... */ CLR(ifp->if_flags, IFF_UP); diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 7d3bef9a548..8958233348b 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan.c,v 1.212 2023/04/21 14:31:41 jan Exp $ */ +/* $OpenBSD: if_vlan.c,v 1.213 2023/04/22 04:39:46 dlg Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology @@ -941,9 +941,6 @@ vlan_set_parent(struct vlan_softc *sc, const char *parent) if (!ISSET(sc->sc_flags, IFVF_LLADDR)) if_setlladdr(ifp, LLADDR(ifp0->if_sadl)); - /* Inherit flags from parent interface. */ - vlan_flags_from_parent(ifp0, IFXF_TSO); - put: if_put(ifp0); return (error); @@ -965,33 +962,6 @@ vlan_del_parent(struct vlan_softc *sc) return (0); } -void -vlan_flags_from_parent(struct ifnet *ifp0, int flags) -{ - struct ifnet *ifp; - struct vlan_softc *sc; - - TAILQ_FOREACH(ifp, &ifnetlist, if_list) { - if ((sc = ifp->if_softc) == NULL) - continue; - - if (sc->sc_type != ETHERTYPE_VLAN && - sc->sc_type != ETHERTYPE_QINQ) - continue; - - /* vlan and tso only works with hw tagging */ - if (!ISSET(ifp0->if_capabilities, IFCAP_VLAN_HWTAGGING)) - CLR(flags, IFXF_TSO); - - if (sc->sc_ifidx0 == ifp0->if_index) { - if (ISSET(ifp0->if_xflags, flags)) - SET(ifp->if_xflags, flags); - else - CLR(ifp->if_xflags, flags); - } - } -} - int vlan_set_compat(struct ifnet *ifp, struct ifreq *ifr) { diff --git a/sys/net/if_vlan_var.h b/sys/net/if_vlan_var.h index 1e4e57bc7bf..9e408cd71ef 100644 --- a/sys/net/if_vlan_var.h +++ b/sys/net/if_vlan_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan_var.h,v 1.44 2023/04/21 14:31:41 jan Exp $ */ +/* $OpenBSD: if_vlan_var.h,v 1.45 2023/04/22 04:39:46 dlg Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology @@ -49,7 +49,6 @@ struct vlanreq { #ifdef _KERNEL struct mbuf *vlan_input(struct ifnet *, struct mbuf *, unsigned int *); struct mbuf *vlan_inject(struct mbuf *, uint16_t, uint16_t); -void vlan_flags_from_parent(struct ifnet *, int); #endif /* _KERNEL */ #endif /* _NET_IF_VLAN_VAR_H_ */ |