From: Song Liu <songliubraving@fb.com>
To: Dmitrii Banshchikov <me@ubique.spb.ru>
Cc: "open list:BPF (Safe dynamic programs and tools)"
<bpf@vger.kernel.org>, "ast@kernel.org" <ast@kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"daniel@iogearbox.net" <daniel@iogearbox.net>,
"andrii@kernel.org" <andrii@kernel.org>,
Martin Lau <kafai@fb.com>, "Yonghong Song" <yhs@fb.com>,
"john.fastabend@gmail.com" <john.fastabend@gmail.com>,
"kpsingh@kernel.org" <kpsingh@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Andrey Ignatov <rdna@fb.com>
Subject: Re: [PATCH bpf-next 09/11] bpfilter: Add struct table
Date: Thu, 20 May 2021 18:07:07 +0000 [thread overview]
Message-ID: <AAFF4E35-AD81-49C1-A1D1-250FF18AD126@fb.com> (raw)
In-Reply-To: <20210517225308.720677-10-me@ubique.spb.ru>
> On May 17, 2021, at 3:53 PM, Dmitrii Banshchikov <me@ubique.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@ubique.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
[...]
next prev parent reply other threads:[~2021-05-20 18:07 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-17 22:52 [PATCH bpf-next 00/11] bpfilter Dmitrii Banshchikov
2021-05-17 22:52 ` [PATCH bpf-next 01/11] bpfilter: Add types for usermode helper Dmitrii Banshchikov
2021-05-17 22:52 ` [PATCH bpf-next 02/11] bpfilter: Add logging facility Dmitrii Banshchikov
2021-05-19 17:32 ` Song Liu
2021-05-20 7:08 ` Dmitrii Banshchikov
2021-05-20 16:35 ` Song Liu
2021-05-21 6:46 ` Dmitrii Banshchikov
2021-05-17 22:53 ` [PATCH bpf-next 03/11] bpfilter: Add IO functions Dmitrii Banshchikov
2021-05-19 18:47 ` Song Liu
2021-05-17 22:53 ` [PATCH bpf-next 04/11] tools: Add bpfilter usermode helper header Dmitrii Banshchikov
2021-05-17 22:53 ` [PATCH bpf-next 05/11] bpfilter: Add map container Dmitrii Banshchikov
2021-05-17 22:53 ` [PATCH bpf-next 06/11] bpfilter: Add struct match Dmitrii Banshchikov
2021-05-20 4:26 ` Song Liu
2021-05-20 7:31 ` Dmitrii Banshchikov
2021-05-20 17:44 ` Song Liu
2021-05-17 22:53 ` [PATCH bpf-next 07/11] bpfilter: Add struct target Dmitrii Banshchikov
2021-05-20 4:36 ` Song Liu
2021-05-20 7:44 ` Dmitrii Banshchikov
2021-05-17 22:53 ` [PATCH bpf-next 08/11] bpfilter: Add struct rule Dmitrii Banshchikov
2021-05-17 22:53 ` [PATCH bpf-next 09/11] bpfilter: Add struct table Dmitrii Banshchikov
2021-05-20 18:07 ` Song Liu [this message]
2021-05-17 22:53 ` [PATCH bpf-next 10/11] bpfilter: Add handling of setsockopt() calls Dmitrii Banshchikov
2021-05-17 22:53 ` [PATCH bpf-next 11/11] bpfilter: Handle setsockopts Dmitrii Banshchikov
2021-05-20 4:54 ` [PATCH bpf-next 00/11] bpfilter Song Liu
2021-05-20 7:53 ` Dmitrii Banshchikov
2021-05-20 16:55 ` Alexei Starovoitov
2021-05-20 17:56 ` Song Liu
2021-05-21 6:00 ` Dmitrii Banshchikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AAFF4E35-AD81-49C1-A1D1-250FF18AD126@fb.com \
--to=songliubraving@fb.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=me@ubique.spb.ru \
--cc=netdev@vger.kernel.org \
--cc=rdna@fb.com \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).