From d07f8b2ad0c752869de0b548c6118c04f0a2970b Mon Sep 17 00:00:00 2001 From: det-intel <97197364+det-intel@users.noreply.github.com> Date: Tue, 19 Apr 2022 19:46:23 -0700 Subject: [PATCH] Small update of README for eBPF networking build. Provide more explicit directions for building without Vagrant. --- build/networking_ebpf/README.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/build/networking_ebpf/README.md b/build/networking_ebpf/README.md index 19085c4..78261af 100644 --- a/build/networking_ebpf/README.md +++ b/build/networking_ebpf/README.md @@ -8,13 +8,28 @@ A high-level overview of the architecture is as follows: ## Running -### Bare Metal +### Running Natively If you want to run natively (on bare metal or in a VM), do the following: ``` -$ sudo ./vagrant/provision.sh -$ sudo ./scripts/host_install.sh +REPO= +$ cd $REPO/build +$ sudo ./ipdk install +$ export PATH=`pwd`:$PATH +$ sudo ./ipdk install ebpf-ubuntu2004 +$ sudo ./networking_ebpf/vagrant/provision.sh +$ sudo ./networking_ebpf/scripts/host_install.sh +``` + +This should put p4c and other executables into your path. You should then be +able to compile the example program simple_l3.p4 as follows. Assuming you want +the results placed in the directory RESULTS, + +``` +RESULTS= +cd $REPO/build/networking_ebpf/ipdk-ebpf/p4c/backend/ebpf +make -f ./runtime/kernel.mk BPFOBJ=$RESULTS/out.o P4FILE=$REPO/build/networking_ebpf/examples/simple_l3.p4 ARGS="-DPSA_PORT_RECIRCULATE=2" P4ARGS="--Wdisable=unused -I/usr/local/share/p4c/p4include/dpdk" psa ``` ### Vagrant