summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/af_packet/af_packet.h
diff options
context:
space:
mode:
authorAnton Ivanov <anton.ivanov@cambridgegreys.com>2017-10-03 10:08:05 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-10-04 09:42:23 +0000
commit3eab064e3fadaf2a6a128f167ad04ca0319b4e17 (patch)
tree3655480915e5d403efae47cbaec9d83262fb9fcb /src/vnet/devices/af_packet/af_packet.h
parent28029530963223c5c3b94f7a2f9d1343662a1a04 (diff)
VPP-1001 - update AF Packet Driver to for modern kernels
1. Add VNET headers support for checksumming - required to operate correctly on any recent Linux 2. Bypass QDISC on transmit - improves performance by ~ 5%. Enabled only if the macro is detected - apparently not present on archaic distributions. This still does not solve all issues with TSO - it can be fixed only by going to tpacket v3 and dynamic rx ring as well as significant changes in the TX (sendmmsg?). Change-Id: Iea14ade12586c0a8da49e6dd1012108a08bc85b3 Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Diffstat (limited to 'src/vnet/devices/af_packet/af_packet.h')
-rw-r--r--src/vnet/devices/af_packet/af_packet.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vnet/devices/af_packet/af_packet.h b/src/vnet/devices/af_packet/af_packet.h
index 95c7e7cf5a7..f731427c6b5 100644
--- a/src/vnet/devices/af_packet/af_packet.h
+++ b/src/vnet/devices/af_packet/af_packet.h
@@ -19,6 +19,8 @@
#include <vppinfra/lock.h>
+#define AF_PACKET_USES_VNET_HEADERS 1
+
typedef struct
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
@@ -54,6 +56,7 @@ typedef struct
/* hash of host interface names */
mhash_t if_index_by_host_if_name;
+ u32 flags;
} af_packet_main_t;
af_packet_main_t af_packet_main;