netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Netlink limitations
@ 2010-11-07 16:44 Jan Engelhardt
  2010-11-07 17:17 ` Patrick McHardy
  0 siblings, 1 reply; 16+ messages in thread
From: Jan Engelhardt @ 2010-11-07 16:44 UTC (permalink / raw)
  To: David S. Miller; +Cc: pablo, netdev

Hi,


we mentioned it only briefly at the Netfilter workshop a few weeks ago, 
but as I am trying to figure out how to use Netlink in Xtables, 
Netlink's limitations really start ruining my day.

The well-known issue is that NL messages the kernel is supposed to 
receive have a max size of 64K, due to nlmsghdr's use of uint16_t. This 
is very problematic because attributes can easily amass more than 64K. 
Think of a chain full of rules, represented by a top-level attribute 
that nests attributes. The problem is bidirectional, a table 
dump has the same problem.

A further problem seems to be that the kernel does not seem to have 
support for receiving NLM_F_MULTI messages, so even assuming chains were 
just 40K, one cannot atomically replace an entire table with 2 chains of 
40K each. Trying to slap transaction support on _top_ of netlink is not 
going to work with the current implementation, because there is no 
notification of when the socket is closed before a NLMSG_DONE has been 
sent.

What I would also like is streaming support, i.e. that I can tag an 
attribute container (one that has nested attrs) with .len = -1 to define 
that the end of the container is given not by .len, but by a stop 
marker.

Hacks like nfnetlink or genetlink also seem unnecessary to me, and the 
limit of MAX_LINKS=32 most likely just stems from nl_table being an 
array that is not very sparse.

Perhaps it is time to replace Netlink by something new?
Trying to elicit some opinions.


Jan

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

end of thread, other threads:[~2010-11-09 23:54 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-07 16:44 Netlink limitations Jan Engelhardt
2010-11-07 17:17 ` Patrick McHardy
2010-11-08 15:16   ` Thomas Graf
2010-11-08 19:21     ` Jan Engelhardt
2010-11-08 23:36       ` Pablo Neira Ayuso
2010-11-09  9:27     ` Patrick McHardy
2010-11-09 14:49       ` Thomas Graf
2010-11-09 20:20         ` Jan Engelhardt
2010-11-09 21:40           ` Thomas Graf
2010-11-09 22:02             ` Jan Engelhardt
2010-11-09 23:35               ` Thomas Graf
2010-11-09 23:42                 ` Jan Engelhardt
2010-11-09 23:54                   ` Thomas Graf
2010-11-09 11:58     ` Jan Engelhardt
2010-11-09 12:10   ` Jan Engelhardt
2010-11-09 12:24     ` Patrick McHardy

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