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
lizhongxiao
OpenXG-RAN
Commits
516de3ae
Commit
516de3ae
authored
Sep 19, 2020
by
Andrew Burger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing remove ul_config_req pdu func
parent
129b95ee
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
54 deletions
+42
-54
nfapi/oai_integration/nfapi_vnf.c
nfapi/oai_integration/nfapi_vnf.c
+31
-42
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
+1
-10
openair2/COMMON/platform_constants.h
openair2/COMMON/platform_constants.h
+0
-2
targets/COMMON/openairinterface5g_limits.h
targets/COMMON/openairinterface5g_limits.h
+10
-0
No files found.
nfapi/oai_integration/nfapi_vnf.c
View file @
516de3ae
...
...
@@ -710,13 +710,9 @@ int phy_sr_indication(struct nfapi_vnf_p7_config *config, nfapi_sr_indication_t
return
1
;
}
static
bool
is_ue_same
(
int
ue_id_1
,
in
t
ue_id_2
)
static
bool
is_ue_same
(
uint16_t
ue_id_1
,
uint16_
t
ue_id_2
)
{
if
(
ue_id_1
==
ue_id_2
)
{
return
true
;
}
return
false
;
return
(
ue_id_1
==
ue_id_2
);
}
static
void
analyze_cqi_pdus_for_duplicates
(
nfapi_cqi_indication_t
*
ind
)
...
...
@@ -731,8 +727,8 @@ static void analyze_cqi_pdus_for_duplicates(nfapi_cqi_indication_t *ind)
for
(
int
j
=
i
+
1
;
j
<
num_cqis
;
j
++
)
{
in
t
rnti_i
=
ind
->
cqi_indication_body
.
cqi_pdu_list
[
i
].
rx_ue_information
.
rnti
;
in
t
rnti_j
=
ind
->
cqi_indication_body
.
cqi_pdu_list
[
j
].
rx_ue_information
.
rnti
;
uint16_
t
rnti_i
=
ind
->
cqi_indication_body
.
cqi_pdu_list
[
i
].
rx_ue_information
.
rnti
;
uint16_
t
rnti_j
=
ind
->
cqi_indication_body
.
cqi_pdu_list
[
j
].
rx_ue_information
.
rnti
;
if
(
is_ue_same
(
rnti_i
,
rnti_j
))
{
LOG_E
(
MAC
,
"Problem, two cqis received from a single UE for rnti %x
\n
"
,
...
...
@@ -1253,28 +1249,25 @@ int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) {
return
retval
;
}
static
bool
remove_ul_config_req_pdu
(
int
index
,
nfapi_ul_config_request_t
*
ul_config_req
)
static
void
remove_ul_config_req_pdu
(
int
index
,
nfapi_ul_config_request_t
*
ul_config_req
)
{
uint8_
t
num_pdus
=
ul_config_req
->
ul_config_request_body
.
number_of_pdus
;
in
t
num_pdus
=
ul_config_req
->
ul_config_request_body
.
number_of_pdus
;
nfapi_ul_config_request_pdu_t
*
pdu_list
=
ul_config_req
->
ul_config_request_body
.
ul_config_pdu_list
;
if
(
index
>
num_pdus
)
if
(
index
>
=
num_pdus
||
index
<
0
)
{
return
false
;
LOG_E
(
MAC
,
"%s() Unable to drop bad ul_config_req PDU
\n
"
,
__FUNCTION__
);
abort
();
}
for
(
int
i
=
index
;
i
<
num_pdus
;
i
++
)
for
(
int
i
=
index
;
i
+
1
<
num_pdus
;
i
++
)
{
pdu_list
[
i
]
=
pdu_list
[
i
+
1
];
}
ul_config_req
->
ul_config_request_body
.
number_of_pdus
--
;
return
true
;
}
#define MAX_DROPPED_INDICIES 10
int
oai_nfapi_ul_config_req
(
nfapi_ul_config_request_t
*
ul_config_req
)
{
nfapi_vnf_p7_config_t
*
p7_config
=
vnf
.
p7_vnfs
[
0
].
config
;
ul_config_req
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
...
...
@@ -1284,43 +1277,39 @@ int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) {
__FUNCTION__
,
NFAPI_SFNSF2SFN
(
ul_config_req
->
sfn_sf
),
NFAPI_SFNSF2SF
(
ul_config_req
->
sfn_sf
),
ul_config_req
->
ul_config_request_body
.
number_of_pdus
,
ul_config_req
->
ul_config_request_body
.
rach_prach_frequency_resources
,
ul_config_req
->
ul_config_request_body
.
srs_present
);
uint16_t
num_dropped_indicies
=
0
;
int
dropped_indicies
[
MAX_DROPPED_INDICIES
];
uint8_t
num_pdus
=
ul_config_req
->
ul_config_request_body
.
number_of_pdus
;
int
num_pdus
=
ul_config_req
->
ul_config_request_body
.
number_of_pdus
;
nfapi_ul_config_request_pdu_t
*
pdu_list
=
ul_config_req
->
ul_config_request_body
.
ul_config_pdu_list
;
for
(
int
i
=
0
;
i
<
num_pdus
;
i
++
)
{
uint8_t
pdu_type
=
ul_config_req
->
ul_config_request_body
.
ul_config_
pdu_list
[
i
].
pdu_type
;
if
(
pdu_type
!=
1
)
uint8_t
pdu_type
=
pdu_list
[
i
].
pdu_type
;
if
(
pdu_type
!=
NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE
)
{
continue
;
}
LOG_I
(
MAC
,
"ul_config_req num_pdus: %u pdu_number: %d pdu_type: %u SFN.SF: %d.%d
\n
"
,
num_pdus
,
i
,
pdu_type
,
ul_config_req
->
sfn_sf
>>
4
,
ul_config_req
->
sfn_sf
&
15
);
for
(
int
j
=
i
+
1
;
j
<
num_pdus
;
j
++
)
{
uint8_t
pdu_type2
=
ul_config_req
->
ul_config_request_body
.
ul_config_pdu_list
[
j
].
pdu_type
;
if
(
pdu_type
==
pdu_type2
)
{
uint16_t
rnti_i
=
ul_config_req
->
ul_config_request_body
.
ul_config_pdu_list
[
i
].
ulsch_cqi_ri_pdu
.
ulsch_pdu
.
ulsch_pdu_rel8
.
rnti
;
uint16_t
rnti_j
=
ul_config_req
->
ul_config_request_body
.
ul_config_pdu_list
[
j
].
ulsch_cqi_ri_pdu
.
ulsch_pdu
.
ulsch_pdu_rel8
.
rnti
;
if
(
is_ue_same
(
rnti_i
,
rnti_j
))
uint8_t
pdu_type2
=
pdu_list
[
j
].
pdu_type
;
if
(
pdu_type
!=
pdu_type2
)
{
assert
(
num_dropped_indicies
<
MAX_DROPPED_INDICIES
);
dropped_indicies
[
num_dropped_indicies
]
=
j
;
num_dropped_indicies
++
;
LOG_E
(
MAC
,
"Problem, two cqis being sent to a single UE for rnti %x dropping one
\n
"
,
rnti_i
);
}
}
}
continue
;
}
for
(
int
i
=
0
;
i
<
num_dropped_indicies
;
i
++
)
{
if
(
!
remove_ul_config_req_pdu
(
dropped_indicies
[
i
],
ul_config_req
))
uint16_t
rnti_i
=
pdu_list
[
i
].
ulsch_cqi_ri_pdu
.
ulsch_pdu
.
ulsch_pdu_rel8
.
rnti
;
uint16_t
rnti_j
=
pdu_list
[
j
].
ulsch_cqi_ri_pdu
.
ulsch_pdu
.
ulsch_pdu_rel8
.
rnti
;
if
(
!
is_ue_same
(
rnti_i
,
rnti_j
))
{
LOG_E
(
MAC
,
"%s() Unable to drop bad ul_config_req PDU
\n
"
,
__FUNCTION__
);
abort
();
continue
;
}
remove_ul_config_req_pdu
(
j
,
ul_config_req
);
j
--
;
num_pdus
--
;
LOG_E
(
MAC
,
"Problem, two cqis being sent to a single UE for rnti %x dropping one
\n
"
,
rnti_i
);
}
}
...
...
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
View file @
516de3ae
...
...
@@ -6144,8 +6144,6 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
nfapi_p7_message_header_t
*
pMessageHeader
=
(
nfapi_p7_message_header_t
*
)
pUnpackedBuf
;
uint8_t
*
pReadPackedMessage
=
pMessageBuf
;
uint8_t
*
end
=
pMessageBuf
+
messageBufLen
;
uint8_t
*
end_unpacked_buf
=
pUnpackedBuf
+
unpackedBufLen
;
uint8_t
*
start_unpacked_buf
=
pUnpackedBuf
;
if
(
pMessageBuf
==
NULL
||
pUnpackedBuf
==
NULL
)
{
...
...
@@ -6354,13 +6352,6 @@ int nfapi_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUn
break
;
}
if
(
pMessageHeader
->
message_id
==
NFAPI_RX_ULSCH_INDICATION
)
{
char
foobar
[
1024
];
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"Biden %s:%d: %s
\n
"
,
__FUNCTION__
,
__LINE__
,
hexdump
(
pUnpackedBuf
,
end_unpacked_buf
-
start_unpacked_buf
,
foobar
,
sizeof
(
foobar
)));
}
if
(
result
==
0
)
return
-
1
;
else
...
...
openair2/COMMON/platform_constants.h
View file @
516de3ae
...
...
@@ -85,8 +85,6 @@
#define MAX_gNB 2
#else
// TODO: Change after gaining stability on 20 UES or less
// Make sure when changing these two fields to also change
// "NUMBER_OF_UE_MAX" constant in targets/COMMON/openairinterface5g_limits.h - Andrew
#define MAX_MOBILES_PER_ENB 20
#define MAX_MOBILES_PER_ENB_NB_IoT 20
#define MAX_MOBILES_PER_GNB 2//16
...
...
targets/COMMON/openairinterface5g_limits.h
View file @
516de3ae
#ifndef OPENAIRINTERFACE5G_LIMITS_H_
#define OPENAIRINTERFACE5G_LIMITS_H_
#include "platform_constants.h"
#if 1
/*defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_LMSSDR) || defined(OAI_ADRV9371_ZC706)*/
# define NUMBER_OF_eNB_MAX 1
# define NUMBER_OF_gNB_MAX 1
...
...
@@ -107,4 +109,12 @@ and the other are using MAX_MOBILES_PER_ENB in for-loop.
# endif
#endif
#if MAX_MOBILES_PER_ENB != NUMBER_OF_UE_MAX
#error "Invalid configuration of UE's"
#endif
#if MAX_MOBILES_PER_ENB_NB_IoT != NUMBER_OF_UE_MAX
#error "Invalid configuration of UE's"
#endif
#endif
/* OPENAIRINTERFACE5G_LIMITS_H_ */
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