netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Norbert Eicker <n.eicker@fz-juelich.de>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linuxppc-dev@ozlabs.org, netdev@vger.kernel.org
Subject: Re: [PATCH] spidernet: Fix problem sending IP fragments
Date: Sat, 10 Mar 2007 00:16:57 +0100	[thread overview]
Message-ID: <200703100016.58469.n.eicker@fz-juelich.de> (raw)
In-Reply-To: <45F19103.3010100@pobox.com>

On Friday, 9. March 2007 17:53, Jeff Garzik wrote:
> Linas Vepstas wrote:
> > Jeff,
> >
> > Please apply. The rather long patch description is from the submitter,
> > Norbert Eicker, I don't know if that's alright, or if I should ask to
> > have it trimmed.
> >
> > Thanks,
> > --linas
> >
> > From: Norbert Eicker <n.eicker@fz-juelich.de>
> >
> >
> > Signed-off-by: Norbert Eicker <n.eicker@fz-juelich.de>
> > Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
>
> are you sure it can't send out fragmented IP frames?  what's really
> going on here?

Pretty sure that fragmented IP frames are not send out. Here's a small test 
using ttcp and tcpdump reproducing the problem (I assume a MTU of 1500):

You need two node, lets call them src and dest.

On dest run 'tcpdump -nvvv host src'.

Furthermore start on dest: 'ttcp -u -r -s'
and on src: 'ttcp -u -t -s -l 1472 -n 4 dest

tcpdump will show 10 frames received from src, one of size 32 (UDP length 4), 
four of size 1500 (UDP length 1472) (the payload), five more of size 32 (UDP 
length 4). The size 32 frames are some startup/closing frames of ttcp.

Start on dest again: 'ttcp -u -r -s'
and on src: 'ttcp -u -t -s -l 1473 -n 4 dest

Now tcpdump only sees the six startup/closing frames. The payload frames 
(which are fragmented by the IP-stack) disappear somehow.

With the patch applied you see in the second case the startup/closing frames 
plus 4 pairs of frames in between. Each pair consists of one frame of size 
1500 followed by one of size 21 (with an offset of 1480), i.e. the two 
fragments of the too large UDP-datagram.

On src tcpdump will show the fragmented IP-frames in both cases (with and 
without patch applied).

> patch was corrupted anyway, and could not be applied...

Whitespace problem? Let's try again...

Signed-off-by: Norbert Eicker <n.eicker@fz-juelich.de>

diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index 3b91af8..e3019d5 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -719,7 +719,7 @@ spider_net_prepare_tx_descr(struct spide
 			SPIDER_NET_DESCR_CARDOWNED | SPIDER_NET_DMAC_NOCS;
 	spin_unlock_irqrestore(&chain->lock, flags);
 
-	if (skb->protocol == htons(ETH_P_IP))
+	if (skb->protocol == htons(ETH_P_IP) && skb->ip_summed == CHECKSUM_PARTIAL)
 		switch (skb->nh.iph->protocol) {
 		case IPPROTO_TCP:
 			hwdescr->dmac_cmd_status |= SPIDER_NET_DMAC_TCP;
 
-- 
Fon ++49-(0)2461/61-1492
http://www.fz-juelich.de

  reply	other threads:[~2007-03-09 23:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-08 23:15 [PATCH] spidernet: Fix problem sending IP fragments Linas Vepstas
2007-03-09 16:53 ` Jeff Garzik
2007-03-09 23:16   ` Norbert Eicker [this message]
2007-03-12  8:28     ` Geert Uytterhoeven
2007-03-12  9:45       ` Norbert Eicker
2007-03-12 10:44         ` Geert Uytterhoeven
2007-03-12 11:21           ` Norbert Eicker
  -- strict thread matches above, loose matches on Subject: below --
2007-02-28 14:21 Norbert Eicker
2007-03-01 22:52 ` Chris Engel
2007-03-01 23:34   ` Linas Vepstas
2007-03-02 17:39     ` Norbert Eicker
2007-03-03  8:21       ` Benjamin Herrenschmidt

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=200703100016.58469.n.eicker@fz-juelich.de \
    --to=n.eicker@fz-juelich.de \
    --cc=jgarzik@pobox.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).