Date: Tue, 8 Oct 2013 13:48:31 -0500 From: Eric van Gyzen <eric_van_gyzen@dell.com> To: Gleb Smirnoff <glebius@FreeBSD.org> Cc: freebsd-net@freebsd.org, Eric van Gyzen <eric@vangyzen.net> Subject: Re: sys/net/radix.h: #define Free(p) for user-land Message-ID: <5254537F.2070309@dell.com> In-Reply-To: <20131008181956.GD22563@glebius.int.ru> References: <5252D7F7.3030709@dell.com> <20131008141504.GA22563@FreeBSD.org> <52541ABF.70101@dell.com> <5254495E.3050206@dell.com> <20131008181956.GD22563@glebius.int.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/08/2013 13:19, Gleb Smirnoff wrote: > On Tue, Oct 08, 2013 at 01:05:18PM -0500, Eric van Gyzen wrote: > E> > So true. :) Before I bothered, I just wanted to ask if a change was > E> > impractical due to API commitments with several known out-of-tree > E> > consumers. Hearing no such replies, I'll test a patch. > E> > E> I simply renamed Free to R_Free, and buildworld succeeded. I built head > E> r256133 on amd64 with no make.conf or src.conf. > E> > E> So, there are [probably] no in-tree consumers. The question then > E> becomes, do we need these user-land definitions at all? > > I suppose we'd better have. The radix code was designed so that it > could be tested in userland. Probably it isn't compilable nowadays, > but R_Free() won't hurt anyone. > > I'd appreciate if you run universe build for this change. We are > in release cycle now and any build breakage can hurt release process. Gleb, It's running now. Thanks for your help. By the way, how much disk space does a "make universe" need nowadays? > If universe succeeds, we can check it in. > > E> diff --git a/sys/net/radix.h b/sys/net/radix.h > E> index 5bacaa3..1c8d654 100644 > E> --- a/sys/net/radix.h > E> +++ b/sys/net/radix.h > E> @@ -141,7 +141,7 @@ struct radix_node_head { > E> #ifndef _KERNEL > E> #define R_Malloc(p, t, n) (p = (t) malloc((unsigned int)(n))) > E> #define R_Zalloc(p, t, n) (p = (t) calloc(1,(unsigned int)(n))) > E> -#define Free(p) free((char *)p); > E> +#define R_Free(p) free((char *)p); > E> #else > E> #define R_Malloc(p, t, n) (p = (t) malloc((unsigned long)(n), M_RTABLE, M_NOWAIT)) > E> #define R_Zalloc(p, t, n) (p = (t) malloc((unsigned long)(n), M_RTABLE, M_NOWAIT | M_ZERO)) > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5254537F.2070309>