netfilter: ctnetlink allocation improvement
Status from this message: Applied, thanks.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | ctnetlink: add callbacks to the per-proto nlattrsinclude/ include/ net/ | +29 | 1 reply | |
| 2/6 | netlink: add nla_policy_len()include/ net/ | +28 | 1 reply | |
| 3/6 | netfilter: limit the length of the helper nameinclude/ net/ | +3 | 3 replies | |
| 4/6 | ctnetlink: allocate right-sized ctnetlink skbnet/ | +64 | 1 reply | |
| 5/6 | netfilter: add generic function to get len of generic policyinclude/ net/ | +7 | 0 replies | |
| 6/6 | netfilter: calculate per-protocol nlattr sizenet/ net/ net/ +7 more | +62 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [patch 0/6] netfilter: ctnetlink allocation improvement
Hi,
what follows is a small patchset against net-next-2.6 which tries to improve the way ctnetlink events are allocated. By allocating the ctnetlink skbs roughly the size of the message we prevent the skb from later being reallocated in netlink_trim().
Though I haven't got any hard performance numbers yet I think this might introduce a noticable performance gain.
The overall idea of these patches is to compute the proto independant attribute sizes at compile time, the proto-dependant parts are computed at registration of the actual proto helpers. This is achieved by introducing nla_policy_len(), which computes the max. length of a nla_policy.
I also have to introduce NF_CT_HELPER_NAME_LEN as an upper limit for the conntrack protcol helper names, which is not much of a problem because all names in mainline are actually shorter than that.
It would be great to have that being merged. Please share youre comments.
Thanks.
/holger