All of lore.kernel.org
 help / color / mirror / Atom feed
* EPOLLERR on memory mapped netlink socket
@ 2017-01-23  3:50 prashantkumar dhotre
  2017-01-23 17:40 ` prashantkumar dhotre
  2017-01-24 19:28 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 6+ messages in thread
From: prashantkumar dhotre @ 2017-01-23  3:50 UTC (permalink / raw)
  To: netfilter-devel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: EPOLLERR on memory mapped netlink socket
  2017-01-23  3:50 EPOLLERR on memory mapped netlink socket prashantkumar dhotre
@ 2017-01-23 17:40 ` prashantkumar dhotre
  2017-01-24  6:52   ` Patrick PIGNOL
  2017-01-24 19:28 ` Pablo Neira Ayuso
  1 sibling, 1 reply; 6+ messages in thread
From: prashantkumar dhotre @ 2017-01-23 17:40 UTC (permalink / raw)
  To: netfilter-devel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: EPOLLERR on memory mapped netlink socket
  2017-01-23 17:40 ` prashantkumar dhotre
@ 2017-01-24  6:52   ` Patrick PIGNOL
  0 siblings, 0 replies; 6+ messages in thread
From: Patrick PIGNOL @ 2017-01-24  6:52 UTC (permalink / raw)
  To: prashantkumar dhotre, netfilter-devel

Hi !

I think nobody here will answer you.

Those who know the answer will not answer you because they think it's 
trivial or don't want to spend time to. And those who don't know it will 
not answer you because they do not want show they don't know the 
answer(like me).

I asked some help for 2 things a couple of days ago but I get no answer.

Best regards,

Patrick.

Le 23/01/2017 à 18:40, prashantkumar dhotre a écrit :
> 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
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: EPOLLERR on memory mapped netlink socket
  2017-01-23  3:50 EPOLLERR on memory mapped netlink socket prashantkumar dhotre
  2017-01-23 17:40 ` prashantkumar dhotre
@ 2017-01-24 19:28 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 6+ messages in thread
From: Pablo Neira Ayuso @ 2017-01-24 19:28 UTC (permalink / raw)
  To: prashantkumar dhotre; +Cc: netfilter-devel

On Mon, Jan 23, 2017 at 09:20:23AM +0530, prashantkumar dhotre wrote:
[...]
> What could be cause of this and what EPOLLERR on memory mapped netlink
> socket mean.

Note that memory mapped netlink support got removed ~1 year ago:

https://patchwork.ozlabs.org/patch/584709/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: EPOLLERR on memory mapped netlink socket
  2017-01-23  3:49 prashantkumar dhotre
@ 2017-01-23 17:40 ` prashantkumar dhotre
  0 siblings, 0 replies; 6+ messages in thread
From: prashantkumar dhotre @ 2017-01-23 17:40 UTC (permalink / raw)
  To: netdev

Appreciate any help on this
Thanks

On Mon, Jan 23, 2017 at 9:19 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* EPOLLERR on memory mapped netlink socket
@ 2017-01-23  3:49 prashantkumar dhotre
  2017-01-23 17:40 ` prashantkumar dhotre
  0 siblings, 1 reply; 6+ messages in thread
From: prashantkumar dhotre @ 2017-01-23  3:49 UTC (permalink / raw)
  To: netdev

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-24 19:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-23  3:50 EPOLLERR on memory mapped netlink socket prashantkumar dhotre
2017-01-23 17:40 ` prashantkumar dhotre
2017-01-24  6:52   ` Patrick PIGNOL
2017-01-24 19:28 ` Pablo Neira Ayuso
  -- strict thread matches above, loose matches on Subject: below --
2017-01-23  3:49 prashantkumar dhotre
2017-01-23 17:40 ` prashantkumar dhotre

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.