{"id":28804667,"url":"https://github.com/ntop/bluefield-kryptonite","last_synced_at":"2025-09-03T22:37:26.902Z","repository":{"id":273893850,"uuid":"921219571","full_name":"ntop/bluefield-kryptonite","owner":"ntop","description":"Benchmark application for BlueField-3/ConnectX-7 DOCA Flow CT","archived":false,"fork":false,"pushed_at":"2025-01-31T14:18:42.000Z","size":121,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-31T15:24:53.289Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ntop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-23T15:07:41.000Z","updated_at":"2025-01-31T14:18:45.000Z","dependencies_parsed_at":"2025-01-23T16:28:45.973Z","dependency_job_id":"37e8111c-8a20-4e81-a1e1-62dafc3ae331","html_url":"https://github.com/ntop/bluefield-kryptonite","commit_stats":null,"previous_names":["ntop/bluefield-kryptonite"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ntop/bluefield-kryptonite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntop%2Fbluefield-kryptonite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntop%2Fbluefield-kryptonite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntop%2Fbluefield-kryptonite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntop%2Fbluefield-kryptonite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ntop","download_url":"https://codeload.github.com/ntop/bluefield-kryptonite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntop%2Fbluefield-kryptonite/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260523607,"owners_count":23021969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-18T09:07:15.036Z","updated_at":"2025-09-03T22:37:26.892Z","avatar_url":"https://github.com/ntop.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kryptonite\nThis repository provides a test/benchmarking tool for **BlueField SuperNICs**.\nThis tool is implementing (PoC level) a NetFlow-like application that offloads flow \nprocessing to the **DPU** by leveraging on **DOCA Flow CT** and can run on an\ninterface pair, both in passive mode or with packet forwarding.\nIt can run both on the DPU (ARM cores) or on the host.\n\nCompatible with:\n\n- BlueField-3\n- ConnectX 6/7\n \n## 🚀 Features\n\n- Implements a **NetFlow-like application** for flow processing.\n- Offloads flow handling tasks to the **DPU**, reducing CPU overhead.\n- Includes functionality for:\n  - Flow creation\n  - Flow aging\n  - Flow statistics collection\n- Provides benchmarks for flow insertion, flow table capacity, aging performance\n- Supports integration with NVIDIA **DOCA Flow CT** APIs.\n\n## 🛠 Installation\n\n1. **Clone the repository**\n\n   ```bash\n   git clone https://github.com/ntop/bluefield-kryptonite.git\n   cd bluefield-kryptonite\n\n3. **Compile**\n\n   ```\n   make\n\n4. **Run**\n\n   \u003e Please refer to the DOCA Flow CT documentation to configure the adapter\n   \u003e before running the tool. For the impatient, check the *Adapter Configuration*\n   \u003e section below.\n\n   ```\n   sudo ./kryptonite -- -p c7:00.0 -s\n\n## Options\n\n| Argument                    | Description                                                          |\n|-----------------------------|----------------------------------------------------------------------|\n| `-p` `--pci-addr` *addr*    | DOCA Flow CT device PCI address                                      |\n| `-d` `--idle-timeout` *sec* | Maximum (seconds) flow idle lifetime (default: 60)                   |\n| `-w` `--enable-fwd`         | Enable packet forwarding                                             |\n| `-s` `--enable-sw-ct`       | Enable software (shadow) flow table                                  |\n| `-e` `--enable-flow-export` | Print flow updates periodically (requires -s) and at flow expiration |\n| `-t` `--verbose` *level*    | Trace verbosity level (0..3) (default: 1)                            |\n\n## Adapter Configuration\n\nConfiguration instructions are available here for the impatients. The tool can run on the ARM cores\non the BlueField DPU, on the host configuring the BlueField in NIC mode, or on the host using a\nConnectX adapter. Please refer to the official documentation for further instructions.\n\nMake sure hugepages are configured on the system\n\n   ```bash\n   echo '8192' | sudo tee -a /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages\n   mkdir /mnt/huge\n   mount -t hugetlbfs -o pagesize=2M nodev /mnt/huge\n   ```\n\n### BlueField (DPU) Configuration\n\n(Run on the DPU/ARM)\n\n1. Modify */etc/default/grub*\n\n   ```text\n   GRUB_CMDLINE_LINUX=\"iommu.passthrough=1\"\n\n2. Update grub\n\n   ```bash\n   update-grub\n   reboot\n\n3. Run mst and list the devices\n\n   ```bash\n   mst start\n   mst status -v\n\n4. Set LAG_RESOURCE_ALLOCATION\n\n   ```bash\n   mlxconfig -d /dev/mst/mt41692_pciconf0.1 s LAG_RESOURCE_ALLOCATION=1\n   mlxconfig -d /dev/mst/mt41692_pciconf0 s LAG_RESOURCE_ALLOCATION=1\n\n5. Modify /etc/mellanox/mlnx-bf.conf\n\n   ```text\n   ALLOW_SHARED_RQ=\"no\"\n\n6. Configure eswitch mode\n\n   ```bash\n   devlink dev param set pci/0000:03:00.0 name esw_multiport value true cmode runtime\n   devlink dev param set pci/0000:03:00.1 name esw_multiport value true cmode runtime\n\n### BlueField (Host/NIC) Configuration\n\n(Run on the host)\n\n1. Run mst and list the devices\n\n   ```bash\n   mst start\n   mst status -v\n\n2. Enable NIC Mode (INTERNAL_CPU_OFFLOAD_ENGINE=1 disables the DPU):\n\n   ```bash\n   mlxconfig -d /dev/mst/mt41692_pciconf0 s \\\n   INTERNAL_CPU_PAGE_SUPPLIER=1 \\\n   INTERNAL_CPU_ESWITCH_MANAGER=1 \\\n   INTERNAL_CPU_IB_VPORT0=1 \\\n   INTERNAL_CPU_OFFLOAD_ENGINE=1 \\\n\n3. Power cycle the system\n\n   ```bash\n   shutdown now\n\n4. Check DOCA Flow CT capabilities\n\n   ```bash\n   /opt/mellanox/doca/tools/doca_caps -p c7:00.0 | grep flow\n      flow\n          flow_ct                                       supported\n\n5. Configure LAG_RESOURCE_ALLOCATION\n\n   ```bash\n   mlxconfig -d /dev/mst/mt41692_pciconf0 s LAG_RESOURCE_ALLOCATION=1\n\n6. Configure eswitch mode\n\n   ```bash\n   devlink dev eswitch set pci/0000:c7:00.0 mode switchdev\n   devlink dev param set pci/0000:c7:00.0 name esw_multiport value true cmode runtime\n\n\n### ConnectX (Host/NIC) Configuration\n\n(Run on the host)\n\n1. Run mst and list the devices\n\n   ```bash\n   mst start\n   mst status -v\n\n2. Check DOCA Flow CT capabilities\n\n   ```bash\n   /opt/mellanox/doca/tools/doca_caps -p c7:00.0 | grep flow\n      flow\n          flow_ct                                       supported\n\n3. Configure LAG_RESOURCE_ALLOCATION\n\n   ```bash\n   mlxconfig -d /dev/mst/mt41692_pciconf0 s LAG_RESOURCE_ALLOCATION=1\n\n4. Configure eswitch mode\n\n   ```bash\n   devlink dev eswitch set pci/0000:c7:00.0 mode switchdev\n   devlink dev param set pci/0000:c7:00.0 name esw_multiport value true cmode runtime\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntop%2Fbluefield-kryptonite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntop%2Fbluefield-kryptonite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntop%2Fbluefield-kryptonite/lists"}