Re: RFC: if_clone overhaul

From: Andre Oppermann (andre_at_freebsd.org)
Date: 04/22/04

  • Next message: Heinz Knocke: "simulating an LFN over 1Gb LAN Ethernet?"
    Date: Thu, 22 Apr 2004 16:13:40 +0200
    To: Brooks Davis <brooks@one-eyed-alien.net>
    
    

    Brooks Davis wrote:
    >
    > Please test/review the following patch to the network interface cloneing
    > code. This code is a major overhaul of the cloning infrastructure.
    >
    > The significant include:
    > - Split the code out into if_clone.[ch].
    > - Locked struct if_clone. Derived from work by Maurycy
    > Pawlowski-Wieronski <maurycy at fouk.org>
    > - Add a per-cloner match function rather then simply matching names of
    > the form <name><unit> and <name>.
    > - Use the match function to allow creation of <interface>.<tag>
    > vlan interfaces. The old way is preserved unchanged!
    > - Also the match function to allow creation of stf(4) interfaces named
    > stf0, stf, or 6to4. This is the only major user visiable change in
    > that "ifconfig stf" creates the interface stf rather then stf0 and
    > does not print "stf0" to stdout.
    > - Allow destroy functions to fail so they can refuse to delete
    > interfaces. Currently, we forbid the deletion of interfaces which
    > were created in the init function, particularly lo0, pflog0, and
    > pfsync0. In the case of lo0 this was a panic implemenation so it
    > does not count as a user visiable change. :-)
    > - Since most interfaces do not need the new functionality, an family of
    > wrapper functions, ifc_simple_*(), were created to wrap old style
    > cloner functions.
    > - The IF_CLONE_INITIALIZER macro is replaced with a new incompatable
    > IFC_CLONE_INITALIZER and ifc_simple consumers use IFC_SIMPLE_DECLARE
    > instead.
    >
    > TODO:
    > - Integrate vlan changes into /etc/rc* (add support for interfaces with
    > '.' in their name).
    > - Document new vlan syntax in vlan(4).

    Looks good and I like it! ;-)

    Some comments:

     o in net/if_clone.h you can remove the 3rd Regents copyright clause.

     o in net/if_clone.h, is ## really a legal character in variables?
       Looks strange for sure!

     o in net/if_clone.c you can remove the 3rd Regents copyright clause.

     o how far does the cloning code scale? I'm asking because with the
       work on the l2tp stuff you'll get machines with possibly 10'000
       or more ppp over l2tp connections acting as LAC.

     o I haven't run the code or applied the patch because I have too many
       modifications in my tree which I need to get committed first. :-)

    Good work!

    -- 
    Andre
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
    

  • Next message: Heinz Knocke: "simulating an LFN over 1Gb LAN Ethernet?"

    Relevant Pages

    • Re: [2.4 PATCH] bugfix: ARP respond on all devices
      ... What RFC is breaking? ... The actual behaviour of linux makes loopback interfaces no sense. ... Also, as long as I know, 127.0.0.1 is not answered in ARP, although ... I think the hidden patch is also RFC compliant. ...
      (Linux-Kernel)
    • Re: [take22 0/4] kevent: Generic event handling mechanism.
      ... February I changed interfaces 4 times - and it is just interfaces, ... When all requested features are implemented I definitely with patch some ... that my guesses were told by The Big Jury to you already: ... why do you care about indent of the userspace ...
      (Linux-Kernel)
    • [PATCH] PCIERR : interfaces for synchronous I/O error detection on driver
      ... This patch proposes new interfaces, that known by few as iochk_*, ... for synchronous I/O error detection on PCI drivers. ... I suppose that proposed interfaces will solve most of remaining issues. ... - i.e. this feature improves Serviceability. ...
      (Linux-Kernel)
    • Re: autobridge patch
      ... >> like qemu or vmware that open a tap interface and need it bridged ... the user can set up a glob for interfaces ... >> This patch includes a big change to how interfaces are configured in ... even if you dont use a bridge. ...
      (freebsd-net)
    • Re: Coding style: mixed-case
      ... >>While there may be reasons why mixed case is suboptimal, ... > Certainly I would like to have a go at a patch, but I must say that I do not ... There could be a quite a bit of external code using these interfaces. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)