Date: Sun, 28 Oct 2007 00:53:46 +0200 (CEST) From: Ed Schouten <ed@fxq.nl> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/117578: [Patch] lo(4) can be simplified even further Message-ID: <20071027225346.9D49D1CD1A@palm.hoeg.nl> Resent-Message-ID: <200710272300.l9RN03Im040620@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071027225346.9D49D1CD1A>