All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] Rightsize IFLA_AF_SPEC size calculation
@ 2015-10-14  5:58 Ronen Arad
  2015-10-14  5:58 ` [PATCH net-next 1/4] rtnetlink: Add get_link_af_size_filtered to rtnl_af_ops Ronen Arad
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Ronen Arad @ 2015-10-14  5:58 UTC (permalink / raw)
  To: netdev; +Cc: Ronen Arad

if_nlmsg_size() overestimates the minimum allocation size of netlink dump
request (when called from rtnl_calcit()) or the size of the message (when called
from rtnl_getlink()). This is because ext_filter_mask is not supported by
rtnl_link_get_af_size() and rtnl_link_get_size().

The over-estimation is significant when at least one netdev has many VLANs
configured (8 bytes for each configured VLAN).

This patch-set "rightsizes" the protocol specific attribute size calculation by
propagating ext_filter_mask to rtnl_link_get_af_size() and adding optional
filtering aware get_af_size_filtered op in struct rtnl_af_ops. Bridge module,
which already used filtering aware sizing for notification, is enhanced to do
the same for netlink dump requests.

Ronen Arad (4):
  rtnetlink: Add get_link_af_size_filtered to rtnl_af_ops
  bridge: br_af_ops add br_get_link_af_size_filtered
  rtnetlink: Prefer filtering-aware af sizing
  bridge: Remove br_get_link_af_size

 include/net/rtnetlink.h |  2 ++
 net/bridge/br_netlink.c | 23 ++---------------------
 net/core/rtnetlink.c    | 12 +++++++++---
 3 files changed, 13 insertions(+), 24 deletions(-)

--
2.1.0

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

end of thread, other threads:[~2015-10-22  1:59 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14  5:58 [PATCH net-next 0/4] Rightsize IFLA_AF_SPEC size calculation Ronen Arad
2015-10-14  5:58 ` [PATCH net-next 1/4] rtnetlink: Add get_link_af_size_filtered to rtnl_af_ops Ronen Arad
2015-10-14  9:55   ` Jiri Benc
2015-10-14 14:46     ` Arad, Ronen
2015-10-14  5:58 ` [PATCH net-next 2/4] bridge: br_af_ops add br_get_link_af_size_filtered Ronen Arad
2015-10-14  5:58 ` [PATCH net-next 3/4] rtnetlink: Prefer filtering-aware af sizing Ronen Arad
2015-10-14  5:58 ` [PATCH net-next 4/4] bridge: Remove br_get_link_af_size Ronen Arad
2015-10-14 15:51 ` [PATCH net-next v2] netlink: Rightsize IFLA_AF_SPEC size calculation Ronen Arad
2015-10-15  2:24   ` David Miller
2015-10-15  5:52     ` Arad, Ronen
2015-10-15  5:50   ` [PATCH net-next v3] " Ronen Arad
2015-10-15 13:02     ` David Miller
2015-10-19 16:23     ` Ronen Arad
2015-10-21  6:31       ` Samudrala, Sridhar
2015-10-22  2:15       ` David Miller
2015-10-15  1:44 ` [PATCH net-next 0/4] " David Miller
2015-10-15  1:32   ` Arad, Ronen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.