diff options
author | 2022-12-16 17:24:48 +0530 | |
---|---|---|
committer | 2022-12-19 21:14:08 +0530 | |
commit | 3409364da8fa46eae8ca22a579e219dc74958079 (patch) | |
tree | 83cb1cc72c3c59465d7d3be0f793a896c0ad7a21 /src/bpfswitch/README.md | |
parent | 34147ac299351c44d4f7d135892457fba38a132b (diff) |
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 <srao@linuxfoundation.org>
Change-Id: I5fd481e3ed3eb51e6b8091cbf6d1ec8e3b00cbf0
Diffstat (limited to 'src/bpfswitch/README.md')
-rw-r--r-- | src/bpfswitch/README.md | 34 |
1 files changed, 34 insertions, 0 deletions
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 @@ +<!--- +This work is licensed under a Creative Commons Attribution 4.0 International License. +http://creativecommons.org/licenses/by/4.0 +--> + +# 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 \<smac,dmac> 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 TGEN<EAST/WEST>MAC, <EAST/WEST> 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. |