{"id":13413625,"url":"https://github.com/aregm/nff-go","last_synced_at":"2026-01-31T11:03:14.127Z","repository":{"id":37484092,"uuid":"86608646","full_name":"aregm/nff-go","owner":"aregm","description":"NFF-Go -Network Function Framework for GO (former YANFF)","archived":false,"fork":false,"pushed_at":"2022-11-22T20:34:23.000Z","size":12820,"stargazers_count":1416,"open_issues_count":65,"forks_count":163,"subscribers_count":77,"default_branch":"master","last_synced_at":"2026-01-08T13:43:58.765Z","etag":null,"topics":["cloud","cloud-native","containers","dpdk","dpdk-driver","go","golang","intel","ipsec","linux","microservices","network-functions","networking","nfv-framework","packet-processing","scalable","scalable-networking","vnf"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aregm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-29T17:07:29.000Z","updated_at":"2026-01-02T03:04:07.000Z","dependencies_parsed_at":"2023-01-21T12:01:35.805Z","dependency_job_id":null,"html_url":"https://github.com/aregm/nff-go","commit_stats":null,"previous_names":["intel-go/yanff","intel-go/nff-go"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/aregm/nff-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aregm%2Fnff-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aregm%2Fnff-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aregm%2Fnff-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aregm%2Fnff-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aregm","download_url":"https://codeload.github.com/aregm/nff-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aregm%2Fnff-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28939508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T10:18:23.202Z","status":"ssl_error","status_checked_at":"2026-01-31T10:18:22.693Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["cloud","cloud-native","containers","dpdk","dpdk-driver","go","golang","intel","ipsec","linux","microservices","network-functions","networking","nfv-framework","packet-processing","scalable","scalable-networking","vnf"],"created_at":"2024-07-30T20:01:44.827Z","updated_at":"2026-01-31T11:03:14.113Z","avatar_url":"https://github.com/aregm.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/intel-go/nff-go)](https://goreportcard.com/report/github.com/intel-go/nff-go) \n[![GoDoc](https://godoc.org/github.com/intel-go/nff-go?status.svg)](https://godoc.org/github.com/intel-go/nff-go)\n[![Dev chat at https://gitter.im/intel-yanff/Lobby](https://img.shields.io/badge/gitter-developer_chat-46bc99.svg)](https://gitter.im/intel-yanff/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Build Status](https://travis-ci.org/intel-go/nff-go.svg?branch=develop)](https://travis-ci.org/intel-go/nff-go)\n# Network Function Framework for Go (former YANFF)\n\n__Wonderful news__ : we are now supporting AF_XDP and supporting(almost) getting packets directly from Linux. So you do not need to write 3(three) different applications to process packets coming from different type of drivers of PMDs. You just write everything in NFF-Go, and it can dynamically use whatever you would like underneath. Contact [us](mailto:edwin.verplanke@intel.com) if you need help.\n\n## What it is\nNFF-Go is a set of libraries for creating and deploying cloud-native Network\nFunctions (NFs). It simplifies the creation of network functions without\nsacrificing performance. \n* Higher level abstractions than DPDK. Using DPDK as a fast I/O engine for performance\n* Go language: safety, productivity, performance, concurrency\n* Network functions are application programs not virtual machines\n* Built-in scheduler to auto-scale processing based on input traffic. Both up and down.\n\n### Benefits:\n* Easily leverage Intel hardware capabilities: multi-cores, AES-NI, CAT, QAT, DPDK\n* 10x reduction in lines of code\n* No need to be an expert network programmer to develop performant network function\n* Similar performance with C/DPDK per box \n* No need to worry on elasticity - done automatically\n* Take advantage of cloud native deployment: continuous delivery, micro-services, containers\n\n### Feel the difference\nSimple ACL based firewall\n```Go\n\nfunc main() {\n\t// Initialize NFF-GO library to use 8 cores max.\n\tconfig := flow.Config{\n\t\tCPUCoresNumber: 8,\n\t}\n\tflow.CheckFatal(flow.SystemInit(\u0026config))\n\n\t// Get filtering rules from access control file.\n\tL3Rules, err := packet.GetL3ACLFromTextTable(\"Firewall.conf\")\n\tflow.CheckFatal(err)\n\n\t// Receive packets from zero port. Receive queue will be added automatically.\n\tinputFlow, err := flow.SetReceiver(uint8(0))\n\tflow.CheckFatal(err)\n\n\t// Separate packet flow based on ACL.\n\trejectFlow, err := flow.SetSeparator(inputFlow, L3Separator, nil)\n\tflow.CheckFatal(err)\n\n\t// Drop rejected packets.\n\tflow.CheckFatal(flow.SetStopper(rejectFlow))\n\n\t// Send accepted packets to first port. Send queue will be added automatically.\n\tflow.CheckFatal(flow.SetSender(inputFlow, uint8(1)))\n\n\t// Begin to process packets.\n\tflow.CheckFatal(flow.SystemStart())\n}\n\n// User defined function for separating packets\nfunc L3Separator(currentPacket *packet.Packet, context flow.UserContext) bool {\n\tcurrentPacket.ParseL4()\n\t// Return whether packet is accepted or not. Based on ACL rules.\n\treturn currentPacket.L3ACLPermit(L3Rules)\n}\n```\nNFF-GO is an Open Source BSD licensed project that runs mostly in Linux user\nland. The most recent patches and enhancements provided by the community are\navailable in the *_develop_* branch. master branch provides the latest stable released version under the appropriate tag. \n\n## Getting NFF-GO\n\nStarting with release 0.7.0 NFF-Go uses go.mod for getting dependencies,\ntherefore Go version 1.11 or later is required. To checkout NFF-Go\nsources use the following command\n\n        git clone --recurse-submodules http://github.com/intel-go/nff-go\n\n## Setting up the build and run environment\n\n### DPDK\n    \nNFF-GO uses DPDK, so you must setup your system to build and run DPDK. See [System\nRequirements in the DPDK Getting Started Guide for\nLinux](http://dpdk.org/doc/guides/linux_gsg/sys_reqs.html) for more\ninformation.\n\nBy default NFF-Go is build with Mellanox cards support out of the box you\nneed to install additional dependencies required for MLX network\ndrivers. On Ubuntu they are called `libmnl-dev` and\n`libibverbs-dev`. For more details see MLX drivers respective pages\nfor [MLX4](https://doc.dpdk.org/guides/nics/mlx4.html) and\n[MLX5](https://doc.dpdk.org/guides/nics/mlx5.html). If these\ndependencies cannot be satisfied, and Mellanox drivers are not needed,\nyou can set variable `NFF_GO_NO_MLX_DRIVERS` to some unempty value to\ndisable MLX drivers compilation.\n\nAdditional dependencies are required for pktgen, especially if you are\nrunning RedHat or CentOS Linux distributions. See [this\nfile](https://git.dpdk.org/apps/pktgen-dpdk/tree/INSTALL.md?h=pktgen-3.5.9\u0026id=d469543f651506a8c9fb7c667a060950c5d92649)\nfor details. LUA section for RedHat and CentOS is in its end.\n\nAfter building a DPDK driver with the make command, you must register network\ncards to work with the DPDK driver, load necessary kernel modules, and bind\ncards to the modules. See [Compiling the DPDK Target from\nSource](http://dpdk.org/doc/guides/linux_gsg/build_dpdk.html) and [How to get\nbest performance with NICs on Intel\nplatforms](http://dpdk.org/doc/guides/linux_gsg/nic_perf_intel_platform.html)\nin the DPDK Getting Started Guide for Linux for more information.\n\nThe kernel module, which is required for DPDK user-mode drivers, is built but\nnot installed into kernel directory. You can load it using the full path to the\nmodule file:\nnff-go/test/dpdk/dpdk/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko\n\n### Go\n\nUse Go version 1.11.4 or higher. To check the version of Go, do:\n\n        go version\n        \n### AF_XDP support\n\nAF_XDP support is enabled by default, and it requires you to install\n`libbpf` package. At the time of writing Ubuntu doesn't have this\nlibrary among its packages, so it is necessary to build `libbpf` from\nsources or disable AF_XDP socket support.\n\nTo disable it set variable `NFF_GO_NO_BPF_SUPPORT` to some unempty\nvalue. When NFF_GO is built with it, AF_XDP support is disaled and\nusing it results in errors.\n\nIf you want to build `libbpf` from sources you can do it in two\ndifferent ways.\n* If you are using stock Linux kernel from distribution, [download\n  `libbpf` from GitHub](https://github.com/libbpf/libbpf), then\n  execute `cd src; make; sudo make install`. Add /usr/lib64 to your\n  ldconfig path.\n* If you build Linux kernel from sources, you can build `libbpf` from\n  Linux source tree using commands `cd tools/lib/bpf; make; sudo make\n  install install_headers`. Add /usr/local/lib64 to your ldconfig path.\n\n## Building NFF-GO\n\nWhen Go compiler runs for the first time it downloads all dependent\npackages listed in `go.mod` file. This operation cannot be done in\nparallel because otherwise Go package cache gets corrupted. Because of\nthat it is necessary to run command `go mod download` before first\n`make` is done. Another option is to use single process `make -j1`\nwhen it is run for the first time, but may be quite slow.\n\n        cd nff-go\n        go mod download        # do it once before first build\n        make -j8\n\n## Building NFF-GO in debug mode\n\n\t\tmake debug -j8\n\n# Running NFF-GO\n\n## Documentation \n\nOnline API documentation is available on [godoc.org\nsite](https://godoc.org/github.com/intel-go/nff-go). API usage is\nexplained on our [Wiki pages](https://github.com/intel-go/nff-go/wiki).\n\n## Tests\n\nInvoking make in the top-level directory builds the testing framework and\nexamples. NFF-GO distributed tests are packaged inside of Docker container\nimages. There are also single node unit tests in some packages that you can\nrun using the command:\n\n         make testing\n\n### Docker images\n\nTo create Docker images on the local default target (either the default UNIX\nsocket in /var/run/docker.sock or whatever is defined in the DOCKER_HOST\nvariable), use the **make images** command.\n\nTo deploy Docker images for use in distributed testing, use the **make deploy**\ncommand. This command requires two environment variables:\n\n* NFF_GO_HOSTS=\"hostname1 hostname2 ... hostnameN\"* - a list of all hostnames for deployed test Docker images\n* DOCKER_PORT=2375* - the port number to connect to Docker daemons running on hosts in the NFF_GO_HOSTS variable\n\nTo delete generated images in the default Docker target, use the **make\nclean-images** command.\n\n### Running tests\n\nAfter the Docker images are deployed on all test hosts, you can run distributed\nnetwork tests. The test framework is located in the test/main directory and\naccepts a JSON file with a test specification. There are predefined configs for\nperformance and stability tests in the same directory. To run these tests,\nchange **hostname1** and **hostname2** to the hosts from the NFF_GO_HOSTS list\nin these JSON files.\n\n## Cleaning-up\n\nTo clean all generated binaries, use the **make clean** command.  To delete all\ndeployed images listed in NFF_GO_HOSTS, use the **make cleanall** command.\n\n## Contributing\n\nIf you want to contribute to NFF-Go, check our [Contributing\nguide](https://github.com/intel-go/nff-go/blob/master/CONTRIBUTING.md). We also\nrecommend checking the bugs with 'help-wanted' or 'easyfix' in our list of open issues; these bugs\ncan be solved without an extensive knowledge of NFF-Go. We would love to help\nyou start contributing.\n\nYou can reach the NFF-Go development team via our [mailing list](mailto:edwin.verplanke@intel.com).\n\n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faregm%2Fnff-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faregm%2Fnff-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faregm%2Fnff-go/lists"}