Multilink packet loss 2.6.32 - would like to resolve and have
Subsystems (2)
Hi all,
Further to some of my posts [1] where applying a patch to undo the default multilink behaviour in 2.6.32 with one turning off fragmentation resolved the packet loss, now we're interested in revisiting this issue and resolving it the "proper" way so that we can have heterogeneous link speeds working.
Unfortunately this would appear to be a chicken and egg problem: if we use the default behaviour of 2.6.32+, we get the massive packet loss. If we apply the round robin patch [2], we get no heterogeneous link speeds.
I also tried another patch [3] to the default 2.6.32+ behaviour, but this didn't resolve the problem. There is still some packet loss, though it's a bit better than before.
Would appreciate any ideas...
Thanks
Erik
[1] http://marc.info/?l=linux-ppp&m7445627823484&w=2
[2] http://lkml.org/lkml/2010/3/26/170
[3] http://marc.info/?l=linux-ppp&m7555649304387&w=2
Quoted 4 lines · Erik L
I also tried another patch [3] to the default 2.6.32+ behaviour, but this didn't resolve the problem. There is still some packet loss, though it's a bit better than before.
Due to other time pressures I've still not had time to do any real testing of the rest of the patches in this series but if you want to try them yourself please see attachments.
Regards,
Ben.
Signature · 3 lines
Ben McKeegan Netservers Limited 01223 446000 ext 8103
From ee7beb261ec1a505e86819369c70dc4bf17897b8 Mon Sep 17 00:00:00 2001
From: Ben McKeegan <[email protected]>
Date: Thu, 3 Jun 2010 10:11:53 +0100
Subject: [PATCH] ppp_generic: fix multilink fragment sizes
Fix bug in multilink fragment size calculation introduced by commit 9c705260feea6ae329bc6b6d5f6d2ef0227eda0a "ppp: ppp_mp_explode() redesign"
--- drivers/net/ppp_generic.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/ppp_generic.c +1 -1
@@ -1416,7 +1416,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb) flen = len;if (nfree >0 ) {if (pch->speed ==0 ) { - flen = totlen/nfree; + flen = len/nfree;if (nbigger >0 ) { flen++; nbigger--;
Signature · 1 line
1.5.6.5
From 03424b002876a5a242229758b9940225f09ec8fc Mon Sep 17 00:00:00 2001
From: Ben McKeegan <[email protected]>
Date: Thu, 3 Jun 2010 18:49:10 +0100
Subject: [PATCH] ppp: add support for configuring minimum sizes of multilink fragments
Add a per bundle parameter for minimum multilink fragment size. Setting this parameter to a non-zero value will modify the multilink fragmentation algorithm such that it no longer fragments every packet accross all free channels where this would result in fragments below the configured threshold.
Setting any minimum fragment size in excess of the MTU will disable fragmentation entirely, causing multilink packets to be sent round-robin over all the free channels.
The minimum fragment size can be configured for each PPP bundle via a new ioctl PPPIOCSMINFRAG. The default value for new bundles is taken from the module parameter 'min_frag_size', which defaults to 0.
--- drivers/net/ppp_generic.c | 64 +++++++++++++++++++++++++++++++++++++++++--- include/linux/if_ppp.h | 1 + 2 files changed, 60 insertions(+), 5 deletions(-)
drivers/net/ppp_generic.c +59 -5
120 lines not on this page · raw message
include/linux/if_ppp.h +1 -0
@@ -161,6 +161,7 @@ struct pppol2tp_ioc_stats {#define PPPIOCATTCHAN _IOW('t', 56, int)/* attach to ppp channel */ #define PPPIOCGCHAN _IOR('t', 55, int)/* get ppp channel number */ #define PPPIOCGL2TPSTATS _IOR('t', 54, struct pppol2tp_ioc_stats) +#define PPPIOCSMINFRAG _IOW('t', 53, int)/* minimum fragment size */ #define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0)#define SIOCGPPPVER (SIOCDEVPRIVATE + 1)/* NEVER change this!! */
Signature · 1 line
1.5.6.5
From 9c7c7bc1d011e0ea96211b7423c8f389202fb0ad Mon Sep 17 00:00:00 2001
From: Ben McKeegan <[email protected]>
Date: Fri, 4 Jun 2010 17:55:11 +0100
Subject: [PATCH] ppp: optionally omit multilink header when fragmentation not required
Add an alternative mode to the multilink sending algorithm to avoid encapsulating packets in a multilink header where otherwise only a single multilink packet would have been sent.
This mode can be enabled for an existing PPP bundle by setting the SC_NOT_1_FRAG flag via the PPPIOCSFLAGS ioctl. It can be enabled by default for new bundles by setting the module parameter encaps_fragmented_only=1
--- drivers/net/ppp_generic.c | 69 +++++++++++++++++++++++++++----------------- include/linux/if_ppp.h | 3 +- 2 files changed, 44 insertions(+), 28 deletions(-)
drivers/net/ppp_generic.c +42 -27
94 lines not on this page · raw message
include/linux/if_ppp.h +2 -1
@@ -72,7 +72,8 @@#define SC_LOG_FLUSH 0x00100000/* log all chars flushed */ #define SC_SYNC 0x00200000/* synchronous serial mode */ #define SC_MUST_COMP 0x00400000/* no uncompressed packets may be sent or received */ -#define SC_MASK 0x0f600fff/* bits that user can change */ +#define SC_NOT_1_FRAG 0x80000000/* don't do multilink encaps for only 1 fragment */ +#define SC_MASK 0x8f600fff/* bits that user can change */ /* state bits */ #define SC_XMIT_BUSY 0x10000000/* (used by isdn_ppp?) */
Signature · 1 line
1.5.6.5
Hi Ben,
Thanks for the patches. What I've done so far was:
-Apply the kernel patches to our LNS Debian kernel and our CPE kernel
-Make the necessary modifications in userspace in pppd to make use of the new min frag ioctl. I picked a min fragment size of 49.
The results of testing as reported by a colleague are that there is still some dropped packets and speed tests are still not performing as well as with the round-robin patch. I can provide further details if this would help.
Next I will try setting SC_NOT_1_FRAG in PPPIOCSFLAGS and play around with various min frag sizes.
In the meanwhile any further ideas would be appreciated.
BTW, this is all with homogeneous links still; haven't even tested heterogeneous yet as was hoping to first replicate the performance equivalent to the round-robin patch on homogeneous.
Thanks
Erik
----- Original Message -----
From: "Ben McKeegan" <[email protected]>
To: "Erik L" <[email protected]>
Cc: "linux-ppp" <[email protected]>
Sent: Wednesday, July 14, 2010 4:36:56 AM
Subject: Re: Multilink packet loss 2.6.32 - would like to resolve and have heterogenous links working
Quoted 6 lines · Erik L
I also tried another patch [3] to the default 2.6.32+ behaviour, but this didn't resolve the problem. There is still some packet loss, though it's a bit better than before.
Due to other time pressures I've still not had time to do any real testing of the rest of the patches in this series but if you want to try them yourself please see attachments.
Regards,
Ben.
-- Ben McKeegan
Netservers Limited
01223 446000 ext 8103