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
704ed09c
Commit
704ed09c
authored
Jan 16, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename variables
parent
db57cc9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
radio/ETHERNET/oran/5g/oran-config.c
radio/ETHERNET/oran/5g/oran-config.c
+8
-8
No files found.
radio/ETHERNET/oran/5g/oran-config.c
View file @
704ed09c
...
...
@@ -556,14 +556,14 @@ bool set_fh_init(struct xran_fh_init *fh_init)
return
false
;
}
int
num_ru
s
=
gpd
(
fhip
,
nump
,
ORAN_CONFIG_RU_ADDR
)
->
numelt
;
int
num_du
s
=
gpd
(
fhip
,
nump
,
ORAN_CONFIG_DU_ADDR
)
->
numelt
;
int
num_ru
_addr
=
gpd
(
fhip
,
nump
,
ORAN_CONFIG_RU_ADDR
)
->
numelt
;
int
num_du
_addr
=
gpd
(
fhip
,
nump
,
ORAN_CONFIG_DU_ADDR
)
->
numelt
;
int
num_vfs
=
gpd
(
fhip
,
nump
,
ORAN_CONFIG_DPDK_DEVICES
)
->
numelt
;
if
(
num_ru
s
!=
num_dus
)
{
if
(
num_ru
_addr
!=
num_du_addr
)
{
printf
(
"need to have same number of DUs and RUs!
\n
"
);
return
false
;
}
if
(
num_ru
s
!=
num_vfs
)
{
if
(
num_ru
_addr
!=
num_vfs
)
{
printf
(
"need to have as many RU/DU entries as DPDK devices (one VF for CP and UP each)
\n
"
);
return
false
;
}
...
...
@@ -582,19 +582,19 @@ bool set_fh_init(struct xran_fh_init *fh_init)
// if multiple RUs: xran_ethdi_init_dpdk_io() iterates over
// &p_o_ru_addr[i]
char
**
du_addrs
=
gpd
(
fhip
,
nump
,
ORAN_CONFIG_DU_ADDR
)
->
strlistptr
;
fh_init
->
p_o_du_addr
=
calloc
(
num_du
s
,
sizeof
(
struct
rte_ether_addr
));
fh_init
->
p_o_du_addr
=
calloc
(
num_du
_addr
,
sizeof
(
struct
rte_ether_addr
));
AssertFatal
(
fh_init
->
p_o_du_addr
!=
NULL
,
"out of memory
\n
"
);
for
(
int
i
=
0
;
i
<
num_du
s
;
++
i
)
{
for
(
int
i
=
0
;
i
<
num_du
_addr
;
++
i
)
{
struct
rte_ether_addr
*
ea
=
(
struct
rte_ether_addr
*
)
fh_init
->
p_o_du_addr
;
if
(
get_ether_addr
(
du_addrs
[
i
],
&
ea
[
i
])
==
NULL
)
{
printf
(
"could not read ethernet address '%s' for DU!
\n
"
,
du_addrs
[
i
]);
return
false
;
}
}
fh_init
->
p_o_ru_addr
=
calloc
(
num_ru
s
,
sizeof
(
struct
rte_ether_addr
));
fh_init
->
p_o_ru_addr
=
calloc
(
num_ru
_addr
,
sizeof
(
struct
rte_ether_addr
));
char
**
ru_addrs
=
gpd
(
fhip
,
nump
,
ORAN_CONFIG_RU_ADDR
)
->
strlistptr
;
AssertFatal
(
fh_init
->
p_o_ru_addr
!=
NULL
,
"out of memory
\n
"
);
for
(
int
i
=
0
;
i
<
num_ru
s
;
++
i
)
{
for
(
int
i
=
0
;
i
<
num_ru
_addr
;
++
i
)
{
struct
rte_ether_addr
*
ea
=
(
struct
rte_ether_addr
*
)
fh_init
->
p_o_ru_addr
;
if
(
get_ether_addr
(
ru_addrs
[
i
],
&
ea
[
i
])
==
NULL
)
{
printf
(
"could not read ethernet address '%s' for RU!
\n
"
,
ru_addrs
[
i
]);
...
...
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