From ed@hoeg.nl  Sat Oct 27 22:53:47 2007
Return-Path: <ed@hoeg.nl>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 79D9E16A468
	for <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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 <ed@fxq.nl>
Reply-To: Ed Schouten <ed@fxq.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [Patch] lo(4) can be simplified even further
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         117578
>Category:       kern
>Synopsis:       [lo] [patch] lo(4) can be simplified even further
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kmacy
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 27 23:00:02 UTC 2007
>Closed-Date:    Wed Jul 30 21:22:32 UTC 2008
>Last-Modified:  Wed Jul 30 21:22:32 UTC 2008
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-bugs 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Oct 28 00:31:04 UTC 2007 
Responsible-Changed-Why:  
Over to the right group 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117578 

From: Ed Schouten <ed@fxq.nl>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/117578: [Patch] lo(4) can be simplified even further
Date: Sun, 28 Oct 2007 09:32:54 +0100

 Sorry for misfiling it. I guess I've been punching in `ports' too many
 times now.
 
 --=20
  Ed Schouten <ed@fxq.nl>
  WWW: http://g-rave.nl/
Responsible-Changed-From-To: freebsd-bugs->kmacy 
Responsible-Changed-By: kmacy 
Responsible-Changed-When: Fri Nov 16 02:56:51 UTC 2007 
Responsible-Changed-Why:  

Assign to self so that this isn't lost. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117578 
State-Changed-From-To: open->closed 
State-Changed-By: ed 
State-Changed-When: Wed Jul 30 21:22:31 UTC 2008 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117578 
>Unformatted:
This sounds straightforward.
