This is an open-source Eideticom-led project that explores how eBPF-based accelerators can be used to offload application code from host processors.
This repository contains the source code for an eBPF-based PCIe accelerator design that can be run on AWS F1 servers. As such, anyone can use this project to run said accelerators on the cloud and develop host code (such as drivers and userspace libraries) targetting said accelerators.
This project consists of four main parts.
This part of the project will develop and ideally upstream a hermes-based PCIe device model. Prior to upstream this code is hosted in this public fork of QEMU. Some early work on such a model results in this RFC.
This part of the project implements an eid-hermes bitstream which can run on an AWS F1 instance. This code will be contained in this repo and will consist mostly of RTL.
This part of the project implements a Linux driver for eid-hermes and should threfore work for both the QEMU model and the AWS F1 instance noted above. This code is hosted in this repo initially and ideally will be upstreamed into the Linux kernel.
The driver requires kernel version 4.14 or higher.
This part of the project implements a userspace library that provides an API whereby applications can offload part of their computation to eBPF-capable devices like eid-hermes. Note that long term this part may span other device types like, for example, NVMe devices and may come under the perview of a standards body like SNIA.
The specification for eid-hermes is located in Markdown files in the
specs
folder. The files in that folder are as follows:
-
eid-hermes-theory-of-operation.md - An overview of how the eid-hermes device interacts with the host and how a driver should communicate with it to get work done.
-
eid-hermes-interface.md - The PCIe register interface to the eid-hermes device and the overall BAR layout.
-
eid-hermes-commands-format.md - The list and format of commands that can be sent to an eid-hermes device or driver.
-
eid-hermes-dirver-interface.md - The interface provided by the Hermes kernel driver.
An Ansible playbook is provided to install some helper programs, such as pcimem15.
To run it, first install ansible then run:
cd ansible
ansible-playbook hermes.yml -K
We include unit tests on the tests directory. To run them:
sudo tests/unit_test
You may find the -v
(verbose) and -f
(failfast) options useful.
Where possible the code in this repository is licensed under the Apache License, Version 2.0. This is a permissive license allowing anyone to use this code, even for commercial purposes, if they so wish. Please refer to the full text of the license for more information.
Contributions in the form of pull-requests are most welcome. The upstream version of this repo is located at this link. Note that only PGP signed commits will be accepted so please setup PGP signing in order to commit to this project.