From 3eab064e3fadaf2a6a128f167ad04ca0319b4e17 Mon Sep 17 00:00:00 2001 From: Anton Ivanov Date: Tue, 3 Oct 2017 10:08:05 +0100 Subject: 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 --- src/vnet/devices/af_packet/af_packet.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/vnet/devices/af_packet/af_packet.h') 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 +#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; -- cgit 1.2.3-korg