GithubHelp home page GithubHelp logo

nvbrent / nv_opof Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bodongwang/firewall_offload

0.0 0.0 0.0 2.11 MB

Nvidia DPU Open Offload Daemon

Shell 3.70% Python 5.26% C 83.78% Meson 7.25%

nv_opof's Introduction

Introduction

Application to communicate with firewall via grpc, and do HW offload on Nvidia BlueField DPU

Prerequisite

  1. Create 2 VFs for each PF on x86 side
  2. An option configure file can be added to /opt/mellanox/nv_opof/nv_opof.conf with json format. For example:
{
  "grpc_addr": "169.254.33.51",
  "grpc_port": 3443
}

Building

Dependency: libev (e.g, yum install -y libev libev-devel)

To build and install this daemon with all deps, run:

$ meson build
$ ninja -C build

Setup hugepages

$ mkdir -p /dev/hugepages
$ mountpoint -q /dev/hugepages || mount -t hugetlbfs nodev /dev/hugepages
$ echo 2048 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages

Usage

The controller has a systemd service running and a user interface tool to communicate with the service.

  • Service: opof.service
  • User Interface: opof
  • Log: journalctl -u opof -f

Setup

User can run opof_setup to setup opof.

  1. As default, the script does configures below:
  • Configure OVS fallback bridges. So that, when daemon is failed or killed, all traffic will be forward to Host VM for processing.
  • Configure gRPC interface(default enp3s0f0s0) IP address.
  • Reserve hugepages, default 2048 * 2M.
  1. User can specify the number of HugePages
$ opof_setup -p 2048
  1. User can specify the interface used by grpc
$ opof_setup -g enp3s0f0s0

SystemD Service

If daemon is running on a DPU, most likely the service already started automatically. Run command below to check the status.

$ systemctl status opof.service

If daemon is not running, start controller by running command below. Make sure to check the status after command start.

$ systemctl start opof.service

To restart the daemon, run

$ systemctl restart opof.service

User Interface

Each command has its own help manual, e.g, opof query -h

  1. Query a session
$ opof query -i <session_id>
  1. Query daemon offload stats
$ opof stats

nv_opof's People

Contributors

bodongwang avatar nvbrent avatar kylestein-nvidia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.