From e3d90506c45f3b076c4f2fd5da882517d7643abb Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Thu, 25 May 2017 23:19:09 +0000 Subject: [PATCH] Remove some code, dead from the day one. --- sys/net/if_lagg.c | 21 --------------------- sys/net/if_lagg.h | 4 ---- 2 files changed, 25 deletions(-) diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 0f08a8de385..de5beaff712 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -1773,7 +1773,6 @@ struct lagg_port * lagg_link_active(struct lagg_softc *sc, struct lagg_port *lp) { struct lagg_port *lp_next, *rval = NULL; - // int new_link = LINK_STATE_DOWN; /* * Search a port which reports an active link state. @@ -1800,22 +1799,6 @@ search: } found: - if (rval != NULL) { - /* - * The IEEE 802.1D standard assumes that a lagg with - * multiple ports is always full duplex. This is valid - * for load sharing laggs and if at least two links - * are active. Unfortunately, checking the latter would - * be too expensive at this point. - XXX - if ((sc->sc_capabilities & IFCAP_LAGG_FULLDUPLEX) && - (sc->sc_count > 1)) - new_link = LINK_STATE_FULL_DUPLEX; - else - new_link = rval->lp_link_state; - */ - } - return (rval); } @@ -1832,7 +1815,6 @@ lagg_enqueue(struct ifnet *ifp, struct mbuf *m) static void lagg_rr_attach(struct lagg_softc *sc) { - sc->sc_capabilities = IFCAP_LAGG_FULLDUPLEX; sc->sc_seq = 0; sc->sc_bkt_count = sc->sc_bkt; } @@ -2001,9 +1983,6 @@ lagg_lb_attach(struct lagg_softc *sc) struct lagg_lb *lb; lb = malloc(sizeof(struct lagg_lb), M_DEVBUF, M_WAITOK | M_ZERO); - - sc->sc_capabilities = IFCAP_LAGG_FULLDUPLEX; - lb->lb_key = m_ether_tcpip_hash_init(); sc->sc_psc = lb; diff --git a/sys/net/if_lagg.h b/sys/net/if_lagg.h index 7098136d209..201d909a9b5 100644 --- a/sys/net/if_lagg.h +++ b/sys/net/if_lagg.h @@ -185,10 +185,6 @@ struct lagg_ifreq { #define sc_ifflags sc_ifp->if_flags /* flags */ #define sc_ifname sc_ifp->if_xname /* name */ -#define sc_capabilities sc_ifp->if_capabilities /* capabilities */ - -#define IFCAP_LAGG_MASK 0xffff0000 /* private capabilities */ -#define IFCAP_LAGG_FULLDUPLEX 0x00010000 /* full duplex with >1 ports */ /* Private data used by the loadbalancing protocol */ struct lagg_lb {