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.h b/clatd.h
index 899458c..34fa885 100644
--- a/clatd.h
+++ b/clatd.h
@@ -24,9 +24,9 @@
struct tun_data;
-#define MAXMTU 1500
+#define MAXMTU 65536
#define PACKETLEN (MAXMTU + sizeof(struct tun_pi))
-#define CLATD_VERSION "1.4"
+#define CLATD_VERSION "1.5"
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))