Skip to content

Tools and experiments for working with eBPF in cloudlab.

License

Notifications You must be signed in to change notification settings

rutu-sh/cloudlab-ebpf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloudlab eBPF

This repository contains the experimentation setup with eBPF on CloudLab. It uses the cloudlab-tools repository as the submodule to automate the setup for running eBPF programs on CloudLab.

To update the repository to use the latest version of the cloudlab-tools submodule, run the following command:

make update-cl-tools

CloudLab setup

  1. Run the following command to create the required CloudLab config. This will create a .cloudlab/cloudlab_config.mk file which will be used to setup the CloudLab environment. Add your CloudLab username, ssh-key path, and the node IPs in the file.:
make cl-setup
  1. Open terminal (call it terminal-1) and SSH into the CloudLab machine and run the following command (replace NODE_1 with the node name).
make cl-ssh-host NODE=NODE_1
  1. Clone the repository in the CloudLab machine by running the following command in terminal-1.
git clone --recursive https://github.com/rutu-sh/cloudlab-ebpf.git

or

If you want to upload the code from local to CloudLab machine, open another terminal (call it terminal-2) and run the following command. This is a good option if you want to try out your code without the need to commit and push it to the repository.

make cl-sync-code NODE=NODE_1

To sync the code to a particular path on the cloudlab node, run the following command:

make cl-sync-code NODE=NODE_1 REMOTE_DIR=PATH_ON_NODE

By default, the remote dir is ~/src.

  1. CD into the the cloudlab-ebpf directory in cloudlab (in terminal-1) and run the following command to setup the environment:
make
  1. Create a folder for your experiment in the experiments directory and add the eBPF C code and the gen.go file. The gen.go file is used to generate the BPF bytecode from the C code. But it requires clang, llvm, and other dependencies. If you're using a Mac, run the following command. This will perform the code generation part and copy the generated go and the object files to your experiment folder. Then you can start working on the rest of the go code.
make go-generate-exp NODE=NODE_0 EXPERIMENT=<experiment-name>

Example:

make go-generate-exp NODE=NODE_0 EXPERIMENT=simple-tracepoint-hook

About

Tools and experiments for working with eBPF in cloudlab.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages