OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 1/3] netns netfilter: semi-rewrite of /proc/net/foo_tables_*
Re: [PATCH 1/3] netns netfilter: semi-rewrite of /proc/net/foo_tables_* [message #26671 is a reply to message #26532] Wed, 30 January 2008 15:17 Go to previous message
Patrick McHardy is currently offline  Patrick McHardy
Messages: 107
Registered: March 2006
Senior Member
Alexey Dobriyan wrote:
> Argh, there are many small but still wrong things with /proc/net/*_tables_*
> so I decided to do overhaul simultaneously making it more suitable for
> per-netns /proc/net/*_tables_* implementation.
> 
> Fix
> a) xt_get_idx() duplicating now standard seq_list_start/seq_list_next
>    iterators
> b) tables/matches/targets list was chosen again and again on every ->next
> c) multiple useless "af >= NPROTO" checks -- we simple don't supply invalid
>    AFs there and registration function should BUG_ON instead.
>    
>    Regardless, the one in ->next() is the most useless -- ->next doesn't
>    run at all if ->start fails.
> d) Don't use mutex_lock_interruptible() -- it can fail and ->stop is
>    executed even if ->start failed, so unlock without lock is possible.
> 
> As side effect, streamline code by splitting xt_tgt_ops into xt_target_ops,
> xt_matches_ops, xt_tables_ops.
> 
> xt_tables_ops hooks will be changed by per-netns code. Code of
> xt_matches_ops, xt_target_ops is identical except the list chosen for
> iterating, but I think consolidating code for two files not worth it
> given "<< 16" hacks needed for it.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>

Applied, and I also removed the now unused TABLE/TARGET/MATCH enum.
 
Read Message
Read Message
Previous Topic: Re: [Xen-devel] dm-band: The I/O bandwidth controller: Performance Report
Next Topic: [PATCH 2/3] netns netfilter: netns propagation for /proc/net/*_tables_names
Goto Forum:
  


Current Time: Sun Aug 03 05:30:16 GMT 2025

Total time taken to generate the page: 1.05881 seconds