P7-SmartNIC is a project focused on leveraging SmartNIC technology to enhance network performance and offload processing tasks. This repository contains the source code, documentation, and resources for the project.
- High-performance network processing
- Offloading computational tasks to SmartNICs
- Scalable and modular design
You need the DOCA environment running on a BlueField-2 SmartNIC. Ensure that the DOCA SDK is properly installed and configured on your SmartNIC. Refer to the official NVIDIA documentation for setup instructions.
You need to install the dependencies listed in the requirements.txt
file. Run the following command:
pip install -r requirements.txt
-
Clone the repository:
git clone https://github.com/lopesvictor1/p7-smartnic.git
-
Navigate to the project directory:
cd p7-smartnic
-
Restart Environment To restart the environment, run the following script provided in the repository:
./scripts/restart_environment.sh
Ensure that you have the necessary permissions to execute the script. If not, you may need to grant execute permissions:
chmod +x ./scripts/restart_environment.sh
To run the code, use the following command:
python3 run_topo.py
You can change this file to represent the desired topology based on the following rules:
topo.add_switch("switch_name")
topo.add_link("switch1", "switch2", bandwidth=w, latency=x, jitter=y, packet_loss=z)
- bandwidth: Maximum link bandwidth in Mbps (Integer)
- latency: Base latency in milliseconds (Integer)
- jitter: Maximum variation in latency in milliseconds (Integer)
- packet_loss: Packet loss percentage (0–100) (Float)
topo.add_link("switch_name", "physical_port", link_type="physical")
topo.show_topology()
This will show the topology in the CLI.
topo.visualize_topology()
This will show the topology as a new matplotlib.pyplot window.
topo.start()
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Description of changes"
- Push to your branch:
git push origin feature-name
- Open a pull request.
For questions or support, please contact [email protected].