]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
af-packet: warn that tpacket-v3 is better for non-inline usage
authorJason Ish <jason.ish@oisf.net>
Thu, 13 Mar 2025 18:14:26 +0000 (12:14 -0600)
committerVictor Julien <vjulien@oisf.net>
Tue, 18 Mar 2025 10:02:32 +0000 (11:02 +0100)
Ticket: #7458

src/runmode-af-packet.c

index 6537435f65bdf88a997cce33b9fb3cd3ca88f3df..65a7718db57b835186a3cc1863e944fa87af5395 100644 (file)
@@ -773,6 +773,11 @@ finalize:
                 iface, MAX_PACKET_SIZE);
     }
 
+    /* Warn that if not-inline, tpacket-v3 is the better choice. */
+    if (aconf->copy_mode == AFP_COPY_MODE_NONE && (aconf->flags & AFP_TPACKET_V3) == 0) {
+        SCLogWarning("%s: AF_PACKET tpacket-v3 is recommended for non-inline operation", iface);
+    }
+
     return aconf;
 }