Re: [PATCH bpf-next 09/11] bpfilter: Add struct table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On May 17, 2021, at 3:53 PM, Dmitrii Banshchikov <me@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx>

[...]


> 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

[...]






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux