Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Feb 2012 19:51:27 +0700
From:      Eugene Grosbein <egrosbein@rdtc.ru>
Cc:        Alexander Motin <mav@FreeBSD.org>, Gleb Smirnoff <glebius@FreeBSD.org>, Andrew Thompson <thompsa@FreeBSD.org>, "net@freebsd.org" <net@FreeBSD.org>
Subject:   Re: netisr+lagg+fragments=80% packet loss
Message-ID:  <4F48D94F.6030803@rdtc.ru>
In-Reply-To: <4F48D14A.7090003@rdtc.ru>
References:  <4F47C55C.8060006@rdtc.ru>	<4F47D5EF.7060908@rdtc.ru> <CAFAOGNQvjJcKb_hhzeoN5ptgm882qimsavzN9b=GW_VgPD8mtw@mail.gmail.com> <4F48D14A.7090003@rdtc.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
25.02.2012 19:17, Eugene Grosbein пишет:
> 25.02.2012 02:00, Andrew Thompson пишет:
>> 2012/2/25 Eugene Grosbein <egrosbein@rdtc.ru>:
>>> 25.02.2012 00:14, Eugene Grosbein пишет:
>>>> This problem occurs only when net.isr.direct=0/net.isr.direct_force=0.
>>>> And only when lagg1 has both ports up and running. And when I use oversized pings.
>>>> At the same time, transit oversized pings go through this BRAS just fine,
>>>> no packet loss at all.
>>>
>>> Running two copies of tcpdump for igb0 and igb1 simultaneously,
>>> I see that fragments of the same ICMP echo-reply packet encapsulated within PPPoE
>>> frame always go out through different ports of lagg1. Even when they arrive to client in order,
>>> it seems this depends of switching network in between PPPoE server and client.
>>>
>>
>> If you are running a recent HEAD then you can try setting
>> net.link.lagg.0.use_flowid to zero.
> 
> It helps to set net.link.lagg.1.use_flowid=1, yes (but I use 8.2-STABLE with this sysctl added).
> Perhaps, ip_fragment() does not keep flowid for fragments it creates.

The following patch (by Alexander Chernikov) solves the problem
by preserving flowid for fragments:

--- sys/netinet/ip_output.c.orig	2012-02-25 19:19:15.000000000 +0700
+++ sys/netinet/ip_output.c	2012-02-25 19:32:00.000000000 +0700
@@ -825,6 +825,10 @@
 		}
 		m->m_pkthdr.len = mhlen + len;
 		m->m_pkthdr.rcvif = NULL;
+		if (m0->m_flags & M_FLOWID) {
+			m->m_pkthdr.flowid = m0->m_pkthdr.flowid;
+			m->m_flags |= M_FLOWID;
+		}
 #ifdef MAC
 		mac_netinet_fragment(m0, m);
 #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F48D94F.6030803>