Skip to contentSkip to conversation

PATCH_ppp_mp_explode_redesign

PATCH [email protected] 4 participants 6 messages Mar 3, 2009 – Apr 7, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

My name is Gabriele Paoloni, I am a Software Engineer working in the Intel Research and Development Center in Shannon, Ireland.

I already sent out different mails to the PPP mantainer (Paul Mackerras), but I got no reply.

I found the PPP subsystem to not work properly when connecting channels with different speeds to the same bundle.

Problem Description:

As the "ppp_mp_explode" function fragments the sk_buff buffer evenly among
the PPP channels that are connected to a certain PPP unit to make up a bundle, if we are transmitting using an upper layer protocol that requires an Ack
before sending the next packet (like TCP/IP for example), we will have a bandwidth bottleneck on the slowest channel of the bundle.
Let's clarify by an example. Let's consider a scenario where we have two PPP links making up a bundle: a slow link (10KB/sec) and a fast link (1000KB/sec) working at the best (full bandwidth). On the top we have a TCP/IP stack sending a 1000 Bytes sk_buff buffer down to the PPP subsystem. The "ppp_mp_explode" function will divide the buffer in two fragments of 500B each (we are neglecting all the headers, crc, flags etc?.). Before the TCP/IP stack sends out the next buffer, it will have to wait for the ACK response from the remote peer, so it will have to wait for both fragments to have been sent over the two PPP links, received by the remote peer and reconstructed. The resulting behaviour is that, rather than having a bundle working @1010KB/sec (the sum of the channels bandwidths), we'll have a bundle working @20KB/sec (the double of the slowest channels bandwidth).

Problem Solution:

The problem has been solved by redesigning the "ppp_mp_explode" function in such a way to make it split the sk_buff buffer according to the speeds of the underlying PPP channels (the speeds of the serial interfaces respectively attached to the PPP channels). Referring to the above example, the redesigned "ppp_mp_explode" function will now divide the 1000 Bytes buffer into two fragments whose sizes are set according to the speeds of the channels where they are going to be sent on (e.g . 10 Byets on 10KB/sec channel and 990 Bytes on 1000KB/sec channel).
The reworked function grants the same performances of the original one in optimal working conditions (i.e. a bundle made up of PPP links all working at the same speed), while greatly improving performances on the bundles made up of channels working at different speeds.

Find inline a possible solution patch.

Note: the kernel patch has been generated against the last stable version

      2.6.28.2

Best Regards

Gabriele Paoloni

email: [email protected]
phone: +353 6 147 7753
mobile1: 00353 8333 52390
mobile2: 0039 3937498940

*******************************************************************************
*******************************************************************************
*******************************************************************************

linux-2.6.28.2.new/drivers/net/ppp_async.c renamed from linux-2.6.28.2/drivers/net/ppp_async.c +3 -0
diff -urN ./linux-2.6.28.2/drivers/net/ppp_async.c ./linux-2.6.28.2.new/drivers/net/ppp_async.c
@@ -157,6 +157,7 @@
 {
 	struct asyncppp *ap;
 	int err;
+	int speed;
 
 	if (tty->ops->write == NULL)
 		return -EOPNOTSUPP;
@@ -187,6 +188,8 @@
 	ap->chan.private = ap;
 	ap->chan.ops = &async_ops;
 	ap->chan.mtu = PPP_MRU;
+	speed = tty_get_baud_rate(tty);
+	ap->chan.speed = speed;
 	err = ppp_register_channel(&ap->chan);
 	if (err)
 		goto out_free;
linux-2.6.28.2.new/drivers/net/ppp_generic.c renamed from linux-2.6.28.2/drivers/net/ppp_generic.c +119 -90

306 lines not on this page · raw message

linux-2.6.28.2.new/drivers/net/ppp_synctty.c renamed from linux-2.6.28.2/drivers/net/ppp_synctty.c +3 -0
diff -urN ./linux-2.6.28.2/drivers/net/ppp_synctty.c ./linux-2.6.28.2.new/drivers/net/ppp_synctty.c
@@ -206,6 +206,7 @@
 {
 	struct syncppp *ap;
 	int err;
+	int speed;
 
 	if (tty->ops->write == NULL)
 		return -EOPNOTSUPP;
@@ -234,6 +235,8 @@
 	ap->chan.ops = &sync_ops;
 	ap->chan.mtu = PPP_MRU;
 	ap->chan.hdrlen = 2;	/* for A/C bytes */
+	speed = tty_get_baud_rate(tty);
+	ap->chan.speed = speed;
 	err = ppp_register_channel(&ap->chan);
 	if (err)
 		goto out_free;
linux-2.6.28.2.new/include/linux/ppp_channel.h renamed from linux-2.6.28.2/include/linux/ppp_channel.h +1 -1
diff -urN ./linux-2.6.28.2/include/linux/ppp_channel.h ./linux-2.6.28.2.new/include/linux/ppp_channel.h
@@ -39,8 +39,8 @@
 	int		mtu;		/* max transmit packet size */
 	int		hdrlen;		/* amount of headroom channel needs */
 	void		*ppp;		/* opaque to channel */
-	/* the following are not used at present */
 	int		speed;		/* transfer rate (bytes/second) */
+	/* the following is not used at present */
 	int		latency;	/* overhead time in milliseconds */
 };
 

---------------------------------------------------------------------
Intel Shannon Limited
Registered in Ireland
Registered Office: One Spencer Dock, North Wall Quay, Dublin 1 Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

maintainer
#1 lore raw

From: [email protected]
Date: Tue, 03 Mar 2009 11:55:23 +0000

Quoted 13 lines

Problem Solution:

The problem has been solved by redesigning the "ppp_mp_explode" function in such a way to make it split the sk_buff buffer according to the speeds of the underlying PPP channels (the speeds of the serial interfaces respectively attached to the PPP channels). Referring to the above example, the redesigned "ppp_mp_explode" function will now divide the 1000 Bytes buffer into two fragments whose sizes are set according to the speeds of the channels where they are going to be sent on (e.g . 10 Byets on 10KB/sec channel and 990 Bytes on 1000KB/sec channel).
The reworked function grants the same performances of the original one in optimal working conditions (i.e. a bundle made up of PPP links all working at the same speed), while greatly improving performances on the bundles made up of channels working at different speeds.

Looks good, applied.

#2 lore raw

Many thanks for that.

Just a question:
Does it mean that I should see my patch applied in the next Linux kernel stable version?

Best Regards

Gabriele Paoloni

-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: 13 March 2009 23:09
To: Paoloni, Gabriele
Cc: [email protected]; [email protected]
Subject: Re: PATCH_ppp_mp_explode_redesign

From: [email protected]
Date: Tue, 03 Mar 2009 11:55:23 +0000

Quoted 13 lines

Problem Solution:

The problem has been solved by redesigning the "ppp_mp_explode" function in such a way to make it split the sk_buff buffer according to the speeds of the underlying PPP channels (the speeds of the serial interfaces respectively attached to the PPP channels). Referring to the above example, the redesigned "ppp_mp_explode" function will now divide the 1000 Bytes buffer into two fragments whose sizes are set according to the speeds of the channels where they are going to be sent on (e.g . 10 Byets on 10KB/sec channel and 990 Bytes on 1000KB/sec channel).
The reworked function grants the same performances of the original one in optimal working conditions (i.e. a bundle made up of PPP links all working at the same speed), while greatly improving performances on the bundles made up of channels working at different speeds.

Looks good, applied.

---------------------------------------------------------------------
Intel Shannon Limited
Registered in Ireland
Registered Office: One Spencer Dock, North Wall Quay, Dublin 1 Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

#3 lore raw
In reply to David Miller

Hi

Can anybody tell me what is the procedure that is followed to apply the patch and when it will be officially released.

Thanks and Regards

Gabriele Paoloni

-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: 13 March 2009 23:09
To: Paoloni, Gabriele
Cc: [email protected]; [email protected]
Subject: Re: PATCH_ppp_mp_explode_redesign

From: [email protected]
Date: Tue, 03 Mar 2009 11:55:23 +0000

Quoted 13 lines

Problem Solution:

The problem has been solved by redesigning the "ppp_mp_explode" function in such a way to make it split the sk_buff buffer according to the speeds of the underlying PPP channels (the speeds of the serial interfaces respectively attached to the PPP channels). Referring to the above example, the redesigned "ppp_mp_explode" function will now divide the 1000 Bytes buffer into two fragments whose sizes are set according to the speeds of the channels where they are going to be sent on (e.g . 10 Byets on 10KB/sec channel and 990 Bytes on 1000KB/sec channel).
The reworked function grants the same performances of the original one in optimal working conditions (i.e. a bundle made up of PPP links all working at the same speed), while greatly improving performances on the bundles made up of channels working at different speeds.

Looks good, applied.

---------------------------------------------------------------------
Intel Shannon Limited
Registered in Ireland
Registered Office: One Spencer Dock, North Wall Quay, Dublin 1 Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

#4 lore raw
Quoted 3 lines · Gabriele

Hi

Can anybody tell me what is the procedure that is followed to apply the patch and when it will be officially released.

Dave Miller (networking maintainer) applied your patch to his various trees on March 13th. Since 2.6.29 was in bug-fix only mode at that time, your patch was too late to be included 2.6.29. It has just been merged into Linus' linux-2.6 tree [1] (which will become 2.6.30) via Dave Miller's tree. So it appears your patch will be included in the 2.6.30 kernel when that is released.

If you think your patch is regression-free and appropriate for stable kernels (2.6.27, 2.6.28, etc) you might try to send it to the stable team for inclusion in subsequent stable kernel updates.

Dan

[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9c705260feea6ae329bc6b6d5f6d2ef0227eda0a

Quoted 46 lines

Thanks and Regards

Gabriele Paoloni

-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: 13 March 2009 23:09
To: Paoloni, Gabriele
Cc: [email protected]; [email protected]
Subject: Re: PATCH_ppp_mp_explode_redesign

From: [email protected]
Date: Tue, 03 Mar 2009 11:55:23 +0000

Quoted 13 lines

Problem Solution:

The problem has been solved by redesigning the "ppp_mp_explode" function in such a way to make it split the sk_buff buffer according to the speeds of the underlying PPP channels (the speeds of the serial interfaces respectively attached to the PPP channels). Referring to the above example, the redesigned "ppp_mp_explode" function will now divide the 1000 Bytes buffer into two fragments whose sizes are set according to the speeds of the channels where they are going to be sent on (e.g . 10 Byets on 10KB/sec channel and 990 Bytes on 1000KB/sec channel).
The reworked function grants the same performances of the original one in optimal working conditions (i.e. a bundle made up of PPP links all working at the same speed), while greatly improving performances on the bundles made up of channels working at different speeds.

Looks good, applied.

---------------------------------------------------------------------
Intel Shannon Limited
Registered in Ireland
Registered Office: One Spencer Dock, North Wall Quay, Dublin 1 Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw
Quoted 12 lines · Dan Williams
Quoted 3 lines · Gabriele

Hi

Can anybody tell me what is the procedure that is followed to apply the patch and when it will be officially released.

Dave Miller (networking maintainer) applied your patch to his various trees on March 13th. Since 2.6.29 was in bug-fix only mode at that time, your patch was too late to be included 2.6.29. It has just been merged into Linus' linux-2.6 tree [1] (which will become 2.6.30) via Dave Miller's tree. So it appears your patch will be included in the 2.6.30 kernel when that is released.

Quoted 3 lines

If you think your patch is regression-free and appropriate for stable kernels (2.6.27, 2.6.28, etc) you might try to send it to the stable team for inclusion in subsequent stable kernel updates.

I guess it's preferred here to ask David for sending to -stable yet (and it usually needs merging to the net-2.6 tree first).

Jarek P.