1. 27 Jan, 2025 26 commits
    • Robert Schmidt's avatar
    • Robert Schmidt's avatar
    • Robert Schmidt's avatar
    • Robert Schmidt's avatar
      nr_schedule_response(): Separate dlsch_fill into DL_tti_req and TX_req part · 6a630f46
      Robert Schmidt authored
      FAPI sends those independently, so we cannot treat both on the arrival
      of the first one.
      6a630f46
    • Robert Schmidt's avatar
    • Robert Schmidt's avatar
    • Robert Schmidt's avatar
      PNF: don't send dummy data · 70474ad1
      Robert Schmidt authored
      If nothing is to be sent, nothing is to be done.
      70474ad1
    • Robert Schmidt's avatar
      pnf_p7_slot_ind(): needs to use TX thread time · c7e145a4
      Robert Schmidt authored
      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.
      c7e145a4
    • Robert Schmidt's avatar
      nr_slot_select() and set_tdd_config_nr(): remove useless second frame · 16ead1d0
      Robert Schmidt authored
      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
      16ead1d0
    • Robert Schmidt's avatar
      Use posix_memalign() for pnf_p7_t creation · 28b60eda
      Robert Schmidt authored
      Some L1 functions might get a pointer to P7 structures, and use SIMD in
      which case the memory access needs to be aligned.
      28b60eda
    • Rúben Soares Silva's avatar
    • Robert Schmidt's avatar
      Call indication regularly · e3bad16a
      Robert Schmidt authored
      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.
      e3bad16a
    • Robert Schmidt's avatar
      Call directly into scheduler from VNF, start immediately · 53172663
      Robert Schmidt authored
      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().
      53172663
    • Robert Schmidt's avatar
      IF module slot_indication: send message in PNF · 41244607
      Robert Schmidt authored
      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).
      41244607
    • Robert Schmidt's avatar
      Remove unnecessary handle_nr_slot_ind() · c5a76d66
      Robert Schmidt authored
      the slot indication is sent from the tx_thread (tx_func()). Thus, we
      don't need to send it a second time.
      c5a76d66
    • Robert Schmidt's avatar
      84d92ac8
    • Robert Schmidt's avatar
      Only use refcount if monolithic · 9f80c82f
      Robert Schmidt authored
      There is a reference counting mechanism used in monolithic. It does not
      apply for the PNF.
      9f80c82f
    • Robert Schmidt's avatar
      Don't call L1 code in VNF · 9634593d
      Robert Schmidt authored
      The VNF should never call into the L1, it's L2/L3, by definition. Also,
      it's not necessary.
      9634593d
    • Robert Schmidt's avatar
      Allow to use multiple PUCCH at once · 1b44f644
      Robert Schmidt authored
      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.
      1b44f644
    • Robert Schmidt's avatar
      No special handling for PNF for RX procedures · 84d9df50
      Robert Schmidt authored
      See also a later commit "Allow to use multiple PUCCH at once", in which
      PUCCH handling in the case of PNF is reworked.
      
      We might squash both commits.
      84d9df50
    • Rúben Soares da Silva's avatar
      Assign NFAPI_NR_CONFIG_SLOT_CONFIG_TAG tag in TLVs used for transmitting the... · a6b40ace
      Rúben Soares da Silva authored
      Assign NFAPI_NR_CONFIG_SLOT_CONFIG_TAG tag in TLVs used for transmitting the TDD Slot configuration through CONFIG.request.
      a6b40ace
    • Robert Schmidt's avatar
      Shorten the sleep · 4ceac17c
      Robert Schmidt authored
      sync_var is set in main() (which likely is wrong in that the L1 code
      sync itself, and not require the help of main()).
      4ceac17c
    • Robert Schmidt's avatar
      Sync PNF through the radio · dd3b3caf
      Robert Schmidt authored
      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.
      dd3b3caf
    • Robert Schmidt's avatar
      Request timing every slot · 604cfe87
      Robert Schmidt authored
      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.
      604cfe87
    • Robert Schmidt's avatar
      Remove double-add of PNF connection · ce0737fc
      Robert Schmidt authored
      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.
      ce0737fc
    • Robert Schmidt's avatar
      Add PNF to VNF's list of PNFs when IP available · d4715fde
      Robert Schmidt authored
      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.
      d4715fde
  2. 22 Jan, 2025 7 commits
  3. 16 Jan, 2025 1 commit
    • Robert Schmidt's avatar
      Merge branch 'integration_2025_w03' into 'develop' · 10e07bc6
      Robert Schmidt authored
      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
      10e07bc6
  4. 15 Jan, 2025 6 commits