mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
Merge remote-tracking branch 'origin/taps-client-rewrite' into integration_2026_w22 (!4086)
vrtsim: Refactor peer antenna configuration and taps_client
Refactor peer antenna configuration and taps_client
This commit addresses several architectural issues in vrtsim,
specifically regarding how peer antenna counts are managed. Some
additional changes were made to allow unit tests and several fixes were
delivered.
Key changes:
1. Refactored peer antenna management:
* Removed the redundant 'peer_info_t' structure which overlapped with
ue_config and client_info.
* Added explicit 'peer_tx_ant' and 'peer_rx_ant' fields to
vrtsim_state_t.
* Server now pulls peer info from the UE config, while Client pulls it
from the GNB info published by the server.
2. Refactor taps_client to be thread safe
3. Fixed a bug where only the first antenna IQ was read from underlying
SHM mechanism
4. Test / usability related changes:
* Added support for configurable SHM channel names via
'--vrtsim.shm_channel_name' to prevent IPC conflicts between tests.
* Reduced the sleep() calls inside the code to reduce test runtime and
speedup vrtsim connection initialization and cleanup
* Added a unit tests for:
- transpartent channel mode
- taps_client mode
- cirdb mode
Reviewed-By: Merkebu Girmay <merkebu.girmay@openairinterface.org>
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#include "utils.h"
|
||||
#include "common/utils/threadPool/pthread_utils.h"
|
||||
|
||||
#define CIRCULAR_BUFFER_SIZE (30720 * 14 * 20)
|
||||
#define CIRCULAR_BUFFER_SIZE (30720 * 20)
|
||||
|
||||
typedef struct {
|
||||
int magic;
|
||||
@@ -97,10 +97,17 @@ ShmTDIQChannel *shm_td_iq_channel_connect(const char *name, int timeout_in_secon
|
||||
// Create shared memory segment
|
||||
int fd = -1;
|
||||
while (timeout_in_seconds > 0 && fd == -1) {
|
||||
fd = shm_open(name, O_RDWR, S_IRUSR | S_IWUSR);
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
fd = shm_open(name, O_RDWR, S_IRUSR | S_IWUSR);
|
||||
if (fd != -1) {
|
||||
break;
|
||||
}
|
||||
usleep(1000);
|
||||
}
|
||||
timeout_in_seconds--;
|
||||
printf("Waiting for server to create shared memory segment\n");
|
||||
sleep(1);
|
||||
if (fd == -1) {
|
||||
printf("Waiting for server to create shared memory segment\n");
|
||||
}
|
||||
}
|
||||
AssertFatal(fd != -1, "shm_open() failed: errno %d, %s", errno, strerror(errno));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user