aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-06 15:26:08 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-06 15:26:08 +0200
commit6eeb7c7e74ed8cc1e23b19453012f43563055e12 (patch)
tree057c41684bdf6324bef672a883ec0401c73ad0a9
parent6e4ccec6c4b69681e94e4d3b27ef022e4aab81a9 (diff)
bssgp: Increment BSSGP flow control tag valuejerlbeck/flow-control
Currently the tag value in FLOW CONTROL BVC messages is always 1. This commit changes the implementation to increment that value with each of the FLOW CONTROL BVC messages that is sent to the SGSN. Sponsored-by: On-Waves ehf
-rw-r--r--src/gprs_bssgp_pcu.cpp5
-rw-r--r--src/gprs_bssgp_pcu.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp
index b0e17f0..db271a5 100644
--- a/src/gprs_bssgp_pcu.cpp
+++ b/src/gprs_bssgp_pcu.cpp
@@ -642,13 +642,16 @@ int gprs_bssgp_tx_fc_bvc(void)
/* Avg queue delay monitoring */
avg_delay_ms = get_and_reset_avg_queue_delay();
+ /* Update tag */
+ the_pcu.fc_tag += 1;
+
LOGP(DBSSGP, LOGL_DEBUG,
"Sending FLOW CONTROL BVC, Bmax = %d, R = %d, Bmax_MS = %d, "
"R_MS = %d, avg_dly = %d\n",
bucket_size, leak_rate, ms_bucket_size, ms_leak_rate,
avg_delay_ms);
- return bssgp_tx_fc_bvc(the_pcu.bctx, 1,
+ return bssgp_tx_fc_bvc(the_pcu.bctx, the_pcu.fc_tag,
bucket_size, leak_rate,
ms_bucket_size, ms_leak_rate,
NULL, &avg_delay_ms);
diff --git a/src/gprs_bssgp_pcu.h b/src/gprs_bssgp_pcu.h
index aaaff7f..32be765 100644
--- a/src/gprs_bssgp_pcu.h
+++ b/src/gprs_bssgp_pcu.h
@@ -61,6 +61,7 @@ struct gprs_bssgp_pcu {
/* Flow control */
struct timeval queue_delay_sum;
unsigned queue_delay_count;
+ uint8_t fc_tag;
/** callbacks below */