-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uplink Packet drop in upf-flow-process node #285
Comments
Hi @RoadRunnr, @ivan4th
I am trying to integrate OPEN5GS core with travel ping UPF.
With few code modifications to ope5gs core, I am able to establish PFCP session b/w Travel ping UPF and OPEN5GS core.
Are you perhaps willing to share?
|
Sure. I created a pull request. |
Sure. I created a pull request.
Cool thanks!
|
Got it resolved now @Networkmama ? |
Hi @infinitydon |
Starting from OGS commit 8fe2e506c0f2893c079bfb5596f9b2cabc757b6c, I got OGS working with upg-vpp by applying the following patch to OGS: diff --git a/lib/pfcp/build.c b/lib/pfcp/build.c
index 723153f38..411950134 100644
--- a/lib/pfcp/build.c
+++ b/lib/pfcp/build.c
@@ -286,9 +286,11 @@ void ogs_pfcp_build_create_pdr(
message->pdi.source_interface.u8 = pdr->src_if;
if (pdr->dnn) {
+ const char *dnn = pdr->src_if == OGS_PFCP_INTERFACE_ACCESS ?
+ UPF_DNN_ACCESS : UPF_DNN_CORE;
message->pdi.network_instance.presence = 1;
message->pdi.network_instance.len = ogs_fqdn_build(
- pdrbuf[i].dnn, pdr->dnn, strlen(pdr->dnn));
+ pdrbuf[i].dnn, (char *) dnn, strlen(dnn));
message->pdi.network_instance.data = pdrbuf[i].dnn;
}
@@ -401,9 +403,11 @@ void ogs_pfcp_build_update_pdr(
message->pdi.source_interface.u8 = pdr->src_if;
if (pdr->dnn) {
+ const char *dnn = pdr->src_if == OGS_PFCP_INTERFACE_ACCESS ?
+ UPF_DNN_ACCESS : UPF_DNN_CORE;
message->pdi.network_instance.presence = 1;
message->pdi.network_instance.len = ogs_fqdn_build(
- pdrbuf[i].dnn, pdr->dnn, strlen(pdr->dnn));
+ pdrbuf[i].dnn, (char *) dnn, strlen(dnn));
message->pdi.network_instance.data = pdrbuf[i].dnn;
}
@@ -473,9 +477,11 @@ void ogs_pfcp_build_create_far(
far->dst_if;
if (far->dnn) {
+ const char *dnn = far->dst_if == OGS_PFCP_INTERFACE_ACCESS ?
+ UPF_DNN_ACCESS : UPF_DNN_CORE;
message->forwarding_parameters.network_instance.presence = 1;
message->forwarding_parameters.network_instance.len =
- ogs_fqdn_build(farbuf[i].dnn, far->dnn, strlen(far->dnn));
+ ogs_fqdn_build(farbuf[i].dnn, (char *) dnn, strlen(dnn));
message->forwarding_parameters.network_instance.data =
farbuf[i].dnn;
}
@@ -544,9 +550,11 @@ void ogs_pfcp_build_update_far_activate(
destination_interface.u8 = far->dst_if;
if (far->dnn) {
+ const char *dnn = far->dst_if == OGS_PFCP_INTERFACE_ACCESS ?
+ UPF_DNN_ACCESS : UPF_DNN_CORE;
message->update_forwarding_parameters.network_instance.presence = 1;
message->update_forwarding_parameters.network_instance.len =
- ogs_fqdn_build(farbuf[i].dnn, far->dnn, strlen(far->dnn));
+ ogs_fqdn_build(farbuf[i].dnn, (char *) dnn, strlen(dnn));
message->update_forwarding_parameters.network_instance.data =
farbuf[i].dnn;
}
diff --git a/lib/pfcp/ogs-pfcp.h b/lib/pfcp/ogs-pfcp.h
index 9f631b708..f6898cdaf 100644
--- a/lib/pfcp/ogs-pfcp.h
+++ b/lib/pfcp/ogs-pfcp.h
@@ -30,6 +30,9 @@
#define OGS_PFCP_UDP_PORT 8805
+#define UPF_DNN_ACCESS "access.oai.org"
+#define UPF_DNN_CORE "core.oai.org"
+
#define OGS_MAX_NUM_OF_PDR 16
#define OGS_MAX_NUM_OF_FAR 16
#define OGS_MAX_NUM_OF_URR 16
diff --git a/lib/pfcp/types.h b/lib/pfcp/types.h
index 285f0cfa4..2649cf825 100644
--- a/lib/pfcp/types.h
+++ b/lib/pfcp/types.h
@@ -342,14 +342,14 @@ ED2(uint8_t reserved:7;,
* The EDRT flag may be set if the FORW flag is set.
* The DDPN flag may be set with any of the DROP and BUFF flags.
*/
-#define OGS_PFCP_APPLY_ACTION_DROP (1<<0)
-#define OGS_PFCP_APPLY_ACTION_FORW (1<<1)
-#define OGS_PFCP_APPLY_ACTION_BUFF (1<<2)
-#define OGS_PFCP_APPLY_ACTION_NOCP (1<<3)
-#define OGS_PFCP_APPLY_ACTION_DUPL (1<<4)
-#define OGS_PFCP_APPLY_ACTION_IPMA (1<<5)
-#define OGS_PFCP_APPLY_ACTION_IPMD (1<<6)
-#define OGS_PFCP_APPLY_ACTION_DFRT (1<<7)
+#define OGS_PFCP_APPLY_ACTION_DROP (1<<0<<8)
+#define OGS_PFCP_APPLY_ACTION_FORW (1<<1<<8)
+#define OGS_PFCP_APPLY_ACTION_BUFF (1<<2<<8)
+#define OGS_PFCP_APPLY_ACTION_NOCP (1<<3<<8)
+#define OGS_PFCP_APPLY_ACTION_DUPL (1<<4<<8)
+#define OGS_PFCP_APPLY_ACTION_IPMA (1<<5<<8)
+#define OGS_PFCP_APPLY_ACTION_IPMD (1<<6<<8)
+#define OGS_PFCP_APPLY_ACTION_DFRT (1<<7<<8)
#define OGS_PFCP_APPLY_ACTION_EDRT (1<<8)
#define OGS_PFCP_APPLY_ACTION_BDPN (1<<9)
#define OGS_PFCP_APPLY_ACTION_DDPN (1<<10)
diff --git a/src/smf/npcf-handler.c b/src/smf/npcf-handler.c
index 863c7e996..62f04110d 100644
--- a/src/smf/npcf-handler.c
+++ b/src/smf/npcf-handler.c
@@ -527,6 +527,10 @@ bool smf_npcf_smpolicycontrol_handle_create(
ul_pdr->f_teid.chid = 1;
ul_pdr->f_teid.choose_id = OGS_PFCP_DEFAULT_CHOOSE_ID;
ul_pdr->f_teid_len = 2;
+ ogs_assert(OGS_OK ==
+ ogs_pfcp_paa_to_ue_ip_addr(&sess->session.paa,
+ &ul_pdr->ue_ip_addr, &ul_pdr->ue_ip_addr_len));
+ ul_pdr->ue_ip_addr.sd = OGS_PFCP_UE_IP_DST;
cp2up_pdr->f_teid.ipv4 = 1;
cp2up_pdr->f_teid.ipv6 = 1; Both uplink and downlink traffic were successful. I used the following compose file to start upg-vpp and then attached OGS smf to it's network: services:
upf:
container_name: upf
image: rdefosseoai/oai-upf-vpp
privileged: true
ulimits:
core: -1
environment:
- N3_IPV4_ADDRESS_REMOTE=10.15.193.106
- N4_IPV4_ADDRESS_REMOTE=10.15.199.101
- N6_IPV4_ADDRESS_REMOTE=10.15.196.107
- N3_IPV4_ADDRESS_LOCAL=10.15.193.102
- N4_IPV4_ADDRESS_LOCAL=10.15.199.102
- N6_IPV4_ADDRESS_LOCAL=10.15.196.102
- GW_ID=1
- MNC03=01
- MCC=001
- REALM=3gppnetwork.org
- NWI_N3=access.oai.org
- NWI_N6=core.oai.org
- NETWORK_UE_IP=10.45.0.0/16
- VPP_MAIN_CORE=0
- VPP_CORE_WORKER=1
- VPP_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/vpp_plugins/ # Ubntu18.04
# - INTERFACE_CP=eth0
- NSSAI_SD_0=000009
- SST=1
- DNN=internet
- REGISTER_NRF=yes
- NRF_IP_ADDR=10.15.199.90
- NRF_PORT=29510
- HTTP_VERSION=2
networks:
default:
ipv4_address: 10.15.199.102
n3:
ipv4_address: 10.15.193.102
n6:
ipv4_address: 10.15.196.102
networks:
default:
name: 5gc-service-bus
ipam:
config:
- subnet: 10.15.199.0/24
n3:
ipam:
config:
- subnet: 10.15.193.0/24
n6:
ipam:
config:
- subnet: 10.15.196.0/24 |
@infinitydon, @mitmitmitm I was able to get it working after adding UE IP address to Up link pdr list.
We should be able to run open5gs from latest sources.
This is almost inline with my change, but i don't see the reason of ul_pdr destination flag. Thanks |
@Networkmama - No problem, can you let me know the outcome when you test with the latest Open5gs main branch? Also are you using the upg-vpp without any changes to the code? |
With open5gs/open5gs#1642 PR , I am able to test upg-vpp without any issues.
Yes, There are no changes. |
@Networkmama - Tested with vpp-upg v1.2.1 and Open5gs commit fe11ee1 but the SMF had an error when PDU activation was attempted:
UPF config:
SMF config:
Can you share the configuration that worked for you and the vpp-upg/Open5gs versions? |
Hi @RoadRunnr, @ivan4th
I am trying to integrate OPEN5GS core with travel ping UPF.
With few code modifications to ope5gs core, I am able to establish PFCP session b/w Travel ping UPF and OPEN5GS core.
After Session creation, When i verify ping b/w UE and Data network in UP link direction, I see packet drops in flow process node, because of the ACL rule failure.
However, Packet drop does not occur in Down link direction. DL packets are sent to UE without any issues.
Could you please provide your inputs on this?
I have attached Session Establishment pcap,upf commands output and data path logs. uplink_error.zip
Thanks
The text was updated successfully, but these errors were encountered: