pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/40273?usp=email )
Change subject: context_map: Rename ps_rab(_ass) to denote it is a list ......................................................................
context_map: Rename ps_rab(_ass) to denote it is a list
This allows also easily grepping to figure out where it is used, otherwise it was named like the struct, fsm, etc.
Change-Id: I6ac029e6a820a031a443dae8c83e44f6ae9fb5fa --- M include/osmocom/hnbgw/context_map.h M src/osmo-hnbgw/context_map.c M src/osmo-hnbgw/ps_rab_ass_fsm.c M src/osmo-hnbgw/ps_rab_fsm.c 4 files changed, 15 insertions(+), 15 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/73/40273/1
diff --git a/include/osmocom/hnbgw/context_map.h b/include/osmocom/hnbgw/context_map.h index a885f5b..f4b8b85 100644 --- a/include/osmocom/hnbgw/context_map.h +++ b/include/osmocom/hnbgw/context_map.h @@ -204,11 +204,11 @@ * appearing in a PS RAB Assignment message have completed their PFCP setup, we can replace the GTP info for the * RAB IDs and forward the RAB Assignment Request to HNB / the RAB Assignment Response to CN. */ - struct llist_head ps_rab_ass; + struct llist_head ps_rab_ass_list;
/* All PS RABs and their GTP tunnel mappings. list of struct ps_rab. Each ps_rab FSM handles the PFCP * communication for one particular RAB ID. */ - struct llist_head ps_rabs; + struct llist_head ps_rab_list;
/* RAB state tracking. As RAB-ID is an 8-bit integer, we need 256 elements in the array */ uint8_t rab_state[256]; diff --git a/src/osmo-hnbgw/context_map.c b/src/osmo-hnbgw/context_map.c index cc68ec6..a70905c 100644 --- a/src/osmo-hnbgw/context_map.c +++ b/src/osmo-hnbgw/context_map.c @@ -88,8 +88,8 @@ map->hnb_ctx = hnb; map->rua_ctx_id = rua_ctx_id; map->is_ps = is_ps; - INIT_LLIST_HEAD(&map->ps_rab_ass); - INIT_LLIST_HEAD(&map->ps_rabs); + INIT_LLIST_HEAD(&map->ps_rab_ass_list); + INIT_LLIST_HEAD(&map->ps_rab_list);
map_rua_fsm_alloc(map);
diff --git a/src/osmo-hnbgw/ps_rab_ass_fsm.c b/src/osmo-hnbgw/ps_rab_ass_fsm.c index f5025a2..ec4adf0 100644 --- a/src/osmo-hnbgw/ps_rab_ass_fsm.c +++ b/src/osmo-hnbgw/ps_rab_ass_fsm.c @@ -140,7 +140,7 @@ }; fi->priv = rab_ass;
- llist_add_tail(&rab_ass->entry, &map->ps_rab_ass); + llist_add_tail(&rab_ass->entry, &map->ps_rab_ass_list); return rab_ass; }
@@ -256,7 +256,7 @@ goto no_rab; }
- /* Got all RABs' state and their Core side GTP info in map->ps_rabs. For each, a ps_rab_fsm has been started and + /* Got all RABs' state and their Core side GTP info in map->ps_rab_list. For each, a ps_rab_fsm has been started and * each will call back with PS_RAB_ASS_EV_LOCAL_F_TEIDS_RX or PS_RAB_ASS_EV_RAB_FAIL. */ fi = rab_ass->fi; return ps_rab_ass_fsm_state_chg(PS_RAB_ASS_ST_WAIT_LOCAL_F_TEIDS); @@ -469,7 +469,7 @@ ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_SetupOrModifiedItem, &item_ies); }
- /* Got all RABs' state and updated their Access side GTP info in map->ps_rabs. For each RAB ID, the matching + /* Got all RABs' state and updated their Access side GTP info in map->ps_rab_list. For each RAB ID, the matching * ps_rab_fsm has been instructed to tell the UPF about the Access Remote GTP F-TEID. Each will call back with * PS_RAB_ASS_EV_RAB_ESTABLISHED or PS_RAB_ASS_EV_RAB_FAIL. */ fi = rab_ass->fi; @@ -618,14 +618,14 @@ struct ps_rab_ass *rab_ass = fi->priv; struct ps_rab *rab;
- llist_for_each_entry(rab, &rab_ass->map->ps_rabs, entry) { + llist_for_each_entry(rab, &rab_ass->map->ps_rab_list, entry) { if (rab->req_fi == fi) rab->req_fi = NULL; if (rab->resp_fi == fi) rab->resp_fi = NULL; }
- /* remove from map->ps_rab_ass */ + /* remove from map->ps_rab_ass_list */ llist_del(&rab_ass->entry); }
@@ -633,10 +633,10 @@ { struct ps_rab_ass *rab_ass, *next; struct ps_rab *rab, *next2; - llist_for_each_entry_safe(rab, next2, &map->ps_rabs, entry) { + llist_for_each_entry_safe(rab, next2, &map->ps_rab_list, entry) { ps_rab_release(rab); } - llist_for_each_entry_safe(rab_ass, next, &map->ps_rab_ass, entry) { + llist_for_each_entry_safe(rab_ass, next, &map->ps_rab_ass_list, entry) { osmo_fsm_inst_term(rab_ass->fi, OSMO_FSM_TERM_REGULAR, NULL); } } diff --git a/src/osmo-hnbgw/ps_rab_fsm.c b/src/osmo-hnbgw/ps_rab_fsm.c index f6d113d..6c9c429 100644 --- a/src/osmo-hnbgw/ps_rab_fsm.c +++ b/src/osmo-hnbgw/ps_rab_fsm.c @@ -107,7 +107,7 @@
OSMO_ASSERT(osmo_use_count_get_put(&rab->use_count, PS_RAB_USE_ACTIVE, 1) == 0);
- llist_add_tail(&rab->entry, &map->ps_rabs); + llist_add_tail(&rab->entry, &map->ps_rab_list); return rab; }
@@ -121,7 +121,7 @@ struct hnbgw_context_map *map; llist_for_each_entry(map, &hnb->map_list, hnb_list) { struct ps_rab *rab; - llist_for_each_entry(rab, &map->ps_rabs, entry) { + llist_for_each_entry(rab, &map->ps_rab_list, entry) { uint64_t rab_seid = is_cp_seid ? rab->cp_seid : rab->up_f_seid.seid; if (rab_seid == seid) return rab; @@ -154,7 +154,7 @@ struct ps_rab *ps_rab_get(struct hnbgw_context_map *map, uint8_t rab_id) { struct ps_rab *rab; - llist_for_each_entry(rab, &map->ps_rabs, entry) { + llist_for_each_entry(rab, &map->ps_rab_list, entry) { if (rab->rab_id != rab_id) continue; return rab; @@ -692,7 +692,7 @@
static void ps_rab_forget_map(struct ps_rab *rab) { - /* remove from map->ps_rabs */ + /* remove from map->ps_rab_list */ if (rab->map) llist_del(&rab->entry); rab->map = NULL;