netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] netlink: access functions for IP address attributes
@ 2015-03-29 14:59 Jiri Benc
  2015-03-29 14:59 ` [PATCH net-next 1/4] tcp: simplify inetpeer_addr_base use Jiri Benc
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Jiri Benc @ 2015-03-29 14:59 UTC (permalink / raw)
  To: netdev
  Cc: Steffen Klassert, Herbert Xu, James Chapman, Paul Moore,
	Pravin Shelar, Johannes Berg, Pablo Neira Ayuso

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(-)

-- 
1.8.3.1

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

end of thread, other threads:[~2015-04-07 16:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-29 14:59 [PATCH net-next 0/4] netlink: access functions for IP address attributes Jiri Benc
2015-03-29 14:59 ` [PATCH net-next 1/4] tcp: simplify inetpeer_addr_base use Jiri Benc
2015-03-29 14:59 ` [PATCH net-next 2/4] xfrm: simplify xfrm_address_t use Jiri Benc
2015-04-07 16:01   ` Stephen Hemminger
2015-04-07 16:29     ` Jiri Benc
2015-04-07 16:35       ` Jiri Benc
2015-03-29 14:59 ` [PATCH net-next 3/4] netlink: implement nla_put_in_addr and nla_put_in6_addr Jiri Benc
2015-03-29 14:59 ` [PATCH net-next 4/4] netlink: implement nla_get_in_addr and nla_get_in6_addr Jiri Benc
2015-03-29 19:02 ` [PATCH net-next 0/4] netlink: access functions for IP address attributes Johannes Berg
2015-03-31 17:58 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).