{"id":48470191,"url":"https://github.com/snowzjx/liteflow","last_synced_at":"2026-04-07T06:03:03.056Z","repository":{"id":40397154,"uuid":"239427112","full_name":"snowzjx/liteflow","owner":"snowzjx","description":"A Hybrid Framework to Build High-performance Adaptive Neural Networks for Kernel Datapath","archived":false,"fork":false,"pushed_at":"2023-05-15T09:11:17.000Z","size":487,"stargazers_count":25,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-05T01:15:13.936Z","etag":null,"topics":["datapath","kernel","kernel-module","networking","neural-networks"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snowzjx.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":"2020-02-10T04:28:44.000Z","updated_at":"2024-10-04T02:54:24.000Z","dependencies_parsed_at":"2024-12-05T01:15:15.316Z","dependency_job_id":"6efbe46a-29a1-42d7-bee5-7d5d1d130546","html_url":"https://github.com/snowzjx/liteflow","commit_stats":null,"previous_names":["liteflow/liteflow"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/snowzjx/liteflow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowzjx%2Fliteflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowzjx%2Fliteflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowzjx%2Fliteflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowzjx%2Fliteflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snowzjx","download_url":"https://codeload.github.com/snowzjx/liteflow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowzjx%2Fliteflow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31501903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["datapath","kernel","kernel-module","networking","neural-networks"],"created_at":"2026-04-07T06:03:01.745Z","updated_at":"2026-04-07T06:03:03.045Z","avatar_url":"https://github.com/snowzjx.png","language":"C","readme":"\u003cdiv align=\"center\"\u003e\n\u003cpicture\u003e\n  \u003cimg alt=\"LiteFlow Logo\" src=\"https://raw.githubusercontent.com/snowzjx/liteflow/master/doc/liteflow-logo.png\" alt=\"logo\" width=\"200\"\u003e\n\u003c/picture\u003e\n\u003ch1\u003eA Hybrid Framework to Build High-performance Adaptive Neural Networks for Kernel Datapath\u003c/h1\u003e\n\u003c/div\u003e\n\n[![Build Status](https://travis-ci.org/snowzjx/liteflow.svg?branch=master)](https://travis-ci.org/liteflow/liteflow)\n\nPlease refer to our [SIGCOMM '22 paper](https://dl.acm.org/doi/10.1145/3544216.3544229) for details.\n\n**ATTENTION:** This project is for research purposes and please do not use it in a production environment. **Some of the code is not opensourced due to compatibility issues now and we are working on it to release them soon.** However, you can still experience some of the key components mentioned in our paper.\n\n**Tested Kernel Version:** 4.15.0-173-generic\n\n## Getting Started\n\n### Installation\n\n1. Clone the repo\n\n    ```sh\n    git clone https://github.com/snowzjx/liteflow.git\n    ```\n\n1. Change the directory to LiteFlow\n\n    ```sh\n    cd liteflow\n    ```\n\n1. Install required packages\n\n    ```sh\n    apt install -y build-essential libnl-3-dev libnl-genl-3-dev pkg-config linux-headers-generic python3 python3-pip \n    ```\n\n    ```sh\n    pip3 install -U pip\n    pip3 install -r bin/requirements.txt\n    ```\n\n1. Compile\n\n    ```sh\n    make all\n    ```\n\n1. Install LiteFlow kernel module\n\n    ```sh\n    make module_install\n    ```\n\n    You can check if the LiteFlow kernel module is successfully installed by executing ```lsmod``` to see if *lf_kernel* is there.\n\n1. Install TCP Congestion Control module\n\n    ```sh\n    make tcp_kernel_install\n    ```\n\n    You can check if the LiteFlow TCP Congestion Control is successfully installed by executing ```lsmod``` to see if *lf_tcp_kernel* is there.\n\n    You can also check if the TCP Congestion Control is successfully activated by executing ```sysctl net.ipv4.tcp_congestion_control``` to see whether is value is *lf_tcp_kernel*\n\n### Examples\n\n#### Snapshot Generation\n\n```sh\ncd script\n./snapshot_generation.sh\n```\n\nThis command tries to generate 3 Aurora snapshots from the model in ```liteflow/data/```. You can verify if the command is successful by checking if *lf_model_1.ko*, *lf_model_2.ko*, and *lf_model_3.ko* are generated. You can also check the generated source code by looking into *lf_model_1.c*, *lf_model_2.c*, and *lf_model_3.ko* files. Note here, we generate 3 identical snapshots just for demo purposes.\n\n#### Snapshot Update\n\n```sh\ncd script\n./active_standby_switch.sh\n```\n\nYou expect a *dmesg* output showing that LiteFlow uses different neural networks to serve different flows.\n\n```sh\n[ 2480.330440] Current slot 0 is registered with model: -1\n[ 2480.330440] Current slot 1 is registered with model: 1\n[ 2480.330440] Current active slot is: 1\n...\n[ 2482.826293] Using model with uuid: 1 for inference...\n...\n[ 2483.578519] Current slot 0 is registered with model: 2\n[ 2483.578519] Current slot 1 is registered with model: 1\n[ 2483.578519] Current active slot is: 0\n...\n[ 2483.823231] Using model with uuid: 2 for inference...\n...\n[ 2484.844727] Current slot 0 is registered with model: 2\n[ 2484.844727] Current slot 1 is registered with model: 3\n[ 2484.844727] Current active slot is: 1\n...\n[ 2485.099799] Using model with uuid: 3 for inference...\n...\n```\n\n#### Batched Training Data Delivery\n\n```sh\ncd script\n./fetch_data_from_kernel.sh\n```\n\nThe screen should print all training data. *Note: different kernel settings may cause different outputs, please change the code accordingly.*\n\n#### LiteFlow Userspace Demo\n\n```sh\ncd bin\npython3 lf.py\n```\n\nYou expect to see a demo output of how LiteFlow generates a snapshot, evaluates a new neural network with the existing snapshot and updates the snapshot. *Note: for compatibility issues, there are lots of places left blank in the userspace program of LiteFlow, users can fill in the blanks with their own needs...*\n\n## Citation\n\n```bibtex\n@inproceedings{liteflow, \n    author      = {Junxue Zhang and Chaoliang Zeng and Hong Zhang and Shuihai Hu and Kai Chen}, \n    title       = {LiteFlow: Towards High-Performance Adaptive Neural Networks for Kernel Datapath}, \n    year        = {2022}, \n    booktitle   = {Proceedings of the ACM SIGCOMM 2022 Conference}, \n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowzjx%2Fliteflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnowzjx%2Fliteflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowzjx%2Fliteflow/lists"}