Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_lagg.c
Show First 20 Lines • Show All 2,045 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
lagg_lb_start(struct lagg_softc *sc, struct mbuf *m) | lagg_lb_start(struct lagg_softc *sc, struct mbuf *m) | ||||
{ | { | ||||
struct lagg_lb *lb = (struct lagg_lb *)sc->sc_psc; | struct lagg_lb *lb = (struct lagg_lb *)sc->sc_psc; | ||||
struct lagg_port *lp = NULL; | struct lagg_port *lp = NULL; | ||||
uint32_t p = 0; | uint32_t p = 0; | ||||
if ((sc->sc_opts & LAGG_OPT_USE_FLOWID) && | if ((sc->sc_opts & LAGG_OPT_USE_FLOWID) && | ||||
M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) | M_HASHTYPE_GET(m) != M_HASHTYPE_NONE && | ||||
M_HASHTYPE_GET(m) != M_HASHTYPE_OPAQUE) | |||||
p = m->m_pkthdr.flowid >> sc->flowid_shift; | p = m->m_pkthdr.flowid >> sc->flowid_shift; | ||||
else | else | ||||
p = m_ether_tcpip_hash(sc->sc_flags, m, lb->lb_key); | p = m_ether_tcpip_hash(sc->sc_flags, m, lb->lb_key); | ||||
p %= sc->sc_count; | p %= sc->sc_count; | ||||
lp = lb->lb_ports[p]; | lp = lb->lb_ports[p]; | ||||
/* | /* | ||||
* Check the port's link state. This will return the next active | * Check the port's link state. This will return the next active | ||||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |