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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191692
2 changed files with 8 additions and 2 deletions

View File

@ -812,7 +812,10 @@ lacp_select_tx_port(struct lagg_softc *sc, struct mbuf *m)
return (NULL);
}
hash = lagg_hashmbuf(m, lsc->lsc_hashkey);
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,7 +1604,10 @@ lagg_lb_start(struct lagg_softc *sc, struct mbuf *m)
struct lagg_port *lp = NULL;
uint32_t p = 0;
p = lagg_hashmbuf(m, lb->lb_key);
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];