netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
To: Thomas Graf <tgraf@suug.ch>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH 1/4] [NETLINK]: Handle NLM_F_ECHO in netlink_rcv_skb()
Date: Sat, 12 Aug 2006 15:03:31 +0400	[thread overview]
Message-ID: <20060812110331.GA31479@ms2.inr.ac.ru> (raw)
In-Reply-To: <20060811214744.GO14627@postel.suug.ch>

Hello!

> Makes sense, especially for auto generated handles. I've been listening
> to the notifications on a separate socket for this purpose.

That's... complicated. But cool. :-)


> It does make sense, the way it has been implemented if at all is
> creepy. Even worse, IPv6 is using current->pid, some other code
> has been using the pid from NETLINK_CREDS() :-)

Yeah, some time ago I sent a path replacing those with 0, but
apparently I forgot to grep IPv6. And did not even search for NETLINK_CREDS().


> when receiving multicasts. Also because some of the multicast
> code is buggy and provides the pid of the requestor's socket to
> netlink_broadcast() leading to excluding that socket.

Actually, it was the idea. If requestor asked NLM_F_ECHO and subscribed
to muticasts, it suppresses double notifications. If it did not ask
NLM_F_ECHO, he is not interested in results, he knows what's going on
without this.

F.e. it was used by my implementation in gated: it did not set either
NLM_F_ECHO or even NLM_F_ACK. And when making massive batch updates,
it received nothing back: only errors and updates made by someone else.


> I'm not sure I understand this correctly, if rcvbuf space was eaten
> by multicasts subsequent recvmsg() will follow invoking netlink_dump()
> again and the dump continues.

Indeed. I forgot how it works. :-)

I understood what is happening there. sock_rmalloc() fails not due
to rcvbuf, but because of global resource limiting. Grr... it does not
look solvable. Luckily, in normal kernel this can happen only if 0-order
GFP_KERNEL allocation fails. Not impossible with oom_killer, but it
definitely moves the status of the problem to marginal.

Alexey


  reply	other threads:[~2006-08-12 11:03 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-09 20:48 [PATCHSET]: Clean up netlink NLM_F_ECHO and rtnl event notifications Thomas Graf
2006-08-08 22:00 ` [PATCH 1/4] [NETLINK]: Handle NLM_F_ECHO in netlink_rcv_skb() Thomas Graf
2006-08-10 15:51   ` Alexey Kuznetsov
2006-08-10 19:02     ` Thomas Graf
2006-08-10 20:32       ` Alexey Kuznetsov
2006-08-10 21:18         ` Thomas Graf
2006-08-11 15:35           ` Alexey Kuznetsov
2006-08-11 21:47             ` Thomas Graf
2006-08-12 11:03               ` Alexey Kuznetsov [this message]
2006-08-12 11:19                 ` Thomas Graf
2006-08-13 13:45                   ` Alexey Kuznetsov
2006-08-12  3:05             ` Herbert Xu
2006-08-12 11:05               ` Alexey Kuznetsov
2006-08-08 22:00 ` [PATCH 2/4] [RTNETLINK]: Use rtnl_multicast()/rtnl_unicast() Thomas Graf
2006-08-09 21:00   ` [RESEND " Thomas Graf
2006-08-08 22:00 ` [PATCH 3/4] [NETLINK]: Dont set socket error for failed event notifications Thomas Graf
2006-08-10 18:09   ` Patrick McHardy
2006-08-10 19:04     ` Thomas Graf
2006-08-10 19:08       ` Patrick McHardy
2006-08-10 19:23         ` Thomas Graf
2006-08-11  6:02           ` David Miller
2006-08-11 10:38             ` Thomas Graf
2006-08-11 10:42               ` David Miller
2006-08-08 22:00 ` [PATCH 4/4] [RTNETLINK]: Unexport global rtnl sock Thomas Graf
2006-08-10  4:16 ` [PATCHSET]: Clean up netlink NLM_F_ECHO and rtnl event notifications David Miller

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=20060812110331.GA31479@ms2.inr.ac.ru \
    --to=kuznet@ms2.inr.ac.ru \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /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).