fastpass icon indicating copy to clipboard operation
fastpass copied to clipboard

documentation on how to build & run fastpass

Open david-olshefski opened this issue 10 years ago • 13 comments

Hi, I was wondering if there was a doc on how to build & run fastpass?

The README doesn't cover it, and fastpass.mit.edu only describes how to build the proper kernel for it, but I could not find any info on building & running fastpass.

I was able to import all the projects into eclipse, but then the build failed, error msg was "Neither FASTPATH_CONTROLLER or FASTPATH_ENDPOINT was defined". So I am guessing there is a set of additional environment variables that need to be set?

david-olshefski avatar Aug 05 '14 14:08 david-olshefski

Hi David There are Makefiles in the arbiter and kernel-mod drivers. Try running them, you'll need the environment variables in the website instructions. I can try to help you solve issues you encounter, and will hopefully have time to update the documentation as you progress. Jonathan On Aug 5, 2014 10:41 AM, "david-olshefski" [email protected] wrote:

Hi, I was wondering if there was a doc on how to build & run fastpass?

The README doesn't cover it, and fastpass.mit.edu only describes how to build the right kernel for it, but I could not find any info on building & running fastpass.

I was able to import all the projects into eclipse, but then the build failed, error msg was "Neither FASTPATH_CONTROLLER or FASTPATH_ENDPOINT was defined". So I am guessing there is a set of additional environment variables that need to be set?

— Reply to this email directly or view it on GitHub https://github.com/yonch/fastpass/issues/1.

yonch avatar Aug 05 '14 15:08 yonch

Thanks!

cd ./fastpass/src/kernel-mod make

...fails with file not found:

/home/yonch/huge/linux-build/

Looks like this path was hardcoded into the Makefile.

On Tue, Aug 5, 2014 at 11:09 AM, yonch [email protected] wrote:

Hi David There are Makefiles in the arbiter and kernel-mod drivers. Try running them, you'll need the environment variables in the website instructions. I can try to help you solve issues you encounter, and will hopefully have time to update the documentation as you progress. Jonathan On Aug 5, 2014 10:41 AM, "david-olshefski" [email protected] wrote:

Hi, I was wondering if there was a doc on how to build & run fastpass?

The README doesn't cover it, and fastpass.mit.edu only describes how to build the right kernel for it, but I could not find any info on building & running fastpass.

I was able to import all the projects into eclipse, but then the build failed, error msg was "Neither FASTPATH_CONTROLLER or FASTPATH_ENDPOINT was defined". So I am guessing there is a set of additional environment variables that need to be set?

— Reply to this email directly or view it on GitHub https://github.com/yonch/fastpass/issues/1.

— Reply to this email directly or view it on GitHub https://github.com/yonch/fastpass/issues/1#issuecomment-51210988.

David P. Olshefski, PhD

  • www.linkedin.com/in/davidolshefski/

david-olshefski avatar Aug 05 '14 15:08 david-olshefski

Jonathan,

The make in grant-accept failed with:

[root@localhost grant-accept]# make cc -g -DNDEBUG -O3 -DNO_DPDK -DPIM_SINGLE_ADMISSION_CORE -c pim.c pim.c: In function ‘pim_add_backlog’: pim.c:107:9: error: too few arguments to function ‘enqueue_bin’ In file included from pim.h:17:0, from pim.c:8: ../graph-algo/bin.h:42:6: note: declared here make: *** [pim.o] Error 1 [root@localhost grant-accept]#

Dave

On Tue, Aug 5, 2014 at 11:42 AM, David Olshefski [email protected] wrote:

Thanks!

cd ./fastpass/src/kernel-mod make

...fails with file not found:

/home/yonch/huge/linux-build/

Looks like this path was hardcoded into the Makefile.

On Tue, Aug 5, 2014 at 11:09 AM, yonch [email protected] wrote:

Hi David There are Makefiles in the arbiter and kernel-mod drivers. Try running them, you'll need the environment variables in the website instructions. I can try to help you solve issues you encounter, and will hopefully have time to update the documentation as you progress. Jonathan On Aug 5, 2014 10:41 AM, "david-olshefski" [email protected] wrote:

Hi, I was wondering if there was a doc on how to build & run fastpass?

The README doesn't cover it, and fastpass.mit.edu only describes how to build the right kernel for it, but I could not find any info on building & running fastpass.

I was able to import all the projects into eclipse, but then the build failed, error msg was "Neither FASTPATH_CONTROLLER or FASTPATH_ENDPOINT was defined". So I am guessing there is a set of additional environment variables that need to be set?

— Reply to this email directly or view it on GitHub https://github.com/yonch/fastpass/issues/1.

— Reply to this email directly or view it on GitHub https://github.com/yonch/fastpass/issues/1#issuecomment-51210988.

David P. Olshefski, PhD

  • www.linkedin.com/in/davidolshefski/

David P. Olshefski, PhD

  • www.linkedin.com/in/davidolshefski/

david-olshefski avatar Aug 05 '14 15:08 david-olshefski

Hi,

tcp-benchmark builds clean

Looks like /graph-algo requires icc

Dave

david-olshefski avatar Aug 05 '14 16:08 david-olshefski

Hi, looks like the Makefile in /protocol can't find rte_ip.h

I have my RTE_SDK and RTE_TARGET set, but doesn't look like the Makefile references them?

david-olshefski avatar Aug 05 '14 16:08 david-olshefski

Hi David,

Thanks for your comments!

You really want kernel-mod (for the linux driver), and arbiter (for the arbiter); other directories are less important now. I've added a couple of instructions on environment variables for the kernel (KDIR and KBUILD_OUTPUT) to the website, which should hopefully fix the compilation of kernel-mod.

Did the arbiter build correctly for you?

Cheers Jonathan

On Tue, Aug 5, 2014 at 12:26 PM, david-olshefski [email protected] wrote:

Hi, looks like the Makefile in /protocol can't find rte_ip.h

I have my RTE_SDK and RTE_TARGET set, but doesn't look like the Makefile references them?

— Reply to this email directly or view it on GitHub https://github.com/yonch/fastpass/issues/1#issuecomment-51222404.

Jonathan

yonch avatar Aug 05 '14 18:08 yonch

Jonathan,

  1. The arbiter builds clean.

  2. Kernel modules build produces a 1 warning, below. fastpass.ko does get built, but does not load for me.

  3. make test fails: cd ./kernel-mod
    make test

So I am not sure how to run it. I am guessing, that fastpass.ko is suppose to load on the endpoint. The arbiter is run using the run.sh script in ./src/arbiter?


[root@localhost kernel-mod]# make clean rm -f fastpass.o sch_fastpass.o sch_timeslot.o fastpass_proto.o ../protocol/fpproto.o fastpass.ko compat-3_2.o [root@localhost kernel-mod]# make make -C /root/linux-stable M=$PWD KCPPFLAGS="-DFASTPASS_ENDPOINT -DCONFIG_IP_FASTPASS_DEBUG" make[1]: Entering directory /root/linux-stable' LD /root/fastpass/src/kernel-mod/built-in.o CC [M] /root/fastpass/src/kernel-mod/sch_timeslot.o CC [M] /root/fastpass/src/kernel-mod/sch_fastpass.o CC [M] /root/fastpass/src/kernel-mod/fastpass_proto.o CC [M] /root/fastpass/src/kernel-mod/../protocol/fpproto.o CC [M] /root/fastpass/src/kernel-mod/compat-3_2.o LD [M] /root/fastpass/src/kernel-mod/fastpass.o Building modules, stage 2. MODPOST 1 modules WARNING: modpost: Found 1 section mismatch(es). To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMATCH=y' CC /root/fastpass/src/kernel-mod/fastpass.mod.o LD [M] /root/fastpass/src/kernel-mod/fastpass.ko make[1]: Leaving directory/root/linux-stable'

david-olshefski avatar Aug 05 '14 20:08 david-olshefski

The driver should work despite the warning. Amy fixed the warning but we haven't pushed the update yet.

To load the driver:

  • (might be obvious) Run within a proper kernel, e.g., the one compiled from the website instructions.
  • There is a script to load the module: src/kernel-mod/vm-tools/fp_tc.sh The module takes some parameters through insmod, and some through tc.
  • Unload is also a two-step process, remove the qdisc using tc, then rmmod. See del_tc.sh in vm-tools/

J

On Tue, Aug 5, 2014 at 4:35 PM, david-olshefski [email protected] wrote:

Jonathan,

  1. The arbiter builds clean.

  2. Kernel modules build produces a 1 warning, below. fastpass.ko does get built, but does not load for me.

  3. make test fails: cd ./kernel-mod

make test

So I am not sure how to run it. I am guessing, that fastpass.ko is suppose to load on the

endpoint. The arbiter is run using the run.sh script in ./src/arbiter?

[root@localhost kernel-mod]# make clean rm -f fastpass.o sch_fastpass.o sch_timeslot.o fastpass_proto.o ../protocol/fpproto.o fastpass.ko compat-3_2.o [root@localhost kernel-mod]# make make -C /root/linux-stable M=$PWD KCPPFLAGS="-DFASTPASS_ENDPOINT -DCONFIG_IP_FASTPASS_DEBUG" make[1]: Entering directory /root/linux-stable' LD /root/fastpass/src/kernel-mod/built-in.o CC [M] /root/fastpass/src/kernel-mod/sch_timeslot.o CC [M] /root/fastpass/src/kernel-mod/sch_fastpass.o CC [M] /root/fastpass/src/kernel-mod/fastpass_proto.o CC [M] /root/fastpass/src/kernel-mod/../protocol/fpproto.o CC [M] /root/fastpass/src/kernel-mod/compat-3_2.o LD [M] /root/fastpass/src/kernel-mod/fastpass.o Building modules, stage 2. MODPOST 1 modules WARNING: modpost: Found 1 section mismatch(es). To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMATCH=y' CC /root/fastpass/src/kernel-mod/fastpass.mod.o LD [M] /root/fastpass/src/kernel-mod/fastpass.ko make[1]: Leaving directory/root/linux-stable'

— Reply to this email directly or view it on GitHub https://github.com/yonch/fastpass/issues/1#issuecomment-51255716.

Jonathan

yonch avatar Aug 06 '14 04:08 yonch

Hi,

I noticed another hardcoded path to your home dir in the fp_tc.sh script. Also, I guess we are supposed to modify the script and change the CONTROLLER_IP to be the IP address of the arbiter. So the DPDK is only needed on the arbiter machine, not on the endpoint machines.

The TC command in fp_tc.sh seemed to fail for me:

[root@localhost kernel-mod]# ./vm-tools/fp_tc.sh ./vm-tools/fp_tc.sh: line 11: ./del_tc.sh: No such file or directory -- lsmod after --

fastpass 63092 0

add-symbol-file /home/yonch/fastpass/src/kernel-mod/fastpass.ko 0xffffffffa032d000 -s .data 0xffffffffa0339000 -s .bss 0xffffffffa0339540 Unknown qdisc "fastpass", hence option "req_cost" is unparsable

/var/log/messages has: ... Aug 6 11:43:43 localhost kernel: [ 1274.559378] fastpass_module_init: initializing Aug 6 11:43:43 localhost kernel: [ 1274.559386] fastpass_module_init: controller address is 192.168.122.111, parsed as 0x6F7AA8C0 (netorder) Aug 6 11:43:43 localhost kernel: [ 1274.559494] tsq_register_qdisc: initializing Aug 6 11:43:43 localhost kernel: [ 1274.559498] tsq_register_qdisc: success Aug 6 11:43:43 localhost kernel: [ 1274.559500] fastpass_module_init: success

david-olshefski avatar Aug 06 '14 15:08 david-olshefski

Thanks Dave

fp_tc.sh runs del_tc.sh to clean up the fastpass module and qdisc before (re) loading them. To get proper cleanup, cd into the vm-tools directory when running fp_tc.sh, so it can find del_tc.sh

As per the qdisc, it seems the module is loading fine, but a suitable version of tc is not available. tc needs support for the fastpass qdisc, which we've added in the repository github.com/yonch/iproute2-fastpass (the instructions to compile tc are already on the website). After compiling iproute2, copy iproute2-fastpass/tc/tc to /sbin/tc, or if you prefer to keep your original tc, edit the 'TC' variable in fp_tc.sh and del_tc.sh.

On Wed, Aug 6, 2014 at 11:49 AM, david-olshefski [email protected] wrote:

Hi,

I noticed another hardcoded path to your home dir in the fp_tc.sh script. Also, I guess we are supposed to modify the script and change the CONTROLLER_IP to be the IP address of the arbiter. So the DPDK is only needed on the arbiter machine, not on the endpoint machines.

The TC command in fp_tc.sh seemed to fail for me:

[root@localhost kernel-mod]# ./vm-tools/fp_tc.sh ./vm-tools/fp_tc.sh: line 11: ./del_tc.sh: No such file or directory -- lsmod after -- fastpass 63092 0

add-symbol-file /home/yonch/fastpass/src/kernel-mod/fastpass.ko 0xffffffffa032d000 -s .data 0xffffffffa0339000 -s .bss 0xffffffffa0339540 Unknown qdisc "fastpass", hence option "req_cost" is unparsable

/var/log/messages has: ... Aug 6 11:43:43 localhost kernel: [ 1274.559378] fastpass_module_init: initializing Aug 6 11:43:43 localhost kernel: [ 1274.559386] fastpass_module_init: controller address is 192.168.122.111, parsed as 0x6F7AA8C0 (netorder) Aug 6 11:43:43 localhost kernel: [ 1274.559494] tsq_register_qdisc: initializing Aug 6 11:43:43 localhost kernel: [ 1274.559498] tsq_register_qdisc: success Aug 6 11:43:43 localhost kernel: [ 1274.559500] fastpass_module_init: success

— Reply to this email directly or view it on GitHub https://github.com/yonch/fastpass/issues/1#issuecomment-51354117.

Jonathan

yonch avatar Aug 06 '14 17:08 yonch

Ok, but If I cd to the vm-tools directory then the script can't find fastpass.ko, so the insmod line needs to be changed to insmod ../fastpath.ko etc

The add-symbol-file path needs to be changed.

david-olshefski avatar Aug 06 '14 19:08 david-olshefski

Ok! after making all the bits & changes, the kernel module is loaded on the endpoint.

For the arbiter...it needs to have two NICS? One for DPDK, the other for linux TCP? This is another part I am not sure of. The arbiter uses DPDK, but the endpoint is configured with the IP address of the controller.

david-olshefski avatar Aug 06 '14 19:08 david-olshefski

On the endpoint machine, I am pinging my gateway in one window.

In another window, I run fp_tc.sh

The ping stops printing...but then prints "sendmsg: no buffer space available".

Is this a problem or expected?

david-olshefski avatar Aug 06 '14 20:08 david-olshefski