NS-3 dce and iperf

209 views
Skip to first unread message

Michaël

unread,
Dec 17, 2014, 10:09:55 AM12/17/14
to ns-3-...@googlegroups.com
Hi,

I am using the iperf traffic generator in NS-3 dce. The current iperf version is version 2 and iperf3 appears to have some interesting new features. I was wondering what steps are necessary to use iperf3 instead of iperf2, if anyone has done this so far or how much effort/time would be required to do this. For iperf2, there is a patch for example (allow DCE to end an endless loop by modifying some code), but since iperf3 is not backwards compatible, this same patch can not be applied.

I also tried using the instructions on this link : http://www.nsnam.org/docs/dce/release/1.1/manual/html/dce-user-newapps.html but I'm can't seem to build it as a shared object file (type DYN).

Thanks in advance!

Hajime Tazaki

unread,
Dec 20, 2014, 5:56:20 PM12/20/14
to ns-3-...@googlegroups.com

At Wed, 17 Dec 2014 07:09:55 -0800 (PST),
could you please let me know how you build iperf3 ?
exact command lines to build iperf3 helps me to understand.

-- Hajime

Michaël

unread,
Dec 21, 2014, 9:21:23 AM12/21/14
to ns-3-...@googlegroups.com
Hi,

I think the commands are the same as for iperf2 

./configure; make; make install

But since iperf3 changed a lot in comparison to iperf2 (totally different directory structure for example), the iperf2 dce patch cannot be reused and has will be totally different as well. Instead of 6 Makefiles for example, there are only 3 now. The code fix for dce (adding 'sleep(1)' to compat/Thread.c can also not be reused since the compat folder does no longer exist, and neither does the Thread.c file or SwitchToThread() method. 

When i simply try to change the CFLAGS and LDFLAGS in the 3 Makefiles (like in the patch file for iperf2 or mentioned in the link I gave in my first email), I get the following error:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/gcrt1.o : relocation R_X86_64_32S against '__libc_csu_fini' can not be used when making a shared object: recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/gcrt1.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [iperf3_profile] Error 1
make[2]: Leaving directory 

Iperf3 builds both a executable and shared library. Using the flags --disable-shared, --disable-static also don't seem to help. Using the shared library in iperf gives the error 'No main method found in executable file .../iperf3'


Hajime Tazaki

unread,
Dec 23, 2014, 10:04:12 AM12/23/14
to ns-3-...@googlegroups.com

At Sun, 21 Dec 2014 06:21:23 -0800 (PST),
Michaël wrote:
>
> [1 <multipart/alternative (7bit)>]
> [1.1 <text/plain; UTF-8 (7bit)>]
> Hi,
>
> I think the commands are the same as for iperf2
>
> ./configure; make; make install
>
> But since iperf3 changed a lot in comparison to iperf2 (totally different
> directory structure for example), the iperf2 dce patch cannot be reused and
> has will be totally different as well. Instead of 6 Makefiles for example,
> there are only 3 now. The code fix for dce (adding 'sleep(1)' to
> compat/Thread.c can also not be reused since the compat folder does no
> longer exist, and neither does the Thread.c file or SwitchToThread()
> method.
>
> When i simply try to change the CFLAGS and LDFLAGS in the 3 Makefiles (like
> in the patch file for iperf2 or mentioned in the link I gave in my first
> email), I get the following error:
>
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/gcrt1.o :
> relocation R_X86_64_32S against '__libc_csu_fini' can not be used when
> making a shared object: recompile with -fPIC
> /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/gcrt1.o: error
> adding symbols: Bad value
> collect2: error: ld returned 1 exit status
> make[2]: *** [iperf3_profile] Error 1
> make[2]: Leaving directory

I tried iperf3 build and found that the above error is due
to bad compatibility between gcc profile option ('-pg') and
PIC option.

because the main binary (iperf3) was built even with this
error, you can see the iperf3 binary at (top)/src/.libs/iperf3.

disabling the build for iperf3_profile seems to be required
for DCE build. patches are welcome ;)

> Iperf3 builds both a executable and shared library. Using the flags
> --disable-shared, --disable-static also don't seem to help. Using the
> shared library in iperf gives the error 'No main method found in executable
> file .../iperf3'

then I can launch a script with iperf3, but got an error
like this.

% LD_LIBRARY_PATH=../iperf-3.0.10/src/.libs ./waf --run dce-iperf3
relocation error: elf-cache/0/libiperf.so.0: symbol
__h_errno_location, version GLIBC_2.2.5 not defined in file
0002.so.6 with link time reference

We may need to add the missing symbol (__h_errno_location).

for your information at the moment.

-- Hajime
Reply all
Reply to author
Forward
0 new messages