netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: prashantkumar dhotre <prashantkumardhotre@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: Re: EPOLLERR on memory mapped netlink socket
Date: Mon, 23 Jan 2017 23:10:32 +0530	[thread overview]
Message-ID: <CA+VDgmNutTGo6AmoszdNkP5yRVO2vyDnVC5Hzj5XXmLueSwEcw@mail.gmail.com> (raw)
In-Reply-To: <CA+VDgmP9MigJxiN5snFmLdHw7cydr4JbnBDDPwzex0Tszqgaag@mail.gmail.com>

Appreciate any help on this
Thanks


On Mon, Jan 23, 2017 at 9:20 AM, prashantkumar dhotre
<prashantkumardhotre@gmail.com> wrote:
> Hi experts,
> I am new to netlink sockets.
> In my app , I am  getting EPOLLERR in epoll_wait() on netlink socket
> continuously.
> epoll just notifies that there is a read event on socket (it does not
> tell if it is read or epollerr).
> What could be cause of this and what EPOLLERR on memory mapped netlink
> socket mean.is this Other side of netlink (kernel side) closed
> connection ?even if kernel side closed connection why non-stop
> repeated EPOLLERR s on netlink sockets ?
> What action should we take in such cases ? just close the socket  or
> call getsockopt(SO_ERROR) to retrieve the pending error state from the
> socket and just continue without closing socket?
>
> how do we detect if kernel side closed the connection ?
> My understanding is :
> if we get read event notification from epoll on memory mapped netlink
> socket and in RX ring if the frame is neither NL_MMAP_STATUS_VALID and
> nor NL_MMAP_STATUS_COPY then we can conclude that this is a 'close()'
> from remote kernel socket and I can close connection by calling
> close() on my netlink socket.
> Is above understanding correct ?
>
> Please

  reply	other threads:[~2017-01-23 17:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23  3:50 EPOLLERR on memory mapped netlink socket prashantkumar dhotre
2017-01-23 17:40 ` prashantkumar dhotre [this message]
2017-01-24  6:52   ` Patrick PIGNOL
2017-01-24 19:28 ` Pablo Neira Ayuso

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=CA+VDgmNutTGo6AmoszdNkP5yRVO2vyDnVC5Hzj5XXmLueSwEcw@mail.gmail.com \
    --to=prashantkumardhotre@gmail.com \
    --cc=netfilter-devel@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).