Re: [RESEND 3/5] [NET]: Protocol Independant Policy Routing Rules Framework

2006-07-31 Thread Thomas Graf
* Patrick McHardy <[EMAIL PROTECTED]> 2006-07-31 20:01 > Thomas Graf wrote: > > * Ville Nuorvala <[EMAIL PROTECTED]> 2006-07-31 17:46 > > > >>Shouldn't all these (struct fib_rule_hdr included) actually be defined > >>in include/linux/rtnetlink.h? > > > > > > We used to stuff everything into rtnet

Re: [RESEND 3/5] [NET]: Protocol Independant Policy Routing Rules Framework

2006-07-31 Thread Patrick McHardy
Thomas Graf wrote: > * Ville Nuorvala <[EMAIL PROTECTED]> 2006-07-31 17:46 > >>Shouldn't all these (struct fib_rule_hdr included) actually be defined >>in include/linux/rtnetlink.h? > > > We used to stuff everything into rtnetlink.h for no good reason. Having > independant include/linux/.h to exp

Re: [RESEND 3/5] [NET]: Protocol Independant Policy Routing Rules Framework

2006-07-31 Thread Thomas Graf
* Ville Nuorvala <[EMAIL PROTECTED]> 2006-07-31 17:46 > > Derived from net/ipv6/fib_rules.c > > do you mean net/ipv4/fib_rules.c or net/ipv6/fib6_rules.c? :-) Hehe, I meant net/ipv4/fib_rules.c :-) > > +struct fib_rule_hdr > > +{ > > + __u8family; > > + __u8dst_len; >

Re: [RESEND 3/5] [NET]: Protocol Independant Policy Routing Rules Framework

2006-07-31 Thread Ville Nuorvala
Thomas Graf wrote: Hi Thomas, > Derived from net/ipv6/fib_rules.c do you mean net/ipv4/fib_rules.c or net/ipv6/fib6_rules.c? :-) A couple of comments below. > Signed-off-by: Thomas Graf <[EMAIL PROTECTED]> > > Index: net-2.6.git/include/linux/fib_rules.h > ===

Re: [RESEND 3/5] [NET]: Protocol Independant Policy Routing Rules Framework

2006-07-29 Thread Martin Josefsson
On Sat, 2006-07-29 at 03:40 +0200, Patrick McHardy wrote: > Martin Josefsson wrote: > > As a somewhat related note, I've just digged a bit through RCU land, > > talked to dipankar and mckenney, and discovered that rcu_read_lock() / > > rcu_read_unlock() aren't strictly needed in softirqs since pree

Re: [RESEND 3/5] [NET]: Protocol Independant Policy Routing Rules Framework

2006-07-28 Thread Patrick McHardy
Martin Josefsson wrote: > As a somewhat related note, I've just digged a bit through RCU land, > talked to dipankar and mckenney, and discovered that rcu_read_lock() / > rcu_read_unlock() aren't strictly needed in softirqs since preempt is > already disabled in softirqs. This means that you can use

Re: [RESEND 3/5] [NET]: Protocol Independant Policy Routing Rules Framework

2006-07-28 Thread Thomas Graf
* Patrick McHardy <[EMAIL PROTECTED]> 2006-07-28 01:30 > > +int fib_rules_lookup(struct fib_rules_ops *ops, struct flowi *fl, > > +int flags, struct fib_lookup_arg *arg) > > +{ > > + struct fib_rule *rule; > > + int err; > > + > > + rcu_read_lock(); > > + > > + list_for_each

Re: [RESEND 3/5] [NET]: Protocol Independant Policy Routing Rules Framework

2006-07-28 Thread Martin Josefsson
On Fri, 2006-07-28 at 00:58 +0200, Patrick McHardy wrote: > > +int fib_rules_lookup(struct fib_rules_ops *ops, struct flowi *fl, > > +int flags, struct fib_lookup_arg *arg) > > +{ > > + struct fib_rule *rule; > > + int err; > > + > > + rcu_read_lock(); > > + > > + list_for_

Re: [RESEND 3/5] [NET]: Protocol Independant Policy Routing Rules Framework

2006-07-27 Thread Patrick McHardy
David Miller wrote: > From: Patrick McHardy <[EMAIL PROTECTED]> > Date: Fri, 28 Jul 2006 00:58:49 +0200 > >>This clashes with my routing table patch, guess we have to figure >>out who should go first :) > > > I think since USAGI has some work that depends on this, we > should get Thomas's stuff

Re: [RESEND 3/5] [NET]: Protocol Independant Policy Routing Rules Framework

2006-07-27 Thread Patrick McHardy
Thomas Graf wrote: > --- /dev/null > +++ net-2.6.git/net/core/fib_rules.c > +int fib_rules_register(struct fib_rules_ops *ops) > +{ > + int err = -EEXIST; > + struct fib_rules_ops *o; > + > + if (ops->rule_size < sizeof(struct fib_rule)) > + return -EINVAL; > + > + if (o

Re: [RESEND 3/5] [NET]: Protocol Independant Policy Routing Rules Framework

2006-07-27 Thread David Miller
From: Patrick McHardy <[EMAIL PROTECTED]> Date: Fri, 28 Jul 2006 00:58:49 +0200 > Thomas Graf wrote: > > Derived from net/ipv6/fib_rules.c > > This clashes with my routing table patch, guess we have to figure > out who should go first :) I think since USAGI has some work that depends on this, we

Re: [RESEND 3/5] [NET]: Protocol Independant Policy Routing Rules Framework

2006-07-27 Thread Patrick McHardy
Thomas Graf wrote: > Derived from net/ipv6/fib_rules.c This clashes with my routing table patch, guess we have to figure out who should go first :) > +int fib_rules_lookup(struct fib_rules_ops *ops, struct flowi *fl, > + int flags, struct fib_lookup_arg *arg) > +{ > + struct

[RESEND 3/5] [NET]: Protocol Independant Policy Routing Rules Framework

2006-07-27 Thread Thomas Graf
Derived from net/ipv6/fib_rules.c Signed-off-by: Thomas Graf <[EMAIL PROTECTED]> Index: net-2.6.git/include/linux/fib_rules.h === --- /dev/null +++ net-2.6.git/include/linux/fib_rules.h @@ -0,0 +1,60 @@ +#ifndef __LINUX_FIB_RULES_H +