From 55793604e5e9dbaec81c8fbf8129d4ac7528ab69 Mon Sep 17 00:00:00 2001 From: Joerg Hofrichter Date: Fri, 24 Apr 2020 11:30:29 +0200 Subject: mpm: systemd: added sysconf file for setting network buffer sizes udp_zero_copy requires the network send buffer size (net.core.wmem_max) and the network receive buffer size (net.core.rmem_max) to be set to 2500000 bytes (UDP_DEFAULT_BUFF_SIZE in udp_common.hpp). Add a sysconf file (usrp-hwd.conf) to automatically set the recommended values. --- mpm/systemd/CMakeLists.txt | 8 ++++++++ mpm/systemd/usrp-hwd.conf | 2 ++ 2 files changed, 10 insertions(+) create mode 100644 mpm/systemd/usrp-hwd.conf (limited to 'mpm/systemd') diff --git a/mpm/systemd/CMakeLists.txt b/mpm/systemd/CMakeLists.txt index f56ccb076..da811c30f 100644 --- a/mpm/systemd/CMakeLists.txt +++ b/mpm/systemd/CMakeLists.txt @@ -10,6 +10,9 @@ PKG_CHECK_MODULES(SYSTEMD "systemd" REQUIRED) PKG_GET_VARIABLE(SYSTEMD_SYSTEM_UNITDIR systemd systemdsystemunitdir) message(STATUS "Systemd system unit directory ${SYSTEMD_SYSTEM_UNITDIR}") +PKG_GET_VARIABLE(SYSTEMD_SYSCTLDIR systemd sysctldir) +message(STATUS "Systemd sysctl directory ${SYSTEMD_SYSCTLDIR}") + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/usrp-hwd.service.in ${CMAKE_CURRENT_BINARY_DIR}/usrp-hwd.service @@ -19,3 +22,8 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/usrp-hwd.service DESTINATION ${SYSTEMD_SYSTEM_UNITDIR} ) + +install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/usrp-hwd.conf + DESTINATION ${SYSTEMD_SYSCTLDIR} +) diff --git a/mpm/systemd/usrp-hwd.conf b/mpm/systemd/usrp-hwd.conf new file mode 100644 index 000000000..cf4996afa --- /dev/null +++ b/mpm/systemd/usrp-hwd.conf @@ -0,0 +1,2 @@ +net.core.wmem_max=2500000 +net.core.rmem_max=2500000 -- cgit v1.2.3