This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Vadim Yanitskiy gerrit-no-reply at lists.osmocom.orgVadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/11136
Change subject: trxcon/scheduler: pass lchan state to sched_prim_dequeue()
......................................................................
trxcon/scheduler: pass lchan state to sched_prim_dequeue()
Having access to a logical channel state is required by the
follow-up change, which will introduce a separate function
for dequeuing SACCH primitives.
Change-Id: Ibde0acf8e6be224b1007be707a636eaad68c8d36
---
M src/host/trxcon/sched_prim.c
M src/host/trxcon/sched_trx.c
M src/host/trxcon/sched_trx.h
3 files changed, 7 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/36/11136/1
diff --git a/src/host/trxcon/sched_prim.c b/src/host/trxcon/sched_prim.c
index 6b160d1..e71109b 100644
--- a/src/host/trxcon/sched_prim.c
+++ b/src/host/trxcon/sched_prim.c
@@ -284,17 +284,17 @@
*
* @param queue a transmit queue to take a prim from
* @param fn the current frame number (used for FACCH/H)
- * @param lchan_type required primitive type
+ * @param lchan logical channel state
* @return a primitive or NULL if not found
*/
struct trx_ts_prim *sched_prim_dequeue(struct llist_head *queue,
- uint32_t fn, enum trx_lchan_type lchan_type)
+ uint32_t fn, struct trx_lchan_state *lchan)
{
/* There is nothing to dequeue */
if (llist_empty(queue))
return NULL;
- switch (lchan_type) {
+ switch (lchan->type) {
/* TCH/F requires FACCH/F prioritization */
case TRXC_TCHF:
return prim_dequeue_tch_f(queue);
@@ -302,11 +302,11 @@
/* FACCH/H prioritization is a bit more complex */
case TRXC_TCHH_0:
case TRXC_TCHH_1:
- return prim_dequeue_tch_h(queue, fn, lchan_type);
+ return prim_dequeue_tch_h(queue, fn, lchan->type);
/* Other kinds of logical channels */
default:
- return prim_dequeue_one(queue, lchan_type);
+ return prim_dequeue_one(queue, lchan->type);
}
}
diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c
index 023764d..fc29998 100644
--- a/src/host/trxcon/sched_trx.c
+++ b/src/host/trxcon/sched_trx.c
@@ -95,7 +95,7 @@
* attempt to obtain a new one from queue
*/
if (lchan->prim == NULL)
- lchan->prim = sched_prim_dequeue(&ts->tx_prims, fn, chan);
+ lchan->prim = sched_prim_dequeue(&ts->tx_prims, fn, lchan);
/* TODO: report TX buffers health to the higher layers */
diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h
index 08e2489..ff288f2 100644
--- a/src/host/trxcon/sched_trx.h
+++ b/src/host/trxcon/sched_trx.h
@@ -302,7 +302,7 @@
(CHAN_IS_TCH(prim->chan) && prim->payload_len == GSM_MACBLOCK_LEN)
struct trx_ts_prim *sched_prim_dequeue(struct llist_head *queue,
- uint32_t fn, enum trx_lchan_type lchan_type);
+ uint32_t fn, struct trx_lchan_state *lchan);
int sched_prim_dummy(struct trx_lchan_state *lchan);
void sched_prim_drop(struct trx_lchan_state *lchan);
void sched_prim_flush_queue(struct llist_head *list);
--
To view, visit https://gerrit.osmocom.org/11136
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibde0acf8e6be224b1007be707a636eaad68c8d36
Gerrit-Change-Number: 11136
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180928/e50bd6cb/attachment.htm>