From 851fcef9627e11f62b9cd0fe78a1ec7775204093 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Fri, 19 Jun 2015 12:05:05 +0200 Subject: [PATCH] af-packet: sync header with latest features Sync the replacement define with the latest Linux code. This patch also updates the detection part in configure.ac to do a declaration of all fields if the newest features are not present. --- configure.ac | 4 ++-- src/source-af-packet.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index fb3c363a3c..f796b06a28 100644 --- a/configure.ac +++ b/configure.ac @@ -1054,8 +1054,8 @@ [enable_af_packet="no"], [[#include #include ]]) - AC_CHECK_DECL([PACKET_FANOUT], - AC_DEFINE([HAVE_PACKET_FANOUT],[1],[Packet fanout support is available]), + AC_CHECK_DECL([PACKET_FANOUT_QM], + AC_DEFINE([HAVE_PACKET_FANOUT],[1],[Recent packet fanout support is available]), [], [[#include ]]) ]) diff --git a/src/source-af-packet.h b/src/source-af-packet.h index e65a1f2a7a..61f4e69ea0 100644 --- a/src/source-af-packet.h +++ b/src/source-af-packet.h @@ -32,6 +32,11 @@ #define PACKET_FANOUT_HASH 0 #define PACKET_FANOUT_LB 1 #define PACKET_FANOUT_CPU 2 +#define PACKET_FANOUT_ROLLOVER 3 +#define PACKET_FANOUT_RND 4 +#define PACKET_FANOUT_QM 5 + +#define PACKET_FANOUT_FLAG_ROLLOVER 0x1000 #define PACKET_FANOUT_FLAG_DEFRAG 0x8000 #else /* HAVE_PACKET_FANOUT */ #include -- 2.47.2