From 3409364da8fa46eae8ca22a579e219dc74958079 Mon Sep 17 00:00:00 2001 From: "Sridhar K. N. Rao" Date: Fri, 16 Dec 2022 17:24:48 +0530 Subject: ebpf: This patch adds ebpf-baremetal test support Remove object files and binaries Suggestions in systems/Readme. Add license headers. Signed-off-by: Sridhar K. N. Rao Change-Id: I5fd481e3ed3eb51e6b8091cbf6d1ec8e3b00cbf0 --- src/bpfswitch/README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/bpfswitch/README.md (limited to 'src/bpfswitch/README.md') diff --git a/src/bpfswitch/README.md b/src/bpfswitch/README.md new file mode 100644 index 00000000..15c3d4fd --- /dev/null +++ b/src/bpfswitch/README.md @@ -0,0 +1,34 @@ + + +# bpfswitch + +This repository is self contained. Please install linux-headers for kernel +version. + +## XDP L2 forwarding +xdp\_l2fwd handles Layer 2 forwarding between an ingress device (e.g., host +devices) and egress device (e.g., tap device for VMs or other host device). +Userspace populates an FDB (hash map) with \ pairs returning an +index into a device map which contains the device to receive the packet. +See scripts/l2fwd.sh for an example. + +This program is used for the netdev 0x14 tutorial, XDP and the cloud: Using +XDP on hosts and VMs https://netdevconf.info/0x14/session.html?tutorial-XDP-and-the-cloud + +## Using l2Fwd + +1. Go to vineperf/src/bpfswitch/ folder. +2. First run configure script and then run make +3. Go to scripts/ folder and open l2fwd.sh file +4. Update values of TGENMAC, Interfaces and their indexes. +5. Use ifindex.py to know the indexes. +5. Ensure that path of bpftool is correc in the file. +6. Save changes and run the script. +7. If successfully run the setup is ready to test loopback + +## Dummy XDP program + +xdp\_dummy is a dummy XDP program that just returns XDP\_PASS. -- cgit 1.2.3-korg