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
wangjie
OpenXG-RAN
Commits
fbf39eec
Commit
fbf39eec
authored
Mar 26, 2021
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cppcheck fixes
parent
fc967bab
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
84 additions
and
97 deletions
+84
-97
common/utils/backtrace.c
common/utils/backtrace.c
+1
-1
nfapi/oai_integration/nfapi_pnf.c
nfapi/oai_integration/nfapi_pnf.c
+2
-2
nfapi/open-nFAPI/common/src/debug.c
nfapi/open-nFAPI/common/src/debug.c
+76
-76
nfapi/open-nFAPI/pnf_sim/src/fapi_stub.cpp
nfapi/open-nFAPI/pnf_sim/src/fapi_stub.cpp
+2
-2
openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c
openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c
+1
-0
openair2/ENB_APP/flexran_agent_common.c
openair2/ENB_APP/flexran_agent_common.c
+0
-12
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+0
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+1
-1
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+0
-1
No files found.
common/utils/backtrace.c
View file @
fbf39eec
...
...
@@ -38,7 +38,7 @@ void display_backtrace(void) {
size_t
i
;
char
*
test
=
getenv
(
"NO_BACKTRACE"
);
if
(
test
!=
0
)
*
((
int
*
)
0
)
=
0
;
if
(
test
!=
0
)
abort
()
;
size
=
backtrace
(
array
,
10
);
strings
=
backtrace_symbols
(
array
,
size
);
...
...
nfapi/oai_integration/nfapi_pnf.c
View file @
fbf39eec
...
...
@@ -2199,7 +2199,7 @@ void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_add
pnf
.
phys
[
0
].
udp
.
tx_port
=
vnf_p7_port
;
strcpy
(
pnf
.
phys
[
0
].
udp
.
tx_addr
,
vnf_ip_addr
);
strcpy
(
pnf
.
phys
[
0
].
local_addr
,
pnf_ip_addr
);
printf
(
"%s() VNF:%s:%d PNF_PHY[addr:%s UDP:tx_addr:%s:%
d rx:%d
]
\n
"
,
printf
(
"%s() VNF:%s:%d PNF_PHY[addr:%s UDP:tx_addr:%s:%
u rx:%u
]
\n
"
,
__FUNCTION__
,
config
->
vnf_ip_addr
,
config
->
vnf_p5_port
,
pnf
.
phys
[
0
].
local_addr
,
pnf
.
phys
[
0
].
udp
.
tx_addr
,
pnf
.
phys
[
0
].
udp
.
tx_port
,
...
...
@@ -2250,7 +2250,7 @@ void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr,
pnf
.
phys
[
0
].
udp
.
tx_port
=
vnf_p7_port
;
strcpy
(
pnf
.
phys
[
0
].
udp
.
tx_addr
,
vnf_ip_addr
);
strcpy
(
pnf
.
phys
[
0
].
local_addr
,
pnf_ip_addr
);
printf
(
"%s() VNF:%s:%d PNF_PHY[addr:%s UDP:tx_addr:%s:%
d rx:%d
]
\n
"
,
printf
(
"%s() VNF:%s:%d PNF_PHY[addr:%s UDP:tx_addr:%s:%
u rx:%u
]
\n
"
,
__FUNCTION__
,
config
->
vnf_ip_addr
,
config
->
vnf_p5_port
,
pnf
.
phys
[
0
].
local_addr
,
...
...
nfapi/open-nFAPI/common/src/debug.c
View file @
fbf39eec
/*
* Copyright 2017 Cisco Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdio.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/types.h>
#include <pthread.h>
#include <syslog.h>
#include <debug.h>
#define MAX_MSG_LENGTH 2096
#define TRACE_HEADER_LENGTH 44
void
nfapi_trace_dbg
(
nfapi_trace_level_t
level
,
const
char
*
format
,
...);
// initialize the trace function to 0
void
(
*
nfapi_trace_g
)(
nfapi_trace_level_t
level
,
const
char
*
format
,
...)
=
&
nfapi_trace_dbg
;
nfapi_trace_level_t
nfapi_trace_level_g
=
NFAPI_TRACE_INFO
;
//nfapi_trace_level_t nfapi_trace_level_g = NFAPI_TRACE_WARN;
void
nfapi_set_trace_level
(
nfapi_trace_level_t
new_level
)
{
nfapi_trace_level_g
=
new_level
;
}
void
nfapi_trace_dbg
(
nfapi_trace_level_t
level
,
const
char
*
format
,
...)
{
char
trace_buff
[
MAX_MSG_LENGTH
+
TRACE_HEADER_LENGTH
];
uint32_t
num_chars
;
va_list
p_args
;
struct
timeval
tv
;
pthread_t
tid
=
pthread_self
();
(
void
)
gettimeofday
(
&
tv
,
NULL
);
num_chars
=
(
uint32_t
)
snprintf
(
trace_buff
,
TRACE_HEADER_LENGTH
,
"%04u.%06u: 0x%02x: %10u: "
,
((
uint32_t
)
tv
.
tv_sec
)
&
0x1FFF
,
(
uint32_t
)
tv
.
tv_usec
,
(
uint32_t
)
level
,
(
uint32_t
)
tid
);
if
(
num_chars
>
TRACE_HEADER_LENGTH
)
{
printf
(
"trace_dbg: Error, num_chars is too large: %
d"
,
num_chars
);
return
;
}
va_start
(
p_args
,
format
);
if
((
num_chars
=
(
uint32_t
)
vsnprintf
(
&
trace_buff
[
num_chars
],
MAX_MSG_LENGTH
,
format
,
p_args
)))
{
if
(
level
<=
NFAPI_TRACE_WARN
)
{
printf
(
"%s"
,
trace_buff
);
}
printf
(
"%s"
,
trace_buff
);
}
va_end
(
p_args
);
}
/*
* Copyright 2017 Cisco Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdio.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/types.h>
#include <pthread.h>
#include <syslog.h>
#include <debug.h>
#define MAX_MSG_LENGTH 2096
#define TRACE_HEADER_LENGTH 44
void
nfapi_trace_dbg
(
nfapi_trace_level_t
level
,
const
char
*
format
,
...);
// initialize the trace function to 0
void
(
*
nfapi_trace_g
)(
nfapi_trace_level_t
level
,
const
char
*
format
,
...)
=
&
nfapi_trace_dbg
;
nfapi_trace_level_t
nfapi_trace_level_g
=
NFAPI_TRACE_INFO
;
//nfapi_trace_level_t nfapi_trace_level_g = NFAPI_TRACE_WARN;
void
nfapi_set_trace_level
(
nfapi_trace_level_t
new_level
)
{
nfapi_trace_level_g
=
new_level
;
}
void
nfapi_trace_dbg
(
nfapi_trace_level_t
level
,
const
char
*
format
,
...)
{
char
trace_buff
[
MAX_MSG_LENGTH
+
TRACE_HEADER_LENGTH
];
uint32_t
num_chars
;
va_list
p_args
;
struct
timeval
tv
;
pthread_t
tid
=
pthread_self
();
(
void
)
gettimeofday
(
&
tv
,
NULL
);
num_chars
=
(
uint32_t
)
snprintf
(
trace_buff
,
TRACE_HEADER_LENGTH
,
"%04u.%06u: 0x%02x: %10u: "
,
((
uint32_t
)
tv
.
tv_sec
)
&
0x1FFF
,
(
uint32_t
)
tv
.
tv_usec
,
(
uint32_t
)
level
,
(
uint32_t
)
tid
);
if
(
num_chars
>
TRACE_HEADER_LENGTH
)
{
printf
(
"trace_dbg: Error, num_chars is too large: %
u"
,
num_chars
);
return
;
}
va_start
(
p_args
,
format
);
if
((
num_chars
=
(
uint32_t
)
vsnprintf
(
&
trace_buff
[
num_chars
],
MAX_MSG_LENGTH
,
format
,
p_args
)))
{
if
(
level
<=
NFAPI_TRACE_WARN
)
{
printf
(
"%s"
,
trace_buff
);
}
printf
(
"%s"
,
trace_buff
);
}
va_end
(
p_args
);
}
nfapi/open-nFAPI/pnf_sim/src/fapi_stub.cpp
View file @
fbf39eec
...
...
@@ -278,7 +278,7 @@ void *fapi_thread_start(void *ptr) {
if
(
instance
->
tick
==
1000
)
{
if
(
instance
->
tx_byte_count
>
0
)
{
printf
(
"[FAPI] Tx rate %
d
bytes/sec
\n
"
,
instance
->
tx_byte_count
);
printf
(
"[FAPI] Tx rate %
u
bytes/sec
\n
"
,
instance
->
tx_byte_count
);
instance
->
tx_byte_count
=
0
;
}
...
...
@@ -319,7 +319,7 @@ void *fapi_thread_start(void *ptr) {
millisec
=
now_ts
.
tv_nsec
/
1e6
;
if
(
last_millisec
!=
-
1
&&
((
last_millisec
+
1
)
%
1000
)
!=
millisec
)
{
printf
(
"*** missing millisec %
d %d
\n
"
,
last_millisec
,
millisec
);
printf
(
"*** missing millisec %
u %u
\n
"
,
last_millisec
,
millisec
);
catchup
=
millisec
-
last_millisec
-
1
;
}
...
...
openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c
View file @
fbf39eec
...
...
@@ -170,6 +170,7 @@ int32_t generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
Msc_RS
=
msrsb
*
6
;
k0
=
(
(
(
int16_t
)(
frame_parms
->
N_RB_UL
>>
1
)
-
(
int16_t
)(
msrs0
>>
1
)
)
*
12
)
+
kTC
;
AssertFatal
(
msrsb
,
"divide by 0"
);
nb
=
(
4
*
n_RRC
/
msrsb
)
%
Nb
;
for
(
b
=
0
;
b
<=
Bsrs
;
b
++
)
{
...
...
openair2/ENB_APP/flexran_agent_common.c
View file @
fbf39eec
...
...
@@ -648,18 +648,6 @@ error:
* ************************************
*/
int
sort_ue_config
(
const
void
*
a
,
const
void
*
b
)
{
const
Protocol__FlexUeConfig
*
fa
=
a
;
const
Protocol__FlexUeConfig
*
fb
=
b
;
if
(
fa
->
rnti
<
fb
->
rnti
)
return
-
1
;
else
if
(
fa
->
rnti
<
fb
->
rnti
)
return
1
;
return
0
;
}
int
flexran_agent_ue_config_reply
(
mid_t
mod_id
,
const
void
*
params
,
Protocol__FlexranMessage
**
msg
)
{
xid_t
xid
;
Protocol__FlexHeader
*
header
=
NULL
;
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
fbf39eec
...
...
@@ -1010,7 +1010,7 @@ int get_format0(uint8_t index,
uint8_t
unpaired
,
frequency_range_t
frequency_range
){
uint16_t
format
;
uint16_t
format
=
0
;
if
(
unpaired
)
{
if
(
frequency_range
==
FR1
)
format
=
table_6_3_3_2_3_prachConfig_Index
[
index
][
0
];
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
fbf39eec
...
...
@@ -247,7 +247,6 @@ void schedule_control_sib1(module_id_t module_id,
gNB_mac
->
sched_ctrlCommon
->
search_space
=
calloc
(
1
,
sizeof
(
*
gNB_mac
->
sched_ctrlCommon
->
search_space
));
gNB_mac
->
sched_ctrlCommon
->
active_bwp
=
calloc
(
1
,
sizeof
(
*
gNB_mac
->
sched_ctrlCommon
->
active_bwp
));
gNB_mac
->
sched_ctrlCommon
->
coreset
=
calloc
(
1
,
sizeof
(
*
gNB_mac
->
sched_ctrlCommon
->
coreset
));
gNB_mac
->
sched_ctrlCommon
->
active_bwp
=
calloc
(
1
,
sizeof
(
*
gNB_mac
->
sched_ctrlCommon
->
active_bwp
));
fill_default_searchSpaceZero
(
gNB_mac
->
sched_ctrlCommon
->
search_space
);
fill_default_coresetZero
(
gNB_mac
->
sched_ctrlCommon
->
coreset
,
servingcellconfigcommon
);
fill_default_initialDownlinkBWP
(
gNB_mac
->
sched_ctrlCommon
->
active_bwp
,
servingcellconfigcommon
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
fbf39eec
...
...
@@ -654,7 +654,7 @@ int checkTargetSSBInTCIStates_pdcchConfig(int ssb_index_t, int Mod_idP, int UE_i
//returns the measured RSRP value (upper limit)
int
get_measured_rsrp
(
uint8_t
index
)
{
//if index is invalid returning minimum rsrp -140
if
(
(
index
>=
0
&&
index
<=
15
)
||
index
>=
114
)
if
(
index
<=
15
||
index
>=
114
)
return
MIN_RSRP_VALUE
;
return
L1_SSB_CSI_RSRP_measReport_mapping_38133_10_1_6_1_1
[
index
];
...
...
targets/RT/USER/lte-ru.c
View file @
fbf39eec
...
...
@@ -869,7 +869,6 @@ static void *ru_thread_asynch_rxtx( void *param ) {
LOG_I
(
PHY
,
"devices ok (ru_thread_asynch_rxtx)
\n
"
);
while
(
!
oai_exit
)
{
if
(
oai_exit
)
break
;
if
(
ru
->
state
!=
RU_RUN
)
{
subframe
=
0
;
...
...
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