Skip to content

Commit

Permalink
af-packet: rename option 'no-percpu-hash'
Browse files Browse the repository at this point in the history
  • Loading branch information
regit authored and victorjulien committed Jun 18, 2019
1 parent 0f6b129 commit 567b5ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions doc/userguide/capture-hardware/ebpf-xdp.rst
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/runmode-af-packet.c
Expand Up @@ -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;
Expand Down

0 comments on commit 567b5ee

Please sign in to comment.