Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_lagg.h
Show First 20 Lines • Show All 238 Lines • ▼ Show 20 Lines | struct lagg_softc { | ||||
struct task sc_lladdr_task; | struct task sc_lladdr_task; | ||||
SLIST_HEAD(__llqhd, lagg_llq) sc_llq_head; /* interfaces to program | SLIST_HEAD(__llqhd, lagg_llq) sc_llq_head; /* interfaces to program | ||||
the lladdr on */ | the lladdr on */ | ||||
eventhandler_tag vlan_attach; | eventhandler_tag vlan_attach; | ||||
eventhandler_tag vlan_detach; | eventhandler_tag vlan_detach; | ||||
struct callout sc_callout; | struct callout sc_callout; | ||||
u_int sc_opts; | u_int sc_opts; | ||||
int flowid_shift; /* shift the flowid */ | int flowid_shift; /* shift the flowid */ | ||||
uint32_t sc_bkt; /* packates bucket for roundrobin */ | /* packates bucket for roundrobin */ | ||||
uint32_t sc_bkt_count; /* packates bucket count for roundrobin */ | uint32_t sc_bkt; | ||||
struct lagg_counters detached_counters; /* detached ports sum */ | /* packates bucket count for roundrobin */ | ||||
uint32_t sc_bkt_count; | |||||
/* detached ports sum */ | |||||
struct lagg_counters detached_counters; | |||||
/* saved sum of ports' counters */ | |||||
struct lagg_counters saved_port_counters; | |||||
}; | }; | ||||
struct lagg_port { | struct lagg_port { | ||||
struct ifnet *lp_ifp; /* physical interface */ | struct ifnet *lp_ifp; /* physical interface */ | ||||
struct lagg_softc *lp_softc; /* parent lagg */ | struct lagg_softc *lp_softc; /* parent lagg */ | ||||
uint8_t lp_lladdr[ETHER_ADDR_LEN]; | uint8_t lp_lladdr[ETHER_ADDR_LEN]; | ||||
u_char lp_iftype; /* interface type */ | u_char lp_iftype; /* interface type */ | ||||
Show All 13 Lines | struct lagg_port { | ||||
struct lagg_counters port_counters; /* ifp counters copy */ | struct lagg_counters port_counters; /* ifp counters copy */ | ||||
SLIST_ENTRY(lagg_port) lp_entries; | SLIST_ENTRY(lagg_port) lp_entries; | ||||
}; | }; | ||||
#define LAGG_LOCK_INIT(_sc) rm_init(&(_sc)->sc_mtx, "if_lagg rmlock") | #define LAGG_LOCK_INIT(_sc) rm_init(&(_sc)->sc_mtx, "if_lagg rmlock") | ||||
#define LAGG_LOCK_DESTROY(_sc) rm_destroy(&(_sc)->sc_mtx) | #define LAGG_LOCK_DESTROY(_sc) rm_destroy(&(_sc)->sc_mtx) | ||||
#define LAGG_RLOCK(_sc, _p) rm_rlock(&(_sc)->sc_mtx, (_p)) | #define LAGG_RLOCK(_sc, _p) rm_rlock(&(_sc)->sc_mtx, (_p)) | ||||
#define LAGG_TRY_RLOCK(_sc, _p) rm_try_rlock(&(_sc)->sc_mtx, (_p)) | |||||
#define LAGG_WLOCK(_sc) rm_wlock(&(_sc)->sc_mtx) | #define LAGG_WLOCK(_sc) rm_wlock(&(_sc)->sc_mtx) | ||||
#define LAGG_RUNLOCK(_sc, _p) rm_runlock(&(_sc)->sc_mtx, (_p)) | #define LAGG_RUNLOCK(_sc, _p) rm_runlock(&(_sc)->sc_mtx, (_p)) | ||||
#define LAGG_WUNLOCK(_sc) rm_wunlock(&(_sc)->sc_mtx) | #define LAGG_WUNLOCK(_sc) rm_wunlock(&(_sc)->sc_mtx) | ||||
#define LAGG_RLOCK_ASSERT(_sc) rm_assert(&(_sc)->sc_mtx, RA_RLOCKED) | #define LAGG_RLOCK_ASSERT(_sc) rm_assert(&(_sc)->sc_mtx, RA_RLOCKED) | ||||
#define LAGG_WLOCK_ASSERT(_sc) rm_assert(&(_sc)->sc_mtx, RA_WLOCKED) | #define LAGG_WLOCK_ASSERT(_sc) rm_assert(&(_sc)->sc_mtx, RA_WLOCKED) | ||||
#define LAGG_UNLOCK_ASSERT(_sc) rm_assert(&(_sc)->sc_mtx, RA_UNLOCKED) | #define LAGG_UNLOCK_ASSERT(_sc) rm_assert(&(_sc)->sc_mtx, RA_UNLOCKED) | ||||
extern struct mbuf *(*lagg_input_p)(struct ifnet *, struct mbuf *); | extern struct mbuf *(*lagg_input_p)(struct ifnet *, struct mbuf *); | ||||
Show All 9 Lines |