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
spbro
OpenXG-RAN
Commits
164397b0
Commit
164397b0
authored
Jun 14, 2020
by
MaheshK1995
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolved pack/unpack issue
parent
3343d93d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
304 additions
and
23 deletions
+304
-23
nfapi/README.md
nfapi/README.md
+9
-9
nfapi/oai_integration/nfapi_pnf.c
nfapi/oai_integration/nfapi_pnf.c
+205
-8
nfapi/oai_integration/nfapi_vnf.c
nfapi/oai_integration/nfapi_vnf.c
+15
-2
nfapi/open-nFAPI/nfapi/src/nfapi_p5.c
nfapi/open-nFAPI/nfapi/src/nfapi_p5.c
+9
-4
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+66
-0
No files found.
nfapi/README.md
View file @
164397b0
# Changelog
each change log shoudl contain the list of commit IDs, the id of issues fixed
### 14/06/20
*
we are not clear on how the parameters are extracted from the config file
*
in ssc struct
*
for some values it is okay and for others it is zero (in
`config_request`
)
*
This causes Assertion Failures leading to termination on PNF side.
| COMMIT ID: | changes |
|---------------|-----------|
| 6ba001ae9 | modified
`.gitignore file`
|
`.gitignore`
: N/A
```
+ .vscode/*
```
\ No newline at end of file
### 15/06/20
*
The values to config request are assigned in:
`config_common()`
in
`config.c`
*
need to add lines for
`cfg->nfapi_config`
*
the config request unpacked on pnf side still has some zero values, which causes assertional failure in from_nrarfcn()
\ No newline at end of file
nfapi/oai_integration/nfapi_pnf.c
View file @
164397b0
This diff is collapsed.
Click to expand it.
nfapi/oai_integration/nfapi_vnf.c
View file @
164397b0
...
...
@@ -42,6 +42,9 @@
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#include "common/ran_context.h"
#define TEST
extern
RAN_CONTEXT_t
RC
;
extern
UL_RCC_IND_t
UL_RCC_INFO
;
...
...
@@ -1013,6 +1016,15 @@ int pnf_start_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_pnf_start_re
extern
uint32_t
to_earfcn
(
int
eutra_bandP
,
uint32_t
dl_CarrierFreq
,
uint32_t
bw
);
int
param_resp_cb
(
nfapi_vnf_config_t
*
config
,
int
p5_idx
,
nfapi_nr_param_response_scf_t
*
resp
)
{
#ifdef TEST
if
(
resp
->
cell_param
.
phy_state
.
tl
.
tag
==
NFAPI_NR_PARAM_TLV_PHY_STATE_TAG
)
printf
(
"
\n\n
Matched
\n\n
"
);
// like this we can check for all the tags
#endif
printf
(
"[VNF] Received NFAPI_PARAM_RESP idx:%d phy_id:%d
\n
"
,
p5_idx
,
resp
->
header
.
phy_id
);
vnf_info
*
vnf
=
(
vnf_info
*
)(
config
->
user_data
);
vnf_p7_info
*
p7_vnf
=
vnf
->
p7_vnfs
;
...
...
@@ -1020,7 +1032,6 @@ int param_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_nr_param_respons
phy_info
*
phy
=
pnf
->
phys
;
struct
sockaddr_in
pnf_p7_sockaddr
;
nfapi_nr_config_request_scf_t
*
req
=
&
RC
.
nrmac
[
0
]
->
config
[
0
];
// check
phy
->
remote_port
=
resp
->
nfapi_config
.
p7_pnf_port
.
value
;
memcpy
(
&
pnf_p7_sockaddr
.
sin_addr
.
s_addr
,
&
(
resp
->
nfapi_config
.
p7_pnf_address_ipv4
.
address
[
0
]),
4
);
phy
->
remote_addr
=
inet_ntoa
(
pnf_p7_sockaddr
.
sin_addr
);
...
...
@@ -1030,6 +1041,8 @@ int param_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_nr_param_respons
req
->
header
.
message_id
=
NFAPI_CONFIG_REQUEST
;
req
->
header
.
phy_id
=
phy
->
id
;
printf
(
"[VNF] Send NFAPI_CONFIG_REQUEST
\n
"
);
printf
(
"
\n
NR bandP =%d
\n
"
,
req
->
nfapi_config
.
rf_bands
.
rf_band
[
0
]);
req
->
nfapi_config
.
p7_vnf_port
.
tl
.
tag
=
NFAPI_NR_NFAPI_P7_VNF_PORT_TAG
;
req
->
nfapi_config
.
p7_vnf_port
.
value
=
p7_vnf
->
local_port
;
req
->
num_tlv
++
;
...
...
@@ -1042,7 +1055,7 @@ int param_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_nr_param_respons
printf
(
"[VNF] DJP local_addr:%s
\n
"
,
p7_vnf
->
local_addr
);
req
->
nfapi_config
.
timing_window
.
tl
.
tag
=
NFAPI_NR_NFAPI_TIMING_WINDOW_TAG
;
req
->
nfapi_config
.
timing_window
.
value
=
p7_vnf
->
timing_window
;
printf
(
"
[VNF] Timing window:%u
\n
"
,
p7_vnf
->
timing_window
);
printf
(
"
\n
[VNF]Timing window tag : %d Timing window:%u
\n
"
,
NFAPI_NR_NFAPI_TIMING_WINDOW_TAG
,
p7_vnf
->
timing_window
);
req
->
num_tlv
++
;
if
(
p7_vnf
->
periodic_timing_enabled
||
p7_vnf
->
aperiodic_timing_enabled
)
{
...
...
nfapi/open-nFAPI/nfapi/src/nfapi_p5.c
View file @
164397b0
...
...
@@ -697,8 +697,8 @@ static uint8_t pack_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_
pack_tlv
(
NFAPI_NR_CONFIG_MIB_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
MIB
),
ppWritePackedMsg
,
end
,
&
pack_uint32_tlv_value
)
&&
pack_tlv
(
NFAPI_NR_CONFIG_MULTIPLE_CELLS_SS_PBCH_IN_A_CARRIER_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
multiple_cells_ss_pbch_in_a_carrier
),
ppWritePackedMsg
,
end
,
&
pack_uint8_tlv_value
)
&&
pack_tlv
(
NFAPI_NR_CONFIG_SS_PBCH_MULTIPLE_CARRIERS_IN_A_BAND_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ss_pbch_multiple_carriers_in_a_band
),
ppWritePackedMsg
,
end
,
&
pack_uint8_tlv_value
)
&&
//
pack_tlv(NFAPI_NR_CONFIG_BEAM_ID_TAG, &(pNfapiMsg->ssb_table.ssb_beam_id_list->
beam_id), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
//pack_tlv(NFAPI_NR_CONFIG_SSB_MASK_TAG, &(pNfapiMsg->ssb_table.ssb_mask_list->
ssb_mask), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
//
pack_tlv(NFAPI_NR_CONFIG_BEAM_ID_TAG, &(pNfapiMsg->ssb_table.ssb_beam_id_list[0].
beam_id), ppWritePackedMsg, end, &pack_uint16_tlv_value) &&
pack_tlv
(
NFAPI_NR_CONFIG_SSB_MASK_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
),
ppWritePackedMsg
,
end
,
&
pack_uint16_tlv_value
)
&&
pack_tlv
(
NFAPI_NR_CONFIG_SSB_OFFSET_POINT_A_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ssb_offset_point_a
),
ppWritePackedMsg
,
end
,
&
pack_uint16_tlv_value
)
&&
pack_tlv
(
NFAPI_NR_CONFIG_SSB_PERIOD_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ssb_period
),
ppWritePackedMsg
,
end
,
&
pack_uint8_tlv_value
)
&&
pack_tlv
(
NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ssb_subcarrier_offset
),
ppWritePackedMsg
,
end
,
&
pack_uint8_tlv_value
)
&&
...
...
@@ -1611,6 +1611,7 @@ static uint8_t unpack_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, vo
unpack_tlv_t
unpack_fns
[]
=
{
{
NFAPI_NR_CONFIG_DL_BANDWIDTH_TAG
,
&
(
pNfapiMsg
->
carrier_config
.
dl_bandwidth
),
&
unpack_uint16_tlv_value
},
{
NFAPI_NR_CONFIG_DL_FREQUENCY_TAG
,
&
(
pNfapiMsg
->
carrier_config
.
dl_frequency
),
&
unpack_uint32_tlv_value
},
{
NFAPI_NR_CONFIG_DL_GRID_SIZE_TAG
,
&
(
pNfapiMsg
->
carrier_config
.
dl_grid_size
),
&
unpack_uint16_tlv_value
},
{
NFAPI_NR_CONFIG_DL_K0_TAG
,
&
(
pNfapiMsg
->
carrier_config
.
dl_k0
),
&
unpack_uint16_tlv_value
},
...
...
@@ -1637,6 +1638,8 @@ static uint8_t unpack_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, vo
{
NFAPI_NR_CONFIG_MIB_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
MIB
),
&
unpack_uint32_tlv_value
},
{
NFAPI_NR_CONFIG_MULTIPLE_CELLS_SS_PBCH_IN_A_CARRIER_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
multiple_cells_ss_pbch_in_a_carrier
),
&
unpack_uint8_tlv_value
},
{
NFAPI_NR_CONFIG_SS_PBCH_MULTIPLE_CARRIERS_IN_A_BAND_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ss_pbch_multiple_carriers_in_a_band
),
&
unpack_uint8_tlv_value
},
// { NFAPI_NR_CONFIG_BEAM_ID_TAG, &(pNfapiMsg->ssb_table.ssb_beam_id_list[0].beam_id), &unpack_uint16_tlv_value},
{
NFAPI_NR_CONFIG_SSB_MASK_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
),
&
unpack_uint16_tlv_value
},
{
NFAPI_NR_CONFIG_SSB_OFFSET_POINT_A_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ssb_offset_point_a
),
&
unpack_uint16_tlv_value
},
{
NFAPI_NR_CONFIG_SSB_PERIOD_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ssb_period
),
&
unpack_uint8_tlv_value
},
{
NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG
,
&
(
pNfapiMsg
->
ssb_table
.
ssb_subcarrier_offset
),
&
unpack_uint8_tlv_value
},
...
...
@@ -1774,8 +1777,10 @@ static uint8_t unpack_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, vo
};
#endif
return
(
pull8
(
ppReadPackedMsg
,
&
pNfapiMsg
->
num_tlv
,
end
)
&&
unpack_tlv_list
(
unpack_fns
,
sizeof
(
unpack_fns
)
/
sizeof
(
unpack_tlv_t
),
ppReadPackedMsg
,
end
,
config
,
&
pNfapiMsg
->
vendor_extension
));
return
(
pull8
(
ppReadPackedMsg
,
&
pNfapiMsg
->
error_code
,
end
)
&&
pull8
(
ppReadPackedMsg
,
&
pNfapiMsg
->
num_tlv
,
end
)
&&
unpack_tlv_list
(
unpack_fns
,
sizeof
(
unpack_fns
)
/
sizeof
(
unpack_tlv_t
),
ppReadPackedMsg
,
end
,
config
,
&
pNfapiMsg
->
vendor_extension
));
}
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
164397b0
...
...
@@ -255,6 +255,7 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm
cfg
->
num_tlv
++
;
cfg
->
num_tlv
++
;
// TDD Table Configuration
//cfg->tdd_table.tdd_period.value = scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity;
cfg
->
tdd_table
.
tdd_period
.
tl
.
tag
=
NFAPI_NR_CONFIG_TDD_PERIOD_TAG
;
...
...
@@ -306,6 +307,71 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm
}*/
cfg
->
carrier_config
.
frequency_shift_7p5khz
.
tl
.
tag
=
NFAPI_NR_CONFIG_FREQUENCY_SHIFT_7P5KHZ_TAG
;
cfg
->
num_tlv
++
;
cfg
->
measurement_config
.
rssi_measurement
.
tl
.
tag
=
NFAPI_NR_CONFIG_RSSI_MEASUREMENT_TAG
;
cfg
->
num_tlv
++
;
cfg
->
prach_config
.
prach_multiple_carriers_in_a_band
.
tl
.
tag
=
NFAPI_NR_CONFIG_PRACH_MULTIPLE_CARRIERS_IN_A_BAND_TAG
;
cfg
->
num_tlv
++
;
cfg
->
ssb_config
.
bch_payload
.
tl
.
tag
=
NFAPI_NR_CONFIG_BCH_PAYLOAD_TAG
;
cfg
->
num_tlv
++
;
cfg
->
ssb_table
.
beta_pss
.
tl
.
tag
=
NFAPI_NR_CONFIG_BETA_PSS_TAG
;
cfg
->
num_tlv
++
;
cfg
->
ssb_table
.
MIB
.
tl
.
tag
=
NFAPI_NR_CONFIG_MIB_TAG
;
cfg
->
num_tlv
++
;
cfg
->
ssb_table
.
multiple_cells_ss_pbch_in_a_carrier
.
tl
.
tag
=
NFAPI_NR_CONFIG_MULTIPLE_CELLS_SS_PBCH_IN_A_CARRIER_TAG
;
cfg
->
num_tlv
++
;
cfg
->
ssb_table
.
ss_pbch_multiple_carriers_in_a_band
.
tl
.
tag
=
NFAPI_NR_CONFIG_SS_PBCH_MULTIPLE_CARRIERS_IN_A_BAND_TAG
;
cfg
->
num_tlv
++
;
if
(
cfg
->
ssb_table
.
ssb_beam_id_list
!=
NULL
)
{
cfg
->
ssb_table
.
ssb_beam_id_list
[
0
].
beam_id
->
tl
.
tag
=
NFAPI_NR_CONFIG_BEAM_ID_TAG
;
cfg
->
num_tlv
++
;
}
// TODO: assign values to nfapi_config struct
cfg
->
nfapi_config
.
dl_ue_per_sf
.
tl
.
tag
=
NFAPI_NR_NFAPI_DOWNLINK_UES_PER_SUBFRAME_TAG
;
cfg
->
num_tlv
++
;
cfg
->
nfapi_config
.
max_transmit_power
.
tl
.
tag
=
NFAPI_NR_NFAPI_MAXIMUM_TRANSMIT_POWER_TAG
;
cfg
->
num_tlv
++
;
cfg
->
nfapi_config
.
nrarfcn
.
tl
.
tag
=
NFAPI_NR_NFAPI_NRARFCN_TAG
;
cfg
->
nfapi_config
.
nrarfcn
.
value
=
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencyPointA
;
cfg
->
num_tlv
++
;
cfg
->
nfapi_config
.
p7_pnf_address_ipv4
.
tl
.
tag
=
NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV4_TAG
;
cfg
->
num_tlv
++
;
cfg
->
nfapi_config
.
p7_pnf_address_ipv6
.
tl
.
tag
=
NFAPI_NR_NFAPI_P7_PNF_ADDRESS_IPV6_TAG
;
cfg
->
num_tlv
++
;
cfg
->
nfapi_config
.
p7_pnf_port
.
tl
.
tag
=
NFAPI_NR_NFAPI_P7_PNF_PORT_TAG
;
cfg
->
num_tlv
++
;
cfg
->
nfapi_config
.
p7_vnf_address_ipv6
.
tl
.
tag
=
NFAPI_NR_NFAPI_P7_VNF_ADDRESS_IPV6_TAG
;
cfg
->
num_tlv
++
;
cfg
->
nfapi_config
.
rf_bands
.
tl
.
tag
=
NFAPI_NR_NFAPI_RF_BANDS_TAG
;
cfg
->
num_tlv
++
;
cfg
->
nfapi_config
.
rf_bands
.
rf_band
[
0
]
=
*
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
frequencyBandList
.
list
.
array
[
0
];
cfg
->
nfapi_config
.
ul_ue_per_sf
.
tl
.
tag
=
NFAPI_NR_NFAPI_UPLINK_UES_PER_SUBFRAME_TAG
;
cfg
->
num_tlv
++
;
}
...
...
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