pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/30279 )
Change subject: gtp: Introduce VTY configurable GTP timer X3
......................................................................
gtp: Introduce VTY configurable GTP timer X3
This timer controls the amount of time a resp message transmitted by the
local gsn is to be stored in the resp queue. This is used in order to
detect duplicate requests received, since GTP states the exact same
response should be answered if a duplicate request is received.
Prior to this patch, this timer was hardcoded to 60 seconds.
This patch actually should be set, in general, to a value
equal than (T3-RESPONSE * N3-REQUESTS) values configured at
the peer, since that is the maximum period during which the local gsn
expects to receive req retransmissions from the peer.
Hence, this value must be user configurable to adapt it to the peers
connected to the GSN.
The 60 seconds hardcoded value is therefore changed to default to our
local (T3-RESPONSE * N3-REQUESTS), since the most common scenario for
osmo-ggsn/osmo-sgsn is to run it against a peer osmo-sgsn/osmo-ggsn,
which will have the same values by default.
This way we avoid by default caching response messages for way too long,
potentially filling the queue.
Related: OS#5485
Change-Id: Ia15c1cfd201d7c43e9a1d6ceb6725ddf392d2c65
---
M gtp/gsn.c
M gtp/gsn.h
M gtp/gtp.c
3 files changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/79/30279/1
diff --git a/gtp/gsn.c b/gtp/gsn.c
index da30fc9..ce66244 100644
--- a/gtp/gsn.c
+++ b/gtp/gsn.c
@@ -108,6 +108,9 @@
{ .T = GTP_GSN_TIMER_N3_REQUESTS, .default_val = 3, .unit = OSMO_TDEF_CUSTOM,
.desc = "Counter N3-REQUESTS holds the maximum number of attempts made by GTP to send a request message"
},
+ { .T = GTP_GSN_TIMER_T3_HOLD_RESPONSE, .default_val = 5 * 3 /* (GTP_GSN_TIMER_T3_RESPONSE * GTP_GSN_TIMER_N3_REQUESTS) */, .unit = OSMO_TDEF_S,
+ .desc = "Time a GTP respoonse message is kept cached to re-transmit it when a duplicate request is received. Value is generally equal to (T3-RESPONSE * N3-REQUESTS) set at the peer"
+ },
{}
};
diff --git a/gtp/gsn.h b/gtp/gsn.h
index 3b9cb1d..8e47ce3 100644
--- a/gtp/gsn.h
+++ b/gtp/gsn.h
@@ -67,6 +67,7 @@
enum gtp_gsn_timers {
GTP_GSN_TIMER_T3_RESPONSE = 3,
GTP_GSN_TIMER_N3_REQUESTS = 1003,
+ GTP_GSN_TIMER_T3_HOLD_RESPONSE = -3,
};
struct gsn_t {
diff --git a/gtp/gtp.c b/gtp/gtp.c
index f32461c..1ebc6dc 100644
--- a/gtp/gtp.c
+++ b/gtp/gtp.c
@@ -499,11 +499,13 @@
LOGP(DLGTP, LOGL_ERROR, "Retransmit resp queue is full (seq=%" PRIu16 ")\n",
seq);
} else {
+ unsigned int t3_hold_resp;
LOGP(DLGTP, LOGL_DEBUG, "Registering seq=%" PRIu16
" in restransmit resp queue\n", seq);
+ t3_hold_resp = osmo_tdef_get(gsn->tdef, GTP_GSN_TIMER_T3_HOLD_RESPONSE, OSMO_TDEF_S, -1);
memcpy(&qmsg->p, packet, sizeof(union gtp_packet));
qmsg->l = len;
- qmsg->timeout = time(NULL) + 60; /* When to timeout */
+ qmsg->timeout = time(NULL) + t3_hold_resp; /* When to timeout */
qmsg->retrans = 0; /* No retransmissions so far */
qmsg->cbp = NULL;
qmsg->type = 0;
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/30279
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Ia15c1cfd201d7c43e9a1d6ceb6725ddf392d2c65
Gerrit-Change-Number: 30279
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Hello osmith, Jenkins Builder, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmocom-bb/+/30253
to look at the new patch set (#4).
Change subject: trxcon: group Rx burst params into struct l1sched_burst_ind
......................................................................
trxcon: group Rx burst params into struct l1sched_burst_ind
Change-Id: I3363c38a43d2f54f846527b70cedac8fa57bcb27
Related: OS#5599
---
M src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h
M src/host/trxcon/src/sched_lchan_desc.c
M src/host/trxcon/src/sched_lchan_pdtch.c
M src/host/trxcon/src/sched_lchan_sch.c
M src/host/trxcon/src/sched_lchan_tchf.c
M src/host/trxcon/src/sched_lchan_tchh.c
M src/host/trxcon/src/sched_lchan_xcch.c
M src/host/trxcon/src/sched_trx.c
M src/host/trxcon/src/trxcon_shim.c
9 files changed, 122 insertions(+), 101 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/53/30253/4
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30253
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I3363c38a43d2f54f846527b70cedac8fa57bcb27
Gerrit-Change-Number: 30253
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30240 )
Change subject: trxcon: adjust coding style in l1sched_pull_burst()
......................................................................
trxcon: adjust coding style in l1sched_pull_burst()
Change-Id: I96a40fdbea5085999b9aeb98b418ae27132f6fda
Related: OS#5599
---
M src/host/trxcon/src/sched_trx.c
1 file changed, 14 insertions(+), 33 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/host/trxcon/src/sched_trx.c b/src/host/trxcon/src/sched_trx.c
index 2ac6904..92f8bf2 100644
--- a/src/host/trxcon/src/sched_trx.c
+++ b/src/host/trxcon/src/sched_trx.c
@@ -95,19 +95,15 @@
struct l1sched_lchan_state *lchan;
l1sched_lchan_tx_func *handler;
enum l1sched_lchan_type chan;
- uint8_t offset;
+ unsigned int offset;
- /* Timeslot is not allocated */
- if (ts == NULL)
- return;
-
- /* Timeslot is not configured */
- if (ts->mf_layout == NULL)
+ /* Check if the given timeslot is configured */
+ if (ts == NULL || ts->mf_layout == NULL)
return;
/* Get frame from multiframe */
offset = br->fn % ts->mf_layout->period;
- frame = ts->mf_layout->frames + offset;
+ frame = &ts->mf_layout->frames[offset];
/* Get required info from frame */
br->bid = frame->ul_bid;
@@ -115,41 +111,26 @@
handler = l1sched_lchan_desc[chan].tx_fn;
/* Omit lchans without handler */
- if (!handler)
+ if (handler == NULL)
return;
- /* Make sure that lchan was allocated and activated */
+ /* Make sure that lchan is allocated and active */
lchan = l1sched_find_lchan(ts, chan);
- if (lchan == NULL)
+ if (lchan == NULL || !lchan->active)
return;
- /* Omit inactive lchans */
- if (!lchan->active)
- return;
-
- /**
- * If we aren't processing any primitive yet,
- * attempt to obtain a new one from queue
- */
+ /* If no primitive is being processed, try obtaining one from Tx queue */
if (lchan->prim == NULL)
lchan->prim = l1sched_prim_dequeue(&ts->tx_prims, br->fn, lchan);
-
- /* TODO: report TX buffers health to the higher layers */
-
- /* If CBTX (Continuous Burst Transmission) is assumed */
- if (l1sched_lchan_desc[chan].flags & L1SCHED_CH_FLAG_CBTX) {
- /**
- * Probably, a TX buffer is empty. Nevertheless,
- * we shall continuously transmit anything on
- * CBTX channels.
- */
- if (lchan->prim == NULL)
+ if (lchan->prim == NULL) {
+ /* If CBTX (Continuous Burst Transmission) is required */
+ if (l1sched_lchan_desc[chan].flags & L1SCHED_CH_FLAG_CBTX)
l1sched_prim_dummy(lchan);
+ if (lchan->prim == NULL)
+ return;
}
- /* If there is no primitive, do nothing */
- if (lchan->prim == NULL)
- return;
+ /* TODO: report TX buffers health to the higher layers */
/* Handover RACH needs to be handled regardless of the
* current channel type and the associated handler. */
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30240
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I96a40fdbea5085999b9aeb98b418ae27132f6fda
Gerrit-Change-Number: 30240
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30242 )
Change subject: trxcon: rx_sch_fn(): do not use sched->fn_counter_proc
......................................................................
trxcon: rx_sch_fn(): do not use sched->fn_counter_proc
Use the given Fn instead, no need to go that deep for it. The
sched->fn_counter_proc is an internal field of the scheduler,
which is not necessarily holding a valid value when pulling
Uplink bursts synchronously via the Ready-to-Send PHYIF API.
Change-Id: I56027876b50e53b474c2f54ac216cd141142020e
Related: OS#5599
---
M src/host/trxcon/src/sched_lchan_sch.c
1 file changed, 4 insertions(+), 3 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
msuraev: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/host/trxcon/src/sched_lchan_sch.c b/src/host/trxcon/src/sched_lchan_sch.c
index c61e134..d943ae8 100644
--- a/src/host/trxcon/src/sched_lchan_sch.c
+++ b/src/host/trxcon/src/sched_lchan_sch.c
@@ -85,13 +85,14 @@
/* Decode BSIC and TDMA frame number */
decode_sb(&time, &bsic, sb_info);
- LOGP_LCHAND(lchan, LOGL_DEBUG, "Received SCH: bsic=%u, fn=%u, sched_fn=%u\n",
- bsic, time.fn, lchan->ts->sched->fn_counter_proc);
+ LOGP_LCHAND(lchan, LOGL_DEBUG,
+ "Received SCH: bsic=%u, fn=%u, sched_fn=%u\n",
+ bsic, time.fn, fn);
/* Check if decoded frame number matches */
if (time.fn != fn) {
LOGP_LCHAND(lchan, LOGL_ERROR,
- "Decoded fn=%u does not match fn=%u provided by scheduler\n",
+ "Decoded fn=%u does not match sched_fn=%u\n",
time.fn, fn);
return -EINVAL;
}
4 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30242
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I56027876b50e53b474c2f54ac216cd141142020e
Gerrit-Change-Number: 30242
Gerrit-PatchSet: 6
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de>
Gerrit-MessageType: merged