On 9/8/20 3:10 AM, Ido Schimmel wrote:
> From: Ido Schimmel <ido...@nvidia.com>
> 
> Prepare the new notification information so that it could be passed to
> listeners in the new patch.
> 
> Signed-off-by: Ido Schimmel <ido...@nvidia.com>
> ---
>  net/ipv4/nexthop.c | 108 +++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 108 insertions(+)
> 

Reviewed-by: David Ahern <dsah...@gmail.com>

one trivial comment below.

> +static void
> +__nh_notifier_single_info_init(struct nh_notifier_single_info *nh_info,
> +                            const struct nexthop *nh)
> +{
> +     struct nh_info *nhi = rtnl_dereference(nh->nh_info);
> +
> +     nh_info->dev = nhi->fib_nhc.nhc_dev;
> +     nh_info->gw_family = nhi->fib_nhc.nhc_gw_family;
> +     if (nh_info->gw_family == AF_INET)
> +             nh_info->ipv4 = nhi->fib_nhc.nhc_gw.ipv4;
> +     else if (nh_info->gw_family == AF_INET6)
> +             nh_info->ipv6 = nhi->fib_nhc.nhc_gw.ipv6;

add a blank line here to make it easier to read.

> +     nh_info->is_reject = nhi->reject_nh;
> +     nh_info->is_fdb = nhi->fdb_nh;
> +     nh_info->is_encap = !!nhi->fib_nhc.nhc_lwtstate;
> +}
> +

Reply via email to