hi,

I'm working on userspace network stack of Linux, called
NUSE. 

as I found NUSE and rumpkernel has a lot of commons, I
believe sharing development effort would be a nice way to
survive (not only for ourselves I believe). 

ultimate goal for this integration is to provide all
required interface of rumpkernel for Linux kernel, 

but for the first step, I copied system call proxy (i.e.,
rumpserver?) and rumpclient code with hijack library, which
previous NUSE lacks this feature (only has rump local mode).

 NUSE (sleep 1000) <--- (rumpuser_sp) <-- rump client (ip addr show)
                   ---------------------->

% LD_PRELOAD=./arch/lib/libnuse-hijack.so  RUMPHIJACK=socket=all \
  RUMP_SERVER=unix:///tmp/rump-server-nuse.43681 ip addr show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group 
default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default 
    link/sit 0.0.0.0 brd 0.0.0.0
3: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN group default 
    link/tunnel6 :: brd ::
4: eno16777736: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN 
group default qlen 1000
    link/ether 00:01:01:01:01:02 brd ff:ff:ff:ff:ff:ff
    inet 192.168.209.39/24 brd 192.168.209.255 scope global eno16777736
       valid_lft forever preferred_lft forever
    inet6 fe80::201:1ff:fe01:102/64 scope link 
       valid_lft forever preferred_lft forever

it just works fine !!! (on FC19 64bits)

# in fact, it took 1 month to reach here, not just works
 btw.

though the current code needs really small tricks (a few
LoC) to src-netbsd, rumpserver looks fine with other guest
kernel (i.e., linux).

temporary codes are available:

https://github.com/libos-nuse/net-next-nuse/tree/syscall-proxy
https://github.com/libos-nuse/src-netbsd/tree/buildrump-src-nuse




a couple of questions were raised during this step:

- is src-netbsd (branch buildrump-src) the appropriate
repository for this purpose ? 

I only use part of src-netbsd (librumpuser, librumphijack,
librumpclient, and sys/rump/librump/rumpkern with a couple
of .h files. sys/rump part should be implemented with
Linux-specific syscall implementation: for future work). it
would be nice that I can propose a standalone toolkit for
such an integration.

- failure in hijacking

in hijack.c, system calls are intercepted by LD_PRELOAD, as
NUSE does. in Linux glibc, some of the functions are using
strong alias (I guess: need to investigate more) which we
cannot hijack by LD_PRELOAD. for example, if_nametoindex(3)
uses '__socket' symbol, which results in inline system calls (we
can't replace it by our own?). does NetBSD glibc have such a
system call ? if yes, does librumphijack take a special care?

if not then, is ptrace(2) only a solution for this ?

- rump local, or remote, or embedded local/hijack ?

current NUSE process model (without rumpserver) is like
'rump local' mode with hijacked calls. is there any possible
combination like this (hijacked rump local mode) in rumpkernel ?

have a nice day.

# I'm going to talk about this stuff in a Linux specific
  conference, netdev0.1. I plan to address the rump server
  integration in my talk. FYI.
  https://www.netdev01.org/news/18

-- Hajime


------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
rumpkernel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rumpkernel-users

Reply via email to