Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
openairinterface5G
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
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
Weiqi Wang
openairinterface5G
Commits
6434e645
Commit
6434e645
authored
Dec 24, 2017
by
knopp
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.eurecom.fr/matzakos/LTE-D2D
Conflicts: targets/RT/USER/lte-ue.c
parents
a3380204
f3192892
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
568 additions
and
244 deletions
+568
-244
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+2
-0
nfapi/nfapi_pnf.c
nfapi/nfapi_pnf.c
+4
-2
nfapi/nfapi_vnf.c
nfapi/nfapi_vnf.c
+1
-1
openair1/PHY/LTE_TRANSPORT/defs.h
openair1/PHY/LTE_TRANSPORT/defs.h
+23
-0
openair1/PHY/LTE_TRANSPORT/prach.c
openair1/PHY/LTE_TRANSPORT/prach.c
+4
-0
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+9
-3
openair1/PHY/defs.h
openair1/PHY/defs.h
+24
-0
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+3
-3
openair2/LAYER2/MAC/ra_procedures.c
openair2/LAYER2/MAC/ra_procedures.c
+11
-2
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+32
-24
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+4
-4
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+4
-0
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c
+8
-3
openair2/LAYER2/RLC/rlc_mac.c
openair2/LAYER2/RLC/rlc_mac.c
+2
-2
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+119
-37
openair2/RRC/LITE/defs.h
openair2/RRC/LITE/defs.h
+5
-0
openair2/RRC/LITE/rrc_UE.c
openair2/RRC/LITE/rrc_UE.c
+74
-11
targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpb210.conf
...s/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpb210.conf
+6
-3
targets/RT/USER/lte-softmodem-stub.c
targets/RT/USER/lte-softmodem-stub.c
+5
-3
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+228
-146
No files found.
cmake_targets/CMakeLists.txt
View file @
6434e645
...
...
@@ -1949,6 +1949,8 @@ add_executable(lte-softmodem-stub
${
OPENAIR_TARGETS
}
/COMMON/create_tasks.c
${
OPENAIR_TARGETS
}
/ARCH/COMMON/common_lib.c
${
OPENAIR1_DIR
}
/SIMULATION/ETH_TRANSPORT/netlink_init.c
${
OPENAIR1_DIR
}
/SIMULATION/ETH_TRANSPORT/multicast_link.c
${
OPENAIR1_DIR
}
/SIMULATION/ETH_TRANSPORT/socket.c
${
OPENAIR3_DIR
}
/NAS/UE/nas_ue_task.c
${
OPENAIR_DIR
}
/common/utils/utils.c
${
OPENAIR_DIR
}
/common/utils/system.c
...
...
nfapi/nfapi_pnf.c
View file @
6434e645
...
...
@@ -645,7 +645,7 @@ int param_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfapi
// P7 PNF Port
nfapi_resp
.
nfapi_config
.
p7_pnf_port
.
tl
.
tag
=
NFAPI_NFAPI_P7_PNF_PORT_TAG
;
nfapi_resp
.
nfapi_config
.
p7_pnf_port
.
value
=
32123
;
// DJP - hard code alert!!!! FIXME TODO
nfapi_resp
.
nfapi_config
.
p7_pnf_port
.
value
=
32123
;
//
32123; //
DJP - hard code alert!!!! FIXME TODO
nfapi_resp
.
num_tlv
++
;
nfapi_pnf_param_resp
(
config
,
&
nfapi_resp
);
...
...
@@ -1326,7 +1326,7 @@ int start_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfapi
p7_config
->
remote_p7_port
=
phy_info
->
remote_port
;
p7_config
->
remote_p7_addr
=
phy_info
->
remote_addr
;
p7_config
->
local_p7_port
=
32123
;
// DJP - good grief cannot seem to get the right answer phy_info->local_port;
p7_config
->
local_p7_port
=
32123
;
//
32123; //
DJP - good grief cannot seem to get the right answer phy_info->local_port;
//DJP p7_config->local_p7_addr = (char*)phy_info->local_addr.c_str();
p7_config
->
local_p7_addr
=
phy_info
->
local_addr
;
...
...
@@ -1353,6 +1353,7 @@ int start_request(nfapi_pnf_config_t* config, nfapi_pnf_phy_config_t* phy, nfapi
if
(
phy_info
->
timing_info_mode
&
0x2
)
{
LOG_I
(
MAC
,
"Panos-D: Configure timing info aperiodic"
);
p7_config
->
timing_info_mode_aperiodic
=
1
;
}
...
...
@@ -1846,6 +1847,7 @@ void oai_subframe_ind(uint16_t sfn, uint16_t sf)
//printf("Panos-D: oai_subframe_ind 1, buffer size:%d", p7_config_g->subframe_buffer_size);
uint16_t
sfn_sf_tx
=
sfn
<<
4
|
sf
;
//LOG_I(MAC, " Panos-D: oai_subframe_ind SFN/SF: %d.%d, SFN_Tx: %d \n", sfn, sf, sfn_sf_tx);
if
((
sfn
%
100
==
0
)
&&
sf
==
0
)
{
...
...
nfapi/nfapi_vnf.c
View file @
6434e645
...
...
@@ -1362,7 +1362,7 @@ void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port)
vnf
.
p7_vnfs
[
0
].
timing_window
=
32
;
vnf
.
p7_vnfs
[
0
].
periodic_timing_enabled
=
1
;
vnf
.
p7_vnfs
[
0
].
aperiodic_timing_enabled
=
0
;
vnf
.
p7_vnfs
[
0
].
aperiodic_timing_enabled
=
1
;
vnf
.
p7_vnfs
[
0
].
periodic_timing_period
=
10
;
vnf
.
p7_vnfs
[
0
].
config
=
nfapi_vnf_p7_config_create
();
...
...
openair1/PHY/LTE_TRANSPORT/defs.h
View file @
6434e645
...
...
@@ -930,6 +930,9 @@ typedef struct {
uint32_t
n_prime_PRB
;
/// m_nprime_PRB_PSSCH (36.213 14.1.3)
uint32_t
m_nprime_PRB_PSCCH
;
/// payload length
int
payload_length
;
/// pointer to payload
uint8_t
*
payload
;
}
SLSCH_t
;
...
...
@@ -937,6 +940,26 @@ typedef struct {
}
SLDCH_t
;
#define TTI_SYNC 0
#define SLSS 1
#define SLDCH 2
#define SLSCH 3
typedef
struct
UE_tport_header_s
{
int
packet_type
;
uint16_t
absSF
;
}
UE_tport_header_t
;
typedef
struct
UE_tport_s
{
UE_tport_header_t
header
;
union
{
SLSS_t
slss
;
SLDCH_t
sldch
;
SLSCH_t
slsch
;
};
uint8_t
payload
[
1500
];
}
UE_tport_t
;
#endif
/**@}*/
...
...
openair1/PHY/LTE_TRANSPORT/prach.c
View file @
6434e645
...
...
@@ -584,9 +584,12 @@ int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex
}
int
is_prach_subframe
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
frame
,
uint8_t
subframe
)
{
uint8_t
prach_ConfigIndex
=
frame_parms
->
prach_config_common
.
prach_ConfigInfo
.
prach_ConfigIndex
;
//LOG_I(MAC, "Panos-D: is_prach_subframe 2 \n");
int
prach_mask
=
is_prach_subframe0
(
frame_parms
,
prach_ConfigIndex
,
frame
,
subframe
);
//LOG_I(MAC, "Panos-D: is_prach_subframe 3 \n");
#ifdef Rel14
int
i
;
...
...
@@ -596,6 +599,7 @@ int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t su
prach_mask
|=
(
is_prach_subframe0
(
frame_parms
,
frame_parms
->
prach_emtc_config_common
.
prach_ConfigInfo
.
prach_ConfigIndex
[
i
],
frame
,
subframe
)
<<
(
i
+
1
));
}
#endif
//LOG_I(MAC, "Panos-D: is_prach_subframe 4 \n");
return
(
prach_mask
);
}
...
...
openair1/PHY/LTE_TRANSPORT/proto.h
View file @
6434e645
...
...
@@ -1482,20 +1482,26 @@ uint8_t generate_dci_top_emul(PHY_VARS_eNB *phy_vars_eNB,
/*! \brief Top-level generation route for Sidelink BCH,PSS and SSS
\param ue pointer to UE descriptor
\param slss pointer to SLSS configuration and payload
\param frame_tx Frame number
\param subframe_tx subframe number
*/
void
generate_slss
(
PHY_VARS_UE
*
ue
,
SLSS_t
*
slss
);
void
generate_slss
(
PHY_VARS_UE
*
ue
,
SLSS_t
*
slss
,
int
frame_tx
,
int
subframe_tx
);
/*! \brief Top-level generation route for Sidelink Discovery Channel
\param ue pointer to UE descriptor
\param sldch pointer to SLDCH configuration and payload
\param frame_tx Frame number
\param subframe_tx subframe number
*/
void
generate_sldch
(
PHY_VARS_UE
*
ue
,
SLDCH_t
*
sldch
);
void
generate_sldch
(
PHY_VARS_UE
*
ue
,
SLDCH_t
*
sldch
,
int
frame_tx
,
int
subframe_tx
);
/*! \brief Top-level generation route for Sidelink Shared Channel
\param ue pointer to UE descriptor
\param slsch pointer to SLSCH configuration and payload
\param frame_tx Frame number
\param subframe_tx subframe number
*/
void
generate_slsch
(
PHY_VARS_UE
*
ue
,
SLSCH_t
*
slss
);
void
generate_slsch
(
PHY_VARS_UE
*
ue
,
SLSCH_t
*
slss
,
int
frame_tx
,
int
subframe_tx
);
void
generate_64qam_table
(
void
);
void
generate_16qam_table
(
void
);
...
...
openair1/PHY/defs.h
View file @
6434e645
...
...
@@ -1454,6 +1454,10 @@ typedef struct {
time_stats_t
tx_prach
;
time_stats_t
timer_stats
;
pthread_mutex_t
timer_mutex
;
pthread_cond_t
timer_cond
;
int
instance_cnt_timer
;
/// RF and Interface devices per CC
openair0_device
rfdevice
;
...
...
@@ -1575,6 +1579,26 @@ static inline void wait_sync(char *thread_name) {
}
static
inline
int
wakeup_thread
(
pthread_mutex_t
*
mutex
,
pthread_cond_t
*
cond
,
int
*
instance_cnt
,
char
*
name
)
{
if
(
pthread_mutex_lock
(
mutex
)
!=
0
)
{
LOG_E
(
PHY
,
"error locking mutex for %s
\n
"
,
name
);
exit_fun
(
"nothing to add"
);
return
(
-
1
);
}
*
instance_cnt
=
*
instance_cnt
+
1
;
// the thread can now be woken up
if
(
pthread_cond_signal
(
cond
)
!=
0
)
{
LOG_E
(
PHY
,
"ERROR pthread_cond_signal
\n
"
);
exit_fun
(
"ERROR pthread_cond_signal"
);
return
(
-
1
);
}
pthread_mutex_unlock
(
mutex
);
return
(
0
);
}
static
inline
int
wait_on_condition
(
pthread_mutex_t
*
mutex
,
pthread_cond_t
*
cond
,
int
*
instance_cnt
,
char
*
name
)
{
if
(
pthread_mutex_lock
(
mutex
)
!=
0
)
{
LOG_E
(
PHY
,
"[SCHED][eNB] error locking mutex for %s
\n
"
,
name
);
...
...
openair1/SCHED/phy_procedures_lte_ue.c
View file @
6434e645
...
...
@@ -2379,13 +2379,13 @@ void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
LOG_D
(
PHY
,
"****** start Sidelink TX-Chain for AbsSubframe %d.%d ******
\n
"
,
frame_tx
,
subframe_tx
);
// check for SLBCH/SLSS
if
((
slss
=
ue_get_slss
(
ue
->
Mod_id
,
ue
->
CC_id
,
frame_tx
,
subframe_tx
))
!=
NULL
)
generate_slss
(
ue
,
slss
);
if
((
slss
=
ue_get_slss
(
ue
->
Mod_id
,
ue
->
CC_id
,
frame_tx
,
subframe_tx
))
!=
NULL
)
generate_slss
(
ue
,
slss
,
frame_tx
,
subframe_tx
);
// check for SLDCH
if
((
sldch
=
ue_get_sldch
(
ue
->
Mod_id
,
ue
->
CC_id
,
frame_tx
,
subframe_tx
))
!=
NULL
)
generate_sldch
(
ue
,
sldch
);
if
((
sldch
=
ue_get_sldch
(
ue
->
Mod_id
,
ue
->
CC_id
,
frame_tx
,
subframe_tx
))
!=
NULL
)
generate_sldch
(
ue
,
sldch
,
frame_tx
,
subframe_tx
);
// check for SLSCH
if
((
slsch
=
ue_get_slsch
(
ue
->
Mod_id
,
ue
->
CC_id
,
frame_tx
,
subframe_tx
))
!=
NULL
)
generate_slsch
(
ue
,
slsch
);
if
((
slsch
=
ue_get_slsch
(
ue
->
Mod_id
,
ue
->
CC_id
,
frame_tx
,
subframe_tx
))
!=
NULL
)
generate_slsch
(
ue
,
slsch
,
frame_tx
,
subframe_tx
);
}
...
...
openair2/LAYER2/MAC/ra_procedures.c
View file @
6434e645
...
...
@@ -106,6 +106,7 @@ void get_prach_resources(module_id_t module_idP,
uint8_t
first_Msg3
,
RACH_ConfigDedicated_t
*
rach_ConfigDedicated
)
{
LOG_I
(
MAC
,
"Panos-D: get_prach_resources 1"
);
uint8_t
Msg3_size
=
UE_mac_inst
[
module_idP
].
RA_Msg3_size
;
PRACH_RESOURCES_t
*
prach_resources
=
&
UE_mac_inst
[
module_idP
].
RA_prach_resources
;
...
...
@@ -195,17 +196,20 @@ void get_prach_resources(module_id_t module_idP,
if
(
first_Msg3
==
1
)
{
if
(
noGroupB
==
1
)
{
LOG_I
(
MAC
,
"Panos-D: get_prach_resources 2"
);
// use Group A procedure
UE_mac_inst
[
module_idP
].
RA_prach_resources
.
ra_PreambleIndex
=
(
taus
())
%
numberOfRA_Preambles
;
UE_mac_inst
[
module_idP
].
RA_prach_resources
.
ra_RACH_MaskIndex
=
0
;
UE_mac_inst
[
module_idP
].
RA_usedGroupA
=
1
;
}
else
if
((
Msg3_size
<
messageSizeGroupA
)
||
(
get_PL
(
module_idP
,
0
,
eNB_index
)
>
PLThreshold
))
{
LOG_I
(
MAC
,
"Panos-D: get_prach_resources 3"
);
// use Group A procedure
UE_mac_inst
[
module_idP
].
RA_prach_resources
.
ra_PreambleIndex
=
(
taus
())
%
sizeOfRA_PreamblesGroupA
;
UE_mac_inst
[
module_idP
].
RA_prach_resources
.
ra_RACH_MaskIndex
=
0
;
UE_mac_inst
[
module_idP
].
RA_usedGroupA
=
1
;
}
else
{
// use Group B
LOG_I
(
MAC
,
"Panos-D: get_prach_resources 4"
);
UE_mac_inst
[
module_idP
].
RA_prach_resources
.
ra_PreambleIndex
=
sizeOfRA_PreamblesGroupA
+
(
taus
())
%
(
numberOfRA_Preambles
-
sizeOfRA_PreamblesGroupA
);
UE_mac_inst
[
module_idP
].
RA_prach_resources
.
ra_RACH_MaskIndex
=
0
;
...
...
@@ -246,6 +250,7 @@ void get_prach_resources(module_id_t module_idP,
// choose RA-RNTI
UE_mac_inst
[
module_idP
].
RA_prach_resources
.
ra_RNTI
=
1
+
t_id
+
10
*
f_id
;
LOG_I
(
MAC
,
"Panos-D: get_prach_resources 4"
);
}
void
Msg1_transmitted
(
module_id_t
module_idP
,
uint8_t
CC_id
,
frame_t
frameP
,
uint8_t
eNB_id
)
...
...
@@ -290,12 +295,13 @@ void Msg3_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8
PRACH_RESOURCES_t
*
ue_get_rach
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
,
uint8_t
eNB_indexP
,
sub_frame_t
subframeP
)
{
LOG_I
(
MAC
,
"Panos-D: ue_get_rach 1"
);
uint8_t
Size
=
0
;
UE_MODE_t
UE_mode
;
// Panos: Modification for phy_stub_ue operation
if
(
nfapi_mode
==
3
)
{
// Panos: phy_stub_ue mode
UE_mode
=
UE_mac_inst
[
module_idP
].
UE_mode
[
0
];
LOG_I
(
MAC
,
"Panos-D: ue_get_rach 2, E_mode: %d"
,
UE_mode
);
}
else
{
// Full stack mode
UE_mode
=
get_ue_mode
(
module_idP
,
0
,
eNB_indexP
);
...
...
@@ -315,13 +321,16 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP,
"Transmission on secondary CCs is not supported yet
\n
"
);
if
(
UE_mode
==
PRACH
)
{
LOG_I
(
MAC
,
"Panos-D: ue_get_rach 3"
);
if
(
UE_mac_inst
[
module_idP
].
radioResourceConfigCommon
)
{
rach_ConfigCommon
=
&
UE_mac_inst
[
module_idP
].
radioResourceConfigCommon
->
rach_ConfigCommon
;
}
else
{
//AssertFatal(UE_mac_inst[module_idP].radioResourceConfigCommon!=NULL,"RadioResourceConfigCommon Null");
return
(
NULL
);
}
if
(
UE_mac_inst
[
module_idP
].
RA_active
==
0
)
{
LOG_I
(
MAC
,
"Panos-D: ue_get_rach 4"
);
LOG_I
(
MAC
,
"RA not active
\n
"
);
// check if RRC is ready to initiate the RA procedure
Size
=
mac_rrc_data_req
(
module_idP
,
...
...
@@ -339,7 +348,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP,
LOG_I
(
MAC
,
"[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes
\n
"
,
module_idP
,
frameP
,
Size
);
if
(
Size
>
0
)
{
LOG_I
(
MAC
,
"Panos-D: ue_get_rach 5"
);
UE_mac_inst
[
module_idP
].
RA_active
=
1
;
UE_mac_inst
[
module_idP
].
RA_PREAMBLE_TRANSMISSION_COUNTER
=
1
;
UE_mac_inst
[
module_idP
].
RA_Msg3_size
=
Size
+
sizeof
(
SCH_SUBHEADER_SHORT
)
+
sizeof
(
SCH_SUBHEADER_SHORT
);
...
...
openair2/LAYER2/MAC/ue_procedures.c
View file @
6434e645
...
...
@@ -139,7 +139,7 @@ void ue_init_mac(module_id_t module_idP)
if
(
nfapi_mode
==
3
)
{
pthread_mutex_init
(
&
UE_mac_inst
[
module_idP
].
UL_INFO_mutex
,
NULL
);
UE_mac_inst
[
module_idP
].
UE_mode
[
0
]
=
PRACH
;
UE_mac_inst
[
module_idP
].
UE_mode
[
0
]
=
NOT_SYNCHED
;
//
PRACH;
UE_mac_inst
[
module_idP
].
first_ULSCH_Tx
=
0
;
UE_mac_inst
[
module_idP
].
dl_config_req
=
NULL
;
UE_mac_inst
[
module_idP
].
ul_config_req
=
NULL
;
...
...
@@ -2696,8 +2696,8 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
0x1234
,
0
,
frameP
,
subframeP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
3
,
0xFFFF
);
if
(
rlc_status
.
bytes_in_buffer
>
0
)
{
LOG_I
(
MAC
,
"S
cheduling for %d bytes in Sidelink buffer
\n
"
,
rlc_status
.
bytes_in_buffer
);
if
(
rlc_status
.
bytes_in_buffer
>
2
)
{
LOG_I
(
MAC
,
"S
FN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer
\n
"
,
frameP
,
subframeP
,
rlc_status
.
bytes_in_buffer
);
// Fill in group id for off-network communications
ue
->
sltx_active
=
1
;
}
...
...
@@ -2707,34 +2707,42 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
// 10 PRBs, mcs 19
int
TBS
=
4584
/
8
;
int
req
;
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
0x1234
,
0
,
frameP
,
subframeP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
3
,
0xFFFF
);
if
(
TBS
<=
rlc_status
.
bytes_in_buffer
)
req
=
TBS
;
else
req
=
rlc_status
.
bytes_in_buffer
;
sdu_length
=
mac_rlc_data_req
(
module_idP
,
0x1234
,
0
,
frameP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
3
,
req
,
(
char
*
)
ue
->
slsch_pdu
.
payload
);
LOG_I
(
MAC
,
"got %d bytes from Sidelink buffer (%d requested)
\n
"
,
sdu_length
,
req
);
if
(
sdu_length
>
0
)
{
slsch
->
payload
=
(
unsigned
char
*
)
ue
->
slsch_pdu
.
payload
;
slsch
->
rvidx
=
0
;
// fill in SLSCH configuration
return
(
&
ue
->
slsch
);
}
else
{
// handle retransmission of SDU
slsch
->
rvidx
=
rvtab
[
absSF
&
3
];
return
(
&
ue
->
slsch
);
if
(
req
>
0
)
{
sdu_length
=
mac_rlc_data_req
(
module_idP
,
0x1234
,
0
,
frameP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
3
,
req
,
(
char
*
)
ue
->
slsch_pdu
.
payload
);
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
);
slsch
->
payload
=
(
unsigned
char
*
)
ue
->
slsch_pdu
.
payload
;
slsch
->
rvidx
=
0
;
slsch
->
payload_length
=
TBS
;
// fill in SLSCH configuration
return
(
&
ue
->
slsch
);
}
else
ue
->
sltx_active
=
0
;
}
}
else
if
((
absSF
%
40
)
>
3
&&
ue
->
sltx_active
==
1
)
{
// handle retransmission of SDU
LOG_I
(
MAC
,
"SFN.SF %d.%d : retransmission
\n
"
,
frameP
,
subframeP
);
slsch
->
rvidx
=
rvtab
[
absSF
&
3
];
return
(
&
ue
->
slsch
);
}
return
(
NULL
);
}
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
6434e645
...
...
@@ -893,7 +893,7 @@ pdcp_run (
int
result
;
protocol_ctxt_t
ctxt
;
#endif
if
(
ctxt_pP
->
enb_flag
)
{
start_meas
(
&
eNB_pdcp_stats
[
ctxt_pP
->
module_id
].
pdcp_run
);
}
else
{
...
...
@@ -1720,7 +1720,7 @@ rrc_pdcp_config_req (
}
pdcp_p
->
first_missing_pdu
=
-
1
;
LOG_
I
(
PDCP
,
PROTOCOL_PDCP_CTXT_FMT
" Config request : Action ADD: radio bearer id %d (already added) configured
\n
"
,
LOG_
D
(
PDCP
,
PROTOCOL_PDCP_CTXT_FMT
" Config request : Action ADD: radio bearer id %d (already added) configured
\n
"
,
PROTOCOL_PDCP_CTXT_ARGS
(
ctxt_pP
,
pdcp_p
),
rb_idP
);
break
;
...
...
@@ -1799,9 +1799,9 @@ rrc_pdcp_config_req (
}
pdcp_p
->
first_missing_pdu
=
-
1
;
LOG_
I
(
PDCP
,
PROTOCOL_PDCP_CTXT_FMT
" Inserting PDCP instance in collection key 0x%"
PRIx64
"
\n
"
,
LOG_
D
(
PDCP
,
PROTOCOL_PDCP_CTXT_FMT
" Inserting PDCP instance in collection key 0x%"
PRIx64
"
\n
"
,
PROTOCOL_PDCP_CTXT_ARGS
(
ctxt_pP
,
pdcp_p
),
key
);
LOG_
I
(
PDCP
,
PROTOCOL_PDCP_CTXT_FMT
" Config request : Action ADD: radio bearer id %d configured
\n
"
,
LOG_
D
(
PDCP
,
PROTOCOL_PDCP_CTXT_FMT
" Config request : Action ADD: radio bearer id %d configured
\n
"
,
PROTOCOL_PDCP_CTXT_ARGS
(
ctxt_pP
,
pdcp_p
),
rb_idP
);
}
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
View file @
6434e645
...
...
@@ -686,12 +686,16 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
ctxt
.
module_id
,
ctxt
.
rnti
,
ctxt
.
enb_flag
);
key
=
PDCP_COLL_KEY_DEFAULT_DRB_VALUE
(
ctxt
.
module_id
,
ctxt
.
rnti
,
ctxt
.
enb_flag
);
h_rc
=
hashtable_get
(
pdcp_coll_p
,
key
,
(
void
**
)
&
pdcp_p
);
LOG_I
(
PDCP
,
"request key %x : (%d,%x,%d,%d)
\n
"
,
key
,
ctxt
.
module_id
,
ctxt
.
rnti
,
ctxt
.
enb_flag
,
rab_id
);
}
else
{
rab_id
=
rab_id
%
maxDRB
;
LOG_I
(
PDCP
,
"PDCP_COLL_KEY_VALUE(module_id=%d, rnti=%x, enb_flag=%d, rab_id=%d, SRB_FLAG=%d)
\n
"
,
ctxt
.
module_id
,
ctxt
.
rnti
,
ctxt
.
enb_flag
,
rab_id
,
SRB_FLAG_NO
);
key
=
PDCP_COLL_KEY_VALUE
(
ctxt
.
module_id
,
ctxt
.
rnti
,
ctxt
.
enb_flag
,
rab_id
,
SRB_FLAG_NO
);
h_rc
=
hashtable_get
(
pdcp_coll_p
,
key
,
(
void
**
)
&
pdcp_p
);
LOG_I
(
PDCP
,
"request key %x : (%d,%x,%d,%d)
\n
"
,
key
,
ctxt
.
module_id
,
ctxt
.
rnti
,
ctxt
.
enb_flag
,
rab_id
);
}
if
(
h_rc
==
HASH_TABLE_OK
)
{
...
...
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c
View file @
6434e645
...
...
@@ -21,6 +21,7 @@
#define RLC_UM_MODULE 1
#define RLC_UM_C 1
//#define TRACE_RLC_UM_PDU 1
//-----------------------------------------------------------------------------
//#include "rtos_header.h"
#include "platform_types.h"
...
...
@@ -105,6 +106,7 @@ rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, void *argP)
// establishment, the RLC entity:
// - is created; and
// - enters the DATA_TRANSFER_READY state.
LOG_D
(
RLC
,
"RLC-UM in RLC_NULL_STATE
\n
"
);
break
;
case
RLC_DATA_TRANSFER_READY_STATE
:
...
...
@@ -125,6 +127,8 @@ rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, void *argP)
// entity:
// - enters the LOCAL_SUSPEND state.
LOG_D
(
RLC
,
"RLC-UM in RLC_DATA_TRANSFER_READY_STATE
\n
"
);
// SEND DATA TO MAC
if
(
rlc_p
->
tx_sn_length
==
10
)
{
rlc_um_segment_10
(
ctxt_pP
,
rlc_p
);
...
...
@@ -155,6 +159,9 @@ rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, void *argP)
// upper layers.
// TO DO TAKE CARE OF SN : THE IMPLEMENTATION OF THIS FUNCTIONNALITY IS NOT CRITICAL
LOG_D
(
RLC
,
"RLC-UM in RLC_LOCAL_SUSPEND_STATE
\n
"
);
break
;
default:
...
...
@@ -656,7 +663,6 @@ rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP,cons
memcpy
(
&
msg_p
->
ittiMsg
.
rlc_um_data_pdu_req
.
text
,
message_string
,
message_string_size
);
itti_send_msg_to_task
(
TASK_UNKNOWN
,
ctxt_pP
->
instance
,
msg_p
);
# else
LOG_T
(
RLC
,
"%s"
,
message_string
);
# endif
...
...
@@ -776,7 +782,6 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t
memcpy
(
&
msg_p
->
ittiMsg
.
rlc_um_sdu_req
.
text
,
message_string
,
message_string_size
);
itti_send_msg_to_task
(
TASK_UNKNOWN
,
ctxt_pP
->
instance
,
msg_p
);
#else
LOG_T
(
RLC
,
"%s"
,
message_string
);
#endif
...
...
@@ -785,7 +790,7 @@ rlc_um_data_req (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, mem_block_t
rlc_p
->
buffer_occupancy
+=
((
struct
rlc_um_tx_sdu_management
*
)
(
sdu_pP
->
data
))
->
sdu_size
;
list_add_tail_eurecom
(
sdu_pP
,
&
rlc_p
->
input_sdus
);
RLC_UM_MUTEX_UNLOCK
(
&
rlc_p
->
lock_input_sdus
);
#if DEBUG_RLC_CONGESTION
#if
1//
DEBUG_RLC_CONGESTION
#if MESSAGE_CHART_GENERATOR
if
(
rlc_p
->
buffer_occupancy
>
4096
)
{
MSC_LOG_EVENT
((
ctxt_pP
->
enb_flag
==
ENB_FLAG_YES
)
?
MSC_RLC_ENB
:
MSC_RLC_UE
,
\
...
...
openair2/LAYER2/RLC/rlc_mac.c
View file @
6434e645
...
...
@@ -37,7 +37,7 @@
#include "assertions.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#define DEBUG_MAC_INTERFACE 1
//
#define DEBUG_MAC_INTERFACE 1
//-----------------------------------------------------------------------------
struct
mac_data_ind
mac_rlc_deserialize_tb
(
...
...
@@ -143,7 +143,7 @@ tbs_size_t mac_rlc_data_req(
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ
,
VCD_FUNCTION_IN
);
#ifdef DEBUG_MAC_INTERFACE
LOG_
I
(
RLC
,
PROTOCOL_CTXT_FMT
" MAC_RLC_DATA_REQ channel %d (%d) MAX RB %d, Num_tb
%d
\n
"
,
LOG_
D
(
RLC
,
PROTOCOL_CTXT_FMT
" MAC_RLC_DATA_REQ channel %d (%d) MAX RB
%d
\n
"
,
PROTOCOL_CTXT_ARGS
((
&
ctxt
)),
channel_idP
,
RLC_MAX_LC
,
...
...
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
6434e645
This diff is collapsed.
Click to expand it.
openair2/RRC/LITE/defs.h
View file @
6434e645
...
...
@@ -746,6 +746,11 @@ typedef struct UE_RRC_INST_s {
/* Used integrity/ciphering algorithms */
CipheringAlgorithm_r12_t
ciphering_algorithm
;
e_SecurityAlgorithmConfig__integrityProtAlgorithm
integrity_algorithm
;
#ifdef Rel14
/// Used for Sidelink Preconfiguration
DRB_ToAddModList_t
*
DRB_configList
;
#endif
}
UE_RRC_INST
;
#include "proto.h"
...
...
openair2/RRC/LITE/rrc_UE.c
View file @
6434e645
...
...
@@ -360,23 +360,86 @@ void init_SL_preconfig(UE_RRC_INST *UE, const uint8_t eNB_index )
// Rel13 extensions
UE
->
SL_Preconfiguration
[
eNB_index
]
->
ext1
=
NULL
;
// Establish a SLRB (using DRB for now)
// Establish a SLRB (using DRB
3
for now)
protocol_ctxt_t
ctxt
;
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
0
,
ENB_FLAG_NO
,
0x1234
,
0
,
0
,
0
);
rrc_pdcp_config_req
(
&
ctxt
,
SRB_FLAG_NO
,
CONFIG_ACTION_ADD
,
3
,
UNDEF_SECURITY_MODE
);
UE
->
DRB_config
[
0
][
0
]
=
CALLOC
(
1
,
sizeof
(
struct
DRB_ToAddMod
));
UE
->
DRB_config
[
0
][
0
]
->
eps_BearerIdentity
=
CALLOC
(
1
,
sizeof
(
long
));
UE
->
DRB_config
[
0
][
0
]
->
drb_Identity
=
3
;
UE
->
DRB_config
[
0
][
0
]
->
eps_BearerIdentity
=
CALLOC
(
1
,
sizeof
(
long
));
// allowed value 5..15, value : x+4
*
(
UE
->
DRB_config
[
0
][
0
]
->
eps_BearerIdentity
)
=
3
;
UE
->
DRB_config
[
0
][
0
]
->
logicalChannelIdentity
=
CALLOC
(
1
,
sizeof
(
long
));
*
(
UE
->
DRB_config
[
0
][
0
]
->
logicalChannelIdentity
)
=
UE
->
DRB_config
[
0
][
0
]
->
drb_Identity
;
//(long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2
struct
RLC_Config
*
DRB_rlc_config
=
CALLOC
(
1
,
sizeof
(
struct
RLC_Config
));
struct
PDCP_Config
*
DRB_pdcp_config
=
CALLOC
(
1
,
sizeof
(
struct
PDCP_Config
));
struct
PDCP_Config__rlc_UM
*
PDCP_rlc_UM
=
CALLOC
(
1
,
sizeof
(
struct
PDCP_Config__rlc_UM
));
struct
LogicalChannelConfig
*
DRB_lchan_config
=
CALLOC
(
1
,
sizeof
(
struct
LogicalChannelConfig
));
struct
LogicalChannelConfig__ul_SpecificParameters
*
DRB_ul_SpecificParameters
=
CALLOC
(
1
,
sizeof
(
struct
LogicalChannelConfig__ul_SpecificParameters
));
long
*
logicalchannelgroup_drb
=
CALLOC
(
1
,
sizeof
(
long
));
DRB_rlc_config
->
present
=
RLC_Config_PR_um_Bi_Directional
;
DRB_rlc_config
->
choice
.
um_Bi_Directional
.
ul_UM_RLC
.
sn_FieldLength
=
SN_FieldLength_size10
;
DRB_rlc_config
->
choice
.
um_Bi_Directional
.
dl_UM_RLC
.
sn_FieldLength
=
SN_FieldLength_size10
;
DRB_rlc_config
->
choice
.
um_Bi_Directional
.
dl_UM_RLC
.
t_Reordering
=
T_Reordering_ms35
;
UE
->
DRB_config
[
0
][
0
]
->
rlc_Config
=
DRB_rlc_config
;
DRB_pdcp_config
=
CALLOC
(
1
,
sizeof
(
*
DRB_pdcp_config
));
UE
->
DRB_config
[
0
][
0
]
->
pdcp_Config
=
DRB_pdcp_config
;
DRB_pdcp_config
->
discardTimer
=
CALLOC
(
1
,
sizeof
(
long
));
*
DRB_pdcp_config
->
discardTimer
=
PDCP_Config__discardTimer_infinity
;
DRB_pdcp_config
->
rlc_AM
=
NULL
;
DRB_pdcp_config
->
rlc_UM
=
NULL
;
/* avoid gcc warnings */
(
void
)
PDCP_rlc_UM
;
DRB_pdcp_config
->
rlc_UM
=
PDCP_rlc_UM
;
PDCP_rlc_UM
->
pdcp_SN_Size
=
PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits
;
DRB_pdcp_config
->
headerCompression
.
present
=
PDCP_Config__headerCompression_PR_notUsed
;
UE
->
DRB_config
[
0
][
0
]
->
logicalChannelConfig
=
DRB_lchan_config
;
DRB_ul_SpecificParameters
=
CALLOC
(
1
,
sizeof
(
*
DRB_ul_SpecificParameters
));
DRB_lchan_config
->
ul_SpecificParameters
=
DRB_ul_SpecificParameters
;
rlc_info_t
rlc_info
;
DRB_ul_SpecificParameters
->
priority
=
12
;
// lower priority than srb1, srb2 and other dedicated bearer
DRB_ul_SpecificParameters
->
prioritisedBitRate
=
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_kBps8
;
//LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
DRB_ul_SpecificParameters
->
bucketSizeDuration
=
LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50
;
rlc_info
.
rlc_mode
=
RLC_MODE_UM
;
rlc_info
.
rlc
.
rlc_um_info
.
timer_reordering
=
5
;
rlc_info
.
rlc
.
rlc_um_info
.
sn_field_length
=
10
;
rlc_info
.
rlc
.
rlc_um_info
.
is_mXch
=
0
;
// LCG for DTCH can take the value from 1 to 3 as defined in 36331: normally controlled by upper layers (like RRM)
rrc_rlc_config_req
(
&
ctxt
,
SRB_FLAG_NO
,
MBMS_FLAG_NO
,
CONFIG_ACTION_ADD
,
3
,
rlc_info
);
*
logicalchannelgroup_drb
=
1
;
DRB_ul_SpecificParameters
->
logicalChannelGroup
=
logicalchannelgroup_drb
;
UE
->
DRB_configList
=
CALLOC
(
1
,
sizeof
(
DRB_ToAddModList_t
));
ASN_SEQUENCE_ADD
(
&
UE
->
DRB_configList
->
list
,
UE
->
DRB_config
[
0
][
0
]);
rrc_pdcp_config_asn1_req
(
&
ctxt
,
(
SRB_ToAddModList_t
*
)
NULL
,
UE
->
DRB_configList
,
(
DRB_ToReleaseList_t
*
)
NULL
,
0xff
,
NULL
,
NULL
,
NULL
#if defined(Rel10) || defined(Rel14)
,
(
PMCH_InfoList_r9_t
*
)
NULL
#endif
,
NULL
);
rrc_rlc_config_asn1_req
(
&
ctxt
,
(
SRB_ToAddModList_t
*
)
NULL
,
UE
->
DRB_configList
,
(
DRB_ToReleaseList_t
*
)
NULL
#if defined(Rel10) || defined(Rel14)
,(
PMCH_InfoList_r9_t
*
)
NULL
#endif
);
}
#endif
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/oaiL1.nfapi.usrpb210.conf
View file @
6434e645
...
...
@@ -35,9 +35,12 @@ L1s = (
{
num_cc
=
1
;
tr_n_preference
=
"nfapi"
;
local_n_if_name
=
"enp0s31f6"
;
remote_n_address
=
"10.0.0.2"
;
local_n_address
=
"10.0.0.1"
;
#local_n_if_name = "enp0s31f6";
#remote_n_address = "10.0.0.2";
#local_n_address = "10.0.0.1";
local_n_if_name
=
"lo"
;
remote_n_address
=
"127.0.0.2"
;
local_n_address
=
"127.0.0.1"
;
local_n_portc
=
50000
;
remote_n_portc
=
50001
;
local_n_portd
=
50010
;
...
...
targets/RT/USER/lte-softmodem-stub.c
View file @
6434e645
...
...
@@ -992,9 +992,9 @@ int main( int argc, char **argv )
set_comp_log
(
HW
,
LOG_INFO
,
LOG_HIGH
,
1
);
set_comp_log
(
PHY
,
LOG_INFO
,
LOG_HIGH
,
1
);
set_comp_log
(
MAC
,
LOG_
TRACE
,
LOG_HIGH
,
1
);
set_comp_log
(
RLC
,
LOG_
TRACE
,
LOG_HIGH
|
FLAG_THREAD
,
1
);
set_comp_log
(
PDCP
,
LOG_
INFO
,
LOG_HIGH
,
1
);
set_comp_log
(
MAC
,
LOG_
INFO
,
LOG_HIGH
,
1
);
set_comp_log
(
RLC
,
LOG_
INFO
,
LOG_HIGH
|
FLAG_THREAD
,
1
);
set_comp_log
(
PDCP
,
LOG_
DEBUG
,
LOG_HIGH
,
1
);
set_comp_log
(
OTG
,
LOG_INFO
,
LOG_HIGH
,
1
);
set_comp_log
(
RRC
,
LOG_INFO
,
LOG_HIGH
,
1
);
#if defined(ENABLE_ITTI)
...
...
@@ -1356,6 +1356,8 @@ int main( int argc, char **argv )
}
// Panos: Call init_UE_stub instead of init_UE as we are always on nfapi_mode=3
//phy_stub_ticking = (SF_ticking*)malloc(sizeof(SF_ticking));