Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
openairinterface-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
openairinterface-6g
Commits
8207a4c3
Commit
8207a4c3
authored
Jul 08, 2025
by
Guido Casati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SDAP refactoring: replace legacy (LTE) type rb_id_t with int
parent
823340a2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
24 deletions
+24
-24
openair2/SDAP/nr_sdap/nr_sdap.c
openair2/SDAP/nr_sdap/nr_sdap.c
+2
-2
openair2/SDAP/nr_sdap/nr_sdap.h
openair2/SDAP/nr_sdap/nr_sdap.h
+2
-2
openair2/SDAP/nr_sdap/nr_sdap_entity.c
openair2/SDAP/nr_sdap/nr_sdap_entity.c
+11
-11
openair2/SDAP/nr_sdap/nr_sdap_entity.h
openair2/SDAP/nr_sdap/nr_sdap_entity.h
+7
-7
openair3/ocp-gtpu/gtp_itf.h
openair3/ocp-gtpu/gtp_itf.h
+1
-1
tests/nr-cuup/nr-cuup-load-test.c
tests/nr-cuup/nr-cuup-load-test.c
+1
-1
No files found.
openair2/SDAP/nr_sdap/nr_sdap.c
View file @
8207a4c3
...
...
@@ -47,7 +47,7 @@ static void reblock_tun_socket(int fd)
bool
sdap_data_req
(
protocol_ctxt_t
*
ctxt_p
,
const
ue_id_t
ue_id
,
const
srb_flag_t
srb_flag
,
const
rb_id_
t
rb_id
,
const
in
t
rb_id
,
const
mui_t
mui
,
const
confirm_t
confirm
,
const
sdu_size_t
sdu_buffer_size
,
...
...
@@ -82,7 +82,7 @@ bool sdap_data_req(protocol_ctxt_t *ctxt_p,
return
ret
;
}
void
sdap_data_ind
(
rb_id_
t
pdcp_entity
,
void
sdap_data_ind
(
in
t
pdcp_entity
,
int
is_gnb
,
bool
has_sdap_rx
,
int
pdusession_id
,
...
...
openair2/SDAP/nr_sdap/nr_sdap.h
View file @
8207a4c3
...
...
@@ -35,7 +35,7 @@
bool
sdap_data_req
(
protocol_ctxt_t
*
ctxt_p
,
const
ue_id_t
ue_id
,
const
srb_flag_t
srb_flag
,
const
rb_id_
t
rb_id
,
const
in
t
rb_id
,
const
mui_t
mui
,
const
confirm_t
confirm
,
const
sdu_size_t
sdu_buffer_size
,
...
...
@@ -53,7 +53,7 @@ bool sdap_data_req(protocol_ctxt_t *ctxt_p,
* Uplink - gNB
* Downlink - nrUE
*/
void
sdap_data_ind
(
rb_id_
t
pdcp_entity
,
void
sdap_data_ind
(
in
t
pdcp_entity
,
int
is_gnb
,
bool
has_sdap_rx
,
int
pdusession_id
,
...
...
openair2/SDAP/nr_sdap/nr_sdap_entity.c
View file @
8207a4c3
...
...
@@ -58,7 +58,7 @@ static int get_sdap_role(bool is_gnb, const NR_SDAP_Config_t *sdap_config)
return
role
;
}
void
nr_pdcp_submit_sdap_ctrl_pdu
(
ue_id_t
ue_id
,
rb_id_
t
sdap_ctrl_pdu_drb
,
nr_sdap_ul_hdr_t
ctrl_pdu
)
void
nr_pdcp_submit_sdap_ctrl_pdu
(
ue_id_t
ue_id
,
in
t
sdap_ctrl_pdu_drb
,
nr_sdap_ul_hdr_t
ctrl_pdu
)
{
protocol_ctxt_t
ctxt
=
{
.
rntiMaybeUEid
=
ue_id
};
...
...
@@ -72,7 +72,7 @@ void nr_pdcp_submit_sdap_ctrl_pdu(ue_id_t ue_id, rb_id_t sdap_ctrl_pdu_drb, nr_s
PDCP_TRANSMISSION_MODE_UNKNOWN
,
NULL
,
NULL
);
LOG_D
(
SDAP
,
"Control PDU - Submitting Control PDU to DRB ID:
%l
d
\n
"
,
sdap_ctrl_pdu_drb
);
LOG_D
(
SDAP
,
"Control PDU - Submitting Control PDU to DRB ID:
%
d
\n
"
,
sdap_ctrl_pdu_drb
);
LOG_D
(
SDAP
,
"QFI: %u
\n
R: %u
\n
D/C: %u
\n
"
,
ctrl_pdu
.
QFI
,
ctrl_pdu
.
R
,
ctrl_pdu
.
DC
);
return
;
}
...
...
@@ -80,7 +80,7 @@ void nr_pdcp_submit_sdap_ctrl_pdu(ue_id_t ue_id, rb_id_t sdap_ctrl_pdu_drb, nr_s
static
bool
nr_sdap_tx_entity
(
nr_sdap_entity_t
*
entity
,
protocol_ctxt_t
*
ctxt_p
,
const
srb_flag_t
srb_flag
,
const
rb_id_
t
rb_id
,
const
in
t
rb_id
,
const
mui_t
mui
,
const
confirm_t
confirm
,
const
sdu_size_t
sdu_buffer_size
,
...
...
@@ -94,7 +94,7 @@ static bool nr_sdap_tx_entity(nr_sdap_entity_t *entity,
int
offset
=
0
;
bool
ret
=
false
;
/*Hardcode DRB ID given from upper layer (ue/gnb_tun_read_thread rb_id), it will change if we have SDAP*/
rb_id_
t
sdap_drb_id
=
rb_id
;
in
t
sdap_drb_id
=
rb_id
;
bool
sdap_ul_tx
=
false
;
bool
sdap_dl_tx
=
false
;
...
...
@@ -104,17 +104,17 @@ static bool nr_sdap_tx_entity(nr_sdap_entity_t *entity,
}
uint8_t
sdap_buf
[
SDAP_MAX_PDU
];
rb_id_
t
pdcp_entity
=
entity
->
qfi2drb_map
(
entity
,
qfi
);
in
t
pdcp_entity
=
entity
->
qfi2drb_map
(
entity
,
qfi
);
if
(
pdcp_entity
){
sdap_drb_id
=
pdcp_entity
;
sdap_ul_tx
=
entity
->
qfi2drb_table
[
qfi
].
entity_role
&
SDAP_UL_TX
;
// UE TX entity
sdap_dl_tx
=
entity
->
qfi2drb_table
[
qfi
].
entity_role
&
SDAP_DL_TX
;
// gNB TX entity
LOG_D
(
SDAP
,
"TX - QFI: %u is mapped to DRB ID: %
l
d
\n
"
,
qfi
,
entity
->
qfi2drb_table
[
qfi
].
drb_id
);
LOG_D
(
SDAP
,
"TX - QFI: %u is mapped to DRB ID: %d
\n
"
,
qfi
,
entity
->
qfi2drb_table
[
qfi
].
drb_id
);
}
if
(
!
sdap_ul_tx
&&
!
sdap_dl_tx
)
{
LOG_D
(
SDAP
,
"TX - DRB ID: %
l
d does not have SDAP header
\n
"
,
entity
->
qfi2drb_table
[
qfi
].
drb_id
);
LOG_D
(
SDAP
,
"TX - DRB ID: %d does not have SDAP header
\n
"
,
entity
->
qfi2drb_table
[
qfi
].
drb_id
);
ret
=
nr_pdcp_data_req_drb
(
ctxt_p
,
srb_flag
,
sdap_drb_id
,
...
...
@@ -201,7 +201,7 @@ static bool nr_sdap_tx_entity(nr_sdap_entity_t *entity,
}
static
void
nr_sdap_rx_entity
(
nr_sdap_entity_t
*
entity
,
rb_id_
t
pdcp_entity
,
in
t
pdcp_entity
,
int
is_gnb
,
int
pdusession_id
,
ue_id_t
ue_id
,
...
...
@@ -390,7 +390,7 @@ static int nr_sdap_qfi2drb(nr_sdap_entity_t *entity, uint8_t qfi)
return
drb_id
;
}
else
if
(
entity
->
default_drb
)
{
/* QoS flow to DRB mapping rule does not exist, map SDAP SDU to default DRB, e.g. return default DRB of the SDAP entity */
LOG_D
(
SDAP
,
"QoS flow to DRB mapping rule does not exists! mapping SDU to Default DRB: %
l
d
\n
"
,
entity
->
default_drb
);
LOG_D
(
SDAP
,
"QoS flow to DRB mapping rule does not exists! mapping SDU to Default DRB: %d
\n
"
,
entity
->
default_drb
);
return
entity
->
default_drb
;
}
else
{
/* Note: UE undefined behaviour when neither a default DRB
...
...
@@ -428,7 +428,7 @@ int nr_sdap_map_ctrl_pdu(nr_sdap_entity_t *entity, int map_type, uint8_t dl_qfi)
/**
* @brief Submit the end-marker control PDU to PDCP according to TS 37.324, clause 5.3
*/
void
nr_sdap_submit_ctrl_pdu
(
ue_id_t
ue_id
,
rb_id_
t
sdap_ctrl_pdu_drb
,
nr_sdap_ul_hdr_t
ctrl_pdu
)
void
nr_sdap_submit_ctrl_pdu
(
ue_id_t
ue_id
,
in
t
sdap_ctrl_pdu_drb
,
nr_sdap_ul_hdr_t
ctrl_pdu
)
{
if
(
sdap_ctrl_pdu_drb
){
nr_pdcp_submit_sdap_ctrl_pdu
(
ue_id
,
sdap_ctrl_pdu_drb
,
ctrl_pdu
);
...
...
@@ -530,7 +530,7 @@ nr_sdap_entity_t *new_nr_sdap_entity(const int is_gnb, const ue_id_t ue_id, cons
// set default DRB
if
(
sdap
.
defaultDRB
)
{
sdap_entity
->
default_drb
=
sdap
.
drb_id
;
LOG_I
(
SDAP
,
"Default DRB for the created SDAP entity: DRB %
l
d
\n
"
,
sdap_entity
->
default_drb
);
LOG_I
(
SDAP
,
"Default DRB for the created SDAP entity: DRB %d
\n
"
,
sdap_entity
->
default_drb
);
}
// store QFI to DRB mapping rules
...
...
openair2/SDAP/nr_sdap/nr_sdap_entity.h
View file @
8207a4c3
...
...
@@ -76,11 +76,11 @@ typedef enum {
}
sdap_role_t
;
typedef
struct
qfi2drb_s
{
rb_id_
t
drb_id
;
in
t
drb_id
;
int
entity_role
;
}
qfi2drb_t
;
void
nr_pdcp_submit_sdap_ctrl_pdu
(
ue_id_t
ue_id
,
rb_id_
t
sdap_ctrl_pdu_drb
,
nr_sdap_ul_hdr_t
ctrl_pdu
);
void
nr_pdcp_submit_sdap_ctrl_pdu
(
ue_id_t
ue_id
,
in
t
sdap_ctrl_pdu_drb
,
nr_sdap_ul_hdr_t
ctrl_pdu
);
typedef
struct
sdap_configuration_s
{
int
pdusession_id
;
...
...
@@ -95,7 +95,7 @@ typedef struct sdap_configuration_s {
typedef
struct
nr_sdap_entity_s
{
ue_id_t
ue_id
;
rb_id_
t
default_drb
;
in
t
default_drb
;
/// sdap_tun_read_thread needs to know if we are gNB/UE, so for noS1 mode,
/// store which one we are
bool
is_gnb
;
...
...
@@ -117,12 +117,12 @@ typedef struct nr_sdap_entity_s {
nr_sdap_ul_hdr_t
(
*
sdap_construct_ctrl_pdu
)(
uint8_t
qfi
);
int
(
*
sdap_map_ctrl_pdu
)(
struct
nr_sdap_entity_s
*
entity
,
int
map_type
,
uint8_t
dl_qfi
);
void
(
*
sdap_submit_ctrl_pdu
)(
ue_id_t
ue_id
,
rb_id_
t
sdap_ctrl_pdu_drb
,
nr_sdap_ul_hdr_t
ctrl_pdu
);
void
(
*
sdap_submit_ctrl_pdu
)(
ue_id_t
ue_id
,
in
t
sdap_ctrl_pdu_drb
,
nr_sdap_ul_hdr_t
ctrl_pdu
);
bool
(
*
tx_entity
)(
struct
nr_sdap_entity_s
*
entity
,
protocol_ctxt_t
*
ctxt_p
,
const
srb_flag_t
srb_flag
,
const
rb_id_
t
rb_id
,
const
in
t
rb_id
,
const
mui_t
mui
,
const
confirm_t
confirm
,
const
sdu_size_t
sdu_buffer_size
,
...
...
@@ -134,7 +134,7 @@ typedef struct nr_sdap_entity_s {
const
bool
rqi
);
void
(
*
rx_entity
)(
struct
nr_sdap_entity_s
*
entity
,
rb_id_
t
pdcp_entity
,
in
t
pdcp_entity
,
int
is_gnb
,
int
pdusession_id
,
ue_id_t
ue_id
,
...
...
@@ -163,7 +163,7 @@ int nr_sdap_map_ctrl_pdu(nr_sdap_entity_t *entity, int map_type, uint8_t dl_qfi)
* TS 37.324 5.3 QoS flow to DRB Mapping
* Submit the end-marker control PDU to the lower layer.
*/
void
nr_sdap_submit_ctrl_pdu
(
ue_id_t
ue_id
,
rb_id_
t
sdap_ctrl_pdu_drb
,
nr_sdap_ul_hdr_t
ctrl_pdu
);
void
nr_sdap_submit_ctrl_pdu
(
ue_id_t
ue_id
,
in
t
sdap_ctrl_pdu_drb
,
nr_sdap_ul_hdr_t
ctrl_pdu
);
/*
* TS 37.324 4.4 5.1.1 SDAP entity establishment
...
...
openair3/ocp-gtpu/gtp_itf.h
View file @
8207a4c3
...
...
@@ -49,7 +49,7 @@ typedef struct gtpv1u_gnb_delete_tunnel_req_s gtpv1u_gnb_delete_tunnel_req_t;
typedef
bool
(
*
gtpCallbackSDAP
)(
protocol_ctxt_t
*
ctxt_pP
,
const
ue_id_t
ue_id
,
const
srb_flag_t
srb_flagP
,
const
rb_id_
t
rb_idP
,
const
in
t
rb_idP
,
const
mui_t
muiP
,
const
confirm_t
confirmP
,
const
sdu_size_t
sdu_buffer_sizeP
,
...
...
tests/nr-cuup/nr-cuup-load-test.c
View file @
8207a4c3
...
...
@@ -165,7 +165,7 @@ static struct ue_stat {
static
bool
recv_ng
(
protocol_ctxt_t
*
ctxt
,
const
ue_id_t
ue_id
,
const
srb_flag_t
flag
,
const
rb_id_
t
rb
,
const
in
t
rb
,
const
mui_t
mui
,
const
confirm_t
confirm
,
const
sdu_size_t
size
,
...
...
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