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
e51ca908
Commit
e51ca908
authored
Jul 29, 2022
by
Swetank Srivastava
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
indentation aligned
parent
cb8aad51
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
235 additions
and
235 deletions
+235
-235
nfapi/oai_integration/nfapi_vnf.c
nfapi/oai_integration/nfapi_vnf.c
+50
-50
nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
+185
-185
No files found.
nfapi/oai_integration/nfapi_vnf.c
View file @
e51ca908
...
@@ -1633,57 +1633,57 @@ req->nfapi_config.tx_data_timing_offset.tl.tag = NFAPI_NR_NFAPI_TX_DATA_TIMING_O
...
@@ -1633,57 +1633,57 @@ req->nfapi_config.tx_data_timing_offset.tl.tag = NFAPI_NR_NFAPI_TX_DATA_TIMING_O
int
param_resp_cb
(
nfapi_vnf_config_t
*
config
,
int
p5_idx
,
nfapi_param_response_t
*
resp
)
{
int
param_resp_cb
(
nfapi_vnf_config_t
*
config
,
int
p5_idx
,
nfapi_param_response_t
*
resp
)
{
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[VNF] Received NFAPI_PARAM_RESP idx:%d phy_id:%d
\n
"
,
p5_idx
,
resp
->
header
.
phy_id
);
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[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_info
*
vnf
=
(
vnf_info
*
)(
config
->
user_data
);
vnf_p7_info
*
p7_vnf
=
vnf
->
p7_vnfs
;
vnf_p7_info
*
p7_vnf
=
vnf
->
p7_vnfs
;
pnf_info
*
pnf
=
vnf
->
pnfs
;
pnf_info
*
pnf
=
vnf
->
pnfs
;
phy_info
*
phy
=
pnf
->
phys
;
phy_info
*
phy
=
pnf
->
phys
;
struct
sockaddr_in
pnf_p7_sockaddr
;
struct
sockaddr_in
pnf_p7_sockaddr
;
nfapi_config_request_t
*
req
=
&
RC
.
mac
[
0
]
->
config
[
0
];
nfapi_config_request_t
*
req
=
&
RC
.
mac
[
0
]
->
config
[
0
];
phy
->
remote_port
=
32123
;
//resp->nfapi_config.p7_pnf_port.value;
phy
->
remote_port
=
32123
;
//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
);
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
);
phy
->
remote_addr
=
inet_ntoa
(
pnf_p7_sockaddr
.
sin_addr
);
// for now just 1
// for now just 1
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[VNF] %d.%d pnf p7 %s:%d timing %u %u %u %u
\n
"
,
p5_idx
,
phy
->
id
,
phy
->
remote_addr
,
phy
->
remote_port
,
p7_vnf
->
timing_window
,
p7_vnf
->
periodic_timing_period
,
p7_vnf
->
aperiodic_timing_enabled
,
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[VNF] %d.%d pnf p7 %s:%d timing %u %u %u %u
\n
"
,
p5_idx
,
phy
->
id
,
phy
->
remote_addr
,
phy
->
remote_port
,
p7_vnf
->
timing_window
,
p7_vnf
->
periodic_timing_period
,
p7_vnf
->
aperiodic_timing_enabled
,
p7_vnf
->
periodic_timing_period
);
p7_vnf
->
periodic_timing_period
);
req
->
header
.
message_id
=
NFAPI_CONFIG_REQUEST
;
req
->
header
.
message_id
=
NFAPI_CONFIG_REQUEST
;
req
->
header
.
phy_id
=
phy
->
id
;
req
->
header
.
phy_id
=
phy
->
id
;
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[VNF] Send NFAPI_CONFIG_REQUEST
\n
"
);
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[VNF] Send NFAPI_CONFIG_REQUEST
\n
"
);
req
->
nfapi_config
.
p7_vnf_port
.
tl
.
tag
=
NFAPI_NFAPI_P7_VNF_PORT_TAG
;
req
->
nfapi_config
.
p7_vnf_port
.
tl
.
tag
=
NFAPI_NFAPI_P7_VNF_PORT_TAG
;
req
->
nfapi_config
.
p7_vnf_port
.
value
=
p7_vnf
->
local_port
;
req
->
nfapi_config
.
p7_vnf_port
.
value
=
p7_vnf
->
local_port
;
req
->
num_tlv
++
;
req
->
num_tlv
++
;
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[VNF] DJP local_port:%d
\n
"
,
p7_vnf
->
local_port
);
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[VNF] DJP local_port:%d
\n
"
,
p7_vnf
->
local_port
);
req
->
nfapi_config
.
p7_vnf_address_ipv4
.
tl
.
tag
=
NFAPI_NFAPI_P7_VNF_ADDRESS_IPV4_TAG
;
req
->
nfapi_config
.
p7_vnf_address_ipv4
.
tl
.
tag
=
NFAPI_NFAPI_P7_VNF_ADDRESS_IPV4_TAG
;
struct
sockaddr_in
vnf_p7_sockaddr
;
struct
sockaddr_in
vnf_p7_sockaddr
;
vnf_p7_sockaddr
.
sin_addr
.
s_addr
=
inet_addr
(
p7_vnf
->
local_addr
);
vnf_p7_sockaddr
.
sin_addr
.
s_addr
=
inet_addr
(
p7_vnf
->
local_addr
);
memcpy
(
&
(
req
->
nfapi_config
.
p7_vnf_address_ipv4
.
address
[
0
]),
&
vnf_p7_sockaddr
.
sin_addr
.
s_addr
,
4
);
memcpy
(
&
(
req
->
nfapi_config
.
p7_vnf_address_ipv4
.
address
[
0
]),
&
vnf_p7_sockaddr
.
sin_addr
.
s_addr
,
4
);
req
->
num_tlv
++
;
req
->
num_tlv
++
;
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[VNF] DJP local_addr:%s
\n
"
,
p7_vnf
->
local_addr
);
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[VNF] DJP local_addr:%s
\n
"
,
p7_vnf
->
local_addr
);
req
->
nfapi_config
.
timing_window
.
tl
.
tag
=
NFAPI_NFAPI_TIMING_WINDOW_TAG
;
req
->
nfapi_config
.
timing_window
.
tl
.
tag
=
NFAPI_NFAPI_TIMING_WINDOW_TAG
;
req
->
nfapi_config
.
timing_window
.
value
=
p7_vnf
->
timing_window
;
req
->
nfapi_config
.
timing_window
.
value
=
p7_vnf
->
timing_window
;
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[VNF] Timing window:%u
\n
"
,
p7_vnf
->
timing_window
);
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"[VNF] Timing window:%u
\n
"
,
p7_vnf
->
timing_window
);
req
->
num_tlv
++
;
req
->
num_tlv
++
;
if
(
p7_vnf
->
periodic_timing_enabled
||
p7_vnf
->
aperiodic_timing_enabled
)
{
req
->
nfapi_config
.
timing_info_mode
.
tl
.
tag
=
NFAPI_NFAPI_TIMING_INFO_MODE_TAG
;
req
->
nfapi_config
.
timing_info_mode
.
value
=
(
p7_vnf
->
aperiodic_timing_enabled
<<
1
)
|
(
p7_vnf
->
periodic_timing_enabled
);
req
->
num_tlv
++
;
if
(
p7_vnf
->
periodic_timing_enabled
)
{
req
->
nfapi_config
.
timing_info_period
.
tl
.
tag
=
NFAPI_NFAPI_TIMING_INFO_PERIOD_TAG
;
req
->
nfapi_config
.
timing_info_period
.
value
=
p7_vnf
->
periodic_timing_period
;
req
->
num_tlv
++
;
}
}
vendor_ext_tlv_2
ve2
;
if
(
p7_vnf
->
periodic_timing_enabled
||
p7_vnf
->
aperiodic_timing_enabled
)
{
memset
(
&
ve2
,
0
,
sizeof
(
ve2
));
req
->
nfapi_config
.
timing_info_mode
.
tl
.
tag
=
NFAPI_NFAPI_TIMING_INFO_MODE_TAG
;
ve2
.
tl
.
tag
=
VENDOR_EXT_TLV_2_TAG
;
req
->
nfapi_config
.
timing_info_mode
.
value
=
(
p7_vnf
->
aperiodic_timing_enabled
<<
1
)
|
(
p7_vnf
->
periodic_timing_enabled
);
ve2
.
dummy
=
2016
;
req
->
num_tlv
++
;
req
->
vendor_extension
=
&
ve2
.
tl
;
nfapi_vnf_config_req
(
config
,
p5_idx
,
req
);
if
(
p7_vnf
->
periodic_timing_enabled
)
{
printf
(
"[VNF] Sent NFAPI_CONFIG_REQ num_tlv:%u
\n
"
,
req
->
num_tlv
);
req
->
nfapi_config
.
timing_info_period
.
tl
.
tag
=
NFAPI_NFAPI_TIMING_INFO_PERIOD_TAG
;
return
0
;
req
->
nfapi_config
.
timing_info_period
.
value
=
p7_vnf
->
periodic_timing_period
;
req
->
num_tlv
++
;
}
}
vendor_ext_tlv_2
ve2
;
memset
(
&
ve2
,
0
,
sizeof
(
ve2
));
ve2
.
tl
.
tag
=
VENDOR_EXT_TLV_2_TAG
;
ve2
.
dummy
=
2016
;
req
->
vendor_extension
=
&
ve2
.
tl
;
nfapi_vnf_config_req
(
config
,
p5_idx
,
req
);
printf
(
"[VNF] Sent NFAPI_CONFIG_REQ num_tlv:%u
\n
"
,
req
->
num_tlv
);
return
0
;
}
}
int
nr_config_resp_cb
(
nfapi_vnf_config_t
*
config
,
int
p5_idx
,
nfapi_nr_config_response_scf_t
*
resp
)
{
int
nr_config_resp_cb
(
nfapi_vnf_config_t
*
config
,
int
p5_idx
,
nfapi_nr_config_response_scf_t
*
resp
)
{
...
...
nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
View file @
e51ca908
This diff is collapsed.
Click to expand it.
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