[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20101109235437.GE11005@canuck.infradead.org>
Date: Tue, 9 Nov 2010 18:54:37 -0500
From: Thomas Graf <tgraf@...radead.org>
To: Jan Engelhardt <jengelh@...ozas.de>
Cc: Patrick McHardy <kaber@...sh.net>,
"David S. Miller" <davem@...emloft.net>, pablo@...filter.org,
netdev@...r.kernel.org
Subject: Re: Netlink limitations
On Wed, Nov 10, 2010 at 12:42:25AM +0100, Jan Engelhardt wrote:
> On Wednesday 2010-11-10 00:35, Thomas Graf wrote:
> >On Tue, Nov 09, 2010 at 11:02:30PM +0100, Jan Engelhardt wrote:
> >> And while we're discussing this, surely there are no objections
> >> to bumping NLA_ALIGN to 8 at the same time..
> >
> >We can't do that. That would break _everything_.
>
> Using nlattr_ext also breaks _something_, unless it's only used for new
> stuff. Similarly, a new NLA_EXT_ALIGN could be used with just those that
> also start using nlattr_ext.
If you want to change alignment for new protocols that's fine but you won't
be able to use the existing attribute API on either side.
nlattr_ext2 or nlattr32 could be used in existing protocols if we used a special
attribute type (f.e. 0xffff) instead of nla_len == 0 to identify them and as long
as the attribute size does not exceed 64K as obviously no older parser would be
able to skip over such attributes correctly.
So yes, large attributes would only be permitted in new protocols which are
guaranteed to have a capable parser but we would at least not have to duplicate
the API but just slightly extend it.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists