From owner-freebsd-net@FreeBSD.ORG Sat Aug 15 17:39:14 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11E241065692 for ; Sat, 15 Aug 2009 17:39:14 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outC.internet-mail-service.net (outc.internet-mail-service.net [216.240.47.226]) by mx1.freebsd.org (Postfix) with ESMTP id E2CF48FC61 for ; Sat, 15 Aug 2009 17:39:13 +0000 (UTC) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 445BDA1049; Sat, 15 Aug 2009 10:39:13 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 2A3672D6010; Sat, 15 Aug 2009 10:39:11 -0700 (PDT) Message-ID: <4A86F2BE.4050203@elischer.org> Date: Sat, 15 Aug 2009 10:39:10 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: Andre Oppermann References: <4A83EEA8.5080202@delphij.net> <20090813182918.S93661@maildrop.int.zabbadoz.net> <20090814193303.GA21941@lor.one-eyed-alien.net> <4A8601CE.5030205@delphij.net> <4A86C782.5030808@freebsd.org> In-Reply-To: <4A86C782.5030808@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Li, Qing" , Brooks Davis , d@delphij.net, freebsd-net@freebsd.org, Qing Li , "Andrey V. Elsukov" , "Bjoern A. Zeeb" Subject: Re: [Take 2] Re: RFC: interface description X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 17:39:14 -0000 Andre Oppermann wrote: > Xin LI wrote: >> Hi, guys, >> >> Here is a patch that implements the functionality in userland (as >> setifdescription/getifdescription functions in libutil); with this I >> think we can also provide an option that some kernel feature (like Qing >> Li said it might be useful for embedded systems, but of course the >> kernel feature would require more careful design) being used without >> modifying programs. This version uses if_dname plus if_dunit as >> distinguished name, and a Berkeley DB (hash, /etc/ifdescr.db) to store >> the information. > > I don't like this approach. Adding unconditional dependencies to libutil > and libbsdxml unnecessarily complicates and bloats up ifconfig, which is > a very central utility that resides on every rescue and minimal boot disk. > > Additionally the DB stored description can easily go out of sync when > interface disappear and reappear. On top of that it complicates porting > of routing daemons (Quagga suite, OpenBGPD/OSPFD). Having it only for > ifconfig but nowhere else is not entirely pointless but seriously reduces > its usefulness. > > IMHO interface description is a very useful feature and it should be stored > in the kernel attached to struct ifnet. However it probably should only be > a pointer to malloc'ed memory. It is only infrequently accessed and never > in a critical code path. A slight disadvantage is either a separate IOCTL > to retrieve the description or a little hack to copy it into struct ifnet > just when it is retrieved by userspace from the kernel. [Which reminds me > that somewhen we need something more flexible than the current routing > socket.] > From my perspective, putting it in a separate db outside the kernel kind of defeats the purpose. I thought the first patches had the right idea. though for me the current ability to rename an interface is good enough. I mean is you can cal your interface "Sydney0" or "Melbourne2" that is really enough..