summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/trxcon.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-11-23 20:05:00 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2017-11-23 20:05:16 +0700
commitcd9b850ee4ac4c0a876102924d7456b327a1b250 (patch)
treef0ee31386f785ae89fd25ae66913cc8b3de716e1 /src/host/trxcon/trxcon.c
parent04aecc7f8d37aa93f2313dd04c4052000097e696 (diff)
host/trxcon/scheduler: process frames in advance
In order to get the transceiver more time to process bursts, the L1 scheduler should process the frames and send the bursts in advance (a few frames before), like OsmoBTS does. By default, the advance value is 20 frames, but this can be adjusted using a new command line option of trxcon '-f'. Change-Id: Ic258a169f3554f931d6277e18ca060d029b77f32
Diffstat (limited to 'src/host/trxcon/trxcon.c')
-rw-r--r--src/host/trxcon/trxcon.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/host/trxcon/trxcon.c b/src/host/trxcon/trxcon.c
index 4a571b9a..07ab1698 100644
--- a/src/host/trxcon/trxcon.c
+++ b/src/host/trxcon/trxcon.c
@@ -69,6 +69,7 @@ static struct {
struct trx_instance *trx;
const char *trx_ip;
uint16_t trx_base_port;
+ uint32_t trx_fn_advance;
} app_data;
void *tall_trx_ctx = NULL;
@@ -143,6 +144,7 @@ static void print_help(void)
printf(" -d --debug Change debug flags. Default: %s\n", DEBUG_DEFAULT);
printf(" -i --trx-ip IP address of host runing TRX (default 127.0.0.1)\n");
printf(" -p --trx-port Base port of TRX instance (default 5700)\n");
+ printf(" -f --trx-advance Scheduler clock advance (default 20)\n");
printf(" -s --socket Listening socket for layer23 (default /tmp/osmocom_l2)\n");
printf(" -D --daemonize Run as daemon\n");
}
@@ -157,11 +159,12 @@ static void handle_options(int argc, char **argv)
{"socket", 1, 0, 's'},
{"trx-ip", 1, 0, 'i'},
{"trx-port", 1, 0, 'p'},
+ {"trx-advance", 1, 0, 'f'},
{"daemonize", 0, 0, 'D'},
{0, 0, 0, 0}
};
- c = getopt_long(argc, argv, "d:i:p:s:Dh",
+ c = getopt_long(argc, argv, "d:i:p:f:s:Dh",
long_options, &option_index);
if (c == -1)
break;
@@ -181,6 +184,9 @@ static void handle_options(int argc, char **argv)
case 'p':
app_data.trx_base_port = atoi(optarg);
break;
+ case 'f':
+ app_data.trx_fn_advance = atoi(optarg);
+ break;
case 's':
app_data.bind_socket = optarg;
break;
@@ -198,6 +204,7 @@ static void init_defaults(void)
app_data.bind_socket = "/tmp/osmocom_l2";
app_data.trx_ip = "127.0.0.1";
app_data.trx_base_port = 5700;
+ app_data.trx_fn_advance = 20;
app_data.debug_mask = NULL;
app_data.daemonize = 0;
@@ -263,7 +270,7 @@ int main(int argc, char **argv)
app_data.trx->l1l = app_data.l1l;
/* Init scheduler */
- rc = sched_trx_init(app_data.trx);
+ rc = sched_trx_init(app_data.trx, app_data.trx_fn_advance);
if (rc)
goto exit;