* [patch 0/2] a few bridge code cleanups
@ 2009-07-04 6:11 ` Cyrill Gorcunov
0 siblings, 0 replies; 12+ messages in thread
From: Cyrill Gorcunov @ 2009-07-04 6:11 UTC (permalink / raw)
To: shemminger, kaber, bridge, netdev
Hi,
here is a few bridge cleanups - code alignment
and conditional compilation for structure members.
Please review. Hope I didn't miss anything.
Anyway if it breaks someone patch queue --
just drop this series then.
Cyrill
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bridge] [patch 0/2] a few bridge code cleanups
@ 2009-07-04 6:11 ` Cyrill Gorcunov
0 siblings, 0 replies; 12+ messages in thread
From: Cyrill Gorcunov @ 2009-07-04 6:11 UTC (permalink / raw)
To: shemminger, kaber, bridge, netdev
Hi,
here is a few bridge cleanups - code alignment
and conditional compilation for structure members.
Please review. Hope I didn't miss anything.
Anyway if it breaks someone patch queue --
just drop this series then.
Cyrill
^ permalink raw reply [flat|nested] 12+ messages in thread
* [patch 1/2] net, bridge: align br_nf_ops assignment
2009-07-04 6:11 ` [Bridge] " Cyrill Gorcunov
@ 2009-07-04 6:11 ` Cyrill Gorcunov
-1 siblings, 0 replies; 12+ messages in thread
From: Cyrill Gorcunov @ 2009-07-04 6:11 UTC (permalink / raw)
To: shemminger, kaber, bridge, netdev; +Cc: Cyrill Gorcunov
[-- Attachment #1: net-br-br_nf_ops-cleanup --]
[-- Type: text/plain, Size: 3041 bytes --]
No functional change -- just for easier reading.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
net/bridge/br_netfilter.c | 96 ++++++++++++++++++++++++++--------------------
1 file changed, 56 insertions(+), 40 deletions(-)
Index: linux-2.6.git/net/bridge/br_netfilter.c
=====================================================================
--- linux-2.6.git.orig/net/bridge/br_netfilter.c
+++ linux-2.6.git/net/bridge/br_netfilter.c
@@ -905,46 +905,62 @@ static unsigned int ip_sabotage_in(unsig
* For br_nf_post_routing, we need (prio = NF_BR_PRI_LAST), because
* ip_refrag() can return NF_STOLEN. */
static struct nf_hook_ops br_nf_ops[] __read_mostly = {
- { .hook = br_nf_pre_routing,
- .owner = THIS_MODULE,
- .pf = PF_BRIDGE,
- .hooknum = NF_BR_PRE_ROUTING,
- .priority = NF_BR_PRI_BRNF, },
- { .hook = br_nf_local_in,
- .owner = THIS_MODULE,
- .pf = PF_BRIDGE,
- .hooknum = NF_BR_LOCAL_IN,
- .priority = NF_BR_PRI_BRNF, },
- { .hook = br_nf_forward_ip,
- .owner = THIS_MODULE,
- .pf = PF_BRIDGE,
- .hooknum = NF_BR_FORWARD,
- .priority = NF_BR_PRI_BRNF - 1, },
- { .hook = br_nf_forward_arp,
- .owner = THIS_MODULE,
- .pf = PF_BRIDGE,
- .hooknum = NF_BR_FORWARD,
- .priority = NF_BR_PRI_BRNF, },
- { .hook = br_nf_local_out,
- .owner = THIS_MODULE,
- .pf = PF_BRIDGE,
- .hooknum = NF_BR_LOCAL_OUT,
- .priority = NF_BR_PRI_FIRST, },
- { .hook = br_nf_post_routing,
- .owner = THIS_MODULE,
- .pf = PF_BRIDGE,
- .hooknum = NF_BR_POST_ROUTING,
- .priority = NF_BR_PRI_LAST, },
- { .hook = ip_sabotage_in,
- .owner = THIS_MODULE,
- .pf = PF_INET,
- .hooknum = NF_INET_PRE_ROUTING,
- .priority = NF_IP_PRI_FIRST, },
- { .hook = ip_sabotage_in,
- .owner = THIS_MODULE,
- .pf = PF_INET6,
- .hooknum = NF_INET_PRE_ROUTING,
- .priority = NF_IP6_PRI_FIRST, },
+ {
+ .hook = br_nf_pre_routing,
+ .owner = THIS_MODULE,
+ .pf = PF_BRIDGE,
+ .hooknum = NF_BR_PRE_ROUTING,
+ .priority = NF_BR_PRI_BRNF,
+ },
+ {
+ .hook = br_nf_local_in,
+ .owner = THIS_MODULE,
+ .pf = PF_BRIDGE,
+ .hooknum = NF_BR_LOCAL_IN,
+ .priority = NF_BR_PRI_BRNF,
+ },
+ {
+ .hook = br_nf_forward_ip,
+ .owner = THIS_MODULE,
+ .pf = PF_BRIDGE,
+ .hooknum = NF_BR_FORWARD,
+ .priority = NF_BR_PRI_BRNF - 1,
+ },
+ {
+ .hook = br_nf_forward_arp,
+ .owner = THIS_MODULE,
+ .pf = PF_BRIDGE,
+ .hooknum = NF_BR_FORWARD,
+ .priority = NF_BR_PRI_BRNF,
+ },
+ {
+ .hook = br_nf_local_out,
+ .owner = THIS_MODULE,
+ .pf = PF_BRIDGE,
+ .hooknum = NF_BR_LOCAL_OUT,
+ .priority = NF_BR_PRI_FIRST,
+ },
+ {
+ .hook = br_nf_post_routing,
+ .owner = THIS_MODULE,
+ .pf = PF_BRIDGE,
+ .hooknum = NF_BR_POST_ROUTING,
+ .priority = NF_BR_PRI_LAST,
+ },
+ {
+ .hook = ip_sabotage_in,
+ .owner = THIS_MODULE,
+ .pf = PF_INET,
+ .hooknum = NF_INET_PRE_ROUTING,
+ .priority = NF_IP_PRI_FIRST,
+ },
+ {
+ .hook = ip_sabotage_in,
+ .owner = THIS_MODULE,
+ .pf = PF_INET6,
+ .hooknum = NF_INET_PRE_ROUTING,
+ .priority = NF_IP6_PRI_FIRST,
+ },
};
#ifdef CONFIG_SYSCTL
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bridge] [patch 1/2] net, bridge: align br_nf_ops assignment
@ 2009-07-04 6:11 ` Cyrill Gorcunov
0 siblings, 0 replies; 12+ messages in thread
From: Cyrill Gorcunov @ 2009-07-04 6:11 UTC (permalink / raw)
To: shemminger, kaber, bridge, netdev; +Cc: Cyrill Gorcunov
[-- Attachment #1: net-br-br_nf_ops-cleanup --]
[-- Type: text/plain, Size: 3041 bytes --]
No functional change -- just for easier reading.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
net/bridge/br_netfilter.c | 96 ++++++++++++++++++++++++++--------------------
1 file changed, 56 insertions(+), 40 deletions(-)
Index: linux-2.6.git/net/bridge/br_netfilter.c
=====================================================================
--- linux-2.6.git.orig/net/bridge/br_netfilter.c
+++ linux-2.6.git/net/bridge/br_netfilter.c
@@ -905,46 +905,62 @@ static unsigned int ip_sabotage_in(unsig
* For br_nf_post_routing, we need (prio = NF_BR_PRI_LAST), because
* ip_refrag() can return NF_STOLEN. */
static struct nf_hook_ops br_nf_ops[] __read_mostly = {
- { .hook = br_nf_pre_routing,
- .owner = THIS_MODULE,
- .pf = PF_BRIDGE,
- .hooknum = NF_BR_PRE_ROUTING,
- .priority = NF_BR_PRI_BRNF, },
- { .hook = br_nf_local_in,
- .owner = THIS_MODULE,
- .pf = PF_BRIDGE,
- .hooknum = NF_BR_LOCAL_IN,
- .priority = NF_BR_PRI_BRNF, },
- { .hook = br_nf_forward_ip,
- .owner = THIS_MODULE,
- .pf = PF_BRIDGE,
- .hooknum = NF_BR_FORWARD,
- .priority = NF_BR_PRI_BRNF - 1, },
- { .hook = br_nf_forward_arp,
- .owner = THIS_MODULE,
- .pf = PF_BRIDGE,
- .hooknum = NF_BR_FORWARD,
- .priority = NF_BR_PRI_BRNF, },
- { .hook = br_nf_local_out,
- .owner = THIS_MODULE,
- .pf = PF_BRIDGE,
- .hooknum = NF_BR_LOCAL_OUT,
- .priority = NF_BR_PRI_FIRST, },
- { .hook = br_nf_post_routing,
- .owner = THIS_MODULE,
- .pf = PF_BRIDGE,
- .hooknum = NF_BR_POST_ROUTING,
- .priority = NF_BR_PRI_LAST, },
- { .hook = ip_sabotage_in,
- .owner = THIS_MODULE,
- .pf = PF_INET,
- .hooknum = NF_INET_PRE_ROUTING,
- .priority = NF_IP_PRI_FIRST, },
- { .hook = ip_sabotage_in,
- .owner = THIS_MODULE,
- .pf = PF_INET6,
- .hooknum = NF_INET_PRE_ROUTING,
- .priority = NF_IP6_PRI_FIRST, },
+ {
+ .hook = br_nf_pre_routing,
+ .owner = THIS_MODULE,
+ .pf = PF_BRIDGE,
+ .hooknum = NF_BR_PRE_ROUTING,
+ .priority = NF_BR_PRI_BRNF,
+ },
+ {
+ .hook = br_nf_local_in,
+ .owner = THIS_MODULE,
+ .pf = PF_BRIDGE,
+ .hooknum = NF_BR_LOCAL_IN,
+ .priority = NF_BR_PRI_BRNF,
+ },
+ {
+ .hook = br_nf_forward_ip,
+ .owner = THIS_MODULE,
+ .pf = PF_BRIDGE,
+ .hooknum = NF_BR_FORWARD,
+ .priority = NF_BR_PRI_BRNF - 1,
+ },
+ {
+ .hook = br_nf_forward_arp,
+ .owner = THIS_MODULE,
+ .pf = PF_BRIDGE,
+ .hooknum = NF_BR_FORWARD,
+ .priority = NF_BR_PRI_BRNF,
+ },
+ {
+ .hook = br_nf_local_out,
+ .owner = THIS_MODULE,
+ .pf = PF_BRIDGE,
+ .hooknum = NF_BR_LOCAL_OUT,
+ .priority = NF_BR_PRI_FIRST,
+ },
+ {
+ .hook = br_nf_post_routing,
+ .owner = THIS_MODULE,
+ .pf = PF_BRIDGE,
+ .hooknum = NF_BR_POST_ROUTING,
+ .priority = NF_BR_PRI_LAST,
+ },
+ {
+ .hook = ip_sabotage_in,
+ .owner = THIS_MODULE,
+ .pf = PF_INET,
+ .hooknum = NF_INET_PRE_ROUTING,
+ .priority = NF_IP_PRI_FIRST,
+ },
+ {
+ .hook = ip_sabotage_in,
+ .owner = THIS_MODULE,
+ .pf = PF_INET6,
+ .hooknum = NF_INET_PRE_ROUTING,
+ .priority = NF_IP6_PRI_FIRST,
+ },
};
#ifdef CONFIG_SYSCTL
^ permalink raw reply [flat|nested] 12+ messages in thread
* [patch 2/2] net, netns_xt: shrink netns_xt members
2009-07-04 6:11 ` [Bridge] " Cyrill Gorcunov
@ 2009-07-04 6:11 ` Cyrill Gorcunov
-1 siblings, 0 replies; 12+ messages in thread
From: Cyrill Gorcunov @ 2009-07-04 6:11 UTC (permalink / raw)
To: shemminger, kaber, bridge, netdev; +Cc: Cyrill Gorcunov
[-- Attachment #1: net-br-x-tables-ifconfig --]
[-- Type: text/plain, Size: 917 bytes --]
In case if kernel was compiled without ebtables support
there is no need to keep ebt_table pointers in netns_xt
structure.
Make it config dependent.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
Probably GCC will authomatically shrink the structure
if the members are not in use. Please review.
include/net/netns/x_tables.h | 3 +++
1 file changed, 3 insertions(+)
Index: linux-2.6.git/include/net/netns/x_tables.h
=====================================================================
--- linux-2.6.git.orig/include/net/netns/x_tables.h
+++ linux-2.6.git/include/net/netns/x_tables.h
@@ -8,8 +8,11 @@ struct ebt_table;
struct netns_xt {
struct list_head tables[NFPROTO_NUMPROTO];
+#if defined(CONFIG_BRIDGE_NF_EBTABLES) || \
+ defined(CONFIG_BRIDGE_NF_EBTABLES_MODULE)
struct ebt_table *broute_table;
struct ebt_table *frame_filter;
struct ebt_table *frame_nat;
+#endif
};
#endif
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bridge] [patch 2/2] net, netns_xt: shrink netns_xt members
@ 2009-07-04 6:11 ` Cyrill Gorcunov
0 siblings, 0 replies; 12+ messages in thread
From: Cyrill Gorcunov @ 2009-07-04 6:11 UTC (permalink / raw)
To: shemminger, kaber, bridge, netdev; +Cc: Cyrill Gorcunov
[-- Attachment #1: net-br-x-tables-ifconfig --]
[-- Type: text/plain, Size: 917 bytes --]
In case if kernel was compiled without ebtables support
there is no need to keep ebt_table pointers in netns_xt
structure.
Make it config dependent.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
Probably GCC will authomatically shrink the structure
if the members are not in use. Please review.
include/net/netns/x_tables.h | 3 +++
1 file changed, 3 insertions(+)
Index: linux-2.6.git/include/net/netns/x_tables.h
=====================================================================
--- linux-2.6.git.orig/include/net/netns/x_tables.h
+++ linux-2.6.git/include/net/netns/x_tables.h
@@ -8,8 +8,11 @@ struct ebt_table;
struct netns_xt {
struct list_head tables[NFPROTO_NUMPROTO];
+#if defined(CONFIG_BRIDGE_NF_EBTABLES) || \
+ defined(CONFIG_BRIDGE_NF_EBTABLES_MODULE)
struct ebt_table *broute_table;
struct ebt_table *frame_filter;
struct ebt_table *frame_nat;
+#endif
};
#endif
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [patch 1/2] net, bridge: align br_nf_ops assignment
2009-07-04 6:11 ` [Bridge] " Cyrill Gorcunov
@ 2009-07-09 19:55 ` Stephen Hemminger
-1 siblings, 0 replies; 12+ messages in thread
From: Stephen Hemminger @ 2009-07-09 19:55 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: bridge, netdev, David Miller
On Sat, 04 Jul 2009 10:11:57 +0400
Cyrill Gorcunov <gorcunov@openvz.org> wrote:
> No functional change -- just for easier reading.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
> ---
> net/bridge/br_netfilter.c | 96 ++++++++++++++++++++++++++--------------------
> 1 file changed, 56 insertions(+), 40 deletions(-)
>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
--
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Bridge] [patch 1/2] net, bridge: align br_nf_ops assignment
@ 2009-07-09 19:55 ` Stephen Hemminger
0 siblings, 0 replies; 12+ messages in thread
From: Stephen Hemminger @ 2009-07-09 19:55 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: netdev, bridge, David Miller
On Sat, 04 Jul 2009 10:11:57 +0400
Cyrill Gorcunov <gorcunov@openvz.org> wrote:
> No functional change -- just for easier reading.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
> ---
> net/bridge/br_netfilter.c | 96 ++++++++++++++++++++++++++--------------------
> 1 file changed, 56 insertions(+), 40 deletions(-)
>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
--
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [patch 2/2] net, netns_xt: shrink netns_xt members
2009-07-04 6:11 ` [Bridge] " Cyrill Gorcunov
@ 2009-07-09 19:55 ` Stephen Hemminger
-1 siblings, 0 replies; 12+ messages in thread
From: Stephen Hemminger @ 2009-07-09 19:55 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: kaber, bridge, netdev, Cyrill Gorcunov
On Sat, 04 Jul 2009 10:11:58 +0400
Cyrill Gorcunov <gorcunov@openvz.org> wrote:
> In case if kernel was compiled without ebtables support
> there is no need to keep ebt_table pointers in netns_xt
> structure.
>
> Make it config dependent.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
> ---
>
> Probably GCC will authomatically shrink the structure
> if the members are not in use. Please review.
>
> include/net/netns/x_tables.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> Index: linux-2.6.git/include/net/netns/x_tables.h
> =====================================================================
> --- linux-2.6.git.orig/include/net/netns/x_tables.h
> +++ linux-2.6.git/include/net/netns/x_tables.h
> @@ -8,8 +8,11 @@ struct ebt_table;
>
> struct netns_xt {
> struct list_head tables[NFPROTO_NUMPROTO];
> +#if defined(CONFIG_BRIDGE_NF_EBTABLES) || \
> + defined(CONFIG_BRIDGE_NF_EBTABLES_MODULE)
> struct ebt_table *broute_table;
> struct ebt_table *frame_filter;
> struct ebt_table *frame_nat;
> +#endif
> };
> #endif
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
--
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Bridge] [patch 2/2] net, netns_xt: shrink netns_xt members
@ 2009-07-09 19:55 ` Stephen Hemminger
0 siblings, 0 replies; 12+ messages in thread
From: Stephen Hemminger @ 2009-07-09 19:55 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: Cyrill Gorcunov, netdev, bridge
On Sat, 04 Jul 2009 10:11:58 +0400
Cyrill Gorcunov <gorcunov@openvz.org> wrote:
> In case if kernel was compiled without ebtables support
> there is no need to keep ebt_table pointers in netns_xt
> structure.
>
> Make it config dependent.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
> ---
>
> Probably GCC will authomatically shrink the structure
> if the members are not in use. Please review.
>
> include/net/netns/x_tables.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> Index: linux-2.6.git/include/net/netns/x_tables.h
> =====================================================================
> --- linux-2.6.git.orig/include/net/netns/x_tables.h
> +++ linux-2.6.git/include/net/netns/x_tables.h
> @@ -8,8 +8,11 @@ struct ebt_table;
>
> struct netns_xt {
> struct list_head tables[NFPROTO_NUMPROTO];
> +#if defined(CONFIG_BRIDGE_NF_EBTABLES) || \
> + defined(CONFIG_BRIDGE_NF_EBTABLES_MODULE)
> struct ebt_table *broute_table;
> struct ebt_table *frame_filter;
> struct ebt_table *frame_nat;
> +#endif
> };
> #endif
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
--
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [patch 1/2] net, bridge: align br_nf_ops assignment
2009-07-09 19:55 ` [Bridge] " Stephen Hemminger
@ 2009-07-11 14:30 ` Cyrill Gorcunov
-1 siblings, 0 replies; 12+ messages in thread
From: Cyrill Gorcunov @ 2009-07-11 14:30 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: bridge, netdev, David Miller
[Stephen Hemminger - Thu, Jul 09, 2009 at 12:55:00PM -0700]
| On Sat, 04 Jul 2009 10:11:57 +0400
| Cyrill Gorcunov <gorcunov@openvz.org> wrote:
|
| > No functional change -- just for easier reading.
| >
| > Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
| > ---
| > net/bridge/br_netfilter.c | 96 ++++++++++++++++++++++++++--------------------
| > 1 file changed, 56 insertions(+), 40 deletions(-)
| >
|
|
| Acked-by: Stephen Hemminger <shemminger@vyatta.com>
|
| --
|
Thanks for review Stephen. Will you pick them up?
-- Cyrill
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Bridge] [patch 1/2] net, bridge: align br_nf_ops assignment
@ 2009-07-11 14:30 ` Cyrill Gorcunov
0 siblings, 0 replies; 12+ messages in thread
From: Cyrill Gorcunov @ 2009-07-11 14:30 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, bridge, David Miller
[Stephen Hemminger - Thu, Jul 09, 2009 at 12:55:00PM -0700]
| On Sat, 04 Jul 2009 10:11:57 +0400
| Cyrill Gorcunov <gorcunov@openvz.org> wrote:
|
| > No functional change -- just for easier reading.
| >
| > Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
| > ---
| > net/bridge/br_netfilter.c | 96 ++++++++++++++++++++++++++--------------------
| > 1 file changed, 56 insertions(+), 40 deletions(-)
| >
|
|
| Acked-by: Stephen Hemminger <shemminger@vyatta.com>
|
| --
|
Thanks for review Stephen. Will you pick them up?
-- Cyrill
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2009-07-11 14:30 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-04 6:11 [patch 0/2] a few bridge code cleanups Cyrill Gorcunov
2009-07-04 6:11 ` [Bridge] " Cyrill Gorcunov
2009-07-04 6:11 ` [patch 1/2] net, bridge: align br_nf_ops assignment Cyrill Gorcunov
2009-07-04 6:11 ` [Bridge] " Cyrill Gorcunov
2009-07-09 19:55 ` Stephen Hemminger
2009-07-09 19:55 ` [Bridge] " Stephen Hemminger
2009-07-11 14:30 ` Cyrill Gorcunov
2009-07-11 14:30 ` [Bridge] " Cyrill Gorcunov
2009-07-04 6:11 ` [patch 2/2] net, netns_xt: shrink netns_xt members Cyrill Gorcunov
2009-07-04 6:11 ` [Bridge] " Cyrill Gorcunov
2009-07-09 19:55 ` Stephen Hemminger
2009-07-09 19:55 ` [Bridge] " Stephen Hemminger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.