Use the flowid if its available for selecting the tx port.

This commit is contained in:
Andrew Thompson 2009-04-30 14:25:44 +00:00
parent 0c4ffccadb
commit 5c6026e91f
2 changed files with 8 additions and 2 deletions

View File

@ -812,6 +812,9 @@ lacp_select_tx_port(struct lagg_softc *sc, struct mbuf *m)
return (NULL);
}
if (m->m_flags & M_FLOWID)
hash = m->m_pkthdr.flowid;
else
hash = lagg_hashmbuf(m, lsc->lsc_hashkey);
hash %= pm->pm_count;
lp = pm->pm_map[hash];

View File

@ -1604,6 +1604,9 @@ lagg_lb_start(struct lagg_softc *sc, struct mbuf *m)
struct lagg_port *lp = NULL;
uint32_t p = 0;
if (m->m_flags & M_FLOWID)
p = m->m_pkthdr.flowid;
else
p = lagg_hashmbuf(m, lb->lb_key);
p %= sc->sc_count;
lp = lb->lb_ports[p];