From owner-freebsd-net@FreeBSD.ORG Tue Oct 8 18:48:35 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 41EE6AB4; Tue, 8 Oct 2013 18:48:35 +0000 (UTC) (envelope-from Eric_Van_Gyzen@dell.com) Received: from aussmtpmrkps320.us.dell.com (aussmtpmrkps320.us.dell.com [143.166.224.254]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E7FC327DB; Tue, 8 Oct 2013 18:48:33 +0000 (UTC) X-Loopcount0: from 64.238.244.148 X-IronPort-AV: E=Sophos;i="4.90,1058,1371099600"; d="scan'208";a="55290732" Message-ID: <5254537F.2070309@dell.com> Date: Tue, 8 Oct 2013 13:48:31 -0500 From: Eric van Gyzen Organization: Dell, Inc. User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130702 Thunderbird/17.0.7 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: sys/net/radix.h: #define Free(p) for user-land References: <5252D7F7.3030709@dell.com> <20131008141504.GA22563@FreeBSD.org> <52541ABF.70101@dell.com> <5254495E.3050206@dell.com> <20131008181956.GD22563@glebius.int.ru> In-Reply-To: <20131008181956.GD22563@glebius.int.ru> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, Eric van Gyzen X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Oct 2013 18:48:35 -0000 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)) > >