Skip to content

Commit

Permalink
[pfcp] add send_asr PFCP option (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
spencersevilla committed Jan 17, 2024
1 parent 61d1fee commit 966e77e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ Tagged releases (e.g. `v2.4.7`) come straight from plain vanilla `open5gs` and c

## Number of Served TAC/TAI
open5gs has a limit of 16 different served TAIs hard-coded in OGS_MAX_NUM_OF_SERVED_TAI. Althea's KeyLTE architecture relies on many more than that: each edge KeyLTE router has its own TAC/TAI. We have currently set OGS_MAX_NUM_OF_SERVED_TAI to 256; this might increase again in the future.

## PFCP Send_ASR Option
When configuring a node's PFCP connection to another node, you now have the option of adding `send_asr: false` to the configuration yaml. This bool (which defaults to `true`) indicates whether the node should send PFCP AssociationSetupRequests or not.

The reason we need this bool/option is to turn it off for the CPS side. To allow KeyLTE routers to be seamlessly added to the existing CPS without requiring a reboot, we have to define all 256 served TAIs in the CPS configuration. Without this option, the CPS logs are full of errors trying to send ASR messages to KeyLTE routers that don't yet exist.
7 changes: 7 additions & 0 deletions lib/pfcp/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ int ogs_pfcp_context_parse_config(const char *local, const char *remote)
const char *hostname[
OGS_MAX_NUM_OF_HOSTNAME];
uint16_t port = self.pfcp_port;
bool send_asr = 1;
uint16_t tac[OGS_MAX_NUM_OF_TAI] = {0,};
int num_of_tac = 0;
const char *dnn[OGS_MAX_NUM_OF_DNN];
Expand Down Expand Up @@ -538,6 +539,10 @@ int ogs_pfcp_context_parse_config(const char *local, const char *remote)
ogs_yaml_iter_value(
&remote_iter);
if (v) port = atoi(v);

} else if (!strcmp(remote_key,
"send_asr")) {
send_asr = ogs_yaml_iter_bool(&remote_iter);
} else if (!strcmp(remote_key,
"tac")) {
ogs_yaml_iter_t tac_iter;
Expand Down Expand Up @@ -704,6 +709,8 @@ int ogs_pfcp_context_parse_config(const char *local, const char *remote)
ogs_list_add(
&self.pfcp_peer_list, node);

node->send_asr = send_asr;

node->num_of_tac = num_of_tac;
if (num_of_tac != 0)
memcpy(node->tac,
Expand Down
2 changes: 2 additions & 0 deletions lib/pfcp/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ typedef struct ogs_pfcp_node_s {
ogs_timer_t *t_association; /* timer to retry to associate peer node */
ogs_timer_t *t_no_heartbeat; /* heartbeat timer to check aliveness */

bool send_asr; /* send association setup request or just listen? */

uint16_t tac[OGS_MAX_NUM_OF_TAI];
uint8_t num_of_tac;
const char* dnn[OGS_MAX_NUM_OF_DNN];
Expand Down
2 changes: 1 addition & 1 deletion lib/pfcp/path.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ extern "C" {
ogs_assert(ogs_pfcp_self()->pfcp_addr || ogs_pfcp_self()->pfcp_addr6); \
\
ogs_list_for_each(&ogs_pfcp_self()->pfcp_peer_list, pfcp_node) \
pfcp_node_fsm_init(pfcp_node, true); \
pfcp_node_fsm_init(pfcp_node, pfcp_node->send_asr); \
\
} while(0)

Expand Down

0 comments on commit 966e77e

Please sign in to comment.