Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
oai-upf-6g
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
oai-upf-6g
Commits
c909aec9
Commit
c909aec9
authored
Apr 22, 2025
by
Franck Messaoudi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: fix regression for non-qos enforcement use case
parent
4b30f688
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
22 deletions
+25
-22
src/upf_app/SessionProgramManager.cpp
src/upf_app/SessionProgramManager.cpp
+1
-1
src/upf_app/bpf/rules/pdr/pfcp_session_lookup_xdp_kernel.c
src/upf_app/bpf/rules/pdr/pfcp_session_lookup_xdp_kernel.c
+18
-15
src/upf_app/simpleswitch/pfcp_switch.cpp
src/upf_app/simpleswitch/pfcp_switch.cpp
+6
-6
No files found.
src/upf_app/SessionProgramManager.cpp
View file @
c909aec9
...
...
@@ -556,7 +556,7 @@ void SessionProgramManager::createPipeline(
*/
std
::
shared_ptr
<
pfcp
::
pfcp_qer
>
qer
;
if
(
!
getQer
(
session
,
pdr
,
qer
))
{
logger
.
debug
(
"Missing qer for pdr %d"
,
pdr_id
);
logger
.
debug
(
"Missing
vv
qer for pdr %d"
,
pdr_id
);
}
struct
rules_match_pdr
rules
=
{
0
};
...
...
src/upf_app/bpf/rules/pdr/pfcp_session_lookup_xdp_kernel.c
View file @
c909aec9
...
...
@@ -797,12 +797,14 @@ static __always_inline pfcp_pdr_t_* pfcp_session_s_lookup_precedence_over_n6(
bpf_debug
(
"pdi.source_interface.interface_value: %d"
,
pdi
.
source_interface
.
interface_value
);
*
qfi_out
=
pdi
.
qfi
.
qfi
;
// Check if the QoS enforcement is enabled:
u32
*
enabling_qos
=
bpf_map_lookup_elem
(
&
m_qos_enabling
,
&
seid
);
if
(
!
enabling_qos
)
{
bpf_debug
(
"Qos enforcement not ebabled for Session %llu"
,
seid
);
return
pdr_high_prec
;
}
else
{
*
qfi_out
=
pdi
.
qfi
.
qfi
;
struct
session_qfi
sdf_key
=
{
0
};
sdf_key
.
seid
=
seid
;
sdf_key
.
qfi
=
*
qfi_out
;
...
...
@@ -938,8 +940,6 @@ int xdp_handle_uplink(struct xdp_md* ctx) {
}
}
/*---------------------------------------------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------------------------------------------*/
SEC
(
"xdp"
)
int
xdp_handle_shaping
(
struct
xdp_md
*
ctx
)
{
...
...
@@ -1086,29 +1086,32 @@ int xdp_handle_downlink(struct xdp_md* ctx) {
pfcp_session_lookup_over_n6
(
data
,
data_end
,
ethh
,
&
ue_ip
,
&
packet_filter
);
if
(
!
session
)
{
bpf_debug
(
"Session lookup failed"
);
bpf_debug
(
"PFCP Session Lookup (Find PFCP session with matching PDRs) failed"
);
return
XDP_PASS
;
}
u64
seid
=
session
->
seid
;
u32
teid_ul
=
session
->
teid_ul
;
bpf_debug
(
"Session found, SEID = %llu"
,
seid
);
bpf_debug
(
"TEID_UL = %x"
,
teid_ul
);
bpf_debug
(
"TEID_DL = %x"
,
session
->
teid_dl
);
bpf_debug
(
"UE = %pI4"
,
ue_ip
);
u32
teid_ul
=
bpf_htonl
(
session
->
teid_ul
)
;
u32
teid_dl
=
bpf_htonl
(
session
->
teid_dl
);
bpf_debug
(
"Session found ( seid, teid_ul, teid_dl ) : ( %llu, %u, %u )"
,
seid
,
teid_ul
,
teid_dl
);
/*
|-----------------------------------------------------------------------|
|------------------------ PFCP Session's Lookup ------------------------|
|--- (Find matching PDR of the PFCP session with highest precedence) ---|
|-----------------------------------------------------------------------|
*/
|-----------------------------------------------------------------------|
|------------------------ PFCP Session's Lookup ------------------------|
|--- (Find matching PDR of the PFCP session with highest precedence) ---|
|-----------------------------------------------------------------------|
*/
u8
qfi
=
0
;
pfcp_pdr_t_
*
pdr_high_precedence
=
pfcp_session_s_lookup_precedence_over_n6
(
seid
,
ue_ip
,
&
qfi
,
&
packet_filter
);
if
(
!
pdr_high_precedence
)
{
bpf_debug
(
"Session lookup failed"
);
bpf_debug
(
"PFCP Session's Lookup (Find matching PDR of the PFCP session with "
"highest precedence) failed"
);
return
XDP_PASS
;
}
...
...
src/upf_app/simpleswitch/pfcp_switch.cpp
View file @
c909aec9
...
...
@@ -706,7 +706,7 @@ void pfcp_switch::handle_pfcp_session_establishment_request(
std
::
shared_ptr
<
itti_n4_session_establishment_request
>
sreq
,
itti_n4_session_establishment_response
*
resp
)
{
bool
isBpfAccelerationEnabled
=
upf_cfg
.
enable_bpf_datapath
;
bool
isQosEnabled
=
isBpfAccelerationEnabled
&&
upf_cfg
.
enable_qos
;
//
bool isQosEnabled = isBpfAccelerationEnabled && upf_cfg.enable_qos;
itti_n4_session_establishment_request
*
req
=
sreq
.
get
();
pfcp
::
fseid_t
fseid
=
{};
...
...
@@ -759,7 +759,7 @@ void pfcp_switch::handle_pfcp_session_establishment_request(
/*
* Add create_qers
*/
if
(
is
Qos
Enabled
)
{
if
(
is
BpfAcceleration
Enabled
)
{
pfcp
::
qer_id_t
qer_id
=
{};
if
(
cr_pdr
.
get
(
qer_id
))
{
pfcp
::
create_qer
cr_qer
=
{};
...
...
@@ -878,7 +878,7 @@ void pfcp_switch::handle_pfcp_session_modification_request(
std
::
shared_ptr
<
itti_n4_session_modification_request
>
sreq
,
itti_n4_session_modification_response
*
resp
)
{
bool
isBpfAccelerationEnabled
=
upf_cfg
.
enable_bpf_datapath
;
bool
isQosEnabled
=
isBpfAccelerationEnabled
&&
upf_cfg
.
enable_qos
;
//
bool isQosEnabled = isBpfAccelerationEnabled && upf_cfg.enable_qos;
itti_n4_session_modification_request
*
req
=
sreq
.
get
();
...
...
@@ -950,7 +950,7 @@ void pfcp_switch::handle_pfcp_session_modification_request(
/*
* Add remove_qers
*/
if
(
is
Qos
Enabled
)
{
if
(
is
BpfAcceleration
Enabled
)
{
if
(
cause
.
cause_value
==
CAUSE_VALUE_REQUEST_ACCEPTED
)
{
for
(
auto
it
:
req
->
pfcp_ies
.
remove_qers
)
{
Logger
::
upf_app
().
info
(
"Modify datapath: remove(qer)"
);
...
...
@@ -1040,7 +1040,7 @@ void pfcp_switch::handle_pfcp_session_modification_request(
/*
* Add create_qers
*/
if
(
is
Qos
Enabled
)
{
if
(
is
BpfAcceleration
Enabled
)
{
if
(
cause
.
cause_value
==
CAUSE_VALUE_REQUEST_ACCEPTED
)
{
for
(
auto
it
:
req
->
pfcp_ies
.
create_qers
)
{
create_qer
&
cr_qer
=
it
;
...
...
@@ -1100,7 +1100,7 @@ void pfcp_switch::handle_pfcp_session_modification_request(
/*
* Add update_qers
*/
if
(
is
Qos
Enabled
)
{
if
(
is
BpfAcceleration
Enabled
)
{
for
(
auto
it
:
req
->
pfcp_ies
.
update_qers
)
{
update_qer
&
qer
=
it
;
uint8_t
cause_value
=
CAUSE_VALUE_REQUEST_ACCEPTED
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment