lagg/lacp poor traffic distribution

Eugene Grosbein egrosbein at rdtc.ru
Tue Dec 21 07:41:27 UTC 2010


On 21.12.2010 13:32, Eugene Grosbein wrote:

>> I had this problem with igb driver, and I found, that lagg selects
>> outgoing interface based on packet header flowid field if M_FLOWID field
>> is set. And in the igb driver code flowid is set as 
>>
>> #if __FreeBSD_version >= 800000
>> <------><------><------>rxr->fmp->m_pkthdr.flowid = que->msix;
>> <------><------><------>rxr->fmp->m_flags |= M_FLOWID;
>> #endif
>>
>> The same thing in em driver with MULTIQUEUE 
>>
>> That does not give enough number of flows to balance traffic well, so I
>> commented check in if_lagg.c
>>
>> lagg_lb_start(struct lagg_softc *sc, struct mbuf *m)
>> {
>> <------>struct lagg_lb *lb = (struct lagg_lb *)sc->sc_psc;
>> <------>struct lagg_port *lp = NULL;
>> <------>uint32_t p = 0;
>>
>> //<---->if (m->m_flags & M_FLOWID)
>> //<----><------>p = m->m_pkthdr.flowid;
>> //<---->else
>>
>> and with this change I have much better load distribution across interfaces.
>>
>> Hope it helps.
>>
> 
> I've made new sysctl net.link.lagg.use_flows to enable/disable
> this code in run time and disabled it. No change.
> 
> --- if_lagg.c.orig	2010-12-20 22:53:21.000000000 +0600
> +++ if_lagg.c	2010-12-20 22:57:50.000000000 +0600

I've just found LACP mode does not use code in place I've patched.
Instead, I should make the change to lacp_select_tx_port()
into ieee8023ad_lacp.c. Sorry for noise, I'll try again.


More information about the freebsd-net mailing list