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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
530f9627
Commit
530f9627
authored
Oct 25, 2024
by
Robert Schmidt
Committed by
Teodora
Nov 21, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rearrange FHI architecture to support M-plane
Co-authored-by:
Teodora
<
teodora.vladic@openairinterface.org
>
parent
5d1c0aaa
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
31 deletions
+42
-31
radio/fhi_72/oran-config.c
radio/fhi_72/oran-config.c
+19
-2
radio/fhi_72/oran-config.h
radio/fhi_72/oran-config.h
+5
-5
radio/fhi_72/oran-init.c
radio/fhi_72/oran-init.c
+6
-21
radio/fhi_72/oran-init.h
radio/fhi_72/oran-init.h
+1
-2
radio/fhi_72/oran_isolate.c
radio/fhi_72/oran_isolate.c
+11
-1
No files found.
radio/fhi_72/oran-config.c
View file @
530f9627
...
...
@@ -560,7 +560,7 @@ uint8_t *get_ether_addr(const char *addr, struct rte_ether_addr *ether_addr)
return
NULL
;
}
bool
set_fh_init
(
struct
xran_fh_init
*
fh_init
)
static
bool
set_fh_init
(
struct
xran_fh_init
*
fh_init
)
{
memset
(
fh_init
,
0
,
sizeof
(
*
fh_init
));
...
...
@@ -765,7 +765,7 @@ static bool set_maxmin_pd(const paramdef_t *pd, int num, const char *name, uint1
}
extern
uint32_t
to_nrarfcn
(
int
nr_bandP
,
uint64_t
dl_CarrierFreq
,
uint8_t
scs_index
,
uint32_t
bw
);
bool
set_fh_config
(
int
ru_idx
,
int
num_rus
,
const
openair0_config_t
*
oai0
,
struct
xran_fh_config
*
fh_config
)
static
bool
set_fh_config
(
int
ru_idx
,
int
num_rus
,
const
openair0_config_t
*
oai0
,
struct
xran_fh_config
*
fh_config
)
{
AssertFatal
(
num_rus
==
1
||
num_rus
==
2
,
"only support 1 or 2 RUs as of now
\n
"
);
AssertFatal
(
ru_idx
<
num_rus
,
"illegal ru_idx %d: must be < %d
\n
"
,
ru_idx
,
num_rus
);
...
...
@@ -886,3 +886,20 @@ bool set_fh_config(int ru_idx, int num_rus, const openair0_config_t *oai0, struc
return
true
;
}
bool
get_xran_config
(
const
openair0_config_t
*
openair0_cfg
,
struct
xran_fh_init
*
fh_init
,
struct
xran_fh_config
*
fh_config
)
{
if
(
!
set_fh_init
(
fh_init
))
{
printf
(
"could not read FHI 7.2/ORAN config
\n
"
);
return
false
;
}
for
(
int32_t
o_xu_id
=
0
;
o_xu_id
<
fh_init
->
xran_ports
;
o_xu_id
++
)
{
if
(
!
set_fh_config
(
o_xu_id
,
fh_init
->
xran_ports
,
openair0_cfg
,
&
fh_config
[
o_xu_id
]))
{
printf
(
"could not read FHI 7.2/RU-specific config
\n
"
);
return
false
;
}
}
return
true
;
}
radio/fhi_72/oran-config.h
View file @
530f9627
...
...
@@ -26,13 +26,13 @@
#include "stdint.h"
struct
xran_fh_init
;
void
print_fh_init
(
const
struct
xran_fh_init
*
fh_init
);
struct
xran_fh_config
;
void
print_fh_config
(
const
struct
xran_fh_config
*
fh_config
);
bool
set_fh_init
(
struct
xran_fh_init
*
fh_init
);
struct
openair0_config
;
bool
set_fh_config
(
int
ru_idx
,
int
num_rus
,
const
struct
openair0_config
*
oai0_cfg
,
struct
xran_fh_config
*
fh_config
);
bool
get_xran_config
(
const
struct
openair0_config
*
openair0_cfg
,
struct
xran_fh_init
*
fh_init
,
struct
xran_fh_config
*
fh_config
);
void
print_fh_init
(
const
struct
xran_fh_init
*
fh_init
);
void
print_fh_config
(
const
struct
xran_fh_config
*
fh_config
);
// hack to workaround LiteOn limitation
extern
int
g_kbar
;
...
...
radio/fhi_72/oran-init.c
View file @
530f9627
...
...
@@ -396,35 +396,20 @@ static void oran_allocate_buffers(void *handle,
xran_5g_prach_req
(
pi
->
instanceHandle
,
prach
,
prachdecomp
,
oai_xran_fh_rx_prach_callback
,
&
portInstances
->
prach_tag
);
}
int
*
oai_oran_initialize
(
const
openair0_config_t
*
openair0_cf
g
)
int
*
oai_oran_initialize
(
struct
xran_fh_init
*
xran_fh_init
,
struct
xran_fh_config
*
xran_fh_confi
g
)
{
int32_t
xret
=
0
;
struct
xran_fh_init
init
=
{
0
};
if
(
!
set_fh_init
(
&
init
))
{
printf
(
"could not read FHI 7.2/ORAN config
\n
"
);
return
NULL
;
}
print_fh_init
(
&
init
);
/* read all configuration before starting anything */
struct
xran_fh_config
xran_fh_config
[
XRAN_PORTS_NUM
]
=
{
0
};
for
(
int32_t
o_xu_id
=
0
;
o_xu_id
<
init
.
xran_ports
;
o_xu_id
++
)
{
if
(
!
set_fh_config
(
o_xu_id
,
init
.
xran_ports
,
openair0_cfg
,
&
xran_fh_config
[
o_xu_id
]))
{
printf
(
"could not read FHI 7.2/RU-specific config
\n
"
);
return
NULL
;
}
print_fh_config
(
&
xran_fh_config
[
o_xu_id
]);
}
xret
=
xran_init
(
0
,
NULL
,
&
init
,
NULL
,
&
gxran_handle
);
print_fh_init
(
xran_fh_init
);
xret
=
xran_init
(
0
,
NULL
,
xran_fh_init
,
NULL
,
&
gxran_handle
);
if
(
xret
!=
XRAN_STATUS_SUCCESS
)
{
printf
(
"xran_init failed %d
\n
"
,
xret
);
exit
(
-
1
);
}
/** process all the O-RU|O-DU for use case */
for
(
int32_t
o_xu_id
=
0
;
o_xu_id
<
init
.
xran_ports
;
o_xu_id
++
)
{
for
(
int32_t
o_xu_id
=
0
;
o_xu_id
<
xran_fh_init
->
xran_ports
;
o_xu_id
++
)
{
print_fh_config
(
&
xran_fh_config
[
o_xu_id
]);
xret
=
xran_open
(
gxran_handle
,
&
xran_fh_config
[
o_xu_id
]);
if
(
xret
!=
XRAN_STATUS_SUCCESS
)
{
printf
(
"xran_open failed %d
\n
"
,
xret
);
...
...
@@ -432,7 +417,7 @@ int *oai_oran_initialize(const openair0_config_t *openair0_cfg)
}
int
sector
=
0
;
printf
(
"Initialize ORAN port instance %d (%d) sector %d
\n
"
,
o_xu_id
,
init
.
xran_ports
,
sector
);
printf
(
"Initialize ORAN port instance %d (%d) sector %d
\n
"
,
o_xu_id
,
xran_fh_init
->
xran_ports
,
sector
);
oran_port_instance_t
*
pi
=
&
gPortInst
[
o_xu_id
][
sector
];
struct
xran_cb_tag
tag
=
{.
cellId
=
sector
,
.
oXuId
=
o_xu_id
};
pi
->
prach_tag
=
tag
;
...
...
radio/fhi_72/oran-init.h
View file @
530f9627
...
...
@@ -57,7 +57,6 @@ typedef struct oran_port_instance_t {
extern
struct
xran_fh_config
gxran_fh_config
[
XRAN_PORTS_NUM
];
extern
void
*
gxran_handle
;
struct
openair0_config
;
int
*
oai_oran_initialize
(
const
struct
openair0_config
*
openair0_cfg
);
int
*
oai_oran_initialize
(
struct
xran_fh_init
*
fh_init
,
struct
xran_fh_config
*
fh_config
);
#endif
/* ORAN_INIT_H */
radio/fhi_72/oran_isolate.c
View file @
530f9627
...
...
@@ -33,6 +33,7 @@
#include "openair1/PHY/defs_gNB.h"
#include "common/utils/threadPool/thread-pool.h"
#include "oaioran.h"
#include "oran-config.h"
// include the following file for VERSIONX, version of xran lib, to print it during
// startup. Only relevant for printing, if it ever makes problem, remove this
...
...
@@ -317,7 +318,16 @@ __attribute__((__visibility__("default"))) int transport_init(openair0_device *d
LOG_I
(
HW
,
"Initializing O-RAN 7.2 FH interface through xran library (compiled against headers of %s)
\n
"
,
VERSIONX
);
initNotifiedFIFO
(
&
oran_sync_fifo
);
eth
->
oran_priv
=
oai_oran_initialize
(
openair0_cfg
);
struct
xran_fh_init
fh_init
=
{
0
};
struct
xran_fh_config
fh_config
[
XRAN_PORTS_NUM
]
=
{
0
};
#ifndef OAI_MPLANE_SUPPORT
bool
success
=
get_xran_config
(
openair0_cfg
,
&
fh_init
,
fh_config
);
AssertFatal
(
success
,
"cannot get configuration for xran
\n
"
);
#else
/* TODO: M-plane integration */
#endif
eth
->
oran_priv
=
oai_oran_initialize
(
&
fh_init
,
fh_config
);
AssertFatal
(
eth
->
oran_priv
!=
NULL
,
"can not initialize fronthaul"
);
// create message queues for ORAN sync
return
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