size op in rtnl_af_ops.
Bridge module already used filtering aware sizing for notifications.
br_get_link_af_size_filtered() is consistent with the modified
get_link_af_size op so it replaces br_get_link_af_size() in br_af_ops.
br_get_link_af_size() becomes unused and thus removed.
Signed-off-by:
to allocated size in order to allow the user to
avoid truncation with more reasonable buffer size.
Signed-off-by: Ronen Arad
---
net/netlink/af_netlink.c | 34 ++
1 file changed, 22 insertions(+), 12 deletions(-)
diff --git a/net/netlink/af_netlink.c b/net/netl
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
This is a v2 of a 4-parts patch with same subject.
Giving up on backward compatibility allows for much simplified single patch.
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_getli
Unset get_link_af_size in br_af_ops. br_get_link_af_size() becomes
unused and thus removed.
Signed-off-by: Ronen Arad
---
net/bridge/br_netlink.c | 20
1 file changed, 20 deletions(-)
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index d900881..204222d
ffect with rtnetlink change in the next
patch of this set.
Signed-off-by: Ronen Arad
---
net/bridge/br_netlink.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 94b4de8..d900881 100644
--- a/net/bridge/br_netlink.c
Signed-off-by: Ronen Arad
---
include/net/rtnetlink.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index aff6ceb..96df9bb 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -130,6 +130,8 @@ struct r
Add ext_filter_mask arg to rtnl_link_get_af_size().
rtnl_link_get_af_size() will prefer filtering-aware af sizing when
provided by an address family. It falls back to get_link_af_size for
other families.
Signed-off-by: Ronen Arad
---
net/core/rtnetlink.c | 12 +---
1 file changed, 9
iltered 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
rtnetli
kb allocated when no interface has
many VLANs configured. This patch applies the same logic to larger skbs
which are allocated using the calculated min_dump_alloc size.
Signed-off-by: Ronen Arad
---
net/netlink/af_netlink.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/ne
RTA_ALIGNTO is currently define as 4. It has to be 4U to prevent warning
for RTA_ALIGN and RTA_DATA expansions when -Wconversion gcc option is
enabled.
This follows NLMSG_ALIGNTO definition in .
Signed-off-by: Ronen Arad
---
include/uapi/linux/rtnetlink.h | 2 +-
1 file changed, 1 insertion
11 matches
Mail list logo