@@ -35,7 +35,7 @@ func main() {
35
35
flow.CheckFatal (flow.SystemInit (&config))
36
36
37
37
// Get filtering rules from access control file.
38
- L3Rules , err := packet.GetL3ACLFromORIG (" Firewall.conf" )
38
+ L3Rules , err := packet.GetL3ACLFromTextTable (" Firewall.conf" )
39
39
flow.CheckFatal (err)
40
40
41
41
// Receive packets from zero port. Receive queue will be added automatically.
@@ -118,6 +118,27 @@ Use Go version 1.11.4 or higher. To check the version of Go, do:
118
118
119
119
go version
120
120
121
+ ### AF_XDP support
122
+
123
+ AF_XDP support is enabled by default, and it requires you to install
124
+ ` libbpf ` package. At the time of writing Ubuntu doesn't have this
125
+ library among its packages, so it is necessary to build ` libbpf ` from
126
+ sources or disable AF_XDP socket support.
127
+
128
+ To disable it set variable ` NFF_GO_NO_BPF_SUPPORT ` to some unempty
129
+ value. When NFF_GO is built with it, AF_XDP support is disaled and
130
+ using it results in errors.
131
+
132
+ If you want to build ` libbpf ` from sources you can do it in two
133
+ different ways.
134
+ * If you are using stock Linux kernel from distribution, [ download
135
+ ` libbpf ` from GitHub] ( https://github.com/libbpf/libbpf ) , then
136
+ execute ` cd src; make; sudo make install ` . Add /usr/lib64 to your
137
+ ldconfig path.
138
+ * If you build Linux kernel from sources, you can build ` libbpf ` from
139
+ Linux source tree using commands `cd tools/lib/bpf; make; sudo make
140
+ install install_headers`. Add /usr/local/lib64 to your ldconfig path.
141
+
121
142
## Building NFF-GO
122
143
123
144
When Go compiler runs for the first time it downloads all dependent
0 commit comments