On Fri, Jun 09, 2017 at 04:40:18PM +0200, Martin Pieuchot wrote:
> Now with the correct diff:
OK bluhm@
>
> Index: net/radix.c
> ===
> RCS file: /cvs/src/sys/net/radix.c,v
> retrieving revision 1.56
> diff -u -p -r1.56 radix.c
>
On 09/06/17(Fri) 16:23, Martin Pieuchot wrote:
> On 09/06/17(Fri) 15:46, Alexander Bluhm wrote:
> > On Fri, Jun 09, 2017 at 03:11:05PM +0200, Martin Pieuchot wrote:
> > > > The static variable last_zeroed does not look MP safe. If I get
> > > > this code correctly it is only an optimization to
On Fri, Jun 09, 2017 at 04:23:13PM +0200, Martin Pieuchot wrote:
> I couldn't convince myself that rn_search() do not check bits
> after 'mlen' so I added the memset() as you suggested.
It looks like you forgot to put the memset() in the diff.
> @@ -432,14 +440,10 @@ rn_addmask(void *n_arg, int
On 09/06/17(Fri) 15:46, Alexander Bluhm wrote:
> On Fri, Jun 09, 2017 at 03:11:05PM +0200, Martin Pieuchot wrote:
> > > The static variable last_zeroed does not look MP safe. If I get
> > > this code correctly it is only an optimization to avoid multiple
> > > zeroing in addmask_key. This does
On Fri, Jun 09, 2017 at 03:11:05PM +0200, Martin Pieuchot wrote:
> > The static variable last_zeroed does not look MP safe. If I get
> > this code correctly it is only an optimization to avoid multiple
> > zeroing in addmask_key. This does not work anyway with addmask_key
> > on the stack.
>
>
On 08/06/17(Thu) 23:46, Alexander Bluhm wrote:
> On Tue, Jun 06, 2017 at 03:36:12PM +0200, Martin Pieuchot wrote:
> > +#define SALEN(sa) (*(u_char *)sa)
>
> Put () around macro arguments.
> #define SALEN(sa) (*(u_char *)(sa))
Done.
> > -int
> > +static int
> > rn_refines(void *m_arg, void
On Tue, Jun 06, 2017 at 03:36:12PM +0200, Martin Pieuchot wrote:
> +#define SALEN(sa)(*(u_char *)sa)
Put () around macro arguments.
#define SALEN(sa) (*(u_char *)(sa))
> -int
> +static int
> rn_refines(void *m_arg, void *n_arg)
> -int
> +static int
> rn_inithead0(struct
One of the reasons IPsec still requires the KERNEL_LOCK() in the
forwarding path is that it uses the radix tree for the SPD lookup.
Since the radix code is used by other subsystems (NFS export list,
PIPEX, PF) we want it to be able to run on parallel, at least when
callers aren't manipulating the