From 24391a66c2965dcbfd412110768ec8359c82aa22 Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Fri, 15 May 2020 15:13:51 +0200 Subject: [PATCH] Fix UDP buffer size bug --- core-buffer/include/buffer_config.hpp | 2 +- core-buffer/include/jungfrau.hpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core-buffer/include/buffer_config.hpp b/core-buffer/include/buffer_config.hpp index 7077655..f01e1c8 100644 --- a/core-buffer/include/buffer_config.hpp +++ b/core-buffer/include/buffer_config.hpp @@ -38,7 +38,7 @@ namespace core_buffer { const int BUFFER_UDP_RCVBUF_N_SLOTS = 100; // +1 for packet headers. const int BUFFER_UDP_RCVBUF_BYTES = - (JUNGFRAU_BYTES_PER_PACKET * BUFFER_UDP_RCVBUF_N_SLOTS); + (JF_BYTES_PER_FRAME * BUFFER_UDP_RCVBUF_N_SLOTS); // Microseconds timeout for UDP recv. const int BUFFER_UDP_US_TIMEOUT = 2 * 1000; diff --git a/core-buffer/include/jungfrau.hpp b/core-buffer/include/jungfrau.hpp index 9b23915..8b95b86 100644 --- a/core-buffer/include/jungfrau.hpp +++ b/core-buffer/include/jungfrau.hpp @@ -8,6 +8,7 @@ #define JUNGFRAU_DATA_BYTES_PER_PACKET 8192 #define JUNGFRAU_N_PACKETS_PER_FRAME 128 #define JUNGFRAU_DATA_BYTES_PER_FRAME 1048576 +#define JF_BYTES_PER_FRAME (8246 * 128) // 6 bytes + 48 bytes + 8192 bytes = 8246 bytes #pragma pack(push)