Commit 21790f9c authored by Bruno Mongazon-Cazavet's avatar Bruno Mongazon-Cazavet Committed by Robert Schmidt

Optimize RFsimulator to improve E2E performance

This improves the RFsimulator code to reach a ~40% E2E throughput
improvement (depending on the machines).

Changes:
- reduce ring buffer size
- code cleanup for readability
- set TCP kernel parameters
parent 79fd37b4
...@@ -572,17 +572,11 @@ struct openair0_device_t { ...@@ -572,17 +572,11 @@ struct openair0_device_t {
typedef int(*oai_device_initfunc_t)(openair0_device *device, openair0_config_t *openair0_cfg); typedef int(*oai_device_initfunc_t)(openair0_device *device, openair0_config_t *openair0_cfg);
/* type of transport init function, implemented in shared lib */ /* type of transport init function, implemented in shared lib */
typedef int(*oai_transport_initfunc_t)(openair0_device *device, openair0_config_t *openair0_cfg, eth_params_t *eth_params); typedef int(*oai_transport_initfunc_t)(openair0_device *device, openair0_config_t *openair0_cfg, eth_params_t *eth_params);
#define UE_MAGICDL 0xA5A5A5A5A5A5A5A5 // UE DL FDD record
#define UE_MAGICUL 0x5A5A5A5A5A5A5A5A // UE UL FDD record
#define ENB_MAGICDL 0xB5B5B5B5B5B5B5B5 // eNB DL FDD record
#define ENB_MAGICUL 0x5B5B5B5B5B5B5B5B // eNB UL FDD record
#define OPTION_LZ4 0x00000001 // LZ4 compression (option_value is set to compressed size) #define OPTION_LZ4 0x00000001 // LZ4 compression (option_value is set to compressed size)
typedef struct { typedef struct {
uint64_t magic; // Magic value (see defines above)
uint32_t size; // Number of samples per antenna to follow this header uint32_t size; // Number of samples per antenna to follow this header
uint32_t nbAnt; // Total number of antennas following this header uint32_t nbAnt; // Total number of antennas following this header
// Samples per antenna follow this header, // Samples per antenna follow this header,
......
This diff is collapsed.
...@@ -186,14 +186,10 @@ int main(int argc, char *argv[]) { ...@@ -186,14 +186,10 @@ int main(int argc, char *argv[]) {
serviceSock=client_start(argv[2],atoi(argv[3])); serviceSock=client_start(argv[2],atoi(argv[3]));
} }
uint64_t typeStamp=ENB_MAGICDL;
bool raw = false; bool raw = false;
if ( argc == 5 ) { if ( argc == 5 ) {
raw=true; raw=true;
if (strcmp(argv[4],"UL") == 0 )
typeStamp=UE_MAGICDL;
} }
samplesBlockHeader_t header; samplesBlockHeader_t header;
...@@ -213,7 +209,6 @@ int main(int argc, char *argv[]) { ...@@ -213,7 +209,6 @@ int main(int argc, char *argv[]) {
setblocking(serviceSock, blocking); setblocking(serviceSock, blocking);
if ( raw ) { if ( raw ) {
header.magic=typeStamp;
header.size=blockSize; header.size=blockSize;
header.nbAnt=1; header.nbAnt=1;
header.timestamp=timestamp; header.timestamp=timestamp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment