From: Travis Stratman <tstratman@emacinc.com>
To: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: netdev@vger.kernel.org
Subject: Re: data received but not detected
Date: Fri, 20 Jun 2008 16:06:12 -0500 [thread overview]
Message-ID: <1213995972.9245.202.camel@localhost.localdomain> (raw)
In-Reply-To: <20080620182333.GA9342@2ka.mipt.ru>
On Fri, 2008-06-20 at 22:23 +0400, Evgeniy Polyakov wrote:
> On Fri, Jun 20, 2008 at 01:17:06PM -0500, Travis Stratman (tstratman@emacinc.com) wrote:
> > Let me clarify this again... I see the packet being sent at the expected
> > time from the sender on the tcpdump. The packet does not show up in
> > tcpdump or in the application on the receive side. When some other data
> > is received by the receiver (i.e. ARP), the missing packet shows up in
> > the tcpdump and in the application at the same time. So the delay shows
> > up in the tcpdump as well. It seems to me that everything is pointing to
> > the packet being in the DMA buffer but the controller driver not knowing
> > anything about it.
>
> Argh. Ok, then please check that napi polling is called and rx interrupt
> happen for the driver.
This is what I have been focusing on. I'm still trying to figure out a
good way to see if the interrupt is triggered for a specific packet
because I have no way of determining which packet it will freeze on and
if I put any prints in the interrupt handler or poll function it slows
things down enough that the problem disappears.
In the meantime I was testing why the FIONREAD ioctl made such a big
difference and I found that if I insert a usleep(1) between the two
receive calls, the problem does not occur. During my testing before I
had put a usleep() between the send calls, which fixed the issue for me
and led me to assume that an IRQ was being missed if the packets come in
too close to each other.
The fact that inserting a sleep between the two receive calls fixes the
issue makes this seem less like a driver issue. The only hypothesis that
I have bee able to come up with so far is that calling recv() somehow
masks the interrupts momentarily so that if the packet comes in at
exactly the same time as the recv or poll() is called, the system does
not know anything about it, to the point that it does not even show on
the packet trace. I have no idea how this could happen at this point.
Thanks,
Travis
next prev parent reply other threads:[~2008-06-20 21:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-17 22:08 data received but not detected Travis Stratman
2008-06-17 22:27 ` Stephen Hemminger
2008-06-17 22:40 ` Travis Stratman
2008-06-17 22:31 ` Ben Greear
2008-06-17 22:58 ` Travis Stratman
2008-06-17 23:45 ` Ben Greear
2008-06-19 22:53 ` Travis Stratman
2008-06-19 23:08 ` Ben Greear
2008-06-22 9:16 ` James Chapman
2008-07-07 21:56 ` Travis Stratman
2008-07-08 9:37 ` James Chapman
2008-07-15 20:46 ` Travis Stratman
2008-06-18 6:28 ` Evgeniy Polyakov
2008-06-19 23:10 ` Travis Stratman
[not found] ` <20080620060219.GA22784@2ka.mipt.ru>
2008-06-20 17:10 ` Travis Stratman
2008-06-20 17:25 ` Evgeniy Polyakov
2008-06-20 17:41 ` Travis Stratman
2008-06-20 17:54 ` Evgeniy Polyakov
2008-06-20 18:17 ` Travis Stratman
2008-06-20 18:23 ` Evgeniy Polyakov
2008-06-20 21:06 ` Travis Stratman [this message]
2008-06-21 7:12 ` Evgeniy Polyakov
2008-07-07 21:10 ` Travis Stratman
2008-07-07 21:25 ` Evgeniy Polyakov
2008-07-15 20:43 ` Travis Stratman
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=1213995972.9245.202.camel@localhost.localdomain \
--to=tstratman@emacinc.com \
--cc=johnpol@2ka.mipt.ru \
--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).