Commit Graph
100 Commits
Author SHA1 Message Date
Cedric Roux 4236ff2b3e nr: improve x2/rrc for ENDC
This commit introduces several enhancements in X2AP and RRC to deal
with ENDC. The main goal is to deal with UE's on/off and with various
errors.

The following work is included:

    - DC prep and DC overall X2 timers
    - X2 messages for UE release and DC timers' timeout

Open problems:

    - what to do when the UE sends an scg Failure? This commit removes
      the UE. And this removal may not be correctly done
    - UE removal in the gNB's PHY layer (a next commit is coming,
      but it is hackish and will need a rework)
2020-09-22 11:57:31 +02:00
Cedric Roux f87b93e639 nr: fix check in nr_find_pucch 2020-09-17 10:55:48 +02:00
Cedric Roux 5b0efd5b83 NR: fix time keeping in RLC for gNB
RLC has timers. We need to keep track of time. We chose to not use
realtime but 'processing time'. That is we send a tick to RLC for every
subframe when it is processed by the softmodem. Before this commit we
used to increase time in the function mac_rlc_status_ind which is called
for every subframe in the eNB, but not in the gNB (at least not in the
current gNB). So we need another way to keep track of time.

The function gNB_dlsch_ulsch_scheduler is called for every slot. It seems
to be the perfect candidate to send a tick to RLC for every subframe. We
take care of subcarrier spacing to send every subframe (one subframe is
always 1ms), not every slot (slot duration depends on subcarrier spacing).

It may not be the best solution. To be revised if needed.

Note: the UE has not been fixed. Some modification is needed for the UE
too, most probably.
2020-09-12 14:54:09 +02:00
Cedric Roux d7bdf4937a nr: use RLC AM instead of RLC UM 2020-08-26 17:15:43 +02:00
Cedric Roux 01da43a00d nr rlc: remove hardcoded values 2020-08-26 16:54:03 +02:00
Cedric Roux da3dd6b8b0 benetel: driver for Benetel's 4G and 5G RRUs
This commit contains work done by Eurecom and by Benetel.
2020-08-21 10:24:35 +02:00
Cedric Roux c95e5deb42 add back ssb_perRACH_Occasion, sony phone complains 2020-08-07 10:33:26 +02:00
Cedric Roux cccb56e571 nr rlc: bug fixes, cleanup
- bad values in asn1_utils.c (copy/paste from 4g)
- remove hardcoded values (t_reassembly, sn_field_length)
- some cleanup
2020-08-06 11:46:39 +02:00
Cedric Roux 503b46cd53 fix to have the sony 5g connect in NSA mode
c_SRS was 61, which does not fit for 106 PRBs as it seems. Value 0 works.
Maybe not the right thing to do though (see 38.211 6.4.1.4.3,
table 6.4.1.4.3-1).

Also it seems necessary to pass desired LTE/NR bands when requesting
LTE UE capabilities. Today this is hardcoded, to be done better at
some point. We should get the bands from the eNB configuration and
the eNB/gNB X2 exchanges.
2020-07-29 14:55:40 +02:00
Cedric Roux 9c2696e5e2 fix to have the sony 5g connect in NSA mode
c_SRS was 61, which does not fit for 106 PRBs as it seems. Value 0 works.
Maybe not the right thing to do though (see 38.211 6.4.1.4.3,
table 6.4.1.4.3-1).

Also it seems necessary to pass desired LTE/NR bands when requesting
LTE UE capabilities. Today this is hardcoded, to be done better at
some point. We should get the bands from the eNB configuration and
the eNB/gNB X2 exchanges.
2020-07-29 11:11:04 +02:00
Cedric Roux 0b8d5a8fd2 Merge remote-tracking branch 'origin/develop' into NR_RRC_PDCP
Conflicts:
	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
2020-07-15 12:06:41 +02:00
Cedric Roux 96b5380b02 minor: remove a LOG_E that should not be here anymore
When running the softmodem, we get the error:

    fill_ulsch UE_id 0 nb_rb = 0

The code has changed some time ago and this log was left but is not
meaningful anymore.
2020-07-10 12:44:59 +02:00
Cedric Roux d32b45dd1a bugfix: uplink ACK/NACK reporting through T was gone
Let's get it back!
2020-07-09 15:50:14 +02:00
Cedric Roux 1fa7a61b2b nr: fix compilation warning 2020-07-09 10:50:17 +02:00
Cedric Roux 62df572aed nr-rlc: small bugfix 2020-07-06 11:24:55 +02:00
Cedric Roux 71f75a3d88 hack for RLC AM ACK reporting
hack: in schedule_ue_spec, 3 bytes are "reserved" (this should be
done better). An RLC AM entity may ask for only 2 bytes for
ACKing and get a TBS of 32 bits and due to these 3 reserved bytes we may
end up with only 1 byte left for RLC, which is not enough. This hack
prevents the problem. To be done better at some point. If the function
schedule_ue_spec is (has been) reworked, this hack can be removed.
Dig for "TBS - ta_len - header_length_total - sdu_length_total - 3"
in schedule_ue_spec.

This should be done better at some point.
2020-07-02 09:13:45 +02:00
Cedric Roux 301ea42482 hotfix: fix compilation of UE with --musim
The following was failing:
./build_oai --UE --musim

Not sure this fix is correct, but it seems consistent with
the rest of platform_constants.h.
2020-05-09 10:12:38 +02:00
Cedric Roux 21a2a8c6e1 rlc v2: some fixes for 'bugs' found by coverity scan
Minor fixes, doesn't change anything. Not sure these are 'bugs' either,
but let's be polite with coverity scan...

One thing was not changed.
Coverity scan says:
*** CID 357991:  Memory - illegal accesses  (USE_AFTER_FREE)
/home/carabe/raphael/openairinterface5g/openair2/LAYER2/rlc_v2/rlc_entity_am.c: 507 in tx_list_remove_sn()
501         } else {
502           prev = cur;
503           cur = cur->next;
504         }
505       }
506
>>>     CID 357991:  Memory - illegal accesses  (USE_AFTER_FREE)
>>>     Using freed pointer "head.next".
507       return head.next;
508     }
509
510     void cleanup_sdu_list(rlc_entity_am_t *entity)
511     {
512       rlc_sdu_t head;

But as far as I understand, there is no problem. We don't access
head.next at all if it has been freed. Or is there some aliasing
going on there (pointer aliasing)? I doubt it. False positive?
2020-05-07 18:05:05 +02:00
Cedric Roux e5ea8a5a03 rlc v2: fix cmake file 2020-04-29 16:15:59 +02:00
Cedric Roux 456e90e25d rlc v2: bugfixes for mbms 2020-04-20 16:28:20 +02:00
Cedric Roux baa9cd0140 rlc v2: mbms support 2020-04-19 13:44:15 +02:00
Cedric Roux 3089dc0d45 rlc v2: update to latest develop
All previous commits for rlc v2 are proably
not functional or even compiling.
2020-04-17 10:41:21 +02:00
Cedric Roux 123745118c rlc v2: hotfix: remove some AssertFatal
Not sure if the problem is in the MAC layer or in the RLC v2 layer.
Maybe the buffer status reporting in RLC v2 is not good. Let's remove
two AssertFatal in the MAC for the time being.
2020-04-17 10:40:05 +02:00
Cedric Roux 4b6f5cea52 rlc v2: have the L2 simulator functional
Not very clean, but will do the job for the time being.
2020-04-17 10:40:05 +02:00
Cedric Roux fbd69663b1 rlc v2: fix for CU/DU split
Limitation: this fix only works if there is only one eNB,
because we force module_id = 0 in the function deliver_sdu where
(as the code is today) we have no way to know which module_id is
concerned. More generally, the rlc v2 does not work with more than
1 eNB.
2020-04-17 10:40:05 +02:00
Cedric Roux 8ca42918d6 hotfix: remove an AssertFatal
The UE code to compute BSR is too complex, has to be reworked/simplified.
This commit just removes the assert, does not solve anything.
2020-04-17 10:40:05 +02:00
Cedric Roux 9b9654a8e8 rlc v2: initial UE support 2020-04-17 10:40:05 +02:00
Cedric Roux eebf2cb938 rlc v2: improve buffer status reporting
The old method was wrong.
The new method is better, but not accurate, especially when the
TX buffer contains SDU of size > 2047 bytes.

Plus it's probably too slow.

To be refined at some point.
2020-04-17 10:40:05 +02:00
Cedric Roux d860ca510e rlc v2: bugfix 2020-04-17 10:40:04 +02:00
Cedric Roux fd61774f26 rlc v2: fix: remove #define RRC_DEFAULT_RAB_IS_AM 1 in rrc_eNB.c 2020-04-17 10:40:04 +02:00
Cedric Roux 6698759a60 rlc v2: fix crash deliver_sdu: ERROR: pdcp_data_ind failed
simply ignore the error

maybe not the best solution
2020-04-17 10:40:04 +02:00
Cedric Roux 90e05a2702 rlc v2: fix cppcheck error (disable it) 2020-04-17 10:40:04 +02:00
Cedric Roux 3310f5c6b0 alternative RLC implementation
This commit introduces an alternative RLC implementation
based on 36.322 version 8. AM and UM done, TM not done.

See openair2/LAYER2/rlc_v2/TODO for missing parts.
2020-04-17 10:40:04 +02:00
Cedric Roux 7f196b11f6 5g nsa: hacks for eurecom testing 2020-04-15 17:06:59 +02:00
Cedric Roux d6ce3a5a31 fix compilation of ldpc libraries - T must be processed before 2020-03-23 17:47:43 +01:00
Cedric Roux ad1a102f08 fix for CU/DU split 2020-03-20 11:13:51 +01:00
Cedric Roux 9bbb12f7ae nr-gnb: configure contention-free random access for the UE 2020-03-16 09:37:40 +01:00
Cedric Roux 143fd5ea5a bugfix 2020-03-12 14:50:02 +01:00
Cedric Roux 86dc600cd9 bugfix 2020-03-12 14:33:47 +01:00
Cedric Roux 0ecc3149ba bugfix: ul grant is 27 bits, does not fit into uint16_t 2020-03-05 11:16:46 +01:00
Cedric Roux 85176d7203 remove compilation warnings 2020-02-21 11:09:28 +01:00
Cedric Roux f829970085 improve NR UE capabilities request
Seems like the UEs in the CI don't like when asked to report NR UE
capabilities. So let's first ask for eutra capabilities and then
dig into them to check for en-dc support and only then ask for
NR capabilities. We chose to ask for NR capabilities after receiving
RRCConnectionReconfigurationComplete. That may not be the best thing
to do.

Today, we do nothing with those capabilities. We could completely skip
asking them to the UE, but since the code is there and since it may be
useful in the future, let's do it. Hopefully, it should not hurt too much.
2020-02-20 15:18:50 +01:00
Cedric Roux eb18a90b7f bugfix: correct X_u computation for both 839 and 139 cases 2020-02-19 14:37:07 +01:00
Cedric Roux 669ba2fafe minor typo fix 2020-02-19 14:29:42 +01:00
Cedric Roux ac28136a78 fix: use dftlen instead of N_ZC 2020-02-18 10:26:51 +01:00
Cedric Roux c46615dc8d fix: add cast to int32_t before mul for prach_ifft_tmp 2020-02-17 17:47:10 +01:00
Cedric Roux b12ca2eba1 fix prach2 value 2020-02-17 12:43:11 +01:00
Cedric Roux bb3bee9f23 fix dftlen computation 2020-02-17 12:22:19 +01:00
Cedric Roux fd81b1ec89 fix 2020-02-17 12:02:28 +01:00
Cedric Roux 9a91fe96c3 update configuration file for gnb band 78 106 PRBs 2020-02-12 10:12:58 +01:00
Cedric Roux 9e1c94835c fix for lte UE compilation 2020-01-28 14:39:50 +01:00
Cedric Roux 1c026a0b32 Merge remote-tracking branch 'origin/nr-dual-connectivity' into NR_RRCConfiguration 2020-01-28 12:28:26 +01:00
Cedric Roux f594ae8b82 release DRB1 on LTE side of things to configure UE for endc 2020-01-28 12:24:48 +01:00
Cedric Roux 6970bea679 fix value in fill_default_secondaryCellGroup 2020-01-28 12:20:08 +01:00
Cedric Roux 1d4d8d685f add drb 1 with nea0
phone was not happy with other settings
2020-01-27 10:13:16 +01:00
Cedric Roux 74762762db Merge remote-tracking branch 'origin/NR_RRCConfiguration' into nr-dual-connectivity 2020-01-24 11:10:55 +01:00
Cedric Roux 1ce8540d6d fix lte softmodem compilation 2020-01-24 11:09:30 +01:00
Cedric Roux 49d27bdf11 Merge remote-tracking branch 'origin/NR_RRCConfiguration' into nr-dual-connectivity 2020-01-23 16:37:21 +01:00
Cedric Roux 51ab31a3b9 trigger NR activation based on RRC measurements
An NR-capable UE will transmit some NR measurements.
Once received, the whole process on nr-cell addition is started.
It will fail quickly.

Many things are still missing.

What is not handled properly with this commit:
- in x2ap_eNB_handle_sgNB_add_req we hardcode the gNB ID
- nr triggering is done if we receive a measurement but this measurement is
  not analyzed at all
- no timers (T_dc_overall, T_dc_prep) and as is the code fails and then the
  next triggering after UE reconnection will not work (x2 ID are not well
  handled here and there in the code)

Note also that the gNB part has not been looked at all for this commit.

This is work in progress...
2020-01-23 16:10:29 +01:00
Cedric Roux ad5706c88d activate NR measurements for NR capable UEs
many things hardcoded, to be refined
2020-01-17 16:56:57 +01:00
Cedric Roux 5930acaca6 harmonize calloc parameters
use:
     type *x = calloc(1, sizeof(*x));
everywhere to avoid bad types inside the sizeof.
2020-01-17 12:08:41 +01:00
Cedric Roux 1f92529452 harmonize calloc parameters
use:
     type *x = calloc(1, sizeof(*x));
everywhere to avoid bad types inside the sizeof.
2020-01-17 12:05:25 +01:00
Cedric Roux 4256251f24 fix rrc asn file
spare4 is not there in rrc 15.6. It leads to bad encoding.
2020-01-15 16:14:24 +01:00
Cedric Roux fb9db399ae hotfix: fix value of MAX_MOBILES_PER_ENB
set MAX_MOBILES_PER_ENB to 4, to be same value as NUMBER_OF_UE_MAX.
Maybe we should set NUMBER_OF_UE_MAX to 16 instead?
2020-01-14 15:11:26 +01:00
Cedric Roux e2db89de9c fix config file 2020-01-13 10:46:49 +01:00
Cedric Roux 477631bd23 hotfix: fix value of MAX_MOBILES_PER_ENB
set MAX_MOBILES_PER_ENB to 4, to be same value as NUMBER_OF_UE_MAX.
Maybe we should set NUMBER_OF_UE_MAX to 16 instead?
2020-01-06 16:12:22 +01:00
Cedric Roux e0f509841c hotfix: fix value of MAX_MOBILES_PER_ENB
set MAX_MOBILES_PER_ENB to 4, to be same value as NUMBER_OF_UE_MAX.
Maybe we should set NUMBER_OF_UE_MAX to 16 instead?
2020-01-06 12:45:37 +01:00
Cedric Roux 35fda01e86 nr-rlc: fix some compilation warnings 2019-12-16 16:19:23 +01:00
Cedric Roux 9a4d1e81d7 nr-rlc: add function mac_rlc_get_buffer_occupancy_ind
Fix also value passed to buffer_status in mac_rlc_status_ind
to be aligned with 38.321 (instead of 36.321).
2019-12-16 16:17:35 +01:00
Cedric Roux b82787dde1 fix compilation of nr_dlsim and nr_ulsim 2019-12-10 10:23:34 +01:00
Cedric Roux 1a46b66d74 nr rlc: first commit
Initial implementation.

nr_rlc/nr_rlc_oai_api.c will need some clean rewrite at some point.

More testing is also needed.
2019-12-10 10:06:17 +01:00
Cedric Roux 2a7ac81b0b hotfix: better CQI requests, especially for TDD
In TDD mode, CQI requests are not possible in special subframes (at
least for some TDD configurations, see 36.213 7.2.3 that says "a
DL subframe is valid if it does not contain a DwPTS field if the
length is less than  7680 Ts").

In the code, we simply disable CQI requests in special subframes,
no matter what the length of DwPTS.

A problem can arise if the DCI0 for a given UE are sent only in
those special subframes. In this case the UE will never report
CQI and the eNB will use low MCS for this UE, impacting performances.

Another, related, problem is when there are several UEs. There again
one UE might always get its DCI0 in special subframes and thus never
report CQI. There again, performance issues.

This commit is an attempt to improve the situation.

It does two things.

1 - tag the UE as schedulable in the function UE_is_to_be_scheduled
    if the cqi_req_timer is expired

2 - use cqi_req_timer as a criterium when ordering UEs for UL scheduling

The value chosen for the expiration of the cqi_req_timer in
UE_is_to_be_scheduled is quite high (300) because as the code is
today we may overschedule the UE for short bursts until we receive
a CQI from the UE. [TODO: fix the code properly to avoid this behavior.]

Note: the fairRR scheduler has not been analyzed and this commit may
      not fix anything in case the fairRR scheduler is used.
2019-11-06 12:30:50 +01:00
Cedric Roux 1fe39ae262 remove compilation warning (may not be correct) 2019-10-07 10:09:28 +02:00
Cedric Roux 0017316554 Merge remote-tracking branch 'origin/develop-nr' into nr-dual-connectivity
Conflicts:
	openair2/RRC/LTE/MESSAGES/asn1_msg.c
2019-10-03 15:18:44 +02:00
Cedric Roux dd760540ea hacks for NR
- send RRC Connection Reconfiguration with dummy ENDC data by doing:
  telnet localhost 9001
  and press enter when the ENDC UE is connected to the eNB to send it
2019-10-03 15:14:26 +02:00
Cedric Roux a0f0a49336 x2ho for lte: have it functional again (plus remove some logs) 2019-09-24 16:32:51 +02:00
Cedric Roux ff379fe08c get NR UE capabilities (hardcoded bands) 2019-09-20 17:29:54 +02:00
Cedric Roux 6f12c99131 minor: change output directory's name for NR RRC
it was 'NR_Rel15' and now it is 'RRC_NR_Rel15'
2019-09-19 15:44:59 +02:00
Cedric Roux de8e225797 bugfix: do not use memory on the stack in do_SIB1_MBMS, allocate it with malloc 2019-08-13 12:10:39 +02:00
Cedric Roux 75778a76c2 bugfix: do not use memory on the stack in do_SIB1, allocate it with malloc 2019-08-12 16:57:19 +02:00
Cedric Roux 2368c9096a Merge branch 'develop-nr-merge' of https://gitlab.eurecom.fr/oai/openairinterface5g into develop-nr-merge 2019-08-09 15:59:41 +02:00
Cedric Roux 7967701de1 lte-softmodem: fix if4p5 (maybe incorrect)
For whatever reason, ru->frame_parms was NULL and the RRU crashed.
Let's allocated memory.

Also, don't do fp = ru->frame_parms in ru_thread, it seems that it
takes the value before allocation (so: NULL) and the code crashes
later on.

Maybe it's not the correct solution. To be refined at some point.
2019-08-09 15:57:25 +02:00
Cedric Roux 5265ea3135 fix some more valgrind errors 2019-08-08 17:14:07 +02:00
Cedric Roux 1737fdf3fa fix some valgrind issues 2019-08-08 17:09:29 +02:00
Cedric Roux e6f056d0af improve x2ap_gNB_generate_ENDC_x2_setup_response 2019-08-05 16:55:45 +02:00
Cedric Roux 290c277486 Merge remote-tracking branch 'origin/dual-connectivity' into develop-nr-merge 2019-08-01 17:06:26 +02:00
Cedric Roux 2955ae4731 bugfix: compile with x2ap release 15.03 2019-08-01 17:02:27 +02:00
Cedric Roux 175fb1769a dual connectivity: preparatory work
- basic version of x2ap_eNB_generate_senb_addition_request with dumb values
- skeleton functions:
    - x2ap_eNB_handle_senb_addition_request
    - x2ap_eNB_handle_senb_addition_request_acknowledge
    - x2ap_eNB_handle_senb_addition_request_reject
2019-08-01 12:17:10 +02:00
Cedric Roux e844ed07d6 bugfix 2019-07-26 11:15:52 +02:00
Cedric Roux 31671946e7 bugfix 2019-07-25 14:06:59 +02:00
Cedric Roux db2853cc49 fix bladeRF compilation 2019-07-12 11:50:22 +02:00
Cedric Roux 2421b71d68 x2ap/sctp: increase buffer size
The 5G phone OPPO has a very big UE capability (> 2KB).

We need bigger buffers to transfer this, especially in x2 handover.

Also the sctp messages need a bigger buffer.

Note: in sctp, we didn't check for partial messages, it's now
      done. When detected, we exit. To be redone differently
      if needed. (Look for "if (!(flags & MSG_EOR))".)
2019-07-11 16:34:28 +02:00
Cedric Roux 893392e476 DOC: minor: update basic-sim 2019-07-24 15:36:35 +02:00
Cedric Roux 8a8fdd59c2 cleanup: no variable definition in header file
We declare variables in header files, we don't define them. So we need
to use 'extern' in the header file and put the definition
in some C file.
2019-07-11 15:28:33 +02:00
Cedric Roux 5775d325e0 phy: do not put random bits in unused DCI
This used to be done to ease power estimation in the UE,
but this is not correct. Let's put no energy in the REs
with no DCI data, which is what needs to be done.

Plus it consumes a lot of CPU because of calling taus()
way too much.
2019-07-11 15:26:00 +02:00
Cedric Roux 443b5fd026 T: add -no-bind option to macpdu2wireshark
To be used when you send data to another host.

On the other host, to avoid ICMP traffic about the port
not being open, do:

./nc -l -u -p 9999 > /dev/null

You need to restart this command each time you run macpdu2wireshark.
You can use any other program that will accept UDP packets on the
port 9999 (default port of macpdu2wireshark, change if you use another
port of course).
2019-07-11 15:22:30 +02:00
Cedric Roux d1fdbfedbc fix power estimation
Some computation has been fixed in PUCCH reception.

SNR has been fixed, uses measurement instead of
a fixed value for the noise.

normalized_rx_power and target_rx_power have been removed,
replaced by snr and target_snr. All the files using those
variables have been updated.
2019-07-19 17:10:42 +02:00
Cedric Roux e0eac2e331 hotfix: do not set s-Measure in measurement report configuration
The value was set to 20 which means -120 dB. Setting this value means
that the UE reports an event only if the RSRP of the serving cell
is lower than -120 dB.

In the lab, we get values of around -70, and to go as low as -120
means a very degraded environment. This is not practical.

Let's disactivate the setting of this parameter for the moment so that
the UE reports an event without taking into consideration the RSRP
of the serving cell.

With this hotfix, the X2 handover works much better.
2019-07-04 14:47:11 +02:00
Cedric Roux 175da6f258 minor: fix parameters to T call for T_ENB_MASTER_TICK 2019-06-27 12:20:09 +02:00
Cedric Roux f6f83ca01b bugfix: fix RRC UE removal
If several UEs are removed, the variable ue_to_be_removed may be overwritten.
Let's use an array instead.
2019-06-20 17:20:20 +02:00