All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/8] net: extend RTM_GETROUTE to return fib result
@ 2017-05-25 17:42 Roopa Prabhu
  2017-05-25 17:42 ` [PATCH net-next v2 1/8] net: ipv4: refactor __ip_route_output_key_hash Roopa Prabhu
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Roopa Prabhu @ 2017-05-25 17:42 UTC (permalink / raw)
  To: davem, dsahern, rami.rosen; +Cc: netdev, nikolay

From: Roopa Prabhu <roopa@cumulusnetworks.com>

This series adds a new RTM_F_FIB_MATCH flag to return matched fib result
with RTM_GETROUTE. This is useful for applications and protocols in
userspace wanting to query the selected route.

examples (with patched iproute2):
ipv4:
----
$ip route show
default via 192.168.0.2 dev eth0
10.0.14.0/24
        nexthop via 172.16.0.3  dev dummy0 weight 1
        nexthop via 172.16.1.3  dev dummy1 weight 1

$ip route get 10.0.14.2
10.0.14.2 via 172.16.1.3 dev dummy1  src 172.16.1.1 
    cache 

$ip route get fibmatch 10.0.14.2
10.0.14.0/24
        nexthop via 172.16.0.3  dev dummy0 weight 1
        nexthop via 172.16.1.3  dev dummy1 weight 1

ipv6:
----
$ip -6 route show
2001:db9:100::/120  metric 1024 
        nexthop via 2001:db8:2::2  dev dummy0 weight 1
        nexthop via 2001:db8:12::2  dev dummy1 weight 1

$ip -6 route get 2001:db9:100::1
2001:db9:100::1 from :: via 2001:db8:12::2 dev dummy1  src 2001:db8:12::1  metric 1024  pref medium

$ip -6 route get fibmatch 2001:db9:100::1
2001:db9:100::/120  metric 1024 
        nexthop via 2001:db8:12::2  dev dummy1 weight 1
        nexthop via 2001:db8:2::2  dev dummy0 weight 1

v2:
        - pick up new forward port of patch-01 from david
        - inet6_rtm_getroute: use container_of for rt6_info to
          dst conversion

David Ahern (5):
  net: ipv4: refactor __ip_route_output_key_hash
  net: ipv4: refactor ip_route_input_noref
  net: ipv4: Remove event arg to rt_fill_info
  net: ipv4: Convert inet_rtm_getroute to rcu versions of route lookup
  net: ipv4: Save trie prefix to fib lookup result

Roopa Prabhu (3):
  net: ipv4: add new RTM_F_FIB_MATCH flag for use with RTM_GETROUTE
  net: ipv4: RTM_GETROUTE: return matched fib result when
    RTM_F_FIB_MATCH flag present
  net: ipv6: RTM_GETROUTE: return matched fib result when
    RTM_F_FIB_MATCH flag present

 include/net/ip_fib.h           |   1 +
 include/net/route.h            |  10 ++-
 include/uapi/linux/rtnetlink.h |   1 +
 net/ipv4/fib_trie.c            |   1 +
 net/ipv4/icmp.c                |   2 +-
 net/ipv4/route.c               | 160 ++++++++++++++++++++++++-----------------
 net/ipv6/route.c               |  11 ++-
 7 files changed, 116 insertions(+), 70 deletions(-)

-- 
1.9.1

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

end of thread, other threads:[~2017-06-01  4:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-25 17:42 [PATCH net-next v2 0/8] net: extend RTM_GETROUTE to return fib result Roopa Prabhu
2017-05-25 17:42 ` [PATCH net-next v2 1/8] net: ipv4: refactor __ip_route_output_key_hash Roopa Prabhu
2017-05-25 17:42 ` [PATCH net-next v2 2/8] net: ipv4: refactor ip_route_input_noref Roopa Prabhu
2017-05-25 17:42 ` [PATCH net-next v2 3/8] net: ipv4: Remove event arg to rt_fill_info Roopa Prabhu
2017-05-25 17:42 ` [PATCH net-next v2 4/8] net: ipv4: Convert inet_rtm_getroute to rcu versions of route lookup Roopa Prabhu
2017-05-31 20:11   ` John Fastabend
2017-05-31 21:48     ` David Ahern
2017-06-01  4:34       ` Roopa Prabhu
2017-05-25 17:42 ` [PATCH net-next v2 5/8] net: ipv4: Save trie prefix to fib lookup result Roopa Prabhu
2017-05-25 17:42 ` [PATCH net-next v2 6/8] net: ipv4: add new RTM_F_FIB_MATCH flag for use with RTM_GETROUTE Roopa Prabhu
2017-05-25 17:42 ` [PATCH net-next v2 7/8] net: ipv4: RTM_GETROUTE: return matched fib result when requested Roopa Prabhu
2017-05-25 17:42 ` [PATCH net-next v2 8/8] net: ipv6: " Roopa Prabhu
2017-05-26 18:18 ` [PATCH net-next v2 0/8] net: extend RTM_GETROUTE to return fib result David Miller
2017-05-27  6:00   ` Roopa Prabhu
2017-05-27 14:02     ` David Ahern

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.