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
常顺宇
OpenXG-RAN
Commits
9a10ec0d
Commit
9a10ec0d
authored
May 14, 2019
by
ivan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
panos patches for user-plane PDCP, log removal
parent
6849e297
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
136 additions
and
57 deletions
+136
-57
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
+3
-3
openair1/PHY/LTE_UE_TRANSPORT/slsch.c
openair1/PHY/LTE_UE_TRANSPORT/slsch.c
+17
-5
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+19
-13
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+37
-14
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+16
-13
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c
+1
-0
openair2/LAYER2/RLC/rlc.c
openair2/LAYER2/RLC/rlc.c
+2
-2
openair2/NETWORK_DRIVER/LITE/netlink.c
openair2/NETWORK_DRIVER/LITE/netlink.c
+1
-1
openair2/NETWORK_DRIVER/UE_IP/common.c
openair2/NETWORK_DRIVER/UE_IP/common.c
+13
-5
openair2/NETWORK_DRIVER/UE_IP/netlink.c
openair2/NETWORK_DRIVER/UE_IP/netlink.c
+4
-0
openair2/UTIL/LISTS/list.c
openair2/UTIL/LISTS/list.c
+22
-1
openair2/UTIL/LISTS/list.h
openair2/UTIL/LISTS/list.h
+1
-0
No files found.
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
View file @
9a10ec0d
...
...
@@ -760,7 +760,7 @@ void ulsch_extract_rbs_single(int32_t **rxdataF,
rxF
=
&
rxdataF
[
aarx
][(
6
*
(
2
*
first_rb
-
frame_parms
->
N_RB_UL
)
+
symbol
*
frame_parms
->
ofdm_symbol_size
)];
#ifdef DEBUG_ULSCH
LOG_D
(
PHY
,
"copying %d REs from %p to %p
\n
"
,
nb_rb2
*
6
,
rxF
,
rxF_ext
);
//
LOG_D(PHY,"copying %d REs from %p to %p\n",nb_rb2*6,rxF,rxF_ext);
#endif
memcpy
(
rxF_ext
,
rxF
,
nb_rb2
*
6
*
sizeof
(
int
));
rxF_ext
+=
nb_rb2
*
6
;
...
...
@@ -846,7 +846,7 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext,
#endif
for
(
rb
=
0
;
rb
<
nb_rb
;
rb
++
)
{
LOG_D
(
PHY
,
"comp: symbol %d rb %d
\n
"
,
symbol
,
rb
);
//
LOG_D(PHY,"comp: symbol %d rb %d\n",symbol,rb);
// just compute channel magnitude without scaling, this is done after equalization for SC-FDMA
...
...
@@ -869,7 +869,7 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext,
mmtmpU1
=
_mm_packs_epi32
(
mmtmpU0
,
mmtmpU0
);
ul_ch_mag128
[
2
]
=
_mm_unpacklo_epi16
(
mmtmpU1
,
mmtmpU1
);
LOG_D
(
PHY
,
"comp: symbol %d rb %d => %d,%d,%d (output_shift %d)
\n
"
,
symbol
,
rb
,
*
((
int16_t
*
)
&
ul_ch_mag128
[
0
]),
*
((
int16_t
*
)
&
ul_ch_mag128
[
1
]),
*
((
int16_t
*
)
&
ul_ch_mag128
[
2
]),
output_shift
);
//
LOG_D(PHY,"comp: symbol %d rb %d => %d,%d,%d (output_shift %d)\n",symbol,rb,*((int16_t*)&ul_ch_mag128[0]),*((int16_t*)&ul_ch_mag128[1]),*((int16_t*)&ul_ch_mag128[2]),output_shift);
#elif defined(__arm__)
...
...
openair1/PHY/LTE_UE_TRANSPORT/slsch.c
View file @
9a10ec0d
...
...
@@ -37,8 +37,9 @@
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "LAYER2/MAC/mac_proto.h"
#include "LAYER2/PDCP_v10.1.0/pdcp.h"
//#define PSSCH_DEBUG 1
#define DEBUG_SCI_DECODING 1
//
#define DEBUG_SCI_DECODING 1
extern
int
multicast_link_write_sock
(
int
groupP
,
char
*
dataP
,
uint32_t
sizeP
);
...
...
@@ -398,7 +399,7 @@ void pscch_codingmodulation(PHY_VARS_UE *ue,int frame_tx,int subframe_tx,uint32_
int
length
=
log2_approx
(
slsch
->
N_SL_RB_data
*
((
ue
->
slsch_rx
.
N_SL_RB_data
+
1
)
>>
1
))
+
32
;
LOG_D
(
PHY
,
"sci %lx (%d bits): freq_hopping_flag %d,resource_block_coding %d,time_resource_pattern %d,mcs %d,timing_advance_indication %d, group_destination_id %d
\n
"
,
sci
,
length
,
LOG_D
(
PHY
,
"sci %lx (%d bits): freq_hopping_flag %d,resource_block_coding %d,time_resource_pattern %d,mcs %d,timing_advance_indication %d, group_destination_id %d
\n
"
,
sci
,
length
,
slsch
->
freq_hopping_flag
,
slsch
->
resource_block_coding
,
slsch
->
time_resource_pattern
,
...
...
@@ -1100,7 +1101,7 @@ void pscch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
else
ue
->
slcch_received
=
0
;
//
ue->slcch_received = 1;
ue
->
slcch_received
=
1
;
ue
->
slsch_decoded
=
0
;
#ifdef DEBUG_SCI_DECODING
printf
(
"%d.%d sci %lx (%d bits,RAbits %d) : freq_hop %d, resource_block_coding %d, time_resource_pattern %d, mcs %d, timing_advance_indication %d, group_destination_id %d (gid shift %d result %lx => %lx
\n
"
,
...
...
@@ -1216,8 +1217,14 @@ void rx_slcch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subframe_rx)
if
(
frame_rx
<
100
)
LOG_D
(
PHY
,
"%d.%d: Checking n_pscch %d => a1 %d, a2 %d, b1 %d, b2 %d (LPSCCH %d, M_RB_PSCCH_RP %d)
\n
"
,
frame_rx
,
subframe_rx
,
n_pscch
,
a1
,
a2
,
b1
,
b2
,
LPSCCH
,
M_RB_PSCCH_RP
);
if
(
absSF_modP
==
b1
)
pscch_decoding
(
ue
,
proc
,
frame_rx
,
subframe_rx
,
a1
,
0
);
else
if
(
absSF_modP
==
b2
)
pscch_decoding
(
ue
,
proc
,
frame_rx
,
subframe_rx
,
a2
,
1
);
if
(
absSF_modP
==
b1
)
{
LOG_D
(
PHY
,
"About to decode SCI at b1: %d
\n
\n
\n
"
,
b1
);
pscch_decoding
(
ue
,
proc
,
frame_rx
,
subframe_rx
,
a1
,
0
);
}
else
if
(
absSF_modP
==
b2
){
LOG_D
(
PHY
,
"About to decode SCI at b2: %d
\n
\n
\n
"
,
b2
);
pscch_decoding
(
ue
,
proc
,
frame_rx
,
subframe_rx
,
a2
,
1
);
}
else
continue
;
}
...
...
@@ -1529,6 +1536,9 @@ void slsch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
slsch
->
group_destination_id
,
slsch
->
L_CRBs
,
slsch
->
mcs
,
slsch
->
rvidx
,
ret
);
/*LOG_I(PDCP, "In slsch_decoding() before calling ue_send_sl_sdu() 1 \n");
list_display_memory_head_tail(&pdcp_sdu_list);*/
ue_send_sl_sdu
(
0
,
0
,
frame_rx
,
subframe_rx
,
...
...
@@ -1536,6 +1546,8 @@ void slsch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
ue
->
dlsch_rx_slsch
->
harq_processes
[
0
]
->
TBS
>>
3
,
0
,
SL_DISCOVERY_FLAG_NO
);
/*LOG_I(PDCP, "In slsch_decoding() before calling ue_send_sl_sdu() 1 \n");
list_display_memory_head_tail(&pdcp_sdu_list);*/
if
(
slsch
->
rvidx
==
0
)
ue
->
slsch_rxcnt
[
0
]
++
;
else
if
(
slsch
->
rvidx
==
2
)
ue
->
slsch_rxcnt
[
1
]
++
;
...
...
openair2/LAYER2/MAC/ue_procedures.c
View file @
9a10ec0d
...
...
@@ -891,8 +891,7 @@ void ue_send_sl_sdu(module_id_t module_idP,
uint8_t
eNB_index
,
sl_discovery_flag_t
sl_discovery_flag
)
{
int
rlc_sdu_len
;
int
rlc_sdu_len
;
unsigned
char
*
rlc_sdu
;
int
lcid
=-
1
;
uint32_t
destinationL2Id
=
0x00000000
;
...
...
@@ -921,7 +920,7 @@ void ue_send_sl_sdu(module_id_t module_idP,
for
(
i
=
0
;
i
<
MAX_NUM_LCID
;
i
++
)
if
((
UE_mac_inst
[
module_idP
].
sl_info
[
i
].
groupL2Id
==
destinationL2Id
)
&&
(
UE_mac_inst
[
module_idP
].
sl_info
[
i
].
sourceL2Id
!=
sourceL2Id
))
{
lcid
=
UE_mac_inst
[
module_idP
].
sl_info
[
i
].
LCID
;
LOG_
I
(
MAC
,
"Found corresponding receiver LCID for group communication: %d
\n
"
,
lcid
);
LOG_
D
(
MAC
,
"Found corresponding receiver LCID for group communication: %d
\n
"
,
lcid
);
break
;
}
...
...
@@ -931,7 +930,7 @@ void ue_send_sl_sdu(module_id_t module_idP,
if
((
UE_mac_inst
[
module_idP
].
sl_info
[
j
].
destinationL2Id
==
sourceL2Id
)
&&
(
UE_mac_inst
[
module_idP
].
sl_info
[
j
].
sourceL2Id
==
destinationL2Id
))
{
//lcid = longh->LCID;
lcid
=
UE_mac_inst
[
module_idP
].
sl_info
[
j
].
LCID
;
LOG_
I
(
MAC
,
"Found corresponding receiver LCID for DATA direct communication: %d
\n
"
,
lcid
);
LOG_
D
(
MAC
,
"Found corresponding receiver LCID for DATA direct communication: %d
\n
"
,
lcid
);
break
;
}
}
...
...
@@ -1011,10 +1010,10 @@ void ue_send_sl_sdu(module_id_t module_idP,
}
AssertFatal
(
lcid
>
0
,
"lcid %d should not happen
\n
"
,
lcid
);
LOG_
I
(
MAC
,
"%d.%d myL2Id %d sending sdu of size %d, sourceL2Id %d, lcid %d to RLC
\n
"
,
frameP
,
subframeP
,
UE_mac_inst
[
module_idP
].
sourceL2Id
,
rlc_sdu_len
,
sourceL2Id
,
lcid
);
LOG_
D
(
MAC
,
"%d.%d myL2Id %d sending sdu of size %d, sourceL2Id %d, lcid %d to RLC
\n
"
,
frameP
,
subframeP
,
UE_mac_inst
[
module_idP
].
sourceL2Id
,
rlc_sdu_len
,
sourceL2Id
,
lcid
);
if
(
UE_rrc_inst
[
0
].
Info
[
0
].
rnti
==
0
){
mac_rlc_data_ind
(
mac_rlc_data_ind
(
module_idP
,
0x1234
,
eNB_index
,
...
...
@@ -3614,9 +3613,17 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
if
(
ue
->
sl_info
[
i
].
LCID
>
0
)
{
// for (int j = 0; j < ue->numCommFlows; j++){
if
((
ue
->
sourceL2Id
>
0
)
&&
(
ue
->
sl_info
[
i
].
destinationL2Id
>
0
)
){
/*LOG_I(MAC,"In ue_get_slsch before mac_rlc_status_ind \n");
list_display_memory_head_tail(&pdcp_sdu_list);*/
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
ue_rnti
,
0
,
frameP
,
subframeP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
ue
->
sl_info
[
i
].
LCID
,
0xFFFF
,
ue
->
sourceL2Id
,
ue
->
sl_info
[
i
].
destinationL2Id
);
LOG_D
(
MAC
,
"absSF_offset %d (test %d): Checking status (%d,Dest %d) => LCID %d => %d bytes
\n
"
,
absSF_offset
,
slsch_test
,
ue
->
sourceL2Id
,
ue
->
sl_info
[
i
].
destinationL2Id
,
ue
->
sl_info
[
i
].
LCID
,
rlc_status
.
bytes_in_buffer
);
/*LOG_I(MAC,"In ue_get_slsch after mac_rlc_status_ind \n");
list_display_memory_head_tail(&pdcp_sdu_list);*/
LOG_D
(
MAC
,
"absSF_offset %d (test %d): Checking status (%d,Dest %d) => LCID %d => %d bytes
\n
"
,
absSF_offset
,
slsch_test
,
ue
->
sourceL2Id
,
ue
->
sl_info
[
i
].
destinationL2Id
,
ue
->
sl_info
[
i
].
LCID
,
rlc_status
.
bytes_in_buffer
);
if
(
rlc_status
.
bytes_in_buffer
>
2
||
slsch_test
==
1
){
if
(
slsch_test
==
1
&&
rlc_status
.
bytes_in_buffer
<=
2
)
rlc_status
.
bytes_in_buffer
=
300
;
LOG_D
(
MAC
,
"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer
\n
"
,
frameP
,
subframeP
,
rlc_status
.
bytes_in_buffer
);
...
...
@@ -3662,7 +3669,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
slsch
->
RB_start
=
RB_start
;
slsch
->
L_CRBs
=
L_CRBs
;
// fill in SCI fields
slsch
->
n_pscch
=
ue
->
sourceL2Id
;
slsch
->
n_pscch
=
2
;
//
ue->sourceL2Id;
slsch
->
format
=
0
;
slsch
->
freq_hopping_flag
=
0
;
slsch
->
resource_block_coding
=
computeRIV
(
slsch
->
N_SL_RB_data
,
RB_start
,
L_CRBs
);
...
...
@@ -3714,7 +3721,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
else
req
=
rlc_status
.
bytes_in_buffer
+
2
;
if
(
req
>
0
)
{
sdu_length
=
mac_rlc_data_req
(
module_idP
,
sdu_length
=
mac_rlc_data_req
(
module_idP
,
ue_rnti
,
0
,
frameP
,
...
...
@@ -3728,15 +3735,14 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
ue
->
destinationL2Id
#endif
);
if
(
sdu_length
==
0
&&
slsch_test
==
1
)
sdu_length
=
300
;
// Notes: 1. hard-coded to 24-bit destination format for now
if
(
sdu_length
>
0
)
{
LOG_
I
(
MAC
,
"SFN.SF %d.%d : got %d bytes from Sidelink buffer (%d requested)
\n
"
,
frameP
,
subframeP
,
sdu_length
,
req
);
LOG_
I
(
MAC
,
"sourceL2Id: 0x%08x
\n
"
,
ue
->
sourceL2Id
);
LOG_
I
(
MAC
,
"groupL2Id/destinationL2Id: 0x%08x
\n
"
,
ue
->
destinationL2Id
);
LOG_
D
(
MAC
,
"SFN.SF %d.%d : got %d bytes from Sidelink buffer (%d requested)
\n
"
,
frameP
,
subframeP
,
sdu_length
,
req
);
LOG_
D
(
MAC
,
"sourceL2Id: 0x%08x
\n
"
,
ue
->
sourceL2Id
);
LOG_
D
(
MAC
,
"groupL2Id/destinationL2Id: 0x%08x
\n
"
,
ue
->
destinationL2Id
);
slsch
->
payload
=
(
unsigned
char
*
)
ue
->
slsch_pdu
.
payload
;
if
(
sdu_length
<
128
)
{
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
9a10ec0d
...
...
@@ -64,6 +64,8 @@
#endif
extern
int
otg_enabled
;
extern
int
sidelink_active
;
#if defined(ENABLE_USE_MME)
extern
uint8_t
nfapi_mode
;
#endif
...
...
@@ -176,7 +178,6 @@ boolean_t pdcp_data_req(
if
(
modeP
==
PDCP_TRANSMISSION_MODE_TRANSPARENT
)
{
LOG_D
(
PDCP
,
" [TM] Asking for a new mem_block of size %d
\n
"
,
sdu_buffer_sizeP
);
pdcp_pdu_p
=
get_free_mem_block
(
sdu_buffer_sizeP
,
__func__
);
if
(
pdcp_pdu_p
!=
NULL
)
{
memcpy
(
&
pdcp_pdu_p
->
data
[
0
],
sdu_buffer_pP
,
sdu_buffer_sizeP
);
#if defined(DEBUG_PDCP_PAYLOAD)
...
...
@@ -184,7 +185,6 @@ boolean_t pdcp_data_req(
(
unsigned
char
*
)
&
pdcp_pdu_p
->
data
[
0
],
sdu_buffer_sizeP
);
#endif
LOG_D
(
PDCP
,
"Before rlc_data_req 1, srb_flagP: %d, rb_idP: %d
\n
"
,
srb_flagP
,
rb_idP
);
rlc_status
=
rlc_data_req
(
ctxt_pP
,
srb_flagP
,
MBMS_FLAG_YES
,
rb_idP
,
muiP
,
confirmP
,
sdu_buffer_sizeP
,
pdcp_pdu_p
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
NULL
,
NULL
...
...
@@ -220,7 +220,6 @@ boolean_t pdcp_data_req(
* Allocate a new block for the new PDU (i.e. PDU header and SDU payload)
*/
pdcp_pdu_p
=
get_free_mem_block
(
pdcp_pdu_size
,
__func__
);
if
(
pdcp_pdu_p
!=
NULL
)
{
/*
* Create a Data PDU with header and append data
...
...
@@ -291,14 +290,12 @@ boolean_t pdcp_data_req(
LOG_D
(
PDCP
,
"Sequence number %d is assigned to current PDU
\n
"
,
current_sn
);
/* Then append data... */
memcpy
(
&
pdcp_pdu_p
->
data
[
pdcp_header_len
],
sdu_buffer_pP
,
sdu_buffer_sizeP
);
//For control plane data that are not integrity protected,
// the MAC-I field is still present and should be padded with padding bits set to 0.
// NOTE: user-plane data are never integrity protected
for
(
i
=
0
;
i
<
pdcp_tailer_len
;
i
++
)
{
pdcp_pdu_p
->
data
[
pdcp_header_len
+
sdu_buffer_sizeP
+
i
]
=
0x00
;
// pdu_header.mac_i[i];
}
#if defined(ENABLE_SECURITY)
if
((
pdcp_p
->
security_activated
!=
0
)
&&
...
...
@@ -359,13 +356,18 @@ boolean_t pdcp_data_req(
*/
LOG_DUMPMSG
(
PDCP
,
DEBUG_PDCP
,(
char
*
)
pdcp_pdu_p
->
data
,
pdcp_pdu_size
,
"[MSG] PDCP DL %s PDU on rb_id %d
\n
"
,(
srb_flagP
)
?
"CONTROL"
:
"DATA"
,
rb_idP
);
LOG_D
(
PDCP
,
"Before rlc_data_req 2, srb_flagP: %d, rb_idP: %d
\n
"
,
srb_flagP
,
rb_idP
);
//LOG_I(PDCP, "In pdcp_data_req() before calling rlc_data_req() 1 \n");
//list_display_memory_head_tail(&pdcp_sdu_list);
rlc_status
=
rlc_data_req
(
ctxt_pP
,
srb_flagP
,
MBMS_FLAG_NO
,
rb_idP
,
muiP
,
confirmP
,
pdcp_pdu_size
,
pdcp_pdu_p
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,
sourceL2Id
,
destinationL2Id
#endif
);
//LOG_I(PDCP, "In pdcp_data_req() after calling rlc_data_req() 1 \n");
//list_display_memory_head_tail(&pdcp_sdu_list);
}
switch
(
rlc_status
)
{
...
...
@@ -406,10 +408,15 @@ boolean_t pdcp_data_req(
* so we return TRUE afterwards
*/
for
(
pdcp_uid
=
0
;
pdcp_uid
<
MAX_MOBILES_PER_ENB
;
pdcp_uid
++
)
{
if
(
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
pdcp_uid
]
==
ctxt_pP
->
rnti
)
break
;
}
LOG_D
(
PDCP
,
"In pdcp_data_req(), MAX_MOBILES_PER_ENB: %d, ctxt_pP->module_id: %d, ctxt_pP->rnti: %d
\n
\n
"
,
MAX_MOBILES_PER_ENB
,
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
);
if
(
!
sidelink_active
){
for
(
pdcp_uid
=
0
;
pdcp_uid
<
MAX_MOBILES_PER_ENB
;
pdcp_uid
++
)
{
LOG_I
(
PDCP
,
"In pdcp_data_req(), pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid]: %d"
,
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
pdcp_uid
]);
if
(
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
pdcp_uid
]
==
ctxt_pP
->
rnti
)
break
;
}
//LOG_I(PDCP,"ueid %d lcid %d tx seq num %d\n", pdcp_uid, rb_idP+rb_offset, current_sn);
Pdcp_stats_tx
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
++
;
...
...
@@ -421,6 +428,12 @@ boolean_t pdcp_data_req(
Pdcp_stats_tx_aiat_tmp_w
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
+=
(
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
-
Pdcp_stats_tx_iat
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]);
Pdcp_stats_tx_iat
[
ctxt_pP
->
module_id
][
pdcp_uid
][
rb_idP
+
rb_offset
]
=
pdcp_enb
[
ctxt_pP
->
module_id
].
sfn
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ
,
VCD_FUNCTION_OUT
);
}
//if (!sidelink_active)
/*LOG_I(PDCP, "In pdcp_data_req() just before returning... \n");
list_display_memory_head_tail(&pdcp_sdu_list);*/
return
ret
;
}
...
...
@@ -437,7 +450,6 @@ pdcp_data_ind(
)
//-----------------------------------------------------------------------------
{
//LOG_I(RLC, "Panos-D: pdcp_data_ind() 1 \n");
pdcp_t
*
pdcp_p
=
NULL
;
list_t
*
sdu_list_p
=
NULL
;
mem_block_t
*
new_sdu_p
=
NULL
;
...
...
@@ -568,6 +580,7 @@ pdcp_data_ind(
PROTOCOL_PDCP_CTXT_FMT
"Incoming (from RLC) SDU is short of size (size:%d)! Ignoring...
\n
"
,
PROTOCOL_PDCP_CTXT_ARGS
(
ctxt_pP
,
pdcp_p
),
sdu_buffer_sizeP
);
free_mem_block
(
sdu_buffer_pP
,
__func__
);
if
(
ctxt_pP
->
enb_flag
)
{
...
...
@@ -756,7 +769,8 @@ pdcp_data_ind(
#endif
if
(
FALSE
==
packet_forwarded
)
{
new_sdu_p
=
get_free_mem_block
(
sdu_buffer_sizeP
-
payload_offset
+
sizeof
(
pdcp_data_ind_header_t
),
__func__
);
new_sdu_p
=
get_free_mem_block
(
sdu_buffer_sizeP
-
payload_offset
+
sizeof
(
pdcp_data_ind_header_t
),
__func__
);
if
(
new_sdu_p
)
{
if
((
MBMS_flagP
==
0
)
&&
(
pdcp_p
->
rlc_mode
==
RLC_MODE_AM
))
{
...
...
@@ -816,9 +830,13 @@ pdcp_data_ind(
LOG_D
(
PDCP
,
"inst=%d size=%d
\n
"
,
((
pdcp_data_ind_header_t
*
)
new_sdu_p
->
data
)
->
inst
,
((
pdcp_data_ind_header_t
*
)
new_sdu_p
->
data
)
->
data_size
);
#endif
//((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = 1; //pdcp_inst++;
LOG_D
(
PDCP
,
"sizeof (pdcp_data_ind_header_t): %d, payload_offset: %d
\n
\n
\n
"
,
sizeof
(
pdcp_data_ind_header_t
),
payload_offset
);
memcpy
(
&
new_sdu_p
->
data
[
sizeof
(
pdcp_data_ind_header_t
)],
\
&
sdu_buffer_pP
->
data
[
payload_offset
],
\
sdu_buffer_sizeP
-
payload_offset
);
sdu_buffer_sizeP
-
payload_offset
);
//payload_offset sizeof (pdcp_data_ind_header_t)
list_add_tail_eurecom
(
new_sdu_p
,
sdu_list_p
);
}
...
...
@@ -862,7 +880,6 @@ pdcp_data_ind(
}
free_mem_block
(
sdu_buffer_pP
,
__func__
);
if
(
ctxt_pP
->
enb_flag
)
{
stop_meas
(
&
eNB_pdcp_stats
[
ctxt_pP
->
module_id
].
data_ind
);
}
else
{
...
...
@@ -1034,8 +1051,14 @@ pdcp_run (
start_meas
(
&
UE_pdcp_stats
[
ctxt_pP
->
module_id
].
pdcp_ip
);
}
//LOG_I(PDCP, "In pdcp_run() before calling pdcp_fifo_flush_sdus() 1 \n");
//list_display_memory_head_tail(&pdcp_sdu_list);
pdcp_fifo_flush_sdus
(
ctxt_pP
);
//LOG_I(PDCP, "In pdcp_run() after calling pdcp_fifo_flush_sdus() 1 \n");
//list_display_memory_head_tail(&pdcp_sdu_list);
if
(
ctxt_pP
->
enb_flag
)
{
stop_meas
(
&
eNB_pdcp_stats
[
ctxt_pP
->
module_id
].
pdcp_ip
);
}
else
{
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
View file @
9a10ec0d
...
...
@@ -30,7 +30,7 @@
*/
#define PDCP_FIFO_C
#define PDCP_DEBUG 1
//
#define PDCP_DEBUG 1
//#define DEBUG_PDCP_FIFO_FLUSH_SDU
extern
int
otg_enabled
;
...
...
@@ -163,7 +163,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_FLUSH
,
1
);
while
(
sdu_p
&&
cont
&&
sdu_p
!=
0x01
&&
sdu_p
!=
0x02
)
{
//&& sdu_p!=0x01 && sdu_p!=0x02
while
(
sdu_p
&&
cont
)
{
//&& sdu_p!=0x01 && sdu_p!=0x02 && sdu_p!=0x100000000 && sdu_p!=0x200000000
#ifdef DEBUG_PDCP_FIFO_FLUSH_SDU
LOG_D
(
PDCP
,
"[%s] SFN/SF=%d/%d inst=%d size=%d
\n
"
,
...
...
@@ -216,7 +216,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
#endif
/* defined(ENABLE_USE_MME) */
#ifdef PDCP_DEBUG
LOG_
I
(
PDCP
,
"PDCP->IP TTI %d INST %d: Preparing %d Bytes of data from rab %d to Nas_mesh
\n
"
,
LOG_
D
(
PDCP
,
"PDCP->IP TTI %d INST %d: Preparing %d Bytes of data from rab %d to Nas_mesh
\n
"
,
ctxt_pP
->
frame
,
((
pdcp_data_ind_header_t
*
)(
sdu_p
->
data
))
->
inst
,
((
pdcp_data_ind_header_t
*
)(
sdu_p
->
data
))
->
data_size
,
((
pdcp_data_ind_header_t
*
)(
sdu_p
->
data
))
->
rb_id
);
#endif //PDCP_DEBUG
...
...
@@ -276,9 +276,6 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
bytes_wrote
=
pdcp_output_header_bytes_to_write
;
#endif //PDCP_USE_RT_FIFO
LOG_I
(
PDCP
,
"Frame %d Sent %d Bytes of header to Nas_mesh
\n
"
,
ctxt_pP
->
frame
,
bytes_wrote
);
#ifdef PDCP_DEBUG
LOG_D
(
PDCP
,
"Frame %d Sent %d Bytes of header to Nas_mesh
\n
"
,
ctxt_pP
->
frame
,
...
...
@@ -354,7 +351,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
if
(
!
pdcp_output_sdu_bytes_to_write
)
{
// OK finish with this SDU
// LOG_D(PDCP, "rb sent a sdu qos_sap %d\n", sapiP);
LOG_
I
(
PDCP
,
LOG_
D
(
PDCP
,
"[FRAME %05d][xxx][PDCP][MOD xx/xx][RB %u][--- PDCP_DATA_IND / %d Bytes --->][IP][INSTANCE %u][RB %u]
\n
"
,
ctxt_pP
->
frame
,
((
pdcp_data_ind_header_t
*
)(
sdu_p
->
data
))
->
rb_id
,
...
...
@@ -364,6 +361,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
list_remove_head
(
&
pdcp_sdu_list
);
free_mem_block
(
sdu_p
,
__func__
);
cont
=
1
;
pdcp_nb_sdu_sent
+=
1
;
sdu_p
=
list_get_head
(
&
pdcp_sdu_list
);
...
...
@@ -763,13 +761,13 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
if
(
h_rc
==
HASH_TABLE_OK
)
{
rab_id
=
pdcp_p
->
rb_id
;
#ifdef PDCP_DEBUG
LOG_
I
(
PDCP
,
"[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d on Rab %d
\n
"
,
LOG_
D
(
PDCP
,
"[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d on Rab %d
\n
"
,
ctxt
.
frame
,
pc5s_header
->
inst
,
bytes_received
,
pc5s_header
->
rb_id
);
LOG_
I
(
PDCP
,
"[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %u][RB %u]
\n
"
,
LOG_
D
(
PDCP
,
"[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %u][RB %u]
\n
"
,
ctxt
.
frame
,
pc5s_header
->
inst
,
pc5s_header
->
rb_id
,
...
...
@@ -790,6 +788,9 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
rab_id
,
pc5s_header
->
data_size
);
/*LOG_I(PDCP, "In pdcp_fifo_read_input_sdus() before calling pdcp_data_req() 1 \n");
list_display_memory_head_tail(&pdcp_sdu_list);*/
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
...
...
@@ -804,6 +805,9 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
,
&
pc5s_header
->
destinationL2Id
#endif
);
/*LOG_I(PDCP, "In pdcp_fifo_read_input_sdus() after calling pdcp_data_req 1() \n");
list_display_memory_head_tail(&pdcp_sdu_list);*/
}
else
{
MSC_LOG_RX_DISCARDED_MESSAGE
(
(
ctxt_pP
->
enb_flag
==
ENB_FLAG_YES
)
?
MSC_PDCP_ENB
:
MSC_PDCP_UE
,
...
...
@@ -847,7 +851,6 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
pc5s_header
->
rb_id
,
DEFAULT_RAB_ID
,
pc5s_header
->
data_size
);
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
...
...
@@ -1076,7 +1079,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
if
(
h_rc
==
HASH_TABLE_OK
)
{
rab_id
=
pdcp_p
->
rb_id
;
#ifdef PDCP_DEBUG
LOG_
I
(
PDCP
,
"[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %zu) on Rab %d
\n
"
,
LOG_
D
(
PDCP
,
"[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %zu) on Rab %d
\n
"
,
ctxt
.
frame
,
pdcp_read_header_g
.
inst
,
len
,
...
...
@@ -1120,7 +1123,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
);
}
else
{
//TTN - for traffic from OIP1 (to eNB), sourceL2/DestL2 should be set to NULL
LOG_
I
(
PDCP
,
"[THINH] source L2 Id: 0x%08x, destL2 0x%08x
\n
"
,
pdcp_read_header_g
.
sourceL2Id
,
pdcp_read_header_g
.
destinationL2Id
);
LOG_
D
(
PDCP
,
"[THINH] source L2 Id: 0x%08x, destL2 0x%08x
\n
"
,
pdcp_read_header_g
.
sourceL2Id
,
pdcp_read_header_g
.
destinationL2Id
);
if
(
pdcp_read_header_g
.
inst
==
0
){
//INST == 0 (OIP0)
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
...
...
@@ -1213,7 +1216,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
}
else
{
//TTN - for traffic from OIP1 (to eNB), sourceL2/DestL2 should be set to NULL
if
(
pdcp_read_header_g
.
inst
==
0
){
//INST == 0 (OIP0)
LOG_
I
(
PDCP
,
"[THINH] source L2 Id: 0x%08x, destL2 0x%08x
\n
"
,
pdcp_read_header_g
.
sourceL2Id
,
pdcp_read_header_g
.
destinationL2Id
);
LOG_
D
(
PDCP
,
"[THINH] source L2 Id: 0x%08x, destL2 0x%08x
\n
"
,
pdcp_read_header_g
.
sourceL2Id
,
pdcp_read_header_g
.
destinationL2Id
);
pdcp_data_req
(
&
ctxt
,
SRB_FLAG_NO
,
...
...
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c
View file @
9a10ec0d
...
...
@@ -40,6 +40,7 @@
#include "mac_primitives.h"
#include "LAYER2/MAC/mac_extern.h"
#include "common/utils/LOG/log.h"
//#include "LAYER2/PDCP_v10.1.0/pdcp.h"
#include "rlc_um_very_simple_test.h"
...
...
openair2/LAYER2/RLC/rlc.c
View file @
9a10ec0d
...
...
@@ -397,13 +397,13 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
key
=
RLC_COLL_KEY_MBMS_VALUE
(
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
ctxt_pP
->
enb_flag
,
mbms_id_p
->
service_id
,
mbms_id_p
->
session_id
);
}
if
(
sourceL2Id
&&
destinationL2Id
){
LOG_
I
(
RLC
,
"In sidelink case: RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d
\n
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
ctxt_pP
->
enb_flag
,
rb_idP
,
srb_flagP
);
LOG_
D
(
RLC
,
"In sidelink case: RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d
\n
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
ctxt_pP
->
enb_flag
,
rb_idP
,
srb_flagP
);
key
=
RLC_COLL_KEY_SOURCE_DEST_VALUE
(
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
ctxt_pP
->
enb_flag
,
rb_idP
,
*
sourceL2Id
,
*
destinationL2Id
,
srb_flagP
);
}
else
#endif
{
LOG_
I
(
RLC
,
"Not in sidelink case: RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d
\n
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
ctxt_pP
->
enb_flag
,
rb_idP
,
srb_flagP
);
LOG_
D
(
RLC
,
"Not in sidelink case: RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d
\n
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
ctxt_pP
->
enb_flag
,
rb_idP
,
srb_flagP
);
key
=
RLC_COLL_KEY_VALUE
(
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
ctxt_pP
->
enb_flag
,
rb_idP
,
srb_flagP
);
}
...
...
openair2/NETWORK_DRIVER/LITE/netlink.c
View file @
9a10ec0d
...
...
@@ -184,7 +184,7 @@ int oai_nw_drv_netlink_send(unsigned char *data,unsigned int len)
// mutex_unlock(&nasmesh_mutex);
if
(
status
<
0
)
{
printk
(
"[OAI_IP_DRV][NETLINK] SEND status is %d
\n
"
,
status
);
//
printk("[OAI_IP_DRV][NETLINK] SEND status is %d\n",status);
return
(
0
);
}
else
{
#ifdef NETLINK_DEBUG
...
...
openair2/NETWORK_DRIVER/UE_IP/common.c
View file @
9a10ec0d
...
...
@@ -57,8 +57,8 @@
ntohs((addr)->s6_addr16[7])
#define OAI_DRV_DEBUG_SEND
#define OAI_DRV_DEBUG_RECEIVE
//
#define OAI_DRV_DEBUG_SEND
//
#define OAI_DRV_DEBUG_RECEIVE
void
ue_ip_common_class_wireless2ip
(
...
...
@@ -286,7 +286,7 @@ ue_ip_common_ip2wireless(
if
(
skb_pP
->
mark
&&
instP
==
0
)
{
pdcph
.
rb_id
=
skb_pP
->
mark
;
printk
(
"[UE_IP_DRV_PROSE] skb_pP->mark %d, oip instance: %d
\n
"
,
skb_pP
->
mark
,
instP
);
//
printk("[UE_IP_DRV_PROSE] skb_pP->mark %d, oip instance: %d\n",skb_pP->mark, instP);
}
else
{
pdcph
.
rb_id
=
UE_IP_DEFAULT_RAB_ID
;
}
...
...
@@ -299,14 +299,16 @@ ue_ip_common_ip2wireless(
switch
(
ipv_p
->
version
)
{
case
6
:
#ifdef OAI_DRV_DEBUG_RECEIVE
printk
(
"[UE_IP_DRV][%s] receive IPv6 message
\n
"
,
__FUNCTION__
);
#endif
//TODO
break
;
case
4
:
src_addr
=
(
unsigned
char
*
)
&
((
struct
iphdr
*
)
&
skb_pP
->
data
[
hard_header_len
])
->
saddr
;
dst_addr
=
(
unsigned
char
*
)
&
((
struct
iphdr
*
)
&
skb_pP
->
data
[
hard_header_len
])
->
daddr
;
#ifdef OAI_DRV_DEBUG_SEND
if
(
src_addr
)
{
printk
(
"[UE_IP_DRV][%s] Source %d.%d.%d.%d
\n
"
,
__FUNCTION__
,
src_addr
[
0
],
src_addr
[
1
],
src_addr
[
2
],
src_addr
[
3
]);
}
...
...
@@ -314,7 +316,7 @@ ue_ip_common_ip2wireless(
printk
(
"[UE_IP_DRV][%s] Dest %d.%d.%d.%d
\n
"
,
__FUNCTION__
,
dst_addr
[
0
],
dst_addr
[
1
],
dst_addr
[
2
],
dst_addr
[
3
]);
}
printk
(
"[UE_IP_DRV][%s] slrb_id %d
\n
"
,
__FUNCTION__
,
pdcph
.
rb_id
);
#endif
// modify inst by IP address for the U-Plane of multiple UEs while L2 fapi simulator start
#ifdef UESIM_EXPANSION
if
((
src_addr
[
3
]
-
2
)
>
instP
)
{
...
...
@@ -341,8 +343,10 @@ ue_ip_common_ip2wireless(
//get Ipv4 address and pass to PCDP header
//pdcph.sourceL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->saddr) & 0x00FFFFFF;
//pdcph.destinationL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->daddr) & 0x00FFFFFF;
#ifdef OAI_DRV_DEBUG_SEND
printk
(
"[UE_IP_DRV] source Id: 0x%08x
\n
"
,
pdcph
.
sourceL2Id
);
printk
(
"[UE_IP_DRV] destinationL2Id Id: 0x%08x
\n
"
,
pdcph
.
destinationL2Id
);
#endif
break
;
default:
...
...
@@ -357,8 +361,10 @@ ue_ip_common_ip2wireless(
#endif
if
(
bytes_wrote
!=
UE_IP_PDCPH_SIZE
)
{
#ifdef OAI_DRV_DEBUG_SEND
printk
(
"[UE_IP_DRV][%s] problem while writing PDCP's header (bytes wrote = %d)
\n
"
,
__FUNCTION__
,
bytes_wrote
);
printk
(
"rb_id %d, Wrote %d, Header Size %d
\n
"
,
pdcph
.
rb_id
,
bytes_wrote
,
UE_IP_PDCPH_SIZE
);
#endif
priv_p
->
stats
.
tx_dropped
++
;
return
;
}
...
...
@@ -367,6 +373,7 @@ ue_ip_common_ip2wireless(
if
(
bytes_wrote
!=
skb_pP
->
len
+
UE_IP_PDCPH_SIZE
)
{
#ifdef OAI_DRV_DEBUG_SEND
printk
(
"[UE_IP_DRV][%s] Inst %d, RB_ID %d: problem while writing PDCP's data, bytes_wrote = %d, Data_len %d, PDCPH_SIZE %d
\n
"
,
__FUNCTION__
,
instP
,
...
...
@@ -374,6 +381,7 @@ ue_ip_common_ip2wireless(
bytes_wrote
,
skb_pP
->
len
,
UE_IP_PDCPH_SIZE
);
// congestion
#endif
priv_p
->
stats
.
tx_dropped
++
;
return
;
...
...
openair2/NETWORK_DRIVER/UE_IP/netlink.c
View file @
9a10ec0d
...
...
@@ -188,7 +188,9 @@ int ue_ip_netlink_send(unsigned char *data,unsigned int len)
// mutex_unlock(&nasmesh_mutex);
if
(
status
<
0
)
{
#ifdef NETLINK_DEBUG
printk
(
"[UE_IP_DRV][NETLINK] SEND status is %d
\n
"
,
status
);
#endif
return
(
0
);
}
else
{
#ifdef NETLINK_DEBUG
...
...
@@ -197,7 +199,9 @@ int ue_ip_netlink_send(unsigned char *data,unsigned int len)
return
len
;
}
}
else
{
#ifdef NETLINK_DEBUG
printk
(
"[UE_IP_DRV][SEND] socket is NULL
\n
"
);
#endif
return
(
0
);
}
}
openair2/UTIL/LISTS/list.c
View file @
9a10ec0d
...
...
@@ -178,6 +178,14 @@ list_add_head (mem_block_t * elementP, list_t * listP)
}
}
void
list_display_memory_head_tail
(
list_t
*
listP
){
/*printf("Displaying list's head address: %p \n", listP->head);
printf("Displaying list's tail address: %p \n \n", listP->tail);*/
}
//-----------------------------------------------------------------------------
/*
* add an element to the end of a list
...
...
@@ -194,12 +202,25 @@ list_add_tail_eurecom (mem_block_t * elementP, list_t * listP)
// access optimisation
listP
->
nb_elements
=
listP
->
nb_elements
+
1
;
elementP
->
next
=
NULL
;
//printf("In list_add_tail_eurecom 3\n");
//list_display_memory_head_tail(listP);
tail
=
listP
->
tail
;
//printf("In list_add_tail_eurecom 4\n");
//list_display_memory_head_tail(listP);
// almost one element
if
(
tail
==
NULL
||
tail
==
0x100000000
)
{
//|| tail == 0x100000000
if
(
tail
==
NULL
)
{
//|| tail == 0x100000000
//printf("In list_add_tail_eurecom 5\n");
//list_display_memory_head_tail(listP);
listP
->
head
=
elementP
;
}
else
{
//printf("In list_add_tail_eurecom 6\n");
//list_display_memory_head_tail(listP);
tail
->
next
=
elementP
;
}
...
...
openair2/UTIL/LISTS/list.h
View file @
9a10ec0d
...
...
@@ -59,6 +59,7 @@ void list_add_head (mem_block_t* , list_t* );
void
list_add_tail_eurecom
(
mem_block_t
*
,
list_t
*
);
void
list_add_list
(
list_t
*
,
list_t
*
);
void
list_display
(
list_t
*
);
void
list_display_memory_head_tail
(
list_t
*
listP
);
//-----------------------------------------------------------------------------
void
list2_init
(
list2_t
*
,
char
*
);
void
list2_free
(
list2_t
*
);
...
...
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