DragonFly kernel List (threaded) for 2007-01
DragonFly BSD
DragonFly kernel List (threaded) for 2007-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: VKernel progress update - 10 Jan 2006


From: "Sepherosa Ziehau" <sepherosa@xxxxxxxxx>
Date: Sun, 14 Jan 2007 15:52:25 +0800

On 1/12/07, Matthew Dillon <dillon@apollo.backplane.com> wrote:
    I would suggest that VKE's be numbered from zero, because then we could
    have the vkernel automatically allocate a free TAP interface and not
    create confusion with rc.conf in the virtual environment.

    Also, the vkernel can ifconfig up the TAP side of the interface as well
    or do the basic bridge tie-in.  That way the sysop wouldn't have to
    worry about which tap interface was allocated.

    Bridging is easy mode but not paricularly efficient because broadcasts
    would wind up being spammed to all the running vkernels (not fun!).
    routing a LAN IP might be a better solution.  I can see a need for both
    solutions.

    So, e.g. leave the -I option intact but add some features and optional
    real-kernel-side IP configuration.  like this:

    -I auto:10.0.0.1:10.0.0.2
    -I auto:10.0.0.1:10.0.0.2:24
    -I auto:bridge0
    -I tap0:bridge0

       auto        - automatically find a free TAP interface and use it
       10.0.0.1    - specify TAP interface IP
       10.0.0.2    - specify VKE interface IP
       24          - specify CIDR bits for TAP/BKE (e.g. would be 10.0.0.0/24)
                     if not specified a /30 would be used.

       bridgeN     - instead of specifying IPs, just tie the TAP interface
                     into the specified bridge.

                     (we have to make sure that disconnecting the TAP also
                     disconnects it from the bridge)

I think following patch does these: http://leaf.dragonflybsd.org/~sephe/vke_multi_syntax.diff

NOTE:
1) bridge will not be brought up automaticly
2) non-existent bridge will not be created

Except above syntax, I have extended it a little bit:
-I tap0:x.x.x.x:y
 will only set real kernel tap0's address and netmask
-I tap0:x.x.x.x
 will only set real kernel tap0's address

-I tap0:bridge0:x.x.x.x
 will tie tap0 to bridge0 in real kernel, and x.x.x.x will be vkeX's address
-I tap0:bridge0:x.x.x.x:y
 will tie tap0 to bridge0 in real kernel, and x.x.x.x will be vkeX's
address and y will be vke0's netmask

If you have assigned vkeX's address/netmask on vkernel command line,
then in vkernel you only need 'ifconfig vkeX up', vkeX will have the
address/netmask supplied on command line.

Two sysctls are added for vkeX:
hw.vkeX.intr_rate (rw), #intr/second, default is 20, valid range is [1, hz]
hw.vkeX.tap_unit (ro), backend tap(4) interface unit in real kernel
And now 'ifconfig vkeX' will print backend tap(4) interface in real kernel

Make sure you have pulled in two tap(4) bug fixing in HAED, before
trying this patch.

Please test/review it. Hope I can drive it into repo before 1.8 branching.

Best Regards,
sephe

--
Live Free or Die



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]