Skip to content

netlink: access functions for IP address attributes

Jiri Benc netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4tcp: simplify inetpeer_addr_base useinclude/net/inetpeer.h net/ipv4/tcp_metrics.c+10 -150 replies
2/4xfrm: simplify xfrm_address_t useinclude/net/xfrm.h include/uapi/linux/xfrm.h net/ipv6/xfrm6_mode_beet.c +3 more+13 -133 replies
3/4netlink: implement nla_put_in_addr and nla_put_in6_addrdrivers/net/vxlan.c include/linux/netfilter/ipset/ip_set.h include/net/netlink.h +26 more+139 -1240 replies
4/4netlink: implement nla_get_in_addr and nla_get_in6_addrdrivers/net/vxlan.c include/net/netlink.h net/ipv4/devinet.c +18 more+72 -620 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJohannes Berg
SeriesA-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/4] netlink: access functions for IP address attributes

There are many places that read or write IP addresses to netlink attributes. With IPv6 addresses, every such place currently has to use generic nla_put and nla_memcpy. Implementing IPv6 address access functions simplify things and makes the code more intelligible. IPv4 address access functions has lesser value but it would be better to be consistent between IPv6 and IPv4 and they still serve as documentation.

The conversion is straightforward and the resulting patches are not that large, thus I kept all the changes in the patches that introduce the access functions. If anyone prefers to split the definition of access functions and the conversion and/or break it out by network protocols, please let me know.

While doing the conversion, I came across ugly typecasting in inetpeer_addr_base and xfrm_address_t when dealing with IPv6 addresses. Instead of introducing more of this, I cleaned it up. Those are the first two patches, serving as a prerequisite to the latter two.

Jiri Benc (4):
tcp: simplify inetpeer_addr_base use
xfrm: simplify xfrm_address_t use
netlink: implement nla_put_in_addr and nla_put_in6_addr
netlink: implement nla_get_in_addr and nla_get_in6_addr

 drivers/net/vxlan.c                            | 38 ++++++++++----------
 include/linux/netfilter/ipset/ip_set.h         |  5 ++-
 include/net/inetpeer.h                         |  3 +-
 include/net/netlink.h                          | 50 ++++++++++++++++++++++++++
 include/net/xfrm.h                             |  6 ++--
 include/uapi/linux/xfrm.h                      |  2 ++
 net/ipv4/devinet.c                             | 16 ++++-----
 net/ipv4/fib_rules.c                           | 12 +++----
 net/ipv4/fib_semantics.c                       | 12 +++----
 net/ipv4/ip_gre.c                              |  8 ++---
 net/ipv4/ip_vti.c                              |  8 ++---
 net/ipv4/ipip.c                                |  8 ++---
 net/ipv4/ipmr.c                                |  4 +--
 net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c |  8 ++---
 net/ipv4/route.c                               | 12 +++----
 net/ipv4/tcp_metrics.c                         | 42 ++++++++++------------
 net/ipv6/addrconf.c                            | 10 +++---
 net/ipv6/addrlabel.c                           |  2 +-
 net/ipv6/fib6_rules.c                          | 12 +++----
 net/ipv6/ip6_gre.c                             | 10 +++---
 net/ipv6/ip6_tunnel.c                          | 12 +++----
 net/ipv6/ip6_vti.c                             | 12 +++----
 net/ipv6/ip6mr.c                               |  4 +--
 net/ipv6/ndisc.c                               |  3 +-
 net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 12 +++----
 net/ipv6/route.c                               | 20 +++++------
 net/ipv6/sit.c                                 | 15 ++++----
 net/ipv6/xfrm6_mode_beet.c                     |  4 +--
 net/ipv6/xfrm6_policy.c                        |  4 +--
 net/key/af_key.c                               |  2 +-
 net/l2tp/l2tp_netlink.c                        | 18 +++++-----
 net/netlabel/netlabel_mgmt.c                   | 20 +++++------
 net/netlabel/netlabel_unlabeled.c              | 28 +++++++--------
 net/openvswitch/flow_netlink.c                 | 10 +++---
 net/wireless/nl80211.c                         |  8 ++---
 net/xfrm/xfrm_state.c                          |  8 ++---
 36 files changed, 234 insertions(+), 214 deletions(-)
Signature · 1 line
1.8.3.1