[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1c27afdc-870e-f775-18c9-a7ea5afee6dc@gmail.com>
Date: Tue, 8 Sep 2020 08:55:06 -0600
From: David Ahern <dsahern@...il.com>
To: Ido Schimmel <idosch@...sch.org>, netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, roopa@...dia.com,
mlxsw@...dia.com, Ido Schimmel <idosch@...dia.com>
Subject: Re: [RFC PATCH net-next 07/22] nexthop: Prepare new notification info
On 9/8/20 3:10 AM, Ido Schimmel wrote:
> From: Ido Schimmel <idosch@...dia.com>
>
> Prepare the new notification information so that it could be passed to
> listeners in the new patch.
>
> Signed-off-by: Ido Schimmel <idosch@...dia.com>
> ---
> net/ipv4/nexthop.c | 108 +++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 108 insertions(+)
>
Reviewed-by: David Ahern <dsahern@...il.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;
> +}
> +
Powered by blists - more mailing lists