mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben McKeegan <ben@netservers.co.uk>
To: davem@davemloft.net
Cc: ben@netservers.co.uk, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, gabriele.paoloni@intel.com,
	alan@lxorguk.ukuu.org.uk, linux-ppp@vger.kernel.org,
	paulus@samba.org
Subject: [PATCH] ppp_generic: fix multilink fragment sizes
Date: Wed,  2 Jun 2010 16:04:54 +0100	[thread overview]
Message-ID: <1275491094-9526-1-git-send-email-ben@netservers.co.uk> (raw)
In-Reply-To: <4C0670E2.1090708@netservers.co.uk>

Fix bug in multilink fragment size calculation introduced by
commit 9c705260feea6ae329bc6b6d5f6d2ef0227eda0a
"ppp: ppp_mp_explode() redesign"

Signed-off-by: Ben McKeegan <ben@netservers.co.uk>
---
 drivers/net/ppp_generic.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index 0db3894..8b36bfe 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -1416,7 +1416,8 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
 		flen = len;
 		if (nfree > 0) {
 			if (pch->speed == 0) {
-				flen = totlen/nfree;
+				if (nfree > 1)
+					flen = DIV_ROUND_UP(len, nfree);
 				if (nbigger > 0) {
 					flen++;
 					nbigger--;
-- 
1.5.6.5


  reply	other threads:[~2010-06-02 15:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-26 15:50 [Patch] fix packet loss and massive ping spikes with PPP multi-link Richard Hartmann
2010-03-26 16:02 ` Alan Cox
2010-03-26 16:33   ` Joe Perches
2010-03-26 16:39   ` Richard Hartmann
2010-03-26 16:59     ` David Miller
2010-03-26 17:04       ` David Miller
2010-03-26 17:04     ` James Carlson
2010-03-26 17:00   ` Alexander E. Patrakov
2010-03-26 17:04     ` Alan Cox
2010-03-31 10:03       ` Ben McKeegan
2010-05-29  2:16         ` Paul Mackerras
2010-05-29  9:06           ` Richard Hartmann
2010-05-31 13:39           ` Richard Hartmann
2010-05-31 16:20           ` Ben McKeegan
2010-06-02 14:55             ` Ben McKeegan
2010-06-02 15:04               ` Ben McKeegan [this message]
2010-06-02 15:17                 ` [PATCH] ppp_generic: fix multilink fragment sizes Paoloni, Gabriele
2010-06-02 15:31                   ` David Miller
2010-06-02 15:55                   ` Ben McKeegan
2010-06-03  8:41                     ` Paoloni, Gabriele
2010-06-03  9:14                       ` Ben McKeegan
2010-11-08 14:05               ` [Patch] fix packet loss and massive ping spikes with PPP multi-link Richard Hartmann
2010-11-15 12:07                 ` Richard Hartmann
2010-06-01 10:20           ` Richard Hartmann
2010-06-01 11:18             ` Ben McKeegan
2010-06-01 11:28               ` Richard Hartmann
2010-06-01 22:15                 ` David Miller
2010-03-31  9:01 ` Richard Hartmann
2010-05-25  9:52 ` Richard Hartmann
     [not found]   ` <4BFBA3F2.2000301@bfs.de>
     [not found]     ` <AANLkTilnueP5HIfX03soMCYE93jubL000rpiOCN1xB2-@mail.gmail.com>
     [not found]       ` <4BFC0942.2030103@bfs.de>
2010-05-26  8:47         ` Richard Hartmann
2010-05-28  7:28           ` walter harms

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1275491094-9526-1-git-send-email-ben@netservers.co.uk \
    --to=ben@netservers.co.uk \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=davem@davemloft.net \
    --cc=gabriele.paoloni@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ppp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®