On 3/29/19 6:47 PM, David Ahern wrote:
> From: David Ahern <dsah...@gmail.com>
> 
> While the cached routes, nh_pcpu_rth_output and nh_rth_input, are IPv4
> specific, a later patch wants to make them accessible for IPv6
> gateways with IPv4 routes but also allow IPv6 routes to have their own
> cached entries. Move the IPv4 cached routes from fib_nh to fib_nh_common
> and update references.
> 
> Signed-off-by: David Ahern <dsah...@gmail.com>
> ---
>  include/net/ip_fib.h     |  6 ++++--
>  net/ipv4/fib_semantics.c | 33 +++++++++++++++++----------------
>  net/ipv4/route.c         | 18 +++++++++---------
>  3 files changed, 30 insertions(+), 27 deletions(-)
> 
> diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
> index 5070bc531ca4..cce437a1b2ff 100644
> --- a/include/net/ip_fib.h
> +++ b/include/net/ip_fib.h
> @@ -92,6 +92,10 @@ struct fib_nh_common {
>  
>       int                     nhc_weight;
>       atomic_t                nhc_upper_bound;
> +
> +     /* v4 specific, but allows v6 gw with v4 routes */
> +     struct rtable __rcu * __percpu *nhc_pcpu_rth_output;
> +     struct rtable __rcu     *nhc_rth_input;
>  };
>  

Dave: please drop this set. I need to take another look at the
combinations and make sure I did not miss something.

Reply via email to