On Sun, 2005-02-06 at 18:08, Thomas Graf wrote:
>
> > --- /dev/null 2004-01-29 13:33:32.773091056 -0500
> > +++ 2611-rc3+bk3/include/net/act_generic.h 2005-02-06 15:55:36.000000000
> > -0500
> > + if (rta == NULL || rtattr_parse_nested(tb, TCA_DEF_MAX, rta) < 0)
> > + return -EINVAL;
> > +
> > + if (tb[TCA_DEF_PARMS - 1] == NULL)
> > + return -EINVAL;
>
> Maybe check for tb[TCA_DEF_DATA - 1] == NULL here as well?
>
Good point; i will check for all
> > + parm = RTA_DATA(tb[TCA_DEF_PARMS - 1]);
>
> RTA_PAYLOAD check for TCA_DEF_PARMS?
>
sure
> > --- /dev/null 2004-01-29 13:33:32.773091056 -0500
> > +++ 2611-rc3+bk3/net/sched/simple.c 2005-02-06 15:55:57.000000000 -0500
> > @@ -0,0 +1,107 @@
>
> > +#include <linux/tc_act/tc_defact.h>
> > +#include <net/tc_act/tc_defact.h>
> > +
> > +/* use generic hash table with 8 buckets */
> > +#define MY_TAB_SIZE 8
> > +#define MY_TAB_MASK (MY_TAB_SIZE - 1)
> > +static u32 idx_gen;
> > +static struct tcf_defact *tcf_simp_ht[MY_TAB_SIZE];
> > +static DEFINE_RWLOCK(simp_lock);
>
> I guess this is supposed to be tca_use_default_defines
> and move MY_TAB_SIZE before the includes?
This is a tricky one; maybe i am playing too many macro tricks ;->
Theres some dependencies - need to think a little
> It looks pretty simple to use and makes up ematches quite well. Any
> userspace code alreay written?
User space could be simplified as well; attached is what i used to test
simple action. Theres a _lot_ of common code there as well.
I am also bgining to work on the checksum action; i will then do the
meta action.
cheers,
jamal
m_simple.c
Description: Text Data
|