Skip to content

intrig-unicamp/SmartNet

Repository files navigation

Project: P7-SmartNIC

Overview

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.

Features

  • High-performance network processing
  • Offloading computational tasks to SmartNICs
  • Scalable and modular design

Getting Started

Prerequisites

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

Installation

  1. Clone the repository:

    git clone https://github.com/lopesvictor1/p7-smartnic.git
  2. Navigate to the project directory:

    cd p7-smartnic
  3. 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

Usage

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:

Add Switches

topo.add_switch("switch_name")

Add Links

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)

External Connections

topo.add_link("switch_name", "physical_port", link_type="physical")

Show Topology

topo.show_topology()

This will show the topology in the CLI.

View Topology

topo.visualize_topology()

This will show the topology as a new matplotlib.pyplot window.

Run SmartNet

topo.start()

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b feature-name
  3. Commit your changes:
    git commit -m "Description of changes"
  4. Push to your branch:
    git push origin feature-name
  5. Open a pull request.

Contact

For questions or support, please contact [email protected].

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •