Commit Graph

246 Commits

Author SHA1 Message Date
Pedro Alvarez af2b593b8c Added check for integrity in test. First Rx PDCP NR test passing. 2019-07-30 15:01:50 +02:00
Pedro Alvarez d3b6828082 Changed PDCP configuration to explicitly have tx and rx direction. Decrypt on PDCP NR seems fine. 2019-07-30 15:01:50 +02:00
Pedro Alvarez ea3c44e9ac Removing header before decrypting. Continuing to add decryption tests to PDCP NR 2019-07-30 15:01:50 +02:00
Pedro Alvarez a42726f836 Fixed hdr_len_bytes in PDCP NR. Tx seems OK now. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 73e30743d1 Added enum to PDCP config to replace two bools. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 457f35699d Reverted back to a single config structure between PDCP NR and PDCP LTE. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 810cacdc02 Adding write_data_header and append_mac helper functions to PDCP NR entity. 2019-07-30 15:01:50 +02:00
Pedro Alvarez c9e99443d8 Adding PDCP NR Tx test. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 8e8a7a4154 Add more logic to PDCP NR tx logic. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 2081b22465 Added PDCP_SN_LEN constants. Added bearer_id and direction back to the pdcp_entity_base. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 8e1b9b9f5b Starting to implement the receive function of PDCP NR. 2019-07-30 15:01:50 +02:00
Pedro Alvarez d7a2721bb0 Adding algorithm to get COUNT for PDCP NR. Added convinience functions to manipulate HFN, SN and COUNT. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 52f75c3cf2 Starting to add PDCP NR state variables. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 2449f901f0 Fixed error in setting Kint in pdcp_entity_lte. 2019-07-30 15:01:50 +02:00
Pedro Alvarez 1944bf9a80 Continue to split pdcp_entity_lte and pdcp_entity_nr. Compiling now. 2019-07-30 15:01:50 +02:00
Pedro Alvarez bd91678d98 Continuing to split pdcp_entity into pdcp_entity_lte and pdcp_entity_nr 2019-07-30 15:01:50 +02:00
Pedro Alvarez 005d03cb1a Starting to split pdcp_entity into pdcp_entity_lte and pdcp_entity_nr to support NR PDCP 2019-07-30 15:01:50 +02:00
Ismael Gomez 11d42acb3a Fix using deallocated PDU 2019-07-12 13:08:42 +02:00
Ismael Gomez 8c41625599 Add RLC suspend and resume 2019-07-12 13:08:42 +02:00
Francisco Paisana 58e2e51044 removed rlc_interfaces. The rlc_cnfg types are now part of the rrc_interface_types. Removed implicit RB initialization in the RLC. 2019-07-05 10:44:15 +02:00
Francisco Paisana b936629221 removed rrc asn1 header from bcd_helpers, from rlc_interface, and rlc tests 2019-07-05 10:44:15 +02:00
Pedro Alvarez 498f1b8e4b Small PDCP fixes:
- Moved most the initialization of the pdcp_entity to the header.
  - Initilize some variables in gtpu_ntoa.
  - Removed debug print.
  - Format eNB GTP-u debugging code.
2019-06-27 17:09:52 +02:00
Pedro Alvarez 53d2220aab Resolved conflicts with unique pointers after rebase in PDCP entity. 2019-06-27 17:09:52 +02:00
Pedro Alvarez b97d1191f4 Added more debug info at eNB GTP-U. Changed the pdcp_entity to follow the standard more strictly for RLC AM DRBs. 2019-06-27 17:09:52 +02:00
Pedro Alvarez f4fd6034ba Starting to add separate functions for PDCP handling for UM DRBs and AM DRBs 2019-06-27 17:09:52 +02:00
Pedro Alvarez 6cbcc5154d Starting to use received SN to do user plane decription. 2019-06-27 17:09:52 +02:00
Andre Puschmann 58763fb714 stack: move initialization of log object into ctor
this fixes the issue when the stack is torn down if, for example,
the radio couldn't be loaded correctly. it will hence call stop() on all stack
components which are not initialzized yet, and logging therefore doesn't work.
the log object is know during contruction time and therefore can be passed
in as soon as possible.
2019-06-27 14:51:33 +02:00
Andre Puschmann e0a28cf4c0 simplify PDCP init and also bypass it for SRB0 on eNB 2019-06-21 15:49:46 +02:00
Andre Puschmann 218f136254 remove default PDCP entity for SRB0 2019-06-21 15:49:46 +02:00
Andre Puschmann abef6ce152 move own ipv6 header definition into own header file and use it in tft filter 2019-06-18 16:06:52 +02:00
Andre Puschmann acbe7fabe4 rlc: fix class member initialization
uninitialized member detected by coverity, now converted all default
initialization to be done in class definition
2019-06-14 11:26:19 +02:00
Francisco Paisana 415d3418b6 reorganized enb to mirror ue director/class structure with a stack class 2019-06-07 15:41:56 +02:00
Andre Puschmann e8d6236975 remove init for all RLC TM/UM/AM
- all RLC entities are now initialized during contruction
- there is no need to check for, e.g., existance of timers, during
  runtime
- there is also no need to call re-init during resume
- timers are freed in dtor
2019-06-06 14:34:25 +02:00
Ismael Gomez f24c0cef8c Use timer interface instead of local boolean to query timer state 2019-06-06 14:34:25 +02:00
Ismael Gomez 14b526f2aa Add PDCP per-bearer reestablish 2019-06-06 14:34:25 +02:00
Ismael Gomez ade720e032 Add RLC resume procedure 2019-06-06 14:34:25 +02:00
Francisco Paisana 3bedc93ba5 added _t to unique_byte_buffer type 2019-05-16 12:35:01 +02:00
Francisco Paisana bc01a5ecda changed block_queue api to return back the unique buffer in case it fails to push it to the queue 2019-05-16 12:35:01 +02:00
Francisco Paisana f4aa03154d change queue read and other functions apis 2019-05-16 12:35:01 +02:00
Francisco Paisana f469e2178b replaced byte_buffer_t allocated by the buffer pool for unique_byte_buffer which is safer and easier to use 2019-05-16 12:35:01 +02:00
Francisco Paisana 0976ea6f27 created a unique byte buffer that automatically deallocates 2019-05-16 12:35:01 +02:00
yagoda c25f3b0acf increasing rlc UM window size for eMBMS, small adjustment to eMBMS PHY common 2019-05-06 17:06:25 +02:00
Andre Puschmann 4b01a2e4a0 update copyright notice 2019-04-29 09:20:02 +02:00
Ismael Gomez 7780b1aba5 add tdd/ca support 2019-04-25 20:57:58 +02:00
David Rupprecht eb3a83ac45 User Plane key in configuration interface 2019-04-11 21:38:01 +02:00
Andre Puschmann e84d26ae4e fix RLC UM reestablishment 2019-03-01 11:01:58 +01:00
Andre Puschmann 86232c143e expose RLC tx queue length through config struct 2019-02-01 17:11:55 +01:00
Francisco Paisana 0204db2e12 new asn1 rrc library 2019-01-17 17:43:13 +01:00
Andre Puschmann 955f5dd37a add mutex in pdcp entity
write_sdu and write_pdu are not re-entrant because all functions
that deal with the counters, e.g. integrity check and generate,
must be protected because MAC threads may call them at the same time.

this addresses issue #254
2018-12-18 11:54:54 +01:00
Andre Puschmann 0e7512f349 fix RLC UM params for eMBMS 2018-12-17 17:47:27 +01:00
Andre Puschmann c3441046c9 simplify RLC buffer status query procedures
- add a simple and low-overhead has_data() method to check whether
  an RLC entity has data to transmit or not
- use this method for all calls that are actually not interested
  in the amount of data to send
- use the more expensive get_buffer_state() for all cases where
  the actual size of the buffer is of importance
2018-12-10 17:48:52 +01:00
Andre Puschmann df40259c26 fix issue in PDCP when bearer ID for DRBs was not starting with 1 2018-12-10 16:58:08 +01:00
Andre Puschmann b71dab87f1 add function to query if RLC bearer exists (the implementation) 2018-11-02 21:46:03 +01:00
Andre Puschmann 6ca0d4494a do not transmit new PDUs after calling stop 2018-10-09 21:17:36 +02:00
Andre Puschmann ebadf3029e Merge branch 'next' of github.com:softwareradiosystems/srsLTE into next 2018-10-04 14:40:25 +02:00
Andre Puschmann e06e5b8b60 limit maximum allowd RLC SDU size 2018-10-04 14:39:42 +02:00
Pedro Alvarez d443604661 Merge next into gtp_cleanup_sn. Fixed some conflicts. 2018-10-04 12:09:13 +01:00
Andre Puschmann 96815e3a5f fix RLC AM handling of bigger MAC grants
- fix concatenation and header reconstruction
2018-10-03 14:58:24 +02:00
Andre Puschmann a6d9181881 fix RLC UM issue with very large MAC grants 2018-10-03 14:58:24 +02:00
Paul Sutton 0e4ab77fb0 GTPU cleanup, adding support for GTPU echo response (#265) 2018-10-01 22:18:11 +02:00
Pedro Alvarez 28f377128b Making sure both Echo request and echo response are supported types. Echo response/request is working again. 2018-10-01 18:23:04 +01:00
Pedro Alvarez a2befbd949 Fix mistake in echo reply/response message type. 2018-10-01 18:07:30 +01:00
Pedro Alvarez e925ef0a42 Added some more debug infor to error prints. Making sure that packet is not sent from the eNB if there is an error in the GTP-U header packing. Fixed error in checking msg_type. 2018-10-01 17:34:02 +01:00
Pedro Alvarez c1f633c5c7 Dropping bitfields for now. Using #defines and uint8_t for the flags. 2018-10-01 15:17:26 +01:00
Pedro Alvarez ee04639337 Changed gtpu header flags to use a bitfield. Fixing compilation issues. 2018-09-28 13:46:13 +01:00
Paul Sutton 569a7cbc94 GTPU cleanup, adding support for GTPU echo response 2018-09-25 15:17:39 +01:00
Andre Puschmann 86e02921f0 fix regression in RLC base introduced during refactor causing eMBMS to fail 2018-09-25 14:04:06 +02:00
Andre Puschmann 22b4396c39 increase default tx_queue length for RLC UM and AM
- With the current default tx queue length (16 SDUs) the BSR reported by the UE
  is too low if the size of the SDU is relativly small (e.g. 100 B).
  This effectivly causes the eNB to only allocate a small grant
  to the UE and thus reduces the UL throughput for small SDUs.
2018-09-25 12:33:25 +02:00
Andre Puschmann ba87819ff1 retransmit random RLC AM PDU in case tx window is full 2018-09-25 10:46:36 +02:00
Andre Puschmann 34535c7efb fix RLC AM issues reported by clang-tidy 2018-09-25 10:46:36 +02:00
Andre Puschmann d981f129e0 Merge branch 'master' into next 2018-09-20 12:54:05 +02:00
Joseph Giovatto 2dddfa2aac added ability to track tput per bearer (#233)
added mac_metrics for ul/dl harq retex counts
2018-09-20 11:22:22 +02:00
Ismael Gomez 0294923e2b Merge branch 'next' of github.com:softwareradiosystems/srsLTE into next 2018-09-19 16:42:11 +02:00
Andre Puschmann 184539b87d add LCID change API to UE interface, add method to reestablish single RLC bearer 2018-09-18 15:09:24 +02:00
Andre Puschmann 10bc01a7ae add API to change LCID of RLC bearers 2018-09-17 13:11:03 +02:00
Andre Puschmann 27459bf706 add API to change LCID of PDCP bearers 2018-09-17 13:10:44 +02:00
Andre Puschmann c0899ddda9 refactor RLC AM, add tx/rx subclasses 2018-09-07 10:49:52 +02:00
Andre Puschmann f56592b0fe add getter for PDCP ul/dl counter 2018-08-08 16:26:32 +02:00
Andre Puschmann 91492b87ef add del_bearer for RLC/PDCP 2018-08-06 13:17:51 +02:00
Andre Puschmann 89df8f1582 unify RLC interface for writing SDUs w/ and w/o blocking 2018-07-25 16:08:07 +02:00
Andre Puschmann 3950629a75 remove obsolete RLC_MODE struct and move existing one to rlc_interface.h 2018-07-25 16:06:42 +02:00
Andre Puschmann ee5b055829 rename pdcp function for GW to is_lcid_enabled() 2018-07-25 15:09:19 +02:00
Andre Puschmann 6a2dc8677b remove obsolete header 2018-07-24 16:44:40 +02:00
Andre Puschmann b8438e9cc3 extend PDCP interface to allow non-blocking write of SDUs 2018-07-24 15:49:09 +02:00
Andre Puschmann 27d3d697df refactor RLC part#2
- move metrics into entities
- make configure interface return true/false on success/failure
- add own srslte mode type
2018-07-23 17:30:32 +02:00
Andre Puschmann 8e8fab027b refactor RLC base class
- add rwlock
- put RLC entities into map
- general cleanup
2018-07-23 15:42:54 +02:00
Andre Puschmann 47a8b1343f add rwlock to PDCP 2018-07-17 15:27:04 +02:00
Andre Puschmann 93c11e4416 turn PDCP array into map 2018-07-17 12:50:10 +02:00
Andre Puschmann b257204471 fix public PDCP interface 2018-07-17 12:17:55 +02:00
Andre Puschmann 31ba175b37 add public PDCP entity interface 2018-07-17 12:17:55 +02:00
Ismael Gomez 3cb9f51460 Merge branch 'next' of github.com:softwareradiosystems/srsLTE into next 2018-07-12 18:12:32 +02:00
Andre Puschmann a9b023258c refactor RLC UM to have separate tx/rx objects 2018-07-12 16:13:03 +02:00
Ismael Gomez 3122d8e959 RLC reestablish to re-enable tx_enabled 2018-07-12 11:18:14 +02:00
Ismael Gomez 005fe87ae9 RLC reestablish to re-enable tx_enabled 2018-07-09 00:26:58 +02:00
Pedro Alvarez b460ece601 Merge branch 'mbms_tun' into next 2018-07-06 13:01:14 +01:00
Ismael Gomez 85a7daa09d Move RLC buffer size to common 2018-07-06 09:08:29 +02:00
Ismael Gomez 589e569ce9
Changes on srsENB mutexing logic to fix general race condition and deadlock issues (#229)
* fixed some issues with the UL scheduling

* Hack to fix UL scheduler

* minor fix

* Cleaned up code and fixed issue with the update_allocation function

* fixed the console printing in the enb

* log/console fix

* fixed the log print

* added a normalization factor

* RLC: entity uses dynamic instances. Simplified stop/reset/reestablish procedure. Added non-blocking interface

* Limit decimals in metrics stdout

* Changed mutexes to rwlock in RLC/RRC/MAC/PDCP to fix race conditions when removing users

* Fix deadlock bug for MIMO

* Remove headers

* Fix missing unlock causing overflows

* Do not decrease CQI when PUCCH (this is a temporal fix, requires to reduce the maximum MCS)

* Fix mutex unlock in worker

* Configurable RLC tx buffer. Default to 512 for enodeb

* Check NULL SDU in write_sdu()

* Protect RLC objects and tx_queue from being destroyed while using it

* Remove superfluous code

* Disable SIB logging

* Fix block_queue for enb
2018-07-05 11:00:19 +02:00
Pedro Alvarez 0e135adc6f Starting to change gtpu_read_header and gtpu_write_header to lib. 2018-07-03 14:30:20 +01:00
yagoda 4569247458 setting tx and rx mod in rlc um for mch to 1 2018-06-06 06:42:30 +02:00
Andre Puschmann 61d525ea80 Merge branch 'next' into embms_merge_final 2018-05-22 10:39:05 +02:00
Ismael Gomez bad007cdd9 Increase/decrease nbytes counter inside mutexed queue 2018-05-21 23:24:55 +02:00
yagoda 65f2747a8e removing mch handler in rlc, fixing embms autostart 2018-05-20 19:24:44 +02:00
yagoda 0ae22e0822 fixing scheduling issues for mbms 2018-05-17 20:20:20 +02:00
Andre Puschmann 2fb0dc62a0 refactor config for multicast RLC bearers 2018-05-15 22:23:21 +02:00
yagoda 49c3578f64 introducing embms support in common upper layer functions 2018-05-15 16:57:23 +02:00
Andre Puschmann 51e093e611 Merge branch 'next' into rlc_updates 2018-05-11 15:55:03 +02:00
Ismael Gomez 040c33497d merged PR#189 and added check for non-empty queue in get size tail 2018-05-10 21:32:32 -05:00
Andre Puschmann 8fde56c582 unify rlc_am_stress test to allow also UM tests 2018-04-27 15:40:05 +02:00
Andre Puschmann a2f6166365 Merge branch 'next' into rlc_updates 2018-04-27 15:03:17 +02:00
Ismael Gomez 62787bdd41 Remove unused include 2018-04-26 12:46:17 +02:00
Andre Puschmann 61a24cbd4a Merge branch 'next' into rlc_updates 2018-04-03 11:28:12 +02:00
David Rupprecht 9d71bec7b6 Unified include guards 2018-03-31 19:04:04 +02:00
Andre Puschmann 4b90852170 add RLC AM FI field helpers 2018-03-28 17:07:10 +02:00
Andre Puschmann 1be93d4682 add RLC UM destructor 2018-02-16 21:32:21 +01:00
Andre Puschmann 75f42ac829 add RLC AM destructor 2018-02-16 12:40:07 +01:00
Andre Puschmann bf26934e13 rlc_am: print error but don't exit on buffer allocation errors 2018-02-08 17:50:19 +01:00
Paul Sutton d1d6cea737 Adding debug helpers 2018-02-07 23:13:59 +00:00
Paul Sutton 60b059f3cc Adding RLC AM stress test 2018-02-07 21:59:50 +00:00
Xavier Arteaga 99ef760b6f More Coverity fixes 2018-01-31 16:49:14 +01:00
Ismael Gomez c0bbf6c5ae Removed PDCP thread 2018-01-25 15:01:57 +01:00
Pedro Alvarez 042552491b Merging next into epc branch. 2018-01-08 14:45:13 +00:00
Pedro Alvarez c838758db2 Added downlink IP tunnel. Downlink user plane packets reach the UE. 2017-12-07 17:09:31 +00:00
Ismael Gomez 5c31800ccb Fixed HO with ciphering 2017-12-02 22:43:35 +01:00
Ismael Gomez 9a255b477a Merge branch 'crypto' into mobility_crypto 2017-12-02 12:23:05 +01:00
Paul Sutton 1a323770c9 Added support for AS ciphering 2017-12-01 19:19:38 +00:00
Paul Sutton 84724d2ab1 NAS-plane encryption working (thanks to David Rupprecht) 2017-11-30 17:09:12 +00:00
Ismael Gomez 408545dab8 X2 (constant NCC) working 2017-11-23 19:46:34 +01:00
Andre Puschmann 7ba8c5b94a fix bug in RLC AM where poll bit was never set if poll_byte and poll_pdu are zero
- In case both poll_pdu and poll_byte are zero a status PDU is requested
  from the other AM entity every N data PDUs
2017-10-26 09:21:26 +02:00
Ismael Gomez 6556941e6d simplified MAC timers. Unified mac and upper timers in same background task 2017-09-19 17:51:35 +02:00
Ismael Gomez 5359c42b46 RLC UM release timer at stop() 2017-09-19 15:15:25 +02:00
Ismael Gomez 68b1782c86 Fixed Paging and reattachment in new state machine. Moved GW to srsue 2017-09-18 14:02:31 +02:00
Ismael Gomez f0d9b333b2 Improved stability when UE reattaches 2017-09-07 13:19:53 +02:00
Ismael Gomez a51b6b09dd Merged with next. Attach successful 2017-09-01 19:32:57 +02:00
Ismael Gomez e5feec1934 Temporal commit before merge. Changed sequence objects to avoid reallocating memory. new NAS/RRC working with initial attachment 2017-09-01 13:29:11 +02:00
Ismael Gomez 5fed766806 fixed UE not reattaching after paging 2017-08-22 15:06:51 +02:00
Andre Puschmann 7ca0988ea3 refactor RLC to use RAT-agnostic config 2017-07-04 18:29:49 +02:00
Andre Puschmann 8dbabb2834 rework bearer/LCID handling
This is a larger patch that reworks the LCID handling throughout the
code.

- It first moves the RB/LCID mapping out of common.h into the RRC object
  because different RATs may have different mappings.
- It adds a interface to RRC that other objects like RLC/PDCP/etc. may
  use to get the bearer name of a specific LCID.
- The patch also introduces a PDCP config class.
2017-07-04 17:48:39 +02:00
Andre Puschmann 60da04ef58 make LCID of GW object a parameter 2017-07-04 17:46:50 +02:00
Paul Sutton b71f7b7080 Adding support for static builds 2017-06-23 14:49:21 +01:00
Ismael Gomez 5e030dc805 renamed SRSUE_ constants to SRSLTE_ 2017-06-06 20:34:09 +02:00
Andre Puschmann eb5460174d fixing namespace issue in debug build 2017-06-05 13:12:02 +02:00
Ismael Gomez 8a367bf825 changed srsue namespace to srslte for all common objects 2017-06-01 12:25:42 +02:00
Ismael Gomez e75daee148 renamed include paths for common objects 2017-05-31 23:39:17 +02:00
Andre Puschmann c51c4d2a38 fix compile warnings 2017-05-31 13:45:01 +02:00
Andre Puschmann 5d66e9701f fixing CMake scripts and include paths 2017-05-30 15:10:19 +02:00
Andre Puschmann d079d25b2c rename srslte folder and src subfolder 2017-05-30 13:05:04 +02:00