]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
af-packet: rename option 'no-percpu-hash'
authorEric Leblond <eric@regit.org>
Sun, 17 Mar 2019 19:50:29 +0000 (20:50 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 18 Jun 2019 05:07:02 +0000 (07:07 +0200)
doc/userguide/capture-hardware/ebpf-xdp.rst
src/runmode-af-packet.c

index 799a52f8c5953985cf2acac07337ebb22f6e2e2b..837df357d6e061780a43d07a78aec5111670bbd0 100644 (file)
@@ -260,13 +260,13 @@ also use the ``/etc/suricata/ebpf/xdp_filter.bpf`` (in our example TCP offloadin
     ring-size: 200000
     # Uncomment the following if you are using hardware XDP with
     # a card like Netronome
-    # no-percpu-hash: yes
+    # use-percpu-hash: no
 
 
-XDP bypass is compatible with AF_PACKET IPS mode. Packets from bypassed flows will be send directly 
-from one card to the second card without going by the kernel network stack.
+XDP bypass is compatible with AF_PACKET IPS mode. Packets from bypassed flows will be send directly
+from one card to the second card without going by the ker nel network stack.
 
-If you are using hardware XDP offload you may have to use the ``no-percpu-hash`` function and
+If you are using hardware XDP offload you may have to set ``use-percpu-hash`` to false and
 build and install the XDP filter file after setting ``USE_PERCPU_HASH`` to 0.
 
 Intel NIC setup
index 9d743aa6dcdbbe978da4afedec12f0eecd8e317a..0fc4ee6472a270be3628db0dd004d51a53271300 100644 (file)
@@ -507,8 +507,9 @@ static void *ParseAFPConfig(const char *iface)
             }
         }
 
-        if (ConfGetChildValueBoolWithDefault(if_root, if_default, "no-percpu-hash", (int *)&boolval) == 1) {
-            if (boolval) {
+        boolval = true;
+        if (ConfGetChildValueBoolWithDefault(if_root, if_default, "use-percpu-hash", (int *)&boolval) == 1) {
+            if (boolval == false) {
                 SCLogConfig("Not using percpu hash on iface %s",
                         aconf->iface);
                 aconf->ebpf_t_config.cpus_count = 1;