public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Matthew Lear <matt@bubblegen.co.uk>
To: Lanttor <lanttor.guo@freescale.com>
Cc: linux-m68k@vger.kernel.org
Subject: Re: 2.6.29 & network stack strangeness
Date: Wed, 10 Jun 2009 10:36:08 +0100	[thread overview]
Message-ID: <4A2F7E88.6040602@bubblegen.co.uk> (raw)
In-Reply-To: <4A2F1C74.1010800@freescale.com>

Lanttor wrote:
> I met the interrupt issue before on mcf5445x platform, following is my fixed patch, but I am not sure it could help resolve your problem, just have a try  :-) 

Thanks but this makes no difference. From what I can tell, the patch to entry.S
is essentially benign because ret_from_interrupt() is not invoked anywhere.

Also, the patch to ints.c adds invocations of irq_enter() and irq_exit()
to process_int(). These macros really just force entry/exit to/from hard
interrupt context and increment/decrement a count (used for tracking
nested interrupts). Given that process_int() is called by inthandler() in
entry.S, I think this is always going to be in interrupt context anyway, so I
can't see the advantage of this. Maybe I'm missing something?

> 
> For your mcf54455 platform, if you use one ether net port, try to disable second ether net port (FEC2) on the menuconfig to see whether it would affect the net working. 

Yes. I've already got the second net port disabled.

I have had some level of success by calling flush_cache_all() immediately after
calling netif_rx() in the rx part of the fec interrupt handler - fec_enet_rx()
in fec.c.

This plus a hack to netif_rx() seems to vastly improve things in that I can wget
large files, run netcat tests although in the cast of netcat there is still a
high number of rx overruns in the fec driver.

Hack:

--- a/net/core/dev.c        2009-05-12 07:02:24.000000000 +0100
+++ b/net/core/dev.c       2009-06-10 10:26:47.000000000 +0100
@@ -1969,16 +1969,18 @@
                        __skb_queue_tail(&queue->input_pkt_queue, skb);
                        local_irq_restore(flags);
                        return NET_RX_SUCCESS;
                }

                napi_schedule(&queue->backlog);
                goto enqueue;
        }
+        else
+                napi_schedule(&queue->backlog);

        __get_cpu_var(netdev_rx_stat).dropped++;
        local_irq_restore(flags);

        kfree_skb(skb);
        return NET_RX_DROP;
 }

This effectively ignores the backlog check and schedules the receive function to
run.

I think all this points to is that there is a timing problem in the system. That
said, I can believe the cache coherency issue as I've read some postings on the
net about similar issues with ethernet tx on ppc...

--  Matt

  parent reply	other threads:[~2009-06-10  9:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-05 15:15 2.6.29 & network stack strangeness Matthew Lear
2009-06-05 15:49 ` Finn Thain
2009-06-05 16:17   ` Matthew Lear
2009-06-05 16:37     ` Finn Thain
2009-06-05 16:44       ` Matthew Lear
     [not found]         ` <4A2DC70F.7080401@freescale.com>
2009-06-09 10:04           ` Matthew Lear
     [not found]             ` <4A2F1C74.1010800@freescale.com>
2009-06-10  9:36               ` Matthew Lear [this message]
     [not found]                 ` <4A2F8318.5080206@freescale.com>
2009-06-10 10:59                   ` Matthew Lear

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=4A2F7E88.6040602@bubblegen.co.uk \
    --to=matt@bubblegen.co.uk \
    --cc=lanttor.guo@freescale.com \
    --cc=linux-m68k@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