Browse Source

wip

Change-Id: I48e3168033756fdde04b4270e8a82fad24a09e41
Neels Hofmeyr 2 months ago
parent
commit
1bdcea9d40
  1. 2
      include/osmocom/hnbgw/hnbgw.h
  2. 2
      src/osmo-hnbgw/hnbgw_cn.c
  3. 9
      src/osmo-hnbgw/hnbgw_pfcp.c
  4. 6
      src/osmo-hnbgw/ps_rab_ass_fsm.c
  5. 5
      src/osmo-hnbgw/ps_rab_fsm.c

2
include/osmocom/hnbgw/hnbgw.h

@ -165,7 +165,7 @@ struct hnb_gw {
struct {
struct osmo_pfcp_endpoint *ep;
struct pfcp_cp_peer *cp_peer;
struct osmo_pfcp_cp_peer *cp_peer;
} pfcp;
};

2
src/osmo-hnbgw/hnbgw_cn.c

@ -29,7 +29,7 @@
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/sccp_helpers.h>
#include <osmocom/hnbgw/pfcp_cp_peer.h>
#include <osmocom/pfcp/pfcp_cp_peer.h>
#include <osmocom/hnbgw/hnbgw.h>
#include <osmocom/hnbgw/hnbgw_rua.h>

9
src/osmo-hnbgw/hnbgw_pfcp.c

@ -21,8 +21,7 @@
#include <osmocom/core/sockaddr_str.h>
#include <osmocom/pfcp/pfcp_endpoint.h>
#include <osmocom/hnbgw/pfcp_cp_peer.h>
#include <osmocom/pfcp/pfcp_cp_peer.h>
#include <osmocom/hnbgw/hnbgw.h>
#include <osmocom/hnbgw/context_map.h>
@ -33,7 +32,7 @@ static void pfcp_set_msg_ctx(struct osmo_pfcp_endpoint *ep, struct osmo_pfcp_msg
struct hnb_gw *hnb_gw = ep->priv;
if (!m->ctx.peer_fi)
pfcp_cp_peer_set_msg_ctx(hnb_gw->pfcp.cp_peer, m);
osmo_pfcp_cp_peer_set_msg_ctx(hnb_gw->pfcp.cp_peer, m);
/* If this is a response to an earlier request, just take the msg context from the request message.
* In osmo-hnbgw, a session_fi always points at a ps_rab FSM. */
@ -131,12 +130,12 @@ int hnbgw_pfcp_init(struct hnb_gw *hnb_gw)
}
/* Associate with UPF */
hnb_gw->pfcp.cp_peer = pfcp_cp_peer_alloc(hnb_gw, ep, &upf_addr);
hnb_gw->pfcp.cp_peer = osmo_pfcp_cp_peer_alloc(hnb_gw, ep, &upf_addr);
if (!hnb_gw->pfcp.cp_peer) {
LOGP(DUPF, LOGL_ERROR, "Cannot allocate PFCP CP Peer FSM\n");
return -1;
}
if (pfcp_cp_peer_associate(hnb_gw->pfcp.cp_peer)) {
if (osmo_pfcp_cp_peer_associate(hnb_gw->pfcp.cp_peer)) {
LOGP(DUPF, LOGL_ERROR, "Cannot start PFCP CP Peer FSM\n");
return -1;
}

6
src/osmo-hnbgw/ps_rab_ass_fsm.c

@ -40,6 +40,7 @@
#include <osmocom/pfcp/pfcp_msg.h>
#include <osmocom/pfcp/pfcp_endpoint.h>
#include <osmocom/pfcp/pfcp_cp_peer.h>
#include <osmocom/hnbgw/hnbgw.h>
#include <osmocom/hnbgw/context_map.h>
@ -49,7 +50,6 @@
#include <osmocom/hnbgw/hnbgw_rua.h>
#include <osmocom/hnbgw/tdefs.h>
#include <osmocom/hnbgw/pfcp_cp_peer.h>
#define PORT_GTP1_U 2152
@ -227,7 +227,7 @@ int hnbgw_gtpmap_rx_rab_ass_req(struct hnbgw_context_map *map, struct osmo_prim_
rab_ass->ranap_rab_ass_req_message = message;
/* Now rab_ass owns message and will clean it up */
if (!pfcp_cp_peer_is_associated(hnb_gw->pfcp.cp_peer)) {
if (!osmo_pfcp_cp_peer_is_associated(hnb_gw->pfcp.cp_peer)) {
LOG_MAP(map, DUPF, LOGL_ERROR, "PFCP is not associated, cannot set up GTP mapping\n");
goto no_rab;
}
@ -421,7 +421,7 @@ int hnbgw_gtpmap_rx_rab_ass_resp(struct hnbgw_context_map *map, struct osmo_prim
rab_ass->ranap_rab_ass_resp_oph = oph;
/* Now rab_ass owns message and will clean it up */
if (!pfcp_cp_peer_is_associated(hnb_gw->pfcp.cp_peer)) {
if (!osmo_pfcp_cp_peer_is_associated(hnb_gw->pfcp.cp_peer)) {
LOG_PS_RAB_ASS(rab_ass, LOGL_ERROR, "PFCP is not associated, cannot set up GTP mapping\n");
ps_rab_ass_failure(rab_ass);
return -1;

5
src/osmo-hnbgw/ps_rab_fsm.c

@ -20,8 +20,7 @@
#include <osmocom/core/tdef.h>
#include <osmocom/pfcp/pfcp_endpoint.h>
#include <osmocom/hnbgw/pfcp_cp_peer.h>
#include <osmocom/pfcp/pfcp_cp_peer.h>
#include <osmocom/hnbgw/hnbgw.h>
#include <osmocom/hnbgw/context_map.h>
@ -146,7 +145,7 @@ void ps_rab_pfcp_set_msg_ctx(struct ps_rab *rab, struct osmo_pfcp_msg *m)
static struct osmo_pfcp_msg *ps_rab_new_pfcp_msg_tx(struct ps_rab *rab, enum osmo_pfcp_message_type msg_type)
{
struct hnb_gw *hnb_gw = rab->hnb_gw;
struct osmo_pfcp_msg *m = pfcp_cp_peer_new_msg_tx(hnb_gw->pfcp.cp_peer, msg_type);
struct osmo_pfcp_msg *m = osmo_pfcp_cp_peer_new_msg_tx(hnb_gw->pfcp.cp_peer, msg_type);
m->h.seid_present = true;
m->h.seid = rab->up_f_seid.seid;

Loading…
Cancel
Save