Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
Michael Black
OpenXG-RAN
Commits
ffebe249
Commit
ffebe249
authored
Mar 20, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify callback for deliver_pdu
parent
0f43c2c7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
57 deletions
+16
-57
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
+1
-1
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
+2
-2
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+12
-53
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h
+1
-1
No files found.
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
View file @
ffebe249
...
@@ -401,7 +401,7 @@ nr_pdcp_entity_t *new_nr_pdcp_entity(
...
@@ -401,7 +401,7 @@ nr_pdcp_entity_t *new_nr_pdcp_entity(
void
(
*
deliver_sdu
)(
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
void
(
*
deliver_sdu
)(
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
char
*
buf
,
int
size
),
char
*
buf
,
int
size
),
void
*
deliver_sdu_data
,
void
*
deliver_sdu_data
,
void
(
*
deliver_pdu
)(
void
*
deliver_pdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
void
(
*
deliver_pdu
)(
void
*
deliver_pdu_data
,
ue_id_t
ue_id
,
int
rb_id
,
char
*
buf
,
int
size
,
int
sdu_id
),
char
*
buf
,
int
size
,
int
sdu_id
),
void
*
deliver_pdu_data
,
void
*
deliver_pdu_data
,
int
sn_size
,
int
sn_size
,
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h
View file @
ffebe249
...
@@ -95,7 +95,7 @@ typedef struct nr_pdcp_entity_t {
...
@@ -95,7 +95,7 @@ typedef struct nr_pdcp_entity_t {
void
(
*
deliver_sdu
)(
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
void
(
*
deliver_sdu
)(
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
char
*
buf
,
int
size
);
char
*
buf
,
int
size
);
void
*
deliver_sdu_data
;
void
*
deliver_sdu_data
;
void
(
*
deliver_pdu
)(
void
*
deliver_pdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
void
(
*
deliver_pdu
)(
void
*
deliver_pdu_data
,
ue_id_t
ue_id
,
int
rb_id
,
char
*
buf
,
int
size
,
int
sdu_id
);
char
*
buf
,
int
size
,
int
sdu_id
);
void
*
deliver_pdu_data
;
void
*
deliver_pdu_data
;
...
@@ -176,7 +176,7 @@ nr_pdcp_entity_t *new_nr_pdcp_entity(
...
@@ -176,7 +176,7 @@ nr_pdcp_entity_t *new_nr_pdcp_entity(
void
(
*
deliver_sdu
)(
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
void
(
*
deliver_sdu
)(
void
*
deliver_sdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
char
*
buf
,
int
size
),
char
*
buf
,
int
size
),
void
*
deliver_sdu_data
,
void
*
deliver_sdu_data
,
void
(
*
deliver_pdu
)(
void
*
deliver_pdu_data
,
struct
nr_pdcp_entity_t
*
entity
,
void
(
*
deliver_pdu
)(
void
*
deliver_pdu_data
,
ue_id_t
ue_id
,
int
rb_id
,
char
*
buf
,
int
size
,
int
sdu_id
),
char
*
buf
,
int
size
,
int
sdu_id
),
void
*
deliver_pdu_data
,
void
*
deliver_pdu_data
,
int
sn_size
,
int
sn_size
,
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
ffebe249
...
@@ -653,35 +653,12 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
...
@@ -653,35 +653,12 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
}
}
}
}
static
void
deliver_pdu_drb
(
void
*
_ue
,
nr_pdcp_entity_t
*
entity
,
static
void
deliver_pdu_drb
(
void
*
deliver_pdu_data
,
ue_id_t
ue_id
,
int
rb_id
,
char
*
buf
,
int
size
,
int
sdu_id
)
char
*
buf
,
int
size
,
int
sdu_id
)
{
{
nr_pdcp_ue_t
*
ue
=
_ue
;
DevAssert
(
deliver_pdu_data
==
NULL
);
int
rb_id
;
protocol_ctxt_t
ctxt
=
{
.
enb_flag
=
1
,
.
rntiMaybeUEid
=
ue_id
};
protocol_ctxt_t
ctxt
;
int
i
;
mem_block_t
*
memblock
;
for
(
i
=
0
;
i
<
MAX_DRBS_PER_UE
;
i
++
)
{
if
(
entity
==
ue
->
drb
[
i
])
{
rb_id
=
i
+
1
;
goto
rb_found
;
}
}
LOG_E
(
PDCP
,
"%s:%d:%s: fatal, no RB found for UE ID/RNTI %ld
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
ue
->
rntiMaybeUEid
);
exit
(
1
);
rb_found:
ctxt
.
module_id
=
0
;
ctxt
.
enb_flag
=
1
;
ctxt
.
instance
=
0
;
ctxt
.
frame
=
0
;
ctxt
.
subframe
=
0
;
ctxt
.
eNB_index
=
0
;
ctxt
.
brOption
=
0
;
ctxt
.
rntiMaybeUEid
=
ue
->
rntiMaybeUEid
;
if
(
NODE_IS_CU
(
node_type
))
{
if
(
NODE_IS_CU
(
node_type
))
{
MessageDef
*
message_p
=
itti_alloc_new_message_sized
(
TASK_PDCP_ENB
,
0
,
MessageDef
*
message_p
=
itti_alloc_new_message_sized
(
TASK_PDCP_ENB
,
0
,
GTPV1U_TUNNEL_DATA_REQ
,
GTPV1U_TUNNEL_DATA_REQ
,
...
@@ -696,14 +673,14 @@ rb_found:
...
@@ -696,14 +673,14 @@ rb_found:
req
->
buffer
=
gtpu_buffer_p
;
req
->
buffer
=
gtpu_buffer_p
;
req
->
length
=
size
;
req
->
length
=
size
;
req
->
offset
=
GTPU_HEADER_OVERHEAD_MAX
;
req
->
offset
=
GTPU_HEADER_OVERHEAD_MAX
;
req
->
ue_id
=
ue
->
rntiMaybeUE
id
;
req
->
ue_id
=
ue
_
id
;
req
->
bearer_id
=
rb_id
;
req
->
bearer_id
=
rb_id
;
LOG_I
(
PDCP
,
"%s() (drb %d) sending message to gtp size %d
\n
"
,
LOG_I
(
PDCP
,
"%s() (drb %d) sending message to gtp size %d
\n
"
,
__func__
,
rb_id
,
size
);
__func__
,
rb_id
,
size
);
extern
instance_t
CUuniqInstance
;
extern
instance_t
CUuniqInstance
;
itti_send_msg_to_task
(
TASK_GTPV1_U
,
CUuniqInstance
,
message_p
);
itti_send_msg_to_task
(
TASK_GTPV1_U
,
CUuniqInstance
,
message_p
);
}
else
{
}
else
{
memblock
=
get_free_mem_block
(
size
,
__FUNCTION__
);
mem
_block_t
*
mem
block
=
get_free_mem_block
(
size
,
__FUNCTION__
);
memcpy
(
memblock
->
data
,
buf
,
size
);
memcpy
(
memblock
->
data
,
buf
,
size
);
LOG_D
(
PDCP
,
"%s(): (drb %d) calling rlc_data_req size %d
\n
"
,
__func__
,
rb_id
,
size
);
LOG_D
(
PDCP
,
"%s(): (drb %d) calling rlc_data_req size %d
\n
"
,
__func__
,
rb_id
,
size
);
//for (i = 0; i < size; i++) printf(" %2.2x", (unsigned char)memblock->data[i]);
//for (i = 0; i < size; i++) printf(" %2.2x", (unsigned char)memblock->data[i]);
...
@@ -755,40 +732,22 @@ srb_found:
...
@@ -755,40 +732,22 @@ srb_found:
}
}
}
}
static
void
deliver_pdu_srb
(
void
*
_ue
,
nr_pdcp_entity_t
*
entity
,
static
void
deliver_pdu_srb
(
void
*
deliver_pdu_data
,
ue_id_t
ue_id
,
int
srb_id
,
char
*
buf
,
int
size
,
int
sdu_id
)
char
*
buf
,
int
size
,
int
sdu_id
)
{
{
nr_pdcp_ue_t
*
ue
=
_ue
;
bool
is_gnb
=
*
(
bool
*
)
deliver_pdu_data
;
int
srb_id
;
int
i
;
for
(
i
=
0
;
i
<
sizeofArray
(
ue
->
srb
)
;
i
++
)
{
if
(
entity
==
ue
->
srb
[
i
])
{
srb_id
=
i
+
1
;
goto
srb_found
;
}
}
LOG_E
(
PDCP
,
"%s:%d:%s: fatal, no SRB found for UE ID/RNTI %ld
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
ue
->
rntiMaybeUEid
);
exit
(
1
);
srb_found:
LOG_D
(
PDCP
,
"%s(): (srb %d) calling rlc_data_req size %d
\n
"
,
__func__
,
srb_id
,
size
);
LOG_D
(
PDCP
,
"%s(): (srb %d) calling rlc_data_req size %d
\n
"
,
__func__
,
srb_id
,
size
);
//for (i = 0; i < size; i++) printf(" %2.2x", (unsigned char)memblock->data[i]);
if
(
is_gnb
)
{
//printf("\n");
if
(
entity
->
is_gnb
)
{
f1ap_dl_rrc_message_t
dl_rrc
=
{.
old_gNB_DU_ue_id
=
0xFFFFFF
,
f1ap_dl_rrc_message_t
dl_rrc
=
{.
old_gNB_DU_ue_id
=
0xFFFFFF
,
.
rrc_container
=
(
uint8_t
*
)
buf
,
.
rrc_container
=
(
uint8_t
*
)
buf
,
.
rrc_container_length
=
size
,
.
rrc_container_length
=
size
,
.
rnti
=
ue
->
rntiMaybeUE
id
,
.
rnti
=
ue
_
id
,
.
srb_id
=
srb_id
};
.
srb_id
=
srb_id
};
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
0
];
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
0
];
rrc
->
mac_rrc
.
dl_rrc_message_transfer
(
0
,
&
dl_rrc
);
rrc
->
mac_rrc
.
dl_rrc_message_transfer
(
0
,
&
dl_rrc
);
}
else
{
// UE
}
else
{
// UE
mem_block_t
*
memblock
;
mem_block_t
*
memblock
;
protocol_ctxt_t
ctxt
=
{
.
module_id
=
0
,
.
enb_flag
=
1
,
.
instance
=
0
,
.
frame
=
0
,
.
subframe
=
0
,
.
eNB_index
=
0
,
.
brOption
=
0
,
.
rntiMaybeUEid
=
ue
->
rntiMaybeUEid
};
protocol_ctxt_t
ctxt
=
{
.
enb_flag
=
1
,
.
rntiMaybeUEid
=
ue_id
};
memblock
=
get_free_mem_block
(
size
,
__FUNCTION__
);
memblock
=
get_free_mem_block
(
size
,
__FUNCTION__
);
memcpy
(
memblock
->
data
,
buf
,
size
);
memcpy
(
memblock
->
data
,
buf
,
size
);
enqueue_rlc_data_req
(
&
ctxt
,
1
,
MBMS_FLAG_NO
,
srb_id
,
sdu_id
,
0
,
size
,
memblock
);
enqueue_rlc_data_req
(
&
ctxt
,
1
,
MBMS_FLAG_NO
,
srb_id
,
sdu_id
,
0
,
size
,
memblock
);
...
@@ -1180,7 +1139,7 @@ bool nr_pdcp_data_req_srb(ue_id_t ue_id,
...
@@ -1180,7 +1139,7 @@ bool nr_pdcp_data_req_srb(ue_id_t ue_id,
nr_pdcp_manager_unlock
(
nr_pdcp_ue_manager
);
nr_pdcp_manager_unlock
(
nr_pdcp_ue_manager
);
deliver_pdu_cb
(
rb
->
deliver_pdu_data
,
rb
,
pdu_buf
,
pdu_size
,
muiP
);
deliver_pdu_cb
(
&
rb
->
is_gnb
,
ue_id
,
rb_id
,
pdu_buf
,
pdu_size
,
muiP
);
return
1
;
return
1
;
}
}
...
@@ -1235,7 +1194,7 @@ bool nr_pdcp_data_req_drb(protocol_ctxt_t *ctxt_pP,
...
@@ -1235,7 +1194,7 @@ bool nr_pdcp_data_req_drb(protocol_ctxt_t *ctxt_pP,
nr_pdcp_manager_unlock
(
nr_pdcp_ue_manager
);
nr_pdcp_manager_unlock
(
nr_pdcp_ue_manager
);
deliver_pdu_cb
(
rb
->
deliver_pdu_data
,
rb
,
pdu_buf
,
pdu_size
,
muiP
);
deliver_pdu_cb
(
NULL
,
ue_id
,
rb_id
,
pdu_buf
,
pdu_size
,
muiP
);
return
1
;
return
1
;
}
}
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h
View file @
ffebe249
...
@@ -77,7 +77,7 @@ bool cu_f1u_data_req(protocol_ctxt_t *ctxt_pP,
...
@@ -77,7 +77,7 @@ bool cu_f1u_data_req(protocol_ctxt_t *ctxt_pP,
const
uint32_t
*
const
sourceL2Id
,
const
uint32_t
*
const
sourceL2Id
,
const
uint32_t
*
const
destinationL2Id
);
const
uint32_t
*
const
destinationL2Id
);
typedef
void
(
*
deliver_pdu
)(
void
*
data
,
nr_pdcp_entity_t
*
entity
,
typedef
void
(
*
deliver_pdu
)(
void
*
data
,
ue_id_t
ue_id
,
int
srb_id
,
char
*
buf
,
int
size
,
int
sdu_id
);
char
*
buf
,
int
size
,
int
sdu_id
);
bool
nr_pdcp_data_req_srb
(
ue_id_t
ue_id
,
bool
nr_pdcp_data_req_srb
(
ue_id_t
ue_id
,
const
rb_id_t
rb_id
,
const
rb_id_t
rb_id
,
...
...
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