Changeset View
Changeset View
Standalone View
Standalone View
head/sys/net/if_lagg.c
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | |||||
static void lagg_port2req(struct lagg_port *, struct lagg_reqport *); | static void lagg_port2req(struct lagg_port *, struct lagg_reqport *); | ||||
static void lagg_init(void *); | static void lagg_init(void *); | ||||
static void lagg_stop(struct lagg_softc *); | static void lagg_stop(struct lagg_softc *); | ||||
static int lagg_ioctl(struct ifnet *, u_long, caddr_t); | static int lagg_ioctl(struct ifnet *, u_long, caddr_t); | ||||
#ifdef RATELIMIT | #ifdef RATELIMIT | ||||
static int lagg_snd_tag_alloc(struct ifnet *, | static int lagg_snd_tag_alloc(struct ifnet *, | ||||
union if_snd_tag_alloc_params *, | union if_snd_tag_alloc_params *, | ||||
struct m_snd_tag **); | struct m_snd_tag **); | ||||
static void lagg_snd_tag_free(struct m_snd_tag *); | |||||
#endif | #endif | ||||
static int lagg_setmulti(struct lagg_port *); | static int lagg_setmulti(struct lagg_port *); | ||||
static int lagg_clrmulti(struct lagg_port *); | static int lagg_clrmulti(struct lagg_port *); | ||||
static int lagg_setcaps(struct lagg_port *, int cap); | static int lagg_setcaps(struct lagg_port *, int cap); | ||||
static int lagg_setflag(struct lagg_port *, int, int, | static int lagg_setflag(struct lagg_port *, int, int, | ||||
int (*func)(struct ifnet *, int)); | int (*func)(struct ifnet *, int)); | ||||
static int lagg_setflags(struct lagg_port *, int status); | static int lagg_setflags(struct lagg_port *, int status); | ||||
static uint64_t lagg_get_counter(struct ifnet *ifp, ift_counter cnt); | static uint64_t lagg_get_counter(struct ifnet *ifp, ift_counter cnt); | ||||
▲ Show 20 Lines • Show All 365 Lines • ▼ Show 20 Lines | lagg_clone_create(struct if_clone *ifc, int unit, caddr_t params) | ||||
ifp->if_transmit = lagg_transmit; | ifp->if_transmit = lagg_transmit; | ||||
ifp->if_qflush = lagg_qflush; | ifp->if_qflush = lagg_qflush; | ||||
ifp->if_init = lagg_init; | ifp->if_init = lagg_init; | ||||
ifp->if_ioctl = lagg_ioctl; | ifp->if_ioctl = lagg_ioctl; | ||||
ifp->if_get_counter = lagg_get_counter; | ifp->if_get_counter = lagg_get_counter; | ||||
ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; | ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; | ||||
#ifdef RATELIMIT | #ifdef RATELIMIT | ||||
ifp->if_snd_tag_alloc = lagg_snd_tag_alloc; | ifp->if_snd_tag_alloc = lagg_snd_tag_alloc; | ||||
ifp->if_snd_tag_free = lagg_snd_tag_free; | |||||
#endif | #endif | ||||
ifp->if_capenable = ifp->if_capabilities = IFCAP_HWSTATS; | ifp->if_capenable = ifp->if_capabilities = IFCAP_HWSTATS; | ||||
/* | /* | ||||
* Attach as an ordinary ethernet device, children will be attached | * Attach as an ordinary ethernet device, children will be attached | ||||
* as special device IFT_IEEE8023ADLAG. | * as special device IFT_IEEE8023ADLAG. | ||||
*/ | */ | ||||
ether_ifattach(ifp, eaddr); | ether_ifattach(ifp, eaddr); | ||||
▲ Show 20 Lines • Show All 1,038 Lines • ▼ Show 20 Lines | lagg_snd_tag_alloc(struct ifnet *ifp, | ||||
ifp = lp->lp_ifp; | ifp = lp->lp_ifp; | ||||
if (ifp == NULL || ifp->if_snd_tag_alloc == NULL || | if (ifp == NULL || ifp->if_snd_tag_alloc == NULL || | ||||
(ifp->if_capenable & IFCAP_TXRTLMT) == 0) | (ifp->if_capenable & IFCAP_TXRTLMT) == 0) | ||||
return (EOPNOTSUPP); | return (EOPNOTSUPP); | ||||
/* forward allocation request */ | /* forward allocation request */ | ||||
return (ifp->if_snd_tag_alloc(ifp, params, ppmt)); | return (ifp->if_snd_tag_alloc(ifp, params, ppmt)); | ||||
} | } | ||||
static void | |||||
lagg_snd_tag_free(struct m_snd_tag *tag) | |||||
{ | |||||
tag->ifp->if_snd_tag_free(tag); | |||||
} | |||||
#endif | #endif | ||||
static int | static int | ||||
lagg_setmulti(struct lagg_port *lp) | lagg_setmulti(struct lagg_port *lp) | ||||
{ | { | ||||
struct lagg_softc *sc = lp->lp_softc; | struct lagg_softc *sc = lp->lp_softc; | ||||
struct ifnet *ifp = lp->lp_ifp; | struct ifnet *ifp = lp->lp_ifp; | ||||
struct ifnet *scifp = sc->sc_ifp; | struct ifnet *scifp = sc->sc_ifp; | ||||
▲ Show 20 Lines • Show All 671 Lines • Show Last 20 Lines |