All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: TPACKET_V3 timeout bug?
Date: Sat, 15 Apr 2017 18:45:36 -0400	[thread overview]
Message-ID: <20170415224530.GA21010@oracle.com> (raw)
In-Reply-To: <20170415194042.GA5936@lunn.ch>

On (04/15/17 21:40), Andrew Lunn wrote:
> 
> In my case, lan3 is up and idle, there are no packets flying around to
> be captured. So i would expect pcap_next_ex() to exit once a second,
> with a return value of 0. But it is not, it blocks and stays blocked.
   :
> Looking at the libpcap source, the 1000ms timeout is being used as
> part of the setsockopt(3, SOL_PACKET, PACKET_RX_RING, 0xbe9445c0, 28)
> call, req.tp_retire_blk_tov is set to the timeoutval.

right, aiui, the retire_blk_tov will only kick in if we have at
least one frame in a block, but the block is not filled up yet,
before the req.tp_retire_blk_tov (1s in your case) expires.

If there are 0 frames pending, we should not be waking up the app,
so everything seems to be behaving as it should?

--Sowmini

  reply	other threads:[~2017-04-15 22:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-15 19:40 TPACKET_V3 timeout bug? Andrew Lunn
2017-04-15 22:45 ` Sowmini Varadhan [this message]
2017-04-15 23:44   ` Andrew Lunn
2017-04-16  2:38     ` Guy Harris
2017-04-16  2:10   ` Andrew Lunn
2017-04-16  2:41     ` Guy Harris
2017-05-02 15:04       ` chetan loke
2017-05-02 17:16         ` chetan loke
2017-05-03  3:15           ` Guy Harris
2017-05-02 17:54         ` Guy Harris
2017-05-02 18:19           ` Guy Harris

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=20170415224530.GA21010@oracle.com \
    --to=sowmini.varadhan@oracle.com \
    --cc=andrew@lunn.ch \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.