[MERGED] osmocom-bb[master]: VIRT-PHY: virt_l1_sched: Pass timeslot number into call-back

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Aug 20 20:22:17 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: VIRT-PHY: virt_l1_sched: Pass timeslot number into call-back
......................................................................


VIRT-PHY: virt_l1_sched: Pass timeslot number into call-back

When we schedule a given frame for transmission, we save its timeslot
number.  However, the callback doesn't get informed about this so far.

Change-Id: I608a91ae8e2a57a2d6f87f4b873c82edb0215bf6
---
M src/host/virt_phy/include/virtphy/gsmtapl1_if.h
M src/host/virt_phy/include/virtphy/virt_l1_sched.h
M src/host/virt_phy/src/gsmtapl1_if.c
M src/host/virt_phy/src/virt_l1_sched_simple.c
M src/host/virt_phy/src/virt_prim_data.c
M src/host/virt_phy/src/virt_prim_rach.c
M src/host/virt_phy/src/virt_prim_traffic.c
7 files changed, 10 insertions(+), 10 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/host/virt_phy/include/virtphy/gsmtapl1_if.h b/src/host/virt_phy/include/virtphy/gsmtapl1_if.h
index 125ec11..8dab6b2 100644
--- a/src/host/virt_phy/include/virtphy/gsmtapl1_if.h
+++ b/src/host/virt_phy/include/virtphy/gsmtapl1_if.h
@@ -9,4 +9,4 @@
 void gsmtapl1_init(struct l1_model_ms *model);
 void gsmtapl1_rx_from_virt_um_inst_cb(struct virt_um_inst *vui,
                                       struct msgb *msg);
-void gsmtapl1_tx_to_virt_um_inst(struct l1_model_ms *ms, uint32_t fn, struct msgb *msg);
+void gsmtapl1_tx_to_virt_um_inst(struct l1_model_ms *ms, uint32_t fn, uint8_t tn, struct msgb *msg);
diff --git a/src/host/virt_phy/include/virtphy/virt_l1_sched.h b/src/host/virt_phy/include/virtphy/virt_l1_sched.h
index f3e9b84..b8d401f 100644
--- a/src/host/virt_phy/include/virtphy/virt_l1_sched.h
+++ b/src/host/virt_phy/include/virtphy/virt_l1_sched.h
@@ -7,7 +7,7 @@
 
 struct l1_model_ms;
 
-typedef void virt_l1_sched_cb(struct l1_model_ms *ms, uint32_t fn, struct msgb * msg);
+typedef void virt_l1_sched_cb(struct l1_model_ms *ms, uint32_t fn, uint8_t tn, struct msgb * msg);
 
 /* bucket containing items to be executed for a specific mframe number */
 struct virt_l1_sched_mframe_item {
diff --git a/src/host/virt_phy/src/gsmtapl1_if.c b/src/host/virt_phy/src/gsmtapl1_if.c
index df1c124..8202046 100644
--- a/src/host/virt_phy/src/gsmtapl1_if.c
+++ b/src/host/virt_phy/src/gsmtapl1_if.c
@@ -51,7 +51,7 @@
 /**
  * Replace l11 header of given msgb by a gsmtap header and send it over the virt um.
  */
-void gsmtapl1_tx_to_virt_um_inst(struct l1_model_ms *ms, uint32_t fn, struct msgb *msg)
+void gsmtapl1_tx_to_virt_um_inst(struct l1_model_ms *ms, uint32_t fn, uint8_t tn, struct msgb *msg)
 {
 	struct l1ctl_hdr *l1h = (struct l1ctl_hdr *)msg->data;
 	struct l1ctl_info_ul *ul = (struct l1ctl_info_ul *)l1h->data;
diff --git a/src/host/virt_phy/src/virt_l1_sched_simple.c b/src/host/virt_phy/src/virt_l1_sched_simple.c
index ba8298f..4737135 100644
--- a/src/host/virt_phy/src/virt_l1_sched_simple.c
+++ b/src/host/virt_phy/src/virt_l1_sched_simple.c
@@ -94,7 +94,7 @@
 				/* exec tdma sched item's handler callback */
 				/* TODO: we do not have a TDMA scheduler currently and execute
 				 * all scheduled tdma items here at once */
-				ti_next->handler_cb(ms, mi_next->fn, ti_next->msg);
+				ti_next->handler_cb(ms, mi_next->fn, ti_next->ts, ti_next->msg);
 				/* remove handled tdma sched item */
 				llist_del(&ti_next->tdma_item_entry);
 			}
diff --git a/src/host/virt_phy/src/virt_prim_data.c b/src/host/virt_phy/src/virt_prim_data.c
index 8931cf9..96534aa 100644
--- a/src/host/virt_phy/src/virt_prim_data.c
+++ b/src/host/virt_phy/src/virt_prim_data.c
@@ -44,9 +44,9 @@
  * @param [in] fn frame number
  * @param [in] msg the msg to sent over virtual um.
  */
-static void virt_l1_sched_handler_cb(struct l1_model_ms *ms, uint32_t fn, struct msgb * msg)
+static void virt_l1_sched_handler_cb(struct l1_model_ms *ms, uint32_t fn, uint8_t tn, struct msgb * msg)
 {
-	gsmtapl1_tx_to_virt_um_inst(ms, fn, msg);
+	gsmtapl1_tx_to_virt_um_inst(ms, fn, tn, msg);
 	l1ctl_tx_data_conf(ms, fn, 0, ms->state.serving_cell.arfcn);
 }
 
diff --git a/src/host/virt_phy/src/virt_prim_rach.c b/src/host/virt_phy/src/virt_prim_rach.c
index 8fb0e2f..94076cf 100644
--- a/src/host/virt_phy/src/virt_prim_rach.c
+++ b/src/host/virt_phy/src/virt_prim_rach.c
@@ -56,9 +56,9 @@
  *
  * @param [in] msg the msg to sent over virtual um.
  */
-static void virt_l1_sched_handler_cb(struct l1_model_ms *ms, uint32_t fn, struct msgb *msg)
+static void virt_l1_sched_handler_cb(struct l1_model_ms *ms, uint32_t fn, uint8_t tn, struct msgb *msg)
 {
-	gsmtapl1_tx_to_virt_um_inst(ms, fn, msg);
+	gsmtapl1_tx_to_virt_um_inst(ms, fn, tn, msg);
 	l1ctl_tx_rach_conf(ms, fn, ms->state.serving_cell.arfcn);
 }
 
diff --git a/src/host/virt_phy/src/virt_prim_traffic.c b/src/host/virt_phy/src/virt_prim_traffic.c
index 6798bc1..4e58de6 100644
--- a/src/host/virt_phy/src/virt_prim_traffic.c
+++ b/src/host/virt_phy/src/virt_prim_traffic.c
@@ -44,9 +44,9 @@
  * @param [in] fn frame number
  * @param [in] msg the msg to sent over virtual um.
  */
-static void virt_l1_sched_handler_cb(struct l1_model_ms *ms, uint32_t fn, struct msgb * msg)
+static void virt_l1_sched_handler_cb(struct l1_model_ms *ms, uint32_t fn, uint8_t tn, struct msgb * msg)
 {
-	gsmtapl1_tx_to_virt_um_inst(ms, fn, msg);
+	gsmtapl1_tx_to_virt_um_inst(ms, fn, tn, msg);
 	l1ctl_tx_traffic_conf(ms, fn, 0, ms->state.serving_cell.arfcn);
 }
 

-- 
To view, visit https://gerrit.osmocom.org/3568
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I608a91ae8e2a57a2d6f87f4b873c82edb0215bf6
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list