switch from using packet ring to normal read
With clat ebpf offload of the receive path on 4.9+ P+ devices
this just doesn't matter any more.
Additionally:
- this is *much* simpler,
- reduces memory consumption,
- eliminates the need for memory locking privs,
- and allows us to increment max supported packet size,
which fixes a long outstanding terrible bug wrt. GRO'ed
packets being oversize and simply dropped.
So, win, win, win.
Test:
git grep '(^|[^t])ring[.][ch]'
git grep 'TP_FRAME_SIZE|TP_BLOCK_SIZE|TP_FRAMES|TP_FRAME_GAP|TP_NUM_BLOCKS|packet_ring|ring_create|ring_read'
come up empty
Verified ipv4 ping works on a flame device on an ipv6 only wireless network.
Bug: 130253220
Test: atest clatd_test netd_integration_test
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I676dfd16ffd2961f14a4e8fcd707c6f9f484e024
diff --git a/clatd_test.cpp b/clatd_test.cpp
index c16a4dd..9b7a3e7 100644
--- a/clatd_test.cpp
+++ b/clatd_test.cpp
@@ -19,6 +19,7 @@
#include <iostream>
#include <arpa/inet.h>
+#include <linux/if_packet.h>
#include <netinet/in6.h>
#include <stdio.h>
#include <sys/uio.h>