netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Code cleanups
@ 2010-02-10 17:39 Jan Engelhardt
  2010-02-10 17:39 ` [PATCH 1/6] netfilter: iptables: remove unused function arguments Jan Engelhardt
                   ` (6 more replies)
  0 siblings, 7 replies; 26+ messages in thread
From: Jan Engelhardt @ 2010-02-10 17:39 UTC (permalink / raw)
  To: kaber; +Cc: netfilter-devel


Hi,


the next patch pack is mostly about cleanups, and there is one
commit for improving debug a little.
Pull URL will be posted once the previous request has been
merged, but I am already posting them now for review.



The following changes since commit e3eaa9910b380530cfd2c0670fcd3f627674da8a:
  Jan Engelhardt (1):
        netfilter: xtables: generate initial table on-demand

are available in the git repository at:

  . master2

Jan Engelhardt (6):
      netfilter: iptables: remove unused function arguments
      netfilter: reduce NF_HOOK by one argument
      netfilter: get rid of the grossness in netfilter.h
      netfilter: xtables: print details on size mismatch
      netfilter: xtables: constify args in compat copying functions
      netfilter: xtables: add const qualifiers

 include/linux/netfilter.h            |   55 +++++++++++---------
 include/linux/netfilter/x_tables.h   |   12 ++--
 net/bridge/netfilter/ebtables.c      |   59 ++++++++++++----------
 net/ipv4/netfilter/arp_tables.c      |   73 +++++++++++++++------------
 net/ipv4/netfilter/ip_tables.c       |   92 +++++++++++++++++++---------------
 net/ipv4/netfilter/ipt_ULOG.c        |    4 +-
 net/ipv4/netfilter/iptable_mangle.c  |   10 +---
 net/ipv6/netfilter/ip6_tables.c      |   92 ++++++++++++++++++---------------
 net/ipv6/netfilter/ip6table_mangle.c |   10 +---
 net/netfilter/x_tables.c             |   16 ++++--
 net/netfilter/xt_hashlimit.c         |    4 +-
 net/netfilter/xt_limit.c             |    4 +-
 12 files changed, 233 insertions(+), 198 deletions(-)

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: [PATCH 6/6] netfilter: xtables: add const qualifiers
@ 2010-02-11  9:14 Alexey Dobriyan
  2010-02-11  9:27 ` Patrick McHardy
  0 siblings, 1 reply; 26+ messages in thread
From: Alexey Dobriyan @ 2010-02-11  9:14 UTC (permalink / raw)
  To: jengelh; +Cc: netfilter-devel, kaber

> -static inline int ebt_basic_match(struct ebt_entry *e, struct ethhdr *h,
> -   const struct net_device *in, const struct net_device *out)
> +static inline int
> +ebt_basic_match(const struct ebt_entry *e, const struct ethhdr *h,
> +                const struct net_device *in, const struct net_device *out)

These const modifiers are pointless because compilers are smart enough
to notice non-modifiability and generate the very same code in both cases.

Nowadays, half of functions declarations in generic
xtables/iptables/ip6tables/arptables
code are littered with const which makes them pretty unpleasant to read.

> -	struct ebt_entry *e = (struct ebt_entry *)chain->data;
> +	const struct ebt_entry *e = (struct ebt_entry *)chain->data;

And such things are wrong (not second const).

Please, at least, keep "struct net *" out of this.

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Xtables cleanup patches
@ 2009-11-03 18:04 Jan Engelhardt
  2009-11-03 18:04 ` [PATCH 6/6] netfilter: xtables: add const qualifiers Jan Engelhardt
  0 siblings, 1 reply; 26+ messages in thread
From: Jan Engelhardt @ 2009-11-03 18:04 UTC (permalink / raw)
  To: kaber; +Cc: netfilter-devel



I am posting here already the next round of pullable patches
(that I originally wanted to get in _much_ faster) for review.

This block is mostly cleanups, simplifications. It might be worth
testing these together with the previous set if there are concerns
about speed.

-----
The following changes since commit 7891b6c280d01d52be5ecefe0db79d4b1f671a1e:
  Jan Engelhardt (1):
        netfilter: xtables: generate initial table on-demand

are available in the git repository at:

  git://dev.medozas.de/linux next

Jan Engelhardt (6):
      netfilter: iptables: remove unused function arguments
      netfilter: reduce NF_HOOK by one argument
      netfilter: get rid of the grossness in netfilter.h
      netfilter: xtables: print details on size mismatch
      netfilter: xtables: constify args in compat copying functions
      netfilter: xtables: add const qualifiers

 include/linux/netfilter.h            |   55 +++++++++++---------
 include/linux/netfilter/x_tables.h   |   12 ++--
 net/bridge/netfilter/ebtables.c      |   56 +++++++++++---------
 net/ipv4/netfilter/arp_tables.c      |   73 +++++++++++++++------------
 net/ipv4/netfilter/ip_tables.c       |   92 +++++++++++++++++++---------------
 net/ipv4/netfilter/ipt_ULOG.c        |    4 +-
 net/ipv4/netfilter/iptable_mangle.c  |   10 +---
 net/ipv6/netfilter/ip6_tables.c      |   92 ++++++++++++++++++---------------
 net/ipv6/netfilter/ip6table_mangle.c |   10 +---
 net/netfilter/x_tables.c             |   16 ++++--
 net/netfilter/xt_hashlimit.c         |    4 +-
 net/netfilter/xt_limit.c             |    4 +-
 12 files changed, 232 insertions(+), 196 deletions(-)

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2010-02-15 16:23 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-10 17:39 Code cleanups Jan Engelhardt
2010-02-10 17:39 ` [PATCH 1/6] netfilter: iptables: remove unused function arguments Jan Engelhardt
2010-02-10 17:39 ` [PATCH 2/6] netfilter: reduce NF_HOOK by one argument Jan Engelhardt
2010-02-10 17:39 ` [PATCH 3/6] netfilter: get rid of the grossness in netfilter.h Jan Engelhardt
2010-02-10 17:44   ` Patrick McHardy
2010-02-10 21:07     ` Jan Engelhardt
2010-02-11  9:02       ` Patrick McHardy
2010-02-10 17:39 ` [PATCH 4/6] netfilter: xtables: print details on size mismatch Jan Engelhardt
2010-02-10 17:39 ` [PATCH 5/6] netfilter: xtables: constify args in compat copying functions Jan Engelhardt
2010-02-10 17:39 ` [PATCH 6/6] netfilter: xtables: add const qualifiers Jan Engelhardt
2010-02-11  9:00   ` Patrick McHardy
2010-02-11 13:27     ` Jan Engelhardt
2010-02-11 16:06       ` Patrick McHardy
2010-02-11 16:22         ` Jan Engelhardt
2010-02-11 16:27           ` Patrick McHardy
2010-02-11 17:04             ` Jan Engelhardt
2010-02-10 21:10 ` Code cleanups Jan Engelhardt
2010-02-15 15:34   ` Patrick McHardy
2010-02-15 16:07     ` Jan Engelhardt
2010-02-15 16:23       ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2010-02-11  9:14 [PATCH 6/6] netfilter: xtables: add const qualifiers Alexey Dobriyan
2010-02-11  9:27 ` Patrick McHardy
2010-02-11  9:42   ` Alexey Dobriyan
2010-02-11  9:56     ` Patrick McHardy
2010-02-11 13:12       ` Jan Engelhardt
2009-11-03 18:04 Xtables cleanup patches Jan Engelhardt
2009-11-03 18:04 ` [PATCH 6/6] netfilter: xtables: add const qualifiers Jan Engelhardt

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).