aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf_ul.h
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-03-24 13:14:09 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2021-03-24 17:12:01 +0100
commit7bd92a3e1d1160df60501047fa73a9ecbfc383a7 (patch)
tree5f07ce55ca9298f4386368fd8221ee39ce81da44 /src/tbf_ul.h
parent4bab867d9fc983ee9c9ed1ab97cfe0e9e30b42b6 (diff)
Set matching USF if available when polling a UL TBF
When the scheduler detects it's time to receive a UL block due to a scheduled poll, if that polling is done on a UL TBF, then use its USF if available instead of using USF_UNUSED (=7) when sending a DL block on that same FN. This is not really needed for correct work, since MS take care themselves of scheduling a UL block when they receive the poll (RRBP) some time before, and don't check the USF at the time of transmitting. In any case, it helps understand better when looking at pcap traces that indeed it a UL block from that MS was requested, instead of setting USF to 7. Related: OS#5033 Change-Id: I2ad9d8ea6afc8f83192033470bd27010a7474430
Diffstat (limited to 'src/tbf_ul.h')
-rw-r--r--src/tbf_ul.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tbf_ul.h b/src/tbf_ul.h
index 8713596e..0c78e104 100644
--- a/src/tbf_ul.h
+++ b/src/tbf_ul.h
@@ -47,6 +47,9 @@ enum tbf_egprs_ul_counters {
TBF_CTR_EGPRS_UL_MCS9,
};
+/* Used in ul_tbf->m_usf[] to flag unassigned USF on a given TS: */
+#define USF_INVALID 0xFF
+
#define LOGPTBFUL(tbf, level, fmt, args...) LOGP(DTBFUL, level, "%s " fmt, tbf_name(tbf), ## args)
struct gprs_rlcmac_ul_tbf : public gprs_rlcmac_tbf {
@@ -90,7 +93,7 @@ struct gprs_rlcmac_ul_tbf : public gprs_rlcmac_tbf {
* variables are in both (dl and ul) structs and not outside union.
*/
int32_t m_rx_counter; /* count all received blocks */
- uint8_t m_usf[8]; /* list USFs per PDCH (timeslot) */
+ uint8_t m_usf[8]; /* list USFs per PDCH (timeslot), initialized to USF_INVALID */
uint8_t m_contention_resolution_done; /* set after done */
uint8_t m_final_ack_sent; /* set if we sent final ack */