Re: adding if_dev member to struct ifnet

From: Brooks Davis (brooks_at_one-eyed-alien.net)
Date: 09/30/03

  • Next message: Brooks Davis: "Re: finishing the if.h/if_var.h split"
    Date: Tue, 30 Sep 2003 10:48:19 -0700
    To: John Baldwin <jhb@freebsd.org>
    
    
    

    On Tue, Sep 30, 2003 at 01:14:39PM -0400, John Baldwin wrote:
    >
    > Fair enough. I think that Brooks planned to use a NULL device_t for
    > interfaces w/o a backing new-bus device. However, that means you
    > still need if_name for all the non-newbus devices, so this seems
    > somewhat pointless if if_name is the only reason. Another counterpoint
    > is that the new-bus namespace and the netif namespace aren't the same
    > anyway and that seemed to be the point of this linkage. The
    > dev_t <> softc <> device_t linkages aren't about unifying namespaces.

    The idea here is that virtually all uses of if_name/if_unit that aren't
    just there for the users benefit are actually references to the
    underlying driver not name of the interface. Currently they are the
    same (i.e. ifname is nearly always device_get_name(dev) or a bug prone
    manual version there of), but I would like to separate them so we can
    rename interfaces.

    Since device_t is as close to a repository of driver/instance
    information as we've got, I though using it would be a reasonable way
    to go. As a side benefit, most drivers have a copy of it in their softc
    already so you'd have a standard place to put it.

    I suppose a usable alternative would be to revive if_name and if_unit
    as something like if_drvname and if_drvunit.

    -- Brooks

    -- 
    Any statement of the form "X is the one, true Y" is FALSE.
    PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
    
    



  • Next message: Brooks Davis: "Re: finishing the if.h/if_var.h split"

    Relevant Pages

    • Re: adding if_dev member to struct ifnet
      ... > somewhat pointless if if_name is the only reason. ... just there for the users benefit are actually references to the ... underlying driver not name of the interface. ... rename interfaces. ...
      (freebsd-net)
    • Re: adding if_dev member to struct ifnet
      ... > just there for the users benefit are actually references to the ... > underlying driver not name of the interface. ... > rename interfaces. ... ifnet a void * that is private to the driver would allow ifnet devices ...
      (freebsd-arch)
    • Re: adding if_dev member to struct ifnet
      ... > just there for the users benefit are actually references to the ... > underlying driver not name of the interface. ... > rename interfaces. ... ifnet a void * that is private to the driver would allow ifnet devices ...
      (freebsd-net)
    • Re: no static functions in WDK examples;
      ... information for their products to OCA? ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... You also end up with a lot of dumps logged ... There is no technical reason not to. ...
      (microsoft.public.win32.programmer.kernel)
    • Re: "All speeding unacceptable" - IAM
      ... Do you believe that if the reason isn't readily "apparent", ... If the driver had been insured, of driving age and stone cold sober ... I simply haven't seen the accident and I can't ... A child runs out in the road, a sober but speeding driver is unable to ...
      (uk.rec.driving)