MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lacp_attach

Function lacp_attach

freebsd/net/ieee8023ad_lacp.c:771–794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

769}
770
771void
772lacp_attach(struct lagg_softc *sc)
773{
774 struct lacp_softc *lsc;
775
776 lsc = malloc(sizeof(struct lacp_softc), M_DEVBUF, M_WAITOK | M_ZERO);
777
778 sc->sc_psc = lsc;
779 lsc->lsc_softc = sc;
780
781 lsc->lsc_hashkey = m_ether_tcpip_hash_init();
782 lsc->lsc_active_aggregator = NULL;
783 lsc->lsc_strict_mode = VNET(lacp_default_strict_mode);
784 LACP_LOCK_INIT(lsc);
785 TAILQ_INIT(&lsc->lsc_aggregators);
786 LIST_INIT(&lsc->lsc_ports);
787
788 callout_init_mtx(&lsc->lsc_transit_callout, &lsc->lsc_mtx, 0);
789 callout_init_mtx(&lsc->lsc_callout, &lsc->lsc_mtx, 0);
790
791 /* if the lagg is already up then do the same */
792 if (sc->sc_ifp->if_drv_flags & IFF_DRV_RUNNING)
793 lacp_init(sc);
794}
795
796void
797lacp_detach(void *psc)

Callers 1

lagg_lacp_attachFunction · 0.85

Calls 3

mallocFunction · 0.85
m_ether_tcpip_hash_initFunction · 0.85
lacp_initFunction · 0.85

Tested by

no test coverage detected