netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Sending big Netlink messages to userspace
@ 2008-06-24 16:38 Julius Volz
  2008-06-24 17:00 ` Patrick McHardy
  0 siblings, 1 reply; 9+ messages in thread
From: Julius Volz @ 2008-06-24 16:38 UTC (permalink / raw)
  To: netdev; +Cc: Patrick McHardy, Vince Busam, Thomas Graf

Hi,

While adding a Netlink interface to IPVS, I've been wondering how to
properly send very big messages to userspace and found these posts:

http://lists.openwall.net/netdev/2007/03/06/214
http://lists.openwall.net/netdev/2007/03/07/2

Herbert writes in the second one, "Dumps should be done using 4K
(NLMSG_GOODSIZE) skb's, where is the problem?" How is that meant?
Should one manually split up dumps into several NLMSG_GOODSIZE
messages or is there some mechanism for that?

I need to send arbitrarily long lists to userspace and I'm already
choosing a big enough size for nlmsg_new(), so I get no put failures
while constructing the message. However, when receiving the data in
userspace (with libnl), the receive callback is never called. An
strace shows that MSG_TRUNC is set in the oversized message, so the
data is never fully received.

I just call nl_recvmsgs_default(sock) once (which does not return an
error). Am I handling libnl incorrectly or do I need to do this
differently on the kernel side?

Thanks,
Julius

-- 
Google Switzerland GmbH

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

end of thread, other threads:[~2008-06-26 15:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-24 16:38 Sending big Netlink messages to userspace Julius Volz
2008-06-24 17:00 ` Patrick McHardy
2008-06-24 18:18   ` Julius Volz
2008-06-25 10:44   ` Thomas Graf
2008-06-25 18:56     ` Julius Volz
2008-06-26 10:01       ` Thomas Graf
2008-06-25 22:51     ` David Miller
2008-06-26  0:41       ` Patrick McHardy
2008-06-26 15:39         ` Julius Volz

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).