[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AAFF4E35-AD81-49C1-A1D1-250FF18AD126@fb.com>
Date: Thu, 20 May 2021 18:07:07 +0000
From: Song Liu <songliubraving@...com>
To: Dmitrii Banshchikov <me@...que.spb.ru>
CC: "open list:BPF (Safe dynamic programs and tools)"
<bpf@...r.kernel.org>, "ast@...nel.org" <ast@...nel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"daniel@...earbox.net" <daniel@...earbox.net>,
"andrii@...nel.org" <andrii@...nel.org>, Martin Lau <kafai@...com>,
"Yonghong Song" <yhs@...com>,
"john.fastabend@...il.com" <john.fastabend@...il.com>,
"kpsingh@...nel.org" <kpsingh@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Andrey Ignatov <rdna@...com>
Subject: Re: [PATCH bpf-next 09/11] bpfilter: Add struct table
> On May 17, 2021, at 3:53 PM, Dmitrii Banshchikov <me@...que.spb.ru> wrote:
>
> A table keeps iptables' blob and an array of struct rule for this blob.
> The array of rules provides more convenient way to interact with blob's
> entries.
>
> All tables are stored in table_ops_map map which is used for lookups.
> Also all tables are linked into a list that is used for freeing them.
>
> Signed-off-by: Dmitrii Banshchikov <me@...que.spb.ru>
[...]
> diff --git a/net/bpfilter/context.h b/net/bpfilter/context.h
> index c62c1ba4781c..2d9e3fafb0f8 100644
> --- a/net/bpfilter/context.h
> +++ b/net/bpfilter/context.h
> @@ -10,12 +10,15 @@
>
> #include "match-ops-map.h"
> #include "target-ops-map.h"
> +#include "table-map.h"
>
> struct context {
> FILE *log_file;
> int log_level;
> struct match_ops_map match_ops_map;
> struct target_ops_map target_ops_map;
> + struct table_map table_map;
> + struct list_head table_list;
How about we add table_list to struct table_map (and maybe rename it)?
I suspect that will make the code a little cleaner.
Thanks,
Song
[...]
Powered by blists - more mailing lists