public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2 0/6] utils: Get rid of inet_get_addr()
@ 2018-01-18 18:13 Serhey Popovych
  2018-01-18 18:13 ` [PATCH iproute2 1/6] utils: Always specify family for address in get_addr_1() Serhey Popovych
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Serhey Popovych @ 2018-01-18 18:13 UTC (permalink / raw)
  To: netdev

It looks confusing to have multiple independent
routines to get internet address from it's string
representation: get_addr() and inet_get_addr().

Most complicated users of inet_get_addr() is
iplink_geneve.c and iplink_vxlan.c because they
required to handle both AF_INET and AF_INET6
for their local/remote endpoints.

On the other hand get_addr() does not provide
additional information like address type: need
to address this. to get rid of current and
possible future code duplications. Note that
this functionality is first step to make proto
independent handling of local/remote endpoints
in ip/tunnel code (there will be additional
series based on this one).

Also fix get_addr_1() and get_prefix() to make
sure it always provide correct ->family and
->bitlen.

As always comments, suggestions and criticism
are welcome.

Thanks,
Serhii

Serhey Popovych (6):
  utils: Always specify family for address in get_addr_1()
  utils: Always specify family and ->bytelen in get_prefix_1()
  utils: Fast inet address classification after get_addr()
  iplink_geneve: Get rid of inet_get_addr()
  iplink_vxlan: Get rid of inet_get_addr()
  ip: Get rid of inet_get_addr()

 include/utils.h       |   36 ++++++++++++++++-
 ip/iplink_geneve.c    |   23 +++++------
 ip/iplink_vxlan.c     |   72 ++++++++++++---------------------
 ip/iproute_lwtunnel.c |    5 ++-
 ip/ipseg6.c           |    8 ++--
 lib/utils.c           |  108 +++++++++++++++++++++++++++++--------------------
 6 files changed, 142 insertions(+), 110 deletions(-)

-- 
1.7.10.4

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

end of thread, other threads:[~2018-01-21 18:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-18 18:13 [PATCH iproute2 0/6] utils: Get rid of inet_get_addr() Serhey Popovych
2018-01-18 18:13 ` [PATCH iproute2 1/6] utils: Always specify family for address in get_addr_1() Serhey Popovych
2018-01-18 18:13 ` [PATCH iproute2 2/6] utils: Always specify family and ->bytelen in get_prefix_1() Serhey Popovych
2018-01-18 18:13 ` [PATCH iproute2 3/6] utils: Fast inet address classification after get_addr() Serhey Popovych
2018-01-18 18:13 ` [PATCH iproute2 4/6] iplink_geneve: Get rid of inet_get_addr() Serhey Popovych
2018-01-18 18:13 ` [PATCH iproute2 5/6] iplink_vxlan: " Serhey Popovych
2018-01-18 18:13 ` [PATCH iproute2 6/6] ip: " Serhey Popovych
2018-01-18 18:35 ` [PATCH iproute2 0/6] utils: " Stephen Hemminger
2018-01-21 18:13 ` David Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox