Integration: `2025.w04`
Closes#876, #896, #875, #893, and #878
See merge request oai/openairinterface5g!3226
* !3198 remove a set of compile options that don't work anyway
* !3171 Refactor SCTP Association Response Handling and E1 connection loss at CU-UP
* !3023 usrp constant and slow derive timestamp
* !3215 Remove unused code
* !3192 fix nr phy-test mode in ntn
* !3214 fix(nrLDPC_coding_t2): Miscellaneous fixes related to T2
* !3020 use ML receiver for 64 QAM UL-MIMO
* Demote error logs to debug for "PUCCH not processed"
* !3217 minor improvements in T hacks
* !3199 Add a small FAPI Hex parser utility
* !3209 Remove most of m64 type usage
* !3211 Avoid huge calloc by alloc'ing TBs independently
* !3212 F1AP IDs: Allow AddMod, fix concurrency bug
* !3152 E1 Setup enc/dec library and unit test
* !2999 Repair nFAPI in 5G
* !3210 FHI72: FDD support
* !3220 Improve RA logs
Improve RA logs
Modify existing LOG entries to include preamble index, timing advance and
estimated distance from the gNB. This makes mapping RA attempts to
physical/simulated UEs easier via sent/received preamble index or physical
distance from the gNB in scenarios with >1 UE.
FHI72: FDD support
- harmonize DL/UL PRB mapping in one get_xran_prb_map() function with support
of mixed slot and duplex mode
- do not assume TDD by default
Repair nFAPI in 5G
Add 5G nFAPI in OAI/Make it it work.
Many commits in this branch are basically bug fixes of things that don't work
properly, such as
- check for correct conditions (e.g. instance numbers in the RAN context)
- remove artificial limitation (e.g. only one PUCCH per TDD period in the PNF)
- improve performance (reduce big mallocs, make some static buffers such as a
global ring buffer for nFAPI messages in the PNF)
- fix bugs in nFAPI (e.g., increase maximum message size to ~64kB instead of
1500 bytes, because the latter is way too small for many TX_data.requests in
5G, and it will delay message arrival unduly)
- fix bugs in message enc/dec (e.g., handle FDD in config.request)
- adjust the L1 such that the condition "we run monolithic" is not necessery
(e.g., some message numbers in nFAPI struct where reset in MAC, instead of
L1, and this breaks when running the PNF)
There are instructions that explain how to set it up. Two CI tests have been
added, one with COTS UE and MIMO in DL+UL in TDD numerology 1 (30kHz), and a
second test with FDD mu=0 (15kHZ) in RFsimulator.
These were some old to-dos that have been addressed.
- test with COTS UE - 4x4 pipeline works good in DL, UL now also work
- test in RFsim
- make PNF status message
- make FDD in u0 work
This function packs P7 messages. At least RX_data.indication messages
might be much bigger than the global buffer that is used here. Allocate
the buffer on the stack, and make it bigger. Do not use the global
buffer, it's simply not necessary; increasing the global tx buffer size
might have negative effects elsewhere in the code.
That change might make the function reentrant. The mutex seems to only
guards the codec config. However, leave it to not introduce any
regressions as of now.
E1 Setup enc/dec library and unit test
This MR is adding a library for E1 Setup enc/dec functions:
- E1 CU-UP Setup Request
- E1 CU-UP Setup Response
- E1 Setup Failure
and relevant unit tests
F1AP IDs: Add update, fix concurrency bug
I suspect a concurrency bug: For instance, during reestablishment, the
CU needs to update the DU UE ID under which the UE is identified in the
DU. Previously, the CU would remove, then add the DU UE ID info. At the
same time, the PDCP thread might look up the information. This can lead
to asserts. Modify the code to do the update under (one) lock.
Also, refactor some code.
Similar to the parent commit, make the numerology in the VNF
configurable. Unlike for the PNF change, the VNF frame/slot info is in a
per-PNF connection structure to which the "oai_integration" code has no
access. So we need to hack the nfapi_vnf_p7_add_pnf() function signature
to take the numerology, to be able to save this on a per-PNF basis.
The fact that we store this on a per-PNF basis is not strictly required,
as the VNF cannot handle multiple numerologies as of now, either.
However, we might want to extend this in the future, so it seems prudent
to store this on a per-PNF basis, so that we could start handling
multiple numerologies at the L2 without the need to change the L1 or
nFAPI code itself.
Also, the numerology is not needed except for some code that deals with
timing over nFAPI. As of now, we don't use this code (nFAPI gets a
trigger every slot, as per the VNF request, see an earlier commit in
this series), but also here, let's not make the future more complicated
by storing the numerology for each PNF now (this could always be reverted).
For 4G, put numerology 0 (15kHZ SCS), which is the SCS that LTE uses.
Fill in the dynamically received numerology, and make the numerology at
the PNF configurable, following the changes in the parent commit.
The change for the reading is somewhat of a hack, because nFAPI, as of
now, does not really foresee to store the numerology, so we fill the
numerology during the start request, when the numerlogy has been
received in the config request, but at that time, the structure for the
time information (frame/slot) does not exist yet.
At both the PNF and the VNF, introduce a separate numerology field, and
pass the numerology when converting time information using macros from
nfapi_interface.h. The actually numerology is still hardcoded to 1 (as it
was before), but the follow-up commits will put a suitable numerology.
In both cases, but the numerology next to the frame/slot information.
Similar as the parent comment, remove time macros. In this particular
case, we can just pass the exact frame/slot information, instead of
squeezing it in a single integer.
The next commits will modify the time macros used in the 5G nFAPI code
to handle different numerologies. As a preparation, remove all the
usages of these macros where they really don't matter (e.g., don't
convert if we don't need to).
the L1 needs both a PDU (in TX_data.req) as well instructions for
the actual transmission (in DL_TTI.req) to encode a PDSCH message. In
nFAPI, it can happen that a DL_TTI.request message has been received
(configuring the PDSCH transmission), without the TX_data.request having
reached the PNF. The L1 assumes to have the PDU.
To avoid problems, ensure that only the pair of DL_TTI.req/TX_data.req
is delivered. Otherwise, drop either message.
nFAPI has a mechanism to segment messages that are too big for transport
over a given medium (see e.g. SCF 225, section 2.3.2).
The maximum segment size of 10000 makes that for larger payloads, e.g.
TX_data.request, many small segments are to be sent. This can create or
increase delays on the transport. On the other hand, the currently only
available transport mechanism, UDP, allows to transport packets of up to
almost 65535 bytes. Correspondingly, increase the maximum segment size
so that less segments are to be created, and potentially, less delay is
to be incurred. # Please enter the commit message for your changes.
Lines starting
Avoid delays in tx_data.request handling by avoiding big malloc()s and
copy operations. Reimplement function to (1) peek the frame/slot
numbers, (2) decide on buffer, and (3) unpack directly into
pre-allocated memory.
Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Co-authored-by: chenyi <Yi-Quan.Chen@eurecom.fr>
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
The next commits refactor the rx handling of messages in the PNF. To
efficiently handle them, provide a "peek()" function that gives us the
frame/slot for which a message is destined. This allows to decide if a
message is on time and select a destination buffer, before unpacking it
completely, avoiding copies.
The time that a message between PNF/VNF to arrive depends mostly on the
transport. To allow for some delays, there is a slot_ahead time, during
which the VNF is allowed to schedule and send instructions to the PNF.
This can be multiple slots; the 1ms hitherto given might typically too
short. Increase to 10ms, to encompass a wider range of slot_ahead times.
Make the corresponding log message of when old (stale) message are
removed a bit clearer with respect to times.
This is the first commit in which nFAPI works. Follow-up commits improve
performance.
The usage of this flag in the L1 is simply wrong: either, the NFAPI mode
runs L1, or not. Correspondingly, add an assert to check this invariant.
In the NR_IF_module, the correct check to do is for VNF (implying no L1,
or "emulation of L1" [which is not true]), in which case we use
queues.
The L1 receives a pointer to the L1 payload to use for PDSCH generation.
This would overwrite an existing pre-allocated pointer. Remove this
preallocation. Instead, allocate it in the simulator (the only place
that actively uses this buffer allocation; in nr-softmodem, it's lost by
assigning a pointer). Allocate with an extra byte, because the payload
(in bits) might not be a multiple of 8 bits/1 byte, so the CRC is in the
last 3 bytes.
Also, improve the log with frame/slot information if the PDSCH payload
pointer is NULL.
The function now utilizes simpler variable names and logic to determine
if a given NR P7 request falls within the timing window.
The logic for determining if a request is within the timing window is as follows:
- The function calculates the absolute difference between the current
and received SFN slots, taking into account the possibility of
wraparound.
- If the absolute difference is greater than half of the maximum SFN
slot value, it subtracts this difference from the maximum SFN slot
value to get the actual difference.
- The function then checks if this difference is less than or equal to
the specified timing window. If it is, the request is considered to be
within the window.
Additionally, the commit updates the function signature to return a
boolean value for better readability and consistency.
Changes made:
- Simplified variable names for readability
- Improved logic for handling wraparound scenarios
- Updated function signature to return a boolean value
Co-authored-by: Rúben Soares Silva <rsilva@allbesmart.pt>
Since commit defc97ec16 ("Msg2 and Msg3 at gNB: check allocation before
committing to Msg2"), the scheduler calculate Msg2/Msg3 frame/slot
before allocation of Msg2, and not when receiving Msg1. It also respects
the RA response window correctly.
Correspondingly, we don't need to calculate here if the RACH.indication
is within the time window. The scheduler will do this.
If VNF and PNF are deployed through different processes, it's crucial to
maintain synchronization and ensure smooth operation. This commit
addresses the need to keep the VNF slot ahead of 2 (as required for
network deployment), while ensuring that PNFs wait appropriately to
avoid overtaking the slot. Specifically, this involves measuring slot
duration and implementing a wait mechanism to ensure that PNFs do not
exceed a slot duration of 300 microseconds. This ensures proper smooth
operation, especially in the case of RFsim.
Reset the counters. In monolithic, this happens in the scheduler; in the
PNF, without this change, it would trigger PDCCH again.
Co-authored-by: hsum <ming-hong.hsu@eurecom.fr>
Refactor pnf_phy_ul_dci_req(), pnf_phy_dl_tti_req(),
pnf_phy_tx_data_req(), pnf_phy_ul_tti_req(), to use L1 functions to
"load" L1 jobs to be executed, via L1 functions.
In monolithic, the sched_response mechanism ensures that FAPI messages
for one slot are not overwritten by scheduler instructions for the
following slots (i.e., it is like a memory allocation pool).
The allocation happens in nr_schedule_response(), not used by the PNF.
Hence, only deallocate when in monolithic.
The PNF uses a big ring buffer over all slots in a frame to ensure the
same.
This function applied an sf_ahead, bigger than the actual slot
indication message sending (so a message could NEVER arrive on time!).
Reduce to zero, because this is when it should arrive for us.
FAPI says these lists should be for MAX_TDD_PERIODICITY (which is maybe
a frame, or a TDD period? but likely not two frames). Reduce to one
frame.
Also, the nFAPI code assumes one entire frame, so use that (this commit
necessary to actually make the PNF work, otherwise, the
packing/unpacking of the FAPI message would need to do 2 frames).
Closes: #876
Upon reception of FAPI UL messages (e.g., RACH.indication), those
messages are put into queues, to be delivered in a single call,
NR_UL_indication(). Call the scheduler to trigger processing in UL.
Note that ideally, these queues should not exist at all, and messages
should just be delivered asynchronously, as this would lead to less
copying of messages. Currently, we fulfill the scheduler interface
instead.
Important! Trigger UL after having run DL scheduler and sent the
messages, to ensure short delay between Slot.indication, and the
response to those messages.
The previous designs seems to do:
loop {
poll_ind_queue()
if (msg)
scheduler;
pselect() on messages;
handle_message {
if slot_ind
put_ind_queue()
}
}
So basically, we artificially put a queue for slot indications in the
middle, but still handle it in the same thread(!). This for some reason
results in a big slow down if the PNF runs faster.
Now, we just do pselect(), waiting for messages. We handle the slot
indication immediately (the schedule should take some microseconds),
then return to pselect().
Use this function to implement distinct behavior for monolithic or PNF:
- monolithic: run the scheduler, as normal
- PNF: send a slot indication; the VNF will send an answer which the PNF
will handle elsewhere.
Add function declarations to make nr_ulsim compile, as NR_IF_Module.c is
part of the MAC sources. As of now, this is necessary; I think the right
way would be to take NR_IF_Module.c out of the MAC, and make this a
"glue" library that sticks L1 and L2 together, in monolithic (in VNF, in
that case, we should not link in L1, and for the PNF not the L2,
creating separate executables... Rome was not built in one day).
We are required to store multiple PUCCH (e.g., for multiple UEs).
However, nr_fill_pucch() automatically freed the previously active PUCCH
structure. Of course(!) this does not make sense.
However, the problem is that init_nr_transport() allocated only one
PUCCH structure. Also this does not make sense to me. The problem was
that slot_ahead was 0, which logically cannot happen in this function
(because slot_ahead is illogical, we must give the radio some time). The
reason is that it uses if_inst->sl_ahead, which, prior to this commit,
was not set.
The init_nr_transport() function is called normally from main() through
init_eNB_afterRU(). In this case, we initialize if_inst->sl_ahead to
what is set in main(). In the PNF case, however, we call
init_nr_transport() from the PNF thread, when receiving the start
request. In the main(), we wait for this to happen, before setting
if_inst->sl_ahead. Hence, initializing this variable (which we should
safely be able to do) before solves the problem.
The radio gives the clock. Therefore, we do not need to keep the time
separately in the PNF.
Also, the VNF should not run the ru_thread, as this is an L1 thread.
This is to align with monolithic/FAPI, where we get slot indications in
each slot. In the nFAPI, this is replaced by timing information, such
that the VNF ticks automatically, and gets indications from the PNF on
early/late messages. The timing information handling is not implemented
in the present nFAPI implementation. Instead, we adopt the FAPI behavior
and send timing information in every slot, abusing it to be a slot
indication.
There is no need to add the PNF in nr_start_resp_cb(), because it has
already been done in nr_param_resp_cb(). This might be wrong, because 4G
does it only in nr_start_resp_cb(), but for the moment, since it is also
used in nr_param_resp_cb(), avoid the double add.
The same function is called in nr_start_resp_cb(), why there and not here?
At reception of nr_param_response, we receive the remote PNF information
on PNF/VNF. We have to store it.
In nr_start_response, it might not be correct and/or can be taken out.
The next commit will remove it.
Remove most of m64 type usage
MMX instructions were first SIMD version, the registers management is complex
(_mm_empty()) so, it is better to remove it now and use more recent instructions
anyway, gcc/clang should replace it automatically as long as we enable sse2,
that should always be the case but for code understanding and for ARM porting
for example, it is better to explicitly remove it
Add a small FAPI Hex parser utility
Adds a small FAPI hex parser utility nfapi_hex_parser, that takes in a FAPI
message hexdump, either from the command line or a file, unpacks it and prints
the contents out to the console.
The functions to print the data to the console were added alongside the existing
utility functions, for both P5 and P7 messages.
This allows the user to quickly check if a message has the valid format to be
unpacked in OAI.
The file examples.md contains some examples of execution and output.
This utility is compiled alongside the NFAPI_LIB, as such, it is compiled
whenever we compile nr-softmodem, or any other target that uses the NFAPI_LIB.
Prior to this this commit, the structure NR_UE_info_t is 4881632 bytes.
On some machines, e.g., one of the CI systems, this can lead to realtime
problems when doing the initial calloc() of the data structure.
Commit e586efb29d ("Enable 32 HARQ
Processes in DL, UL") introduced the real-time problems by increasing
the number of HARQ processes.
The reason NR_UE_info_t is that big is that it contains buffers for DL
HARQ data that might need to be retransmitted (the L1 is stateless, it
cannot store this for the L2). To reduce the size, dynamically allocate
the DL HARQ buffers when they are needed. This also reduces the size of
NR_UE_info_t to 15840 bytes.
Encapsulate transportBlock in byte_array and accessory functions, and
allocate in big chunks of multiple of ~32kB.
Reported-By: Cedric Roux <cedric.roux@eurecom.fr>
Fixes: e586efb29dCloses: #875
ran_func_kpm.c uses cp_ba_to_str(), but it is not defined in OAI. Define
it so we can link properly, instead of relying on FlexRIC (where it was
defined).
Introduce function cu_update_f1_ue_data() which does remove+add under
one lock. This fixes a concurrency bug. For instance, during
reestablishment, the CU needs to update the DU UE ID under which the UE
is identified in the DU. Previously, the CU would remove, then add the
DU UE ID info. At the same time, the PDCP thread might look up the
information. This can lead to asserts. Use the above addmod
functionality to do the remove-add under a mutex.
Modify test to verify this works as expected.
use ML receiver for 64 QAM UL-MIMO
Change condition on MMSE/ML selection to include 64QAM for ML UL-MIMO receiver.
Only 256QAM will now use MMSE UL-MIMO receiver.
fix(nrLDPC_coding_t2): Miscellaneous fixes related to T2
1. HARQ combined offset:
The offset provided for each code block in the HARQ combined input and output
buffer shall not be above 512. A modulus was performed on the offset of the TB
in the buffer to avoid this situation. But the offset of the code block was
added afterward so that the total offset was sometimes going above 512.This
commit performs the modulus after adding the code block offset. Usually this
issue was triggering a segfault after less than 2 minutes of an iperf test on
some setup using T2. The same iperf test was successfully performed during 10
minutes on the same setup with this change.
2. Properly stop LDPC coding in gNB and UE:
LDPC coding was yet not properly stopped by using free_nrLDPC_coding_interface
in gNB and UE. This was not causing major issue until now. It was especially not
causing any issue with T2 LDPC coding using the PF. But using T2 VFs, if the
coding library is not properly stopped then the VF cannot be used anymore unless
the admin app is restarted. So this MR adds the missing free_nrLDPC_coding_interface.
fix nr phy-test mode in ntn
Following SIB19 MR !3019 (merged), the phy-test mode is no longer working
In this MR we update the handling NTN-Config from ServingCellConfigCommon
to be the same as when NTN-Config is received in SIB19
More details: !3019 (comment 145103)
usrp constant and slow derive timestamp
Sample write reorder function doesn't handle properly the clock shift.
It keeps the same time origin forever, so, if the clock sifts in one direction,
we finish to reach the maximum time shift that was designed for slot to slot
maximum shift.
We may also consider if this function is useful: gNB and UE currently ensure Tx
in order because there are other issues above if we let Tx preparation run out
of order in separate threads
Closes#893
- Refactor SCTP Association Response Handling
- Unified function for both CU-CP and CU-UP handling
- CU-CP: Notifies RRC of E1 connection loss with CU-UP
- CU-UP: Initiates a new SCTP association request to regain E1 connection
- this fix will prevent issue #878 from happening
- Send list of PDU Session Resources to Failed Setup in the (PDU Session
Resource/Initial Context) Setup Response
- depending on different failure scenarios
- e.g. (#878) when No CU-UP is associated and still the CU-CP receives a PDU
Session Setup Request
- add relevant functions to handle NGAP Setup Response messages with failed
list of items
- this is an extra failure handling to make #878 is handled if it ever happens
again
- NGAP Cause Refactoring
- Refactor struct for NGAP cause group and value
- Add extended radio network cause enumeration values
- Refactor redundant code into a new NGAP cause encoding function
- Minor logging, function descriptions improvements
Closes#878
Useful to debug realtime issues, for example when calling a periodical
routine, if it's not programmed carefully enough, it may be that the first
call takes way longer than the next ones (for example it uses some memory
that is not mapped in the process, leading to many page faults the first
time it's executed).
Having a periodic log for the timing of this routine with min/avg/max/count
will reveal that a call is way longer than average and will help in
finding where exactly in the code the time is spent, thanks to the ease
of use of the T tracer; you put T(T_XX, T_INT(1)) just before the code
you want to measure, you put T(T_XX, T_INT(0)) just after and time_meas
will show the delta time between those events. Then you cut the routine
in smaller pieces, measure with T(1)/T(0), and you finally reach the small
guilty part that takes too long.
In time_meas.c, when getting 0 for the event, we log delta time with
previous 1 for the event. "start_valid" was not cleared, so receiving
a second 0 without 1 in between may lead to wrong logging.
Should not happen in practice, but still, little bug.
(Note: we don't protect against streams of 1, but this case should also
not happen.)
Add utility functions to print the FAPI messages contents
Add dump functions for DL_TTI.request PDUs, remaining message structures to be finished
Add file examples.md with some examples on how to use nfapi_hex_parser
Now uses RC.nb_nr_L1_inst instead of RC.nb_nr_inst in order to configure the L1, since in PNF RC.nb_nr_inst is always 0, and so, it wouldn't configure the L1
chore(ci): Move to new Jenkins and Openshift Cluster
- Update helm-charts with new node roles
- Add resource definition in physim helm-charts to easily schedule them
on different cluster servers
- Update entitlement creation methodology
- Add namespace for aerial pipeline
Due to HW version differences between the CI RHEL build machine and
the FHI 7.2 test machine (cacofonix), FHI 7.2 test using RHEL image
failed, reporting an 'Illegal Instruction' error.
* this commit is making explicit the mandatory IE cn_support
in the E1 Setup Request message
* also, init cn_support in E1 Setup Request initial message preparation
* E1 CU-CP Setup Request is an E1 Interface Management message
whose type defition was missing, and it is introduced in this commit
(see 9.2.1.7 of 3GPP TS 38.463)
LDPC coding was yet not properly stopped by using free_nrLDPC_coding_interface in gNB and UE.
This was not causing major issue until now. It was especially not causing any issue with T2 LDPC coding using the PF.
But using T2 VFs, if the coding library is not properly stopped then the VF cannot be used anymore unless the admin app is restarted.
So this MR adds the missing free_nrLDPC_coding_interface.
The offset provided for each code block in the HARQ combined input and output buffer shall not be above 512.
A modulus was performed on the offset of the TB in the buffer to avoid this situation.
But the offset of the code block was added afterward so that the total offset was sometimes going above 512.
This commit performs the modulus after adding the code block offset.
- extend get_xran_prb_map() function to handle mixed slot
- properly fill PRB configuration based on DL/UL direction and duplex mode
- do not implicitly assume TDD
Modify xu_add_f1_ue_data() to be xu_addmod_f1_ue_data(), i.e., "addmod"
behavior in which it is possible to also update f1_ue_data. I do it this
way since an xu_updade_f1_ue_data() function would be almost the same as
the add function (only deleting existing data, whereas the original
add() was asserting in that case).
Modify tests to test for this behavior.
This fixes a concurrency bug. For instance, during reestablishment, the
CU needs to update the DU UE ID under which the UE is identified in the
DU. Previously, the CU would remove, then add the DU UE ID info.
At the same time, the PDCP thread might look up the information. This
can lead to asserts. Use the above addmod functionality to do the
remove-add under a mutex.
- the parameters used in DL/UL are exactly the same, except the direction and the number of PRBs;
therefore, passing the direction seems convenient for visibility purposes and reduces the code.
Note: Number of PRBs we store in fh_config for both DL/UL is num_rb_dl of openair0_config struct.
At the end, it is actually the same info.
Following SIB19 MR !3019, the phy-test mode is no longer working
In this MR we update the handling NTN-Config from ServingCellConfigCommon
to be the same as when NTN-Config is received in SIB19
Integration: `2025.w03`
See merge request oai/openairinterface5g!3206
* !3167 remove calls to clear SIMD registers, that was a historical issue
* !3179 UE statistics improvements
* !3193 Remove spinlock from threadpool task return
* !3195 UE MAC: in phy-test/do-ra, fill TB randomly
* !3201 T tracer: minor fixes for compilation
* !3204 CI: Increase number of test trials for timing tests
* !3034 Delay compensation for PUCCH2
* !3205 Fix calculation of RSSI in pucch_rx.c
Fix calculation of RSSI in pucch_rx.c
Fix two issues with RSSI calculation in PUCCH:
- RSSI was calculated using partial sum instead of average of squared samples.
- There was a missing parentheses pair which causes the RSSI value to underflow.
The proper way to calculate power in dBFS is
let signal_energy = average of squared samples of received signal over resource elements, antennas and symbols under measurement
then:
rssi[dBFS] = -10log10(max_sample^2 / signal_energy),
or (to avoid division):
rssi[dBFS] = -(10log10(max_sample^2) - 10log10(signal_energy))
CI: Increase number of test trials for timing tests
- Increasing a number of test trials aims to reduce variations and
improve reliability of the nr_ulsim and nr_dlsim test results.
- Disable CPU sleep states on the machine when running physims.
- Minor adjustment of timing threshold in 60 MHz phytest.
Delay compensation for PUCCH2
- Implementation of delay compensation for PUCCH2, which minimizes for
exampe logs "reported RSRP index XXX invalid"
- Adding a test to the CI to perform the delay compensation in PUCCH2
- Refactor code to use c16_t data type in PUCCH decoder
Remove spinlock from threadpool task return
The idea to use atomic aligned to cache line for counting finished jobs
is reused, but instead of polling a semaphore was added.
remove calls to clear SIMD registers, that was a historical issue
This works because gcc/clang replaces the MMX calls by SSE2 automatically.
There are some mm_empty() calls in bad places (places where we don't use
_m64) and it is lacking in places where we still use _m64. Given that
MMX calls are converted to SSE2, there is no problem, and we will remove
remaining _m64 variables.
Fix two issues with RSSI calculation in PUCCH:
- RSSI was calculated using partial sum instead of average of squared samples.
- There was a missing parentheses pair which causes the RSSI value to underflow.
The proper way to calculate power in dBFS is
let signal_energy = average of squared samples of received signal over resource
elements, antennas and symbols under measurement
then:
rssi[dBFS] = -10log10(max_sample^2 / signal_energy),
or (to avoid division):
rssi[dBFS] = -(10log10(max_sample^2) - 10log10(signal_energy))
* this function is used by both CU-CP and CU-UP
* it behaves differently depending on the type of E1 instance:
CU-CP: inform RRC of E1 connection loss with CU-UP
CU-UP: trigger a new SCTP association request by sending an ITTI to the CU-UP task
* after receiving the E1AP register request, the CU-UP will send a new association request to
SCTP until new E1 connection is achieved by sending a TIMER_HAS_EXPIRED message to the CU-UP
task. The function e1apHandleTimer() is basically triggering a new E1 association request
until new E1 connection is achieved
* print SCTP association state in e1ap.c whenever needed
Related to #878
* add function to check whether cu-up is connected
* add functions to send the relevant response messages with the failed list
e.g. to fill PDU Session Resource Failed to Setup items
* set return value of trigger_bearer_setup to bool and handle the
failure by sending setup response messages with list of PDU sessions failed to setup
i.e. send failed list of items when no CU-UP is associated to the CU-CP
note: it considers all PDU Sessions as failed to setup in the considered failure scenarios
* e.g. send a list of failed PDU session resources in the response message to reject
PDU Session Resource Setup in rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ
* the Initial Context Setup has a Failure message, but for the considered failure scenario
when no CU-UP is available the current design is just sending a list of failed to setup
items in the Response message
* transfer PDU Session Resource/Initial Context Setup Request NAS PDU to UE
closes#878
* new struct definition including both NGAP cause group and value
* add encoding function, temporarily in ngap_common.c
(in the long term to be place in a enc/dec NGAP library)
* extend Radio Network cause enum values
* add cause member to Setup Failure
Integration: `2025.w02`
Closes#866 and #887
See merge request oai/openairinterface5g!3197
* !3135 replace a set of #define by a C bit array, remove duplicated extern global variable declaration
* !3173 nrLDPC_coding: improvements
* !3181 Use UL actor for processSlotTx
* !3186 chore(ci): improved errors messages visibility
* !3101 NR gNB improvements for analog beam management
* !3130 NR gNB MSG3 TPC
* !3175 Improvements for PUSCH per symbol processing
* !3177 CI: change frequency for timing and B200-SABOX pipelines
* !3188 NR UE fix DCI mask size
* !3119 Config files improvements for PRACH
* !3196 Fix yaml example config file
* !3187 nrLDPC_coding: Fix naming, comments, superfluous variables and documentation typos in coding library interfaces
* !3076 move UL_INFO structure allocation local to a rx slot processing
* !3189 fhi_72: allow to provide dpdk_iova_mode to xran
* !3182 RSSI threshold for PUSCH & PUCCH power control
* !3103 Introduce ITTI queue in RRC-to-MAC direction
RSSI threshold for PUSCH & PUCCH power control
To prevent ADC railing or "clipping" when the received power is too
large, introduce RSSI threshold parameters for PUSCH and PUCCH, which
are now configured in units of 0.1 dB. Here is how you can configure and
use these thresholds:
1. Configuration:
- Set the pusch_RSSI_Threshold and pucch_RSSI_Threshold parameters in
your configuration file (e.g., gnb.conf) (MACRLC section).
- These parameters define the maximum acceptable RSSI values for
PUSCH and PUCCH, respectively. The unit is either dBm or dBFS,
depending on the RSSI reporting configuration.
2. Usage:
- The nr_limit_tpc function will automatically adjust the Transmit
Power Control (TPC) commands based on the configured RSSI
thresholds.
- If the RSSI exceeds the threshold, the TPC command will be limited
to prevent further increase in power, thereby avoiding ADC
clipping.
Introduce ITTI queue in RRC-to-MAC direction
resolve ue rcc to mac race conditions by a itti queue, but it doesn't
resolve the problem of exact slot we should apply the new cell
configurtion
fhi_72: allow to provide dpdk_iova_mode to xran
- Introduce a gNB configuration option that enables users to select the
desired IOVA mode for DPDK ("PA" or "VA") with dpdk_iova_mode
parameters in fhi_72 configuration section. If not set, the default
remains PA mode to ensure backward compatibility with existing
configurations. Detailed information about IOVA modes, including their
advantages and disadvantages, can be found in the DPDK documentation:
Memory in DPDK Part 2: Deep Dive into IOVA
- Using IOVA VA mode allows DPDK to run without requiring SYS_ADMIN
capability for the docker container.
- Switch to IOVA VA mode in the FHI7.2 pipeline and reduce the required
capabilities for the docker container.
Move UL_INFO structure allocation local to a rx slot processing
UL_INFO is allocated a gNB, so require mutex and obscur information
passing function to function. Instead, make a local UL_INFO per slot,
removing the mutex and making the code easier to understand.
Use UL_INFO on the stack, to simplify the code. move in the same struct
the associated rach, pdu, crc, srs arrays that where pointed from
directly in gNB structure Keep in nfapi the existing logic that make
malloc for theses rach, pdu, crc, srs array lists
Pass only relevant fields, where appropriate.
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
nrLDPC_coding: Fix naming, comments, superfluous variables and documentation typos in coding library interfaces
This MR is clarifying the interfaces to the LDPC coding libraries. It
aims to improve the readability of the interfaces and compliance of
naming with specification 38.212.
Fix yaml example config file
amf_ip_address is decoded as a paramlist_def_t and not as a paramdef_t,
so in the config file it should be a list of ip addresses
In current develop just by trying to run this config file with:
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.yaml
results in a segfault.
Config files improvements for PRACH
Some PRACH parameters in configuration files are not properly set.
- number of SSB per RACH occasion should be 1 when we have only 1 SSB
(it would still work with 1/2 but it makes little sense and might
limit UE selection of ROs).
- some PRACH configuration indices would generate PRACH conflicting with
PUCCH and therefore reducing scheduling capabilities
Further cleanup of some config files still using deprecated fields
Switching to IOVA VA mode in the FHI7.2 pipeline reduces the required
capabilities for the Docker container. This change allows the removal
of the SYS_ADMIN capability.
In DPDK, IO Virtual Addresses (IOVA) refers to the memory addressing
scheme used for IO operations. The two IOVA modes supported by DPDK are:
- IOVA as Physical Address (PA): IO memory addresses correspond directly
to physical addresses, no address translation required.
- IOVA as Virtual Address (VA): IO memory addresses align with user-space
virtual addresses, requiring IOMMU to remap physical memory.
Previously, this was hardcoded to 0, to use IOVA as PA mode, with xRAN's
DPDK EAL initialization using the "--iova-mode=pa" flag.
This commit introduces a gNB configuration option to allow users to select
the desired IOVA mode. The default remains PA mode to
ensure backward compatibility.
Using IOVA VA mode allows DPDK to run without requiring SYS_ADMIN
capability in the docker container.
NR UE fix DCI mask size
Previous maximum size was 15 but in practice it could be at least up to
18. Also moved assertion on non-contiguous type0 DLSCH allocation to L1
(to remove blocking point for L2 implementation).
CI: change frequency for timing and B200-SABOX pipelines
Change center frequency of
- RAN-SA-B200-Module-SABOX-Container - 20 MHz TDD SA scenario from
3309.48 MHz to 3609.12 MHz
- RAN-gNB-N300-Timing-Phytest-LDPC - Timing phytest 40 MHz scenario from
3619.08 MHz to 3319.68 Mhz
to avoid interference between the SABOX and timing pipeline.
Improvements for PUSCH per symbol processing
- Improved the assert in task_ans.c
- Fixed and issue with PUSCH per-symbol processing that could cause an
issue in case num_pusch_symbols_per_thread is not 1.
NR gNB MSG3 TPC
This MR improves the handling of MSG3 TPC commands at MAC gNB.
TODO: Compute TPC when PRACH sends a valid power measurements (currently
not the case for OAI L1, to be verified with Aerial L1)
Closes#866
NR gNB improvements for analog beam management
- Improvements at gNB MAC layer to properly handle analog beam
management for all channels
- Simple beam switching mechanism based on UE RSRP report
- Introduced new configuration parameters `pusch_RSSI_Threshold` and `pucch_RSSI_Threshold`
(MACRLC section)
- Added `nr_limit_tpc` function in `gNB_scheduler_primitives.c` to limit TPC based on RSSI
threshold.
- Integrated `nr_limit_tpc` in PUCCH and PUSCH power control
Example Configuration
puxch_RSSI_Threshold takes value between -1280 and 0 and is mapped to range -128.0 dBm/dBFS
to 0.0 dBm/dBFS in 0.1 dB increments. Unit depends on RSSI reporting config.
pucch_RSSI_Threshold = -500; # Set the PUSCH RSSI threshold to -50.0dBm/-50dBFS
pucch_RSSI_Threshold = -600; # Set the PUCCH RSSI threshold to -60.0dBm/-60dBFS
chore(ci): improved errors messages visibility
1. There was a trailing && before $BUILD_OPTIONS in the command line
2. Added leading lines and more pattern to the grep command that
displays errors/warnings messages during docker build since we don't
have access to all.txt if build fails
nrLDPC_coding: improvements
One improvement in this changeset: Functions nr_interleaving_ldpc,
nr_deinterleaving_ldpc, nr_rate_matching_ldpc and
nr_rate_matching_ldpc_rx that were previously linked with the PHY layer
in the executables are now linked with the LDPC coding implementations
where they are called.
The parent commit cleans up and groups oai_exit in one place,
nr-softmodem-common.h. Therefore, this 5G file is included in the 4G
defs_common.h (at least it's mostly 4G), which is not nice. Instead,
define oai_exit also in 4G softmodem-common.h, and include this in
defs_common.h. Remove the cyclic inclusion of defs_common.h in
softmodem-common.h, and resolve all subsequent errors around unknown
types and extern definition mismatches.
Commit d641a76196 ("fix BSR report malformed, add SHORT BSR when it
can") removed code to fill the remainder of a TB, if it is not filled
with data from RLC, with random data when using phy-test or do-ra modes.
This random data filling is intentional, as it might prove useful for
demos or when debugging (e.g., to see used spectrum instead of 0, etc.).
Reintroduce the functionality, but unlike the original code, make it
dependent on the mode, not RFsim.
See also discussion in #888.
Fixup: d641a76196
Reduce race conditions through a itti queue, such that RRC-initiated MAC
memory modifications happen at the same time as MAC thread writes.
However, it doesn't resolve the problem of exact slot we should apply
the new cell configurtion.
This assert checks if the structure is correctly initialized. The structure
is one-time use so the assert is valid, but the value of the atomic was added
to the output to improve debugging.
Integration: `2024.w51`
Closes#879
See merge request oai/openairinterface5g!3180
* !3155 UL BLER vs SNR plot
* !3170 Replace AssertFatal with static_assert for cmdline arguments check
* !3172 A script to run CI tests locally.
* !3151 Optimize PHY_ofdm_mod CYCLIC_PREFIX in case of incidentally aligned pointers
* !3164 Fix and refactor channel average
* !3154 Fix TPMI for UL retransmissions
Fix TPMI for UL retransmissions
If the ul_ri of srs_feedback changes between a UL transmission and a
retransmission, we use the TPMI of transmission.
Closes#879
Assertion ((*nrOfLayers==1 && srs_feedback->tpmi <= 1) || (*nrOfLayers==2 && srs_feedback->tpmi == 0)) failed!
In compute_precoding_information() /home/user/openairinterface5g/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c:2896
TPMI 1 is invalid!
Fix and refactor channel average
- Fixing missing init average variable with zero and refactor the code #86b11ab7
Fixes just the missing avg1=0
- Refactor the code to a common SSE/AVX2 inline function using also horizontal add.
- We use int64_t result from now on.
- We decided to fix length to x12 instead of old x9 openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
//compute average channel_level on each (TX,RX) antenna pair
void nr_pdcch_channel_level(int32_t rx_size,
c16_t dl_ch_estimates_ext[][rx_size],
NR_DL_FRAME_PARMS *frame_parms,
int32_t *avg,
int symbol,
int nb_rb)
{
for (int aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
//clear average level
simde__m128i avg128P = simde_mm_setzero_si128();
simde__m128i *dl_ch128 = (simde__m128i *)&dl_ch_estimates_ext[aarx][symbol * nb_rb * 12];
for (int rb = 0; rb < (nb_rb * 12) >> 2; rb++) { <-------------- here
avg128P = simde_mm_add_epi32(avg128P, simde_mm_madd_epi16(dl_ch128[rb], dl_ch128[rb]));
}
DevAssert(nb_rb);
avg[aarx] = 0;
for (int i = 0; i < 4; i++)
avg[aarx] += ((int32_t *)&avg128P)[i] / (nb_rb * 12); <-------------- and here
LOG_DDD("Channel level : %d\n",avg[aarx]);
}
}
Optimize PHY_ofdm_mod CYCLIC_PREFIX in case of incidentally aligned pointers
It seems that the cyclic prefix is in most cases a multiple of 512 samples.
This means that in most cases the idft output pointer is already aligned and
there is no need to perform an extra memcpy. This saves the memcpy time in
most cyclic prefix insertion cases.
A script to run CI tests locally.
Added ./run_locally.sh script. The script takes one argument being the testcase
that one wants to run. The testcase is run locally. This means that some
testcases that utilize hardware resources will not run. However most if not all
rfsimulator testcases should run as in CI.
To this end, the CI python scripting framework was updated:
- override and <srv_node> elements from XML so all commands are executed locally
in case --local flag is passed
- Allow RemoteCmd class to run on localhost
Replace AssertFatal with static_assert for cmdline arguments check
Replace AssertFatal with static_assert for command line arguments definition
length check. The static assert will not allow the code to compile in case
the size is incorrect.
This could save some time in the future since its easy to forget to extend
CMDLINE_PARAMS_CHECK_DESC.
Added ./run_locally.sh script. The script takes one argument being the testcase
that one wants to run. The testcase is run locally. This means that some testcases that
utilize hardware resources will not run. However most if not all rfsimulator testcases
should run as in CI.
To this end, the CI python scripting framework was updated, adding --local flag which changes
the script behavior as follows:
- overrides <node> and <srv_node> XML elements to 'localhost' so all commands are executed locally
- Avoid running image pull, image cleanup and workspace creation steps of the scripts:
user is responsible for that
Replace AssertFatal with static_assert for command line arguments definition
length check. The static assert will not allow the code to compile in case
the size is incorrect.
This could save some time in the future since its easy to forget to extend
CMDLINE_PARAMS_CHECK_DESC.
Alignment of temporary IDFT buffer was changed to 64 bytes. This is in preparation
for possible use of different IDFT implementation which could use AVX-512, requiring
64-byte alignment.
Integration: `2024.w50`
Closes#753
See merge request oai/openairinterface5g!3166
* !3159 CI: Add FHI7.2 test with Metanoia RU
* !3111 Enable USRP Tx thread in nrUE
* !3144 UE data race fix
* !3149 Fix several issues in ulsch_mmse_2layers
* !3158 GTP: use direct call instead of ITTI
* !3160 FHI-72: initialize mask, find correct libxran
* !3019 SIB19 utilization on UE
* !3162 Add Rocky 9.5 to list of distributions
* !3163 NGAP-Initial Context Setup Failure
* !2952 New LDPC coding library interface for decoding and encoding complete slots in one call to the library
* !3125 Add support for O1 in O-DU via telnet
* !3161 Cmd line option for sync in frames for iqrecorder
Cmd line option for sync in frames for iqrecorder
B200 with high clock drift will go out of sync within 280ms which was
the default duration to sync in with iqrecorder. Now this value can be
specified via cmd line so the user can change it according to needs.
Add support for O1 in O-DU via telnet
This change set adds a simple telnet interface to nr-softmodem. Together
with oai/o1-adapter>, this implements a part of the O1 interface, for
the DU only. Currently supported uses cases:
- some stats are send to an SMO (such as bandwidth, PLMN, frequency, ...)
- re-configuration of bandwidth, frequency
- stop/start of the softmodem, while keeping the CU and L2 running
- the o1-adapter implements two alarms, load overload and base station
offline, using this interface.
It is possible to use the telnet interface by itself (i.e., "o1" without
the o1-adapter). To do this, compile with telnet support (./build_oai
--build-lib telnetsrv) and start the nr-softmodem with O1 module
(./nr-softmodem --telnetsrv --telnetsrv.shrmod o1). You can then do the
following:
- see some statistics as exposed to o1-adapter, in JSON: echo o1 stats | nc 127.0.0.1 9090 && echo
- stop the L1: echo o1 stop_modem | nc 127.0.0.1 9090 && echo
- reconfigure bandwidth: e.g., echo o1 bwconfig 20 | nc 127.0.0.1 9090 && echo (also supported: 40, 60, 100)
- start the L1: echo o1 start_modem | nc 127.0.0.1 9090 && echo
Note that the reconfiguration works with split-8 radios. Notably, it
does not work yet out-of-the-box with 7.2 radios, because they have to
be manually reconfigured on bandwith/frequency switch. The planned
M-plane should allow such use case, though.
To help with the above, this branch also includes fixes (for more
information, refer to the corresponding commits):
- fixes for stopping the L1, notably stop threads in right order, stop
thread pool of RU
- collect some general MAC metrics, fix some bugs in MAC
- fix problems in F1AP gNB-DU configuration update message, update test
- fix some problems in RRC
The consumer of this function just passes a pointer to something to be
sent. This function should not free this memory, it's simply not it's
task. This is the same bug as above in
"CU_handle_gNB_DU_CONFIGURATION_UPDATE(): don't free the message of RRC"
This adds a basic telnet module to support the O1 interface at the DU,
to be used together with the oai/o1-adapter>. Concretely, this first
version supports to
- read/modify cell parameters
- stop/start the L1
Implements the re-start of the L1 after it has been stopped through
stop_L1(). It takes into account some changes, such as bandwidth, or
frequency, when restarting the L1. To this end, it also triggers a
gNB-DU configuration update message on each restart to inform the CU
about any changes in the DU. FDD has not been tested.
Refactor L1 stopping code into a function. The function is basically the
same as what we were doing at the end of main() of nr-softmodem.c.
This will be reused to support the "soft-restart" functionality in the
next commits.
Need to proper forward declaration, as we otherwise need to make
telnet_o1 module dependent on F1. Make functions publicly accessible,
as the F1 functions are used in an upcoming commit to start the L1.
Need to keep track of number of RUs, as the RU initialization increments
the number of RUs. Therefore, subsequent initializations would fail if
we don't decrement first. There is no better place (or I did not find
it) to decrement the number of RUs than in nr_phy_free_RU(). For this
reason, we also have to manually set the number of RUs in nr_prachsim to
1, otherwise the assert will trigger.
Split out these functions, to be reused in a follow-up commit to
correctly have gNB-DU configuration update message working.
Change the return type copy_f1ap_served_cell_info(), to return the copy,
which IMO is more intuitive then passing target and source in
parentheses.
For the "restart" feature, earlier versions where creating multiple UL
TDA. This is not a problem (anymore), but to avoid that we call this
multiple times, add this assert.
The existing code prevents double initialization if e.g., both gNB&UE
call these functions (like in a simulator). However, in the case of a
double-initialization such as stopping and re-starting the L1, the
memory will be freed, but not freed again. Basically, this works:
generate()
generate() # not initialized again
but this leads to problems:
generate()
free()
generate() # not initialized again, but should be!
Reimplement the check based on the data to be initialized, such that an
intermediate free() will be handled properly.
These are the "main" worker threads (apart the ru_thread). If the
thread-pool stops, they might get stuck. E.g., in PUSCH channel
estimation, it uses a local response queue, and if the thread pool is
terminated, it seems that the L1_rx_thread can get stuck in there.
To limit these problems, attempt to stop these threads first; stop the
queue from which they read and make them terminate; then, stop the
thread pool.
Also, fix the termination of respPuschSymb queue.
A later commit implements the "restart" of the L1. The L1 reads
configuration options. First, allow to re-read configurations by
increasing the amount of memory the config module might allocate. Then,
avoid an out-of-bound write by checking that we still have memory
available (and assert if not possible).
New LDPC coding library interface for decoding and encoding complete slots in one call to the library
Previous attempts to integrate LDPC decoding relying on offloading show
the limitation of the original code segment coding interface for the
library implementing LDPC coding. In order to perform the offload and
therefore the decoding in an optimal fashion, it is relevant to provide
the implementation with the broader amount of data possible per call,
which is a slot. A previous MR related to T2 offload managed to offer
an interface for decoding transport blocks by modifying only
nr_ulsch_decoding.c. But this may not be sufficient for performing an
efficient decoding in any situation. Slots could be shared between
multiple transport blocks in case multiple UEs are connected to the RAN,
which makes the transport block size shrink and therefore degrades the
efficiency of the offloading.
This MR offers a broader interface with a gNB decoding entry point in
phy_procedures_nr_gNB.c. The file nr_ulsch_decoding.c now lets the
decoding library implement deinterleaving, rate-unmatching and decoding
for the slot. In gNB encoding and UE decoding and encoding as well,
tasks are partitioned in a similar fashion.
As it allows to feed the implementation with the broadest amount of data
possible, it allows to fit any coding solution in a library. This will
avoid further modification to OAI source code and addition of options to
select an implementation when integrating new decoding solutions. An
implementation of this interface will therefore be offered for every
existing decoding solution in OAI and solutions added in the future will
be provided as independent module code without any modification to the
core of OAI code. The way to choose the decoding solution and to
configure it was also unified using configmodule. The library can be
chosen through the option --loader.ldpc.shlibversion. The slot coding
solutions shipped with this MR can be configured through configmodule
(e.g., T2 address and isolated cores).
This MR includes three coding implementations:
- A wrapper around segment decoding libraries for test purpose: libldpc.so
- A one shot slot coding and encoding with the T2 board: libldpc_t2.so
- A decoder on FPGA using the XDMA driver: libldpc_xdma.so
Improvements brought by this MR:
- Easy integration of a wider variety of LDPC coding solution at gNB and UE
- Easy selection of the LDPC coding solution (option --ldpc-offload-enable is kept for now but it can be ultimately removed)
- T2:
* More efficient when many UEs are connected
* Decoding and encoding in nr-uesoftmodem
NGAP-Initial Context Setup Failure
NGAP Failure message - Initial Context Setup Failure. When an Initial
Context Setup Request is received with the UE context as null, it
triggers Initial Context Setup failure
SIB19 utilization on UE
Following SIB19 initialization and scheduling on gNB (!2899 - merged)
and Receive SIB19 on nrUE (!2920 - merged), this merge request aims to
introduce the actual use of the SIB19 provided parameters by gNB in UE.
Changes needed for utilization include: initialization of position
coordinates parameters for UE (which are needed to calculate propagation
delay between UE and SAT), propagation delay calculations and timing
advance adjusts. Moreover, this change removes the now unused arguments
for ntn_koffset, ntn_ta_common and ntn_ta_commondrift
GTP: use direct call instead of ITTI
Using ITTI calls for user plane implies (1) a memory allocation, (2)
mutexes, and (3) queueing messages for each user plane packet, which is
heavy. Use a direct API call instead to reduce overhead.
It seems that the cyclic prefix is in most cases a multiple of 512 samples.
This means that in most cases the idft output pointer is already aligned and
there is no need to perform an extra memcpy. This saves the memcpy time in
most cyclic prefix insertion cases.
More complex implementations will be achieved using the new reworked interface
- t_nrLDPC_dec_params: remove F, Qm, rv and perCB
- encoder_implemparams_t: remove Qm, Tbslbrm, G, rv and perCB
- Remove all variables (like OPENAIR1), they serve no purpose and make
unnecessarily long lines
- Remove linking to T, it does not seem to be necessary
- Avoid intermediate variables to keep sources, and declare libraries
directly, making for shorter code
NGAP Failure message - Initial Context Setup Failure.
When an Initial Context Setup Request is received with the UE context as null, it triggers Initial Context Setup failure.
Fix several issues in ulsch_mmse_2layers
Fix incorrect array type of determ_fin which was set to int32_t while the
array holds the results of simde_mm_abs_epi32 which produces unsigned
values.
Remove assert on right-shifting negative integers as it is impossible for
determ_fin to hold negative values.
Change type of sum_det to uint32_t to prevent possible overflow. Fix
the type cast (int -> uint32_t) to prevent casting before shift in
nr_ulsch_comp_muli_sum which might have resulted in right shifting
negative integers.
Closes: #753
UE data race fix
When a new sync request is sent to PHY, we clear harq buffer and start
synchronization process. This could lead to unexpected behavior or segv
because DL actors might be using the buffer we just cleared. To avoid
this, the DL actors are shutdown and re initiated before clearing harq
info.
Some users copy libxran.so to a system directory (e.g., /usr/local/lib).
At the same time, we require xran_LOCATION to be set to find the build
directory. Use HINTS to prefer the location passed through
xran_LOCATION.
Also, use NO_DEFAULT_PATH to outright disallow global scope, to prevent
"accidentally" finding libxran.so in global scope (this is for
multi-user systems that are used in development, and where people have
different version of libxran for testing purposes). To still use
packages in e.g., /usr/local/, it would be possible to set xran_LOCATION
to this directory. (there is a problem that the version information will
likely not be read correctly, so this might not be enough)
B200 with high clock drift will go out of sync within 280ms which was
the default duration to sync in with iqrecorder. Now this value can be
specified via cmd line so the user can change it according to needs.
Set the number of barriers to 512 and implement proper slot and frame
based selection. Now the dynamic barriers should not be overwritten in
case the rx-to-tx offset is high. The maximum offset supported is 512.
- Removed ntn_koffset, ntn_ta_common, ntn_ta_commondrift arguments in order to be used directly from SIB19
- Removed global NTN_UE_Koffset variable and it's use
- Introduced getter functions for ntn related parameters
Using ITTI calls for user plane implies (1) a memory allocation, (2)
mutexes, and (3) queueing messages for each user plane packet, which is
heavy. Use a direct API call instead to reduce overhead.
- Added new structure to hold timing advance parameters
- Made SIB19 related calculation to save to this struct
- Modified in ra to get ta struct values
Move handling of sync request from MAC from UE_dl_preprocessing(). This
will process the sync request before receiving the samples of current
slot from radio so we don't 'lose' the slot.
Integration: `2024.w49`
See merge request oai/openairinterface5g!3148
* !3065 NAS Service Request enc/dec implementation
* !3129 Refactor UL MAC PDU decoding
* !3136 Use ninja -k option in CI
* !3137 T tracer: add macpdu traces for the NR UE
* !2392 Documentation: add multi-UE deployment with RFsimulator
* !3145 a lib has been added but missed dependancies
* !3050 doc: Add instructions for 5G NR gNB frequency configuration
* !3141 CI: Allow restart of the container if deployment fails
* !3138 Align YAML config getlist with libconfig implementation
* !3140 remove un-necessary global variables
* !3146 Updates to match more fapi-compliant tx_data.request
* !3025 New threadpool, fixed in NR UE
* CI: Remove USRP mgmt_addr from LTE-2x2 conf files
* !3147 Fronthaul xran library update to F release (2. and final step towards M-plane integration)
* !3142 Add CI test to trigger RLF with high pathloss in channelmod
Upon restoration to ploss, set to 20; when setting to 0, the UE is not
able to sync to the cell anymore.
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org>
Fronthaul xran library update to F release (2. and final step towards M-plane integration)
- xran library support -> both E and F releases
- RU delay profile removed -> not used in neither of the releases
- DU delay profile updated
- one-way delay measurements support is improved/fixed in the F release.
However, not implemented here as it depends on the RU capabilities
The "mgmt_addr" parameter is not required for USRP N310 initialization. The
critical parameter for successful operation is the "addr", which specifies
the IP address of the SFP port used for data transfer.
Including both "mgmt_addr" and "addr" can lead to initialization failures if
one of the specified addresses is unavailable. Since the "mgmt_addr" is
unnecessary for this context, it has been removed to avoid potential conflicts
and simplify the configuration.
Fix incorrect array type of determ_fin which was set to int32_t while the
array holds the results of simde_mm_abs_epi32 which produces unsigned
values.
Remove assert on right-shifting negative integers as it is impossible for
determ_fin to hold negative values.
Change type of sum_det to uint32_t to prevent possible overflow.
Fix the type cast (int -> uint32_t) to prevent casting before shift in
nr_ulsch_comp_muli_sum which might have resulted in right shifting negative
integers.
Updates to match more fapi-compliant tx_data.request
The packing of PDUs as required in aerial for the Tx_data.Request wasn't
complaint with FAPI. That was fixed in Aerial 24-2. This change makes L2
pack the payloads in the way that Aerial now requires.
remove un-necessary global variables
Remove global variables that can be removed by a trivial way:
- simply dead globals
- or reference is a single source, so can be static
setting them static reduces the scope, that is a progress, but of course as
for all static variables, the code is still not re-entrant
Major improvements:
1) bbu_offload - enable packet handling on BBU cores
2) dlCpProcBurst - DL CP processing on one or more symbols
3) SRS CP processing - depends on the RU capabilities that can be
retreived via M-plane (if RU is CAT B)
4) nSecDesc - the number of section descriptors per symbol; it was hardcoded to 0 in E release;
depends on the RU capabilities that can be retreived via M-plane
5) RunSlotPrbMapBySymbolEnable - enable PRB mapping by symbol with multisection;
depends on the RU capabilities that can be retreived via M-plane
6) DSS (Dynamic Spectrum Sharing) support - depends on the RU capabilities that can be retreived via M-plane
Minor fixes in F that exist in E:
1) prach_config->nPrachFilterIdx - explained in commit ID f3045396
2) T1a_min_cp_dl - explained in the commit under title "Clarification on DU delay profile"
3) fh_config->nULRBs - explained in commit under title "Further clarification on xran E release parameters"
Removed const for prb_conf argument in oran_allocate_cplane_buffers()
function, as F release requires the not const struct for
xran_init_PrbMap_by_symbol_from_cfg() and xran_init_PrbMap_from_cfg()
even though the struct is not modified inside of these functions.
- remove xran parameter io_cfg->port logging => this parameter
is filled within xran library in both E and F releases
- PRACH offset explanation; not limited to >= max(Ntx, Nrx);
workaround done in xran to support PRACH eAxC IDs same as PUSCH eAxC IDs
- DL PRB not used in xran; UL PRB used in xran F release, therefore
removed from the patch
- these fixes should have been done in the commit ID f3045396
Align YAML config getlist with libconfig implementation
This aligns the behavior of params_yaml with params_config library:
- when a mapping is read using getlist it returns the number of elements in
the mapping instead of 0
- when a mapping is read using get it returns the number of parameters used
for input
CI: Allow restart of the container if deployment fails
In CI we sometimes encounter fail of the gNB/UE deployment (and fail of the test
scenario) caused by unsuccessful initialization of the USRP N310.
This MR enables to optionally restart the gNB or UE container, if the deployment
fails on the health check during start up. By default, restarts of the container
are not allowed, but we can enable them by setting num_attemps > 1 for a given
deployment in the XML file.
Logs from failed deployment attempts are collected.
This MR aims to avoid known CI failure caused by "USRP N310 Initialization Failure"
mentioned in #871.
Documentation: add multi-UE deployment with RFsimulator
Extended doc/NR_SA_Tutorial_OAI_nrUE.md with section about how to run multiple UEs
- multiple UEs with namespaces (provided new script)
- multiple UEs with Docker UEs
- updated rfsimulator and channel simulation tutorials
- updated README.md
This change makes it so the fapi_nr_p7_message_pack is used to pack TX_DATA.request for Aerial, reducing the amount of repeated code.
Add the capability to pack TLVs with TAG=2 (offset from first address)
Packs the TLV.length differently according to whether or not Aerial is in use ( for Aerial TLV.length is 16-bit, for OAI is 32-bit )
In CI we sometimes encouter fail of the gNB/UE deployment (and fail of
the pipeline) caused by unsuccsessful initialization of the USRP N310.
Restart the container if the health check fails during initialization.
Introduce a configurable parameter (from XML) to set max number of
attempts for the container deployment.
Store logs from failed deployment attempts.
Rework GetContainerHealth() to work with docker compose and services,
instead of using docker and containers. Return health and message about
deployment status (used for console and HTML logging) for a given service.
T tracer: add macpdu traces for the NR UE
MIB, SIB1, random access and regular scheduling are traced.
At the beginning of a connection (rrc setup request and rrc setup), the
RNTI is reported as 0. Might be fixed, somehow, if absolutely needed (not
sure).
Refactor UL MAC PDU decoding
Refactor the UL MAC PDU decoding: A single function is created to decode the
entire MAC subheader
uint8_t decode_ul_mac_sub_pdu_header(uint8_t *pduP, uint8_t *lcid, uint16_t *length).
It returns the length of the MAC subheader and outputs the LCID and Length.
This new function is called from 2 functions: lcid_crnti_lookahead() and
nr_process_mac_pdu().
After calling it in nr_process_mac_pdu(), the validation of the PDU can be
made for all the MAC subPDUs in a single place, allowing for less and more
clean code (as opposed with the previous version where the validation was
made multiple times inside the LCID switch-case).
Additionally, this MR updates the list of LCIDs as in 3GPP TS 38.321 v18.3.0
Table 6.2.1-2: Values of LCID for UL-SCH when the LX field is not present or
is set to 0.
- removed some whitespace noise.
- cleaned up CMakeLists.txt
- reintegrated task_manager.c into thread-pool.c
- cleaned up some unnecessary code
Co-authored-by: Cedric Roux <cedric.roux@eurecom.fr>
Co-authored-by: Mikel Irazabal <mikel.irazabal@openairinterface.com>
MIB, SIB1, random access and regular scheduling are traced.
At the beginning of a connection (rrc setup request and rrc setup), the
RNTI is reported as 0. Might be fixed, somehow, if absolutely needed (not
sure).
This aligns the behavior of params_yaml with params_config library so that
when a mapping is read using getlist it returns the number of elements in
the mapping instead of 0.
Some users of the OAI CI complain that since we build with -Werror, it
is difficult to see all warnings/errors and fix them, necessitating
multiple attempts at times to see all warnings. To allow them to see
more warnings, use ninja option -k10 to keep going after errors, and
show more errors at once.
There are command line options that one might pass to ninja/make, but
for which cmake does not provide an interface. For instance, make/ninja
support -k/-kN to "keep going" after errors. Cmake does not provide an
option, but it is still possible to pass this. Make a build_oai option
to allow this, used in the next commit.
* ideally the result of these macros shall be relevant
only in unit tests, in order to validate enc/dec NAS functions
* use a local print macro
* remove dependency from LOG module
* simplified the code
* cleanup TLVDecoder.c (kept it for LTE dependencies)
* FGMM enc/dec library files
* Plain message encoding + logic for security protected message
* added fill_fgstmsi function
* add checks on length in 5G-S-TMSI encoder function
* encoding of NAS Service Request and relevant mandatory IEs
# It is not a good way of assigning pods to the nodes: this way we bypass the scheduler. At the moment we don't provide the resource information of these pods.
# Therefore, Openshift assigns the pods to the same node because it thinks the pods don't consume much resources. This isn't the case, they consume a lot of resources.
nodeName:
dlsim100rbtm2:acamas
dlsimbasic:acamas
ldpctest:acamas
nrdlschsim:acamas
nrdlsimbasic:acamas
nrdlsimdmrsptrs:acamas
nrdlsimmcsmimo:acamas
nrdlsimoffset:dedale
nrpbschsim106rb:dedale
nrpbchsim217rb:dedale
nrpbchsim273rb:dedale
nrpbchsimscs:dedale
nrpsbchsim:dedale
nrprachsim:dedale
nrpucchsim:dedale
nrulschsim:demophon
nrulsim3gpp:demophon
nrulsimmimo:demophon
nrulsimmisc:demophon
nrulsimscfdma:demophon
polartest:demophon
smallblocktest:demophon
ulsim:demophon
# will place on two nodes intel 3rd gen and 5th gen with RT kernel
This docker-compose is designed to use `OAI-gNB` with a 7.2 compatible Radio Unit. Before using this docker compose you have to configure
the host machine as per the [ORAN_FHI7.2_Tutorial](../../../doc/ORAN_FHI7.2_Tutorial.md). The container image used by the docker compose file is tested only on `Ubuntu 22.04` and `RHEL 9.4` docker host.
## Build Image (Optional)
Refer to [OAI Docker/Podman Build and Usage Procedures](../../../docker/README.md)
## Configure Networking
### SR-IOV Virtual Functions (VFs)
In docker-compose environment there is no automated method
to configure the VFs on the fly. The user will have to manually configure
C/U plane VFs before starting the container `OAI-gNB`.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.