From afa906192121b4ec989b392609428851a095e23c Mon Sep 17 00:00:00 2001
From: Martin Teichmann <martin.teichmann@xfel.eu>
Date: Sat, 4 Feb 2023 22:51:58 +0100
Subject: [PATCH] use only active packages to give user data

this means we know what values were set in ebpf. It is a bit
magic how often this will get called.
---
 ebpfcat/ebpfcat.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ebpfcat/ebpfcat.py b/ebpfcat/ebpfcat.py
index a1590be..ae42165 100644
--- a/ebpfcat/ebpfcat.py
+++ b/ebpfcat/ebpfcat.py
@@ -432,7 +432,8 @@ class FastSyncGroup(SyncGroupBase, XDP):
         await super().run()
 
     def update_devices(self, data):
-        self.current_data = data
+        if data[3] & 1:
+            self.current_data = data
         for dev in self.devices:
             dev.fast_update()
         return self.asm_packet
-- 
GitLab