From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Oct 27 23:00:03 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B20F316A421 for ; Sat, 27 Oct 2007 23:00:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 95C6E13C4B0 for ; Sat, 27 Oct 2007 23:00:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9RN033B040621 for ; Sat, 27 Oct 2007 23:00:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9RN03Im040620; Sat, 27 Oct 2007 23:00:03 GMT (envelope-from gnats) Resent-Date: Sat, 27 Oct 2007 23:00:03 GMT Resent-Message-Id: <200710272300.l9RN03Im040620@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ed Schouten Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79D9E16A468 for ; Sat, 27 Oct 2007 22:53:47 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 42D0113C48A for ; Sat, 27 Oct 2007 22:53:47 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 9D49D1CD1A; Sun, 28 Oct 2007 00:53:46 +0200 (CEST) Message-Id: <20071027225346.9D49D1CD1A@palm.hoeg.nl> Date: Sun, 28 Oct 2007 00:53:46 +0200 (CEST) From: Ed Schouten To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/117578: [Patch] lo(4) can be simplified even further X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ed Schouten List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2007 23:00:03 -0000 >Number: 117578 >Category: ports >Synopsis: [Patch] lo(4) can be simplified even further >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Oct 27 23:00:02 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Ed Schouten >Release: FreeBSD 6.2-STABLE i386 >Organization: >Environment: System: FreeBSD palm.hoeg.nl 6.2-STABLE FreeBSD 6.2-STABLE #0: Mon Sep 10 21:37:34 CEST 2007 root@palm.hoeg.nl:/usr/obj/usr/src/sys/PALM i386 >Description: As of 27 Oct 2007, the lo(4) driver has been simplified by removing lo_list. lo_list kept a list of all the lo(4) devices within the kernel. It became useless, because the if_clone interface nowadays keeps an internal list of devices, that is used to destruct all the interfaces on unloading. After the removal of the lo_list, even more unused code appears to be present in the driver, namely the entire softc structure. The softc only contains a pointer to the ifnet, which is never used within the driver. Removing that leaves us with an empty softc, which can be removed. Removing the softc will only shave off a couple of bytes of memory, but will improve readability, because the lo(4) driver will then contain no more dead code, which makes it easier for people to see the relevant parts. >How-To-Repeat: >Fix: The following patch removes a couple of things from the lo(4) driver: - The lo_softc structure; it contains no useful data that is used within the driver. - All uses of the lo_softc driver; if_softc is now left untouched. - The MALLOC_DEFINE() that is used within the lo(4) driver; there are no memory allocations within the driver anymore. - The LONAME definition that's only used for MALLOC_DEFINE(). http://g-rave.nl/unix/freebsd/freebsd-if_loop.diff >Release-Note: >Audit-Trail: >Unformatted: