[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <63b098d5-6232-590c-ca90-e9e07368fef7@gmail.com>
Date: Thu, 28 Jan 2021 20:16:06 -0700
From: David Ahern <dsahern@...il.com>
To: Petr Machata <petrm@...dia.com>, netdev@...r.kernel.org
Cc: David Ahern <dsahern@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH net-next 07/12] nexthop: Extract dump filtering parameters
into a single structure
On 1/28/21 5:49 AM, Petr Machata wrote:
> Requests to dump nexthops have many attributes in common with those that
> requests to dump buckets of resilient NH groups will have. In order to make
> reuse of this code simpler, convert the code to use a single structure with
> filtering configuration instead of passing around the parameters one by
> one.
>
> Signed-off-by: Petr Machata <petrm@...dia.com>
> Reviewed-by: Ido Schimmel <idosch@...dia.com>
> ---
> net/ipv4/nexthop.c | 44 ++++++++++++++++++++++++--------------------
> 1 file changed, 24 insertions(+), 20 deletions(-)
>
> diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
> index 7149b12c4703..ad48e5d71bf9 100644
> --- a/net/ipv4/nexthop.c
> +++ b/net/ipv4/nexthop.c
> @@ -1971,16 +1971,23 @@ static int rtm_get_nexthop(struct sk_buff *in_skb, struct nlmsghdr *nlh,
> goto out;
> }
>
> -static bool nh_dump_filtered(struct nexthop *nh, int dev_idx, int master_idx,
> - bool group_filter, u8 family)
> +struct nh_dump_filter {
> + int dev_idx;
> + int master_idx;
> + bool group_filter;
> + bool fdb_filter;
> +};
> +
I should have made that a struct from the beginning.
Reviewed-by: David Ahern <dsahern@...nel.org>
Powered by blists - more mailing lists