Commit f254107b authored by Cedric Roux's avatar Cedric Roux

import work from the branch nfapi-L2-emulator to merge it to develop

It was not possible to merge the branch directly, because the
history of this branch contains files that cannot be in the
repository, namely wireshark from Cisco work on nFAPI.

As for Cisco work on nFAPI, a special commit containing all the
work is thus created.

Below is the output of the command:
git log --graph 184d51c6..61276d87

184d51c6 is the commit ID of the develop
branch prior to the merge.

61276d87 is the commit ID of the
nfapi-L2-emulator branch prior to the merge.

The commit 61276d87 (and all its
history) will be removed from the main OAI repository. It is
present in the internal OAI repository for those who have access
to it.

There was also some cleanup done on the code.

Some changes were necessary to have the eNB functional. They may have an
impact on the FAPI L2 simulator, which may be non-functional and requires
some work to be functional (and not break other use cases).

The most critical ones are:
- in openair2/RRC/LITE/MESSAGES/asn1_msg.c, in the function do_SIB23:
  SIB 18/18/21 are not included because they make the MAC message to
  big for the SIB scheduler
- in targets/RT/USER/lte-enb.c, in the function eNB_thread_rxtx,
  the following code has not been included because it breaks the
  regular eNB:
     //Panos: NEW ACHECK FOR VNF HERE!
     //if(nfapi_mode!=2){
     if(get_nprocs() >= 8)      wakeup_tx(eNB,eNB->proc.ru_proc);
     else if(get_nprocs() > 4)
     {
       LOG_I(PHY, "Panos-D: In eNB_thread_rxtx() before re-calling phy_procedures_eNB_TX() and wakeup_txfh() \n");
       phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1);
       wakeup_txfh(proc,eNB->proc.ru_proc);
     }

It is possible to see the differences between this commit and the commit
61276d87 to get all the differences between
the two. Use: git diff 61276d87 <this commit>

Here is now the output of "git log [...]".

------------------------------------------------------------------------------
* commit 61276d87
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Fri May 4 15:10:23 2018 +0200
|
|     Fix before merge
|
* commit 1d3c88cd
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Fri May 4 12:41:22 2018 +0200
|
|     Fixed some warnings and removed redundant files.
|
* commit ea33b914
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Mon Apr 30 17:40:03 2018 +0200
|
|     Modifications related to using single copies of nfapi config. messages for all the UEs at each subframe.
|
* commit f578c1cf
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Mon Apr 30 11:13:23 2018 +0200
|
|     Updated instructions file for launching nfapi-L2-emulator and polishing the code.
|
* commit e8180fd6
| Merge: dc3787d3 184d51c6
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Fri Apr 27 18:48:49 2018 +0200
|
|     Merge branch develop.
|
* commit dc3787d3
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Tue Apr 17 14:56:02 2018 +0200
|
|     Added configuration option for nfapi-L2-emulation mode and updated instructions file.
|
* commit 4e5b67c4
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Thu Apr 5 13:36:21 2018 +0200
|
|     Added instructions file for launching nfapi-L2-emulator.
|
* commit 848d5e0a
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Thu Mar 29 19:02:49 2018 +0200
|
|     Fixed some more issues for running with multiple UEs. Added configuration option for the number of UEs.
|
* commit 230421bc
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Tue Mar 27 16:17:32 2018 +0200
|
|     More stable performance of nfapi-L2-emulator with 2 UEs, after dealing with some PNF-VNF synchronization issues.
|
* commit d74c43bd
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Wed Mar 21 19:56:26 2018 +0100
|
|     Minor modifications.
|
* commit 4f93ef56
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Tue Mar 20 18:14:49 2018 +0100
|
|     Fixed a bug. Now both UEs reaching RRC Connection Reconfiguration state about 90% of the executions. Less frequently appearing issues remain to be fixed.
|
* commit 1ed57bbf
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Tue Mar 20 12:00:53 2018 +0100
|
|     Extension to multiple UEs. Currently being tested with two UEs. Second UE doesn't always reach the RRC Connection Reconfiguration stage.
|
* commit 6cc3fb72
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Tue Mar 6 16:21:55 2018 +0100
|
|     process SidelinkUEInformation/RRCConnectionReconfiguration (partially)
|
* commit b3ecd62f
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Tue Mar 6 14:17:06 2018 +0100
|
|     add SIB21/SidelinkUEInformation support
|
* commit 93052033
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Thu Mar 1 18:35:57 2018 +0100
|
|     [RRC] add sIB19 support (partially)
|
*   commit 907b4f80
|\  Merge: 77072adf c64f9cd8
| | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| | Date:   Wed Feb 28 19:25:52 2018 +0100
| |
| |     [RRC] support SIB18 (partially)
| |
| * commit c64f9cd8
| | Author: matzakos <panagiotis.matzakos@eurecom.fr>
| | Date:   Tue Feb 27 20:02:05 2018 +0100
| |
| |     Minor modifications. Some problem appears rarely that prevents the reception of RRCConnectionSetupComplete message at the eNB.
| |
* | commit 77072adf
|/  Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
|   Date:   Wed Feb 28 19:18:20 2018 +0100
|
|       [RRC] support SIB18 (partially)
|
*   commit 709e5974
|\  Merge: 8b28e71b 314bf57f
| | Author: matzakos <panagiotis.matzakos@eurecom.fr>
| | Date:   Mon Feb 19 12:29:14 2018 +0100
| |
| |     Merge branch 'master' of gitlab.eurecom.fr:matzakos/LTE-D2D
| |
| |     Merge with latest changes of LTE-D2D/master
| |
| * commit 314bf57f
| | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| | Date:   Wed Feb 14 13:30:29 2018 +0100
| |
| |     minor update
| |
| * commit 84177053
| | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| | Date:   Mon Feb 12 12:13:59 2018 +0100
| |
| |     update instructions for 1-1, update multicast_link.c
| |
| * commit c24e4e6d
| | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| | Date:   Mon Feb 12 11:32:24 2018 +0100
| |
| |     update control socket for 1-1 scenario
| |
| * commit 9cf15c80
| | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| | Date:   Thu Feb 8 16:02:00 2018 +0100
| |
| |     polish the code/update instructions
| |
| * commit f2653443
| | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| | Date:   Wed Feb 7 13:45:34 2018 +0100
| |
| |     passing S+D from PDCP to lower layers (PC5-S)
| |
| *   commit a76a5a56
| |\  Merge: ff8d9a81 6823e3aa
| | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| | | Date:   Wed Feb 7 11:55:50 2018 +0100
| | |
| | |     Merge branch 'master' of gitlab.eurecom.fr:matzakos/LTE-D2D
| | |
| * | commit ff8d9a81
| | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| | | Date:   Wed Feb 7 11:55:34 2018 +0100
| | |
| | |     separation of SLRB establishment PC5-U/PC5-S
| | |
* | | commit 8b28e71b
| |/  Merge: 6823e3aa be8d32d5
|/|   Author: matzakos <panagiotis.matzakos@eurecom.fr>
| |   Date:   Mon Feb 19 12:27:21 2018 +0100
| |
| |       Merge with develop branch of main OAI repository.
| |
* | commit 6823e3aa
|/  Author: matzakos <panagiotis.matzakos@eurecom.fr>
|   Date:   Tue Feb 6 18:05:52 2018 +0100
|
|       Successful RRC Connection establishment without any errors, based on testing up to now
|
* commit 97c2aff9
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Tue Feb 6 16:44:58 2018 +0100
|
|     PC5-U - passing (source,destination) down to PDCP/RLC/MAC (first alternative - mapping of L2Ids form IP Addresses
|
* commit 24d5700c
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Thu Feb 1 11:53:07 2018 +0100
|
|     change ue-ip.ko to extract L2 Id from IP adress, update PC5-Signalling message
|
* commit 713e3135
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Wed Jan 31 19:47:22 2018 +0100
|
|     Seemed to have fixed pnf(UE) -vnf(eNB) sync issue. Works up to the reception of RRConnectionReconfigurationComplete message at the eNB but crashing after that.
|
* commit d794f690
| Author: William Johnson <wjohnson@vencorelabs.com>
| Date:   Tue Jan 30 11:50:42 2018 -0500
|
|     Merge cleanup
|
* commit ee627921
| Author: William Johnson <wjohnson@vencorelabs.com>
| Date:   Tue Jan 30 11:10:33 2018 -0500
|
|     Merge cleanup
|
* commit d4102b55
| Author: William Johnson <wjohnson@vencorelabs.com>
| Date:   Mon Jan 22 15:20:55 2018 -0500
|
|     Resolved issues with PC5-D implementation.
|
* commit 7fb0902d
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Mon Jan 29 18:02:31 2018 +0100
|
|     Works up to the reception of Msg4 at the eNB. Still sometimes SF sync between PNF and VNF is lost.
|
* commit 507c1ea9
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Wed Jan 24 20:07:09 2018 +0100
|
|     Added correct handling of HI_DCI0.req + memory management issues
|
* commit 5dc306ec
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Wed Jan 24 11:12:53 2018 +0100
|
|     Works up to the reception of HI_DCI0.request at the UE-PNF. Sometimes Msg3 arrives later than expected at the eNB-VNF.
|
* commit 17baaaa1
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Wed Jan 24 09:38:42 2018 +0100
|
|     update instructions regarding PC5-D
|
* commit 2403529e
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Mon Jan 22 16:52:16 2018 +0100
|
|     fix issues related to PC5D transmission/reception
|
* commit dd3ed7a5
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Mon Jan 22 11:03:25 2018 +0100
|
|     minor update PC5DiscoveryAnnouncement -> PC5DiscoveryMessage
|
* commit ad2da99d
| Author: William Johnson <wjohnson@vencorelabs.com>
| Date:   Thu Jan 18 17:28:36 2018 -0500
|
|     testing of Discovery transmission/reception
|
* commit ccdc09c8
| Author: Rohit Gupta <rohit.gupta@eurecom.fr>
| Date:   Thu Jan 18 14:08:19 2018 +0100
|
|     final pieces for SLDCH emulation
|
* commit a7f21281
| Author: Rohit Gupta <rohit.gupta@eurecom.fr>
| Date:   Thu Jan 18 13:18:57 2018 +0100
|
|     force instance 0 for PDCP netlink
|
* commit 276556ac
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Tue Jan 16 09:56:39 2018 +0100
|
|     update instructions
|
* commit 241aa2bb
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Mon Jan 15 16:03:48 2018 +0100
|
|     support PC5-D (RRC/MAC)
|
* commit c6aefa31
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Sun Jan 14 14:59:01 2018 +0100
|
|     minor update to fix issues related to PC5-S
|
* commit 9c00f4b7
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Fri Jan 12 11:43:15 2018 +0100
|
|     update RRC_UE to support PC5-S
|
* commit 952ec555
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Thu Jan 11 16:36:37 2018 +0100
|
|     update instructions
|
* commit 153af28d
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Thu Jan 11 15:17:24 2018 +0100
|
|     first version for supporting PC5-S
|
* commit d5d6ecab
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Fri Jan 5 22:32:50 2018 +0100
|
|     minor update - d2d-emulator-setup
|
* commit 7781cd58
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Fri Jan 5 00:08:49 2018 +0100
|
|     Configure MAC with Source/groupL2Id, add possiblility to filter at MAC layer
|
* commit 2e5af5a9
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Thu Jan 4 15:50:36 2018 +0100
|
|     add network configuration
|
* commit c5a3e404
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Thu Jan 4 15:31:43 2018 +0100
|
|     add instructions to setup emulator
|
* commit a1c1e9ce
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Wed Jan 3 22:54:38 2018 +0100
|
|     enable control socket
|
* commit ff6c7119
| Author: Raymond Knopp <raymond.knopp@eurecom.fr>
| Date:   Wed Jan 3 07:26:05 2018 -0800
|
|     added MAC header handling for reception.
|
*   commit 532a566c
|\  Merge: 86a308bb 109d6bb7
| | Author: Raymond Knopp <raymond.knopp@eurecom.fr>
| | Date:   Wed Jan 3 06:58:58 2018 -0800
| |
| |     Merge branch 'master' of https://gitlab.eurecom.fr/matzakos/LTE-D2D
| |
| * commit 109d6bb7
| | Author: Raymond Knopp <raymond.knopp@eurecom.fr>
| | Date:   Mon Dec 25 19:55:21 2017 +0100
| |
| |     uplink path tested.
| |
* | commit 86a308bb
|/  Author: Raymond Knopp <raymond.knopp@eurecom.fr>
|   Date:   Wed Jan 3 06:58:28 2018 -0800
|
|       added MAC header handling for TX
|
* commit 5b59872d
| Author: Raymond Knopp <raymond.knopp@eurecom.fr>
| Date:   Mon Dec 25 04:32:45 2017 -0800
|
|     added new L1 files for Sidelink
|
* commit b215b431
| Author: Raymond Knopp <raymond.knopp@eurecom.fr>
| Date:   Mon Dec 25 04:25:37 2017 -0800
|
|     changes to allow configuring multicast interface on command line
|
*   commit 6434e645
|\  Merge: a3380204 f3192892
| | Author: Raymond Knopp <raymond.knopp@eurecom.fr>
| | Date:   Sun Dec 24 12:54:29 2017 -0800
| |
| |     Merge branch 'master' of https://gitlab.eurecom.fr/matzakos/LTE-D2D
| |
| |     Conflicts:
| |             targets/RT/USER/lte-ue.c
| |
| * commit f3192892
| | Author: matzakos <panagiotis.matzakos@eurecom.fr>
| | Date:   Wed Dec 20 15:29:40 2017 +0100
| |
| |     Works up to the reception of the RA_RESPONSE at the UE. Crashing at fill_rx_indication_UE_MAC just before sending Msg3.
| |
| * commit ee61cb51
| | Author: matzakos <panagiotis.matzakos@eurecom.fr>
| | Date:   Mon Dec 18 16:18:00 2017 +0100
| |
| |     Fixed the issue with synchronization but only for the case o running both eNB (vnf) and UE (pnf) processes in the same machine. Receiving and decoding now all MIBs and SIBs1/2/3.
| |
* | commit a3380204
|/  Author: Raymond Knopp <raymond.knopp@eurecom.fr>
|   Date:   Fri Dec 22 20:22:41 2017 -0800
|
|       addition of Sidelink UE-UE stub and initial MAC scheduling for Sidelink for off-network scenario
|
*   commit d34ac165
|\  Merge: 7b6a9c44 63ac8b4c
| | Author: matzakos <panagiotis.matzakos@eurecom.fr>
| | Date:   Wed Dec 13 23:58:48 2017 +0100
| |
| |     Merge branch 'master' of gitlab.eurecom.fr:matzakos/LTE-D2D
| |
| |     Merge with Thin's last commit
| |
| *   commit 63ac8b4c
| |\  Merge: c7c8057f 93627a4c
| | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| | | Date:   Wed Dec 6 23:05:13 2017 +0100
| | |
| | |     Merge branch 'master' of gitlab.eurecom.fr:matzakos/LTE-D2D
| | |
| * | commit c7c8057f
| | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| | | Date:   Wed Dec 6 23:02:39 2017 +0100
| | |
| | |     integrate RRC control socket
| | |
* | | commit 7b6a9c44
| |/  Author: matzakos <panagiotis.matzakos@eurecom.fr>
|/|   Date:   Wed Dec 13 23:58:15 2017 +0100
| |
| |       Testing works up to the reception of SIB1/2/3 from the UE through nfapi, but there is an issue with missing some of the nfapi messages for some frames.
| |
* |   commit 93627a4c
|\ \  Merge: db011d28 a2f8a366
| | | Author: matzakos <matzakos@eurecom.fr>
| | | Date:   Wed Dec 6 14:12:23 2017 +0100
| | |
| | |     Merge branch 'master' of https://gitlab.eurecom.fr/matzakos/LTE-D2D
| | |
| | |     Testing of phy_stub
| | |
| * | commit a2f8a366
| |/  Author: matzakos <panagiotis.matzakos@eurecom.fr>
| |   Date:   Tue Dec 5 20:27:29 2017 +0100
| |
| |       Testing works until the call of callback function pnf_p7_subframe_ind. There, it never satisfies the condition if(tx_subframe_buffer->sfn_sf == sfn_sf_tx) so both sides (vnf and pnf are hanging).
| |
| * commit b3cc16ba
| | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| | Date:   Tue Dec 5 15:41:50 2017 +0100
| |
| |     update RRC for SL
| |
* | commit db011d28
|/  Author: matzakos <matzakos@eurecom.fr>
|   Date:   Wed Dec 6 14:11:06 2017 +0100
|
|       Necessary modifications to support noS1 with nfapi and eNB side for testing vnf-pnf up to the stage of previous commit
|
* commit ec67c1c9
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Fri Dec 1 20:05:40 2017 +0100
|
|     Introduce new executable for the UE (nfapi pnf in stub mode) lte-softmodem-stub
|
* commit 9de8b0fc
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Mon Nov 27 16:25:57 2017 +0100
|
|     Added function to extract nfapi address-port from UE specific configuration file
|
* commit 3cced60a
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Thu Nov 23 17:10:48 2017 +0100
|
|     Connected new callback functions at nfapi_pnf for phy_stub mode + Intorducing new functions initializing UE variables and threads specific to phy_stub mode, instead of extending the existing ones + Direct connection of the timer_thread with UE_phy_stub_thread_rxn_txnp4.
|
*   commit 911ed228
|\  Merge: 83394cd3 c42a5932
| | Author: matzakos <panagiotis.matzakos@eurecom.fr>
| | Date:   Mon Nov 20 11:42:51 2017 +0100
| |
| |     Merge with Cisco nfapi-ru-rau-split remote branch
| |
| * commit c42a5932
| | Author: David Price <davpric2@cisco.com>
| | Date:   Tue Nov 14 14:44:25 2017 +0000
| |
| |     Works in monolithic mode and nFAPI mode
| |
| * commit 4fea20e7
| | Author: David Price <davpric2@cisco.com>
| | Date:   Tue Nov 14 12:34:36 2017 +0000
| |
| |     Get logging working - merge changes from develop branch
| |
| * commit cc02d6c1
| | Merge: 673b2e9f d915c208
| | Author: David Price <davpric2@cisco.com>
| | Date:   Fri Nov 10 12:53:22 2017 +0000
| |
| |     Merge of develop branch as of 10 Nov.  Tested with single UE attach.
| |
| * commit 673b2e9f
| | Author: David Price <davpric2@cisco.com>
| | Date:   Fri Nov 10 09:21:30 2017 +0000
| |
| |     Turn down logging
| |
| * commit b9268bc3
| | Author: David Price <davpric2@cisco.com>
| | Date:   Fri Nov 10 09:09:07 2017 +0000
| |
| |     How the hell did that work???
| |
| * commit 6482d18c
| | Author: David Price <davpric2@cisco.com>
| | Date:   Mon Nov 6 12:45:58 2017 +0000
| |
| |     Sample attach
| |
| * commit d98502d4
| | Author: David Price <davpric2@cisco.com>
| | Date:   Mon Nov 6 11:08:57 2017 +0000
| |
| |     Add wireshark with nfapi
| |
| * commit e5925084
| | Author: David Price <davpric2@cisco.com>
| | Date:   Sun Nov 5 22:15:50 2017 +0000
| |
| |     He has only gone and done it.  11th hour and it works.  Phone has attached twice
| |
| * commit 4dfbcf58
| | Author: David Price <davpric2@cisco.com>
| | Date:   Sun Nov 5 21:32:59 2017 +0000
| |
| |     Update open-nfapi patch - has new dissector in it
| |
| * commit bcd998ab
| | Author: David Price <davpric2@cisco.com>
| | Date:   Sun Nov 5 21:25:57 2017 +0000
| |
| |     Attach accept and then crash
| |
| * commit 91aeda82
| | Author: David Price <davpric2@cisco.com>
| | Date:   Sun Nov 5 17:53:09 2017 +0000
| |
| |     Gets late packets during attach
| |
| * commit 25af68d3
| | Author: David Price <davpric2@cisco.com>
| | Date:   Fri Nov 3 06:36:45 2017 +0000
| |
| |     Logging...
| |
| * commit 7382d913
| | Author: David Price <davpric2@cisco.com>
| | Date:   Fri Nov 3 06:35:41 2017 +0000
| |
| |     logging...
| |
| * commit f90444a1
| | Author: David Price <davpric2@cisco.com>
| | Date:   Fri Nov 3 06:35:11 2017 +0000
| |
| |     Cannot run vnf 3 ahead it runs out of space with downlink messages and their harq
| |
| * commit ebee0e12
| | Author: David Price <davpric2@cisco.com>
| | Date:   Thu Nov 2 16:13:04 2017 +0000
| |
| |     Now seem to be getting uplink data, but it is error'd
| |
| * commit 9f781408
| | Author: David Price <davpric2@cisco.com>
| | Date:   Wed Nov 1 18:18:12 2017 +0000
| |
| |     Fails at the point core sends Identity Request to UE
| |
| * commit 3a7456df
| | Author: David Price <davpric2@cisco.com>
| | Date:   Wed Nov 1 17:36:52 2017 +0000
| |
| |     Bad harq configuration
| |
| * commit 30c76c6d
| | Author: David Price <davpric2@cisco.com>
| | Date:   Mon Oct 30 15:21:39 2017 +0000
| |
| |     Works up to rrc connection setup complete in nfapi mode
| |
| * commit e10c0c08
| | Author: David Price <davpric2@cisco.com>
| | Date:   Mon Oct 30 08:40:34 2017 +0000
| |
| |     Crashes due to clearing out the wrong info from subframe buffer
| |
| * commit 2ac91f05
| | Author: David Price <davpric2@cisco.com>
| | Date:   Mon Oct 30 07:04:33 2017 +0000
| |
| |     uplink data from ue received, corrected scheduling of DCI0/UPLINK_CFG.  Fails to correctly form (SFNSF) for PHICH ACK
| |
| * commit 22367109
| | Author: David Price <davpric2@cisco.com>
| | Date:   Fri Oct 27 06:49:20 2017 +0100
| |
| |     Change +4 for tx to a variable and get it to run at +2, this alllows nFAPI to get the reply back for HI_DCI0 to generate the PHICH in time
| |
| * commit 7a577094
| | Author: David Price <davpric2@cisco.com>
| | Date:   Wed Oct 25 14:45:37 2017 +0100
| |
| |     Crashes around msg4 time, but understand that need to get the ACK for the UE UL of msg3 back to UE within 4ms
| |
| * commit 74cbde7c
| | Author: David Price <davpric2@cisco.com>
| | Date:   Mon Oct 23 14:16:24 2017 +0100
| |
| |     Add a gtk wave for pnf
| |
| * commit 9d5d78f5
| | Author: David Price <davpric2@cisco.com>
| | Date:   Mon Oct 23 14:16:07 2017 +0100
| |
| |     Stack smashing error reported.  Fixed by parameter changing int to uint16_t.  Not obvious!
| |
| * commit f7670c4b
| | Author: David Price <davpric2@cisco.com>
| | Date:   Fri Oct 20 10:48:30 2017 +0100
| |
| |     Yet another small tweak still proving that RACH works
| |
| * commit b9fc5e67
| | Author: David Price <davpric2@cisco.com>
| | Date:   Fri Oct 20 09:18:24 2017 +0100
| |
| |     Small update mostly tweaking.  Still RACHs
| |
| * commit 80aaca76
| | Author: David Price <davpric2@cisco.com>
| | Date:   Thu Oct 19 16:19:22 2017 +0100
| |
| |     More tidy up
| |
| * commit b6a9bb33
| | Author: David Price <davpric2@cisco.com>
| | Date:   Thu Oct 19 16:08:19 2017 +0100
| |
| |     Bit of tidy up, rename variables. change some logs
| |
| * commit 17322170
| | Merge: 1ec934f9 599ba826
| | Author: David Price <davpric2@cisco.com>
| | Date:   Wed Oct 18 09:32:11 2017 +0100
| |
| |     Merged RU-RAU-split as of 18 Oct
| |
| * commit 1ec934f9
| | Author: David Price <davpric2@cisco.com>
| | Date:   Mon Oct 16 14:04:05 2017 +0100
| |
| |     Works up to message 3 reception at VNF
| |
| * commit 5be8cf7b
| | Author: David Price <davpric2@cisco.com>
| | Date:   Tue Oct 10 08:58:21 2017 +0100
| |
| |     RACH received on VNF.  Message 2 created and sent to PNF.  Got Message 2 received on PNF.  Nothing useful done with it yet
| |
| * commit 6c519f5b
| | Author: David Price <davpric2@cisco.com>
| | Date:   Mon Oct 9 17:11:49 2017 +0100
| |
| |     Merge from RU-RAU-split and fix of frame/subframe handling.  Was very confused with the counter in the main loop, the incrementing from the USRP read library and the nFAPI frame handling.  RACH seen on wireshark and something happens on VNF
| |
| * commit 6559fc19
| | Merge: 8da3d5cc 8e6cc019
| | Author: David Price <davpric2@cisco.com>
| | Date:   Mon Oct 9 07:14:17 2017 +0100
| |
| |     Merge from RU-RAU-split 9th Oct
| |
| * commit 8da3d5cc
| | Merge: 483cd5cf e52c57b8
| | Author: David Price <davpric2@cisco.com>
| | Date:   Fri Oct 6 11:24:35 2017 +0100
| |
| |     Merge from official RU-RAU-split branch.  Tested with san jole and UE - network is seen.  Not tried RACH
| |
| * commit 483cd5cf
| | Author: David Price <davpric2@cisco.com>
| | Date:   Thu Oct 5 11:48:01 2017 +0100
| |
| |     NFAPI RACH now working.  Gets sent to VNF.  VNF cores currently on receipt.  Probably fixed by merge from main RU-RAU-split which I will do next
| |
| * commit de5bec31
| | Author: David Price <davpric2@cisco.com>
| | Date:   Tue Oct 3 15:12:46 2017 +0100
| |
| |     Over write Raymond's copy of the open nfapi diff with the one that I am using - it re-orders the processing of dl_config and tx_req
| |
| * commit 53e7a572
| | Author: David Price <davpric2@cisco.com>
| | Date:   Tue Oct 3 15:06:39 2017 +0100
| |
| |     Network search working again.  Now calling generate_dci_top every subframe, using dummy subframe if no data to transmit. MIB and SIB2/3 coming out.  UE sees cell
| |
| * commit 142d96fd
| | Author: David Price <davpric2@cisco.com>
| | Date:   Thu Sep 28 09:05:44 2017 +0100
| |
| |     Store a complete list of DLSCH PDUs because it is possible they might get written over otherwise
| |
| * commit 3cb04fc3
| | Author: David Price <davpric2@cisco.com>
| | Date:   Fri Sep 22 15:39:30 2017 +0100
| |
| |     Phone sees network on network search.  Need to schedule MIB every frame.  Fixed pdu length. fixed number of dcis
| |
| * commit 0bd5978e
| | Author: David Price <davpric2@cisco.com>
| | Date:   Fri Sep 22 09:22:39 2017 +0100
| |
| |     Both MIB and SIB1 are coming out on san jole.  SIB2/3 is missing
| |
| * commit fbd450ee
| | Author: David Price <davpric2@cisco.com>
| | Date:   Thu Sep 21 12:09:45 2017 +0100
| |
| |     Missing checkin.
| |
| * commit 9496696a
| | Author: David Price <davpric2@cisco.com>
| | Date:   Thu Sep 21 11:50:04 2017 +0100
| |
| |     Remove hard coding of my IP address and use config file address
| |
| * commit 72107411
| | Merge: 17e158f6 b421d467
| | Author: Raymond Knopp <raymond.knopp@eurecom.fr>
| | Date:   Thu Sep 21 08:48:46 2017 +0200
| |
| |     Merge branch 'RU-RAU-split' of https://gitlab.eurecom.fr/oai/openairinterface5g into nfapi-ru-rau-split
| |
| |     Conflicts:
| |             openair2/RRC/LITE/L2_interface.c
| |             targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
| |
| *   commit 17e158f6
| |\  Merge: 16a36ec8 ca96ede8
| | | Author: Raymond Knopp <raymond.knopp@eurecom.fr>
| | | Date:   Wed Sep 20 14:51:36 2017 +0200
| | |
| | |     Merge branch 'nfapi-ru-rau-split' of https://gitlab.eurecom.fr/daveprice/openairinterface5g into nfapi-ru-rau-split
| | |
| | * commit ca96ede8
| | | Author: David Price <davpric2@cisco.com>
| | | Date:   Wed Sep 20 11:32:40 2017 +0100
| | |
| | |     NFAPI_DIR was set to my personal directory
| | |
| * | commit 16a36ec8
| |/  Author: Raymond Knopp <raymond.knopp@eurecom.fr>
| |   Date:   Wed Sep 20 12:49:46 2017 +0200
| |
| |       removed ITTI message transfer for MAC->RRC
| |
| * commit 8b12045b
|   Author: David Price <davpric2@cisco.com>
|   Date:   Wed Sep 20 10:50:09 2017 +0100
|
|       Trying to get NFAPI working.  BCH not being sent out over the air but is being scheduled
|
* commit 83394cd3
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Fri Nov 17 14:41:34 2017 +0100
|
|     Small correction wrt the UE_MAC state machine in phy_stub_UE
|
* commit 725ad9d9
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Thu Nov 16 15:59:22 2017 +0100
|
|     Introduced a new timer_thread within lte-ue. This thread is ticking the subframes and wakes up UE_thread function which is waiting on a condition variable for nfapi_mode=3 (phy_stub)
|
* commit c3f984d0
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Tue Nov 14 12:34:55 2017 +0100
|
|     Introduce nfapi_mode variable to differentiate functionality between phy_stub_ue mode (nfapi_mode=3) and normal full stack mode (nfapi_mode!=3).
|
* commit 96f18a06
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Mon Nov 13 16:58:11 2017 +0100
|
|     Added functions copying nfapi requests to UE_mac_inst + Substituted calls to phy_procedures_ue rx/tx with phy_stub functions triggering MAC layer Tx/Rx procedures at UE MAC. Changes within UE_thread_rxn_txnp4
|
* commit 66ae679d
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Thu Nov 9 15:51:45 2017 +0100
|
|     update SidelinkUEInformation (UE's side), RRCConnectionReconfiguration (eNB's side), add rrc_ue_process_radioResourceConfig to process RPs and configure MAC/PHY
|
*   commit 511c48c7
|\  Merge: 34f5368c d9174256
| | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| | Date:   Tue Nov 7 16:12:03 2017 +0100
| |
| |     XMerge branch 'master' of gitlab.eurecom.fr:matzakos/LTE-D2D
| |
| * commit d9174256
| | Author: matzakos <panagiotis.matzakos@eurecom.fr>
| | Date:   Mon Nov 6 11:58:59 2017 +0100
| |
| |     Added handling of HI_DCI0_config requests at UE MAC. Eliminated calls to PHY functions from utilized UE MAC functions (e.g., ue_send_sdu) to support phy_stub operation mode.
| |
* | commit 34f5368c
|/  Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
|   Date:   Tue Nov 7 16:11:28 2017 +0100
|
|       add function to fill MIB_SL
|
* commit 7e77fb67
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Fri Nov 3 13:56:29 2017 +0100
|
|     support SidelinkUEInformation (eNB) and RRCConnectionReconfiguration (SL)
|
* commit 418da5b4
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Thu Nov 2 19:53:40 2017 +0100
|
|     Updated handling of DL_config and Tx_req pdus in phy_stub_UE to be compliant with nfapi callback functions
|
* commit a37ff36d
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Thu Nov 2 14:34:58 2017 +0100
|
|     Added MAC level state variable for the UE and control mechanisms to ensure the correct operation of the UE MAC state machine.
|
* commit 4757a1b6
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Sat Oct 28 14:16:33 2017 +0200
|
|     Added remaining fill_harq indication functions + the functionality to handle ul_config request pdus arriving from nfapi-vnf: trigger the appropriate UE_MAC and fill_indication functions to prepare the UL_indications which will be put into the socket for transfer back to vnf. Main changes within phy_stub_UE().
|
* commit 6719eefb
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Mon Oct 23 15:40:02 2017 +0200
|
|     minor update to process SidelinkUEInformation
|
* commit 136c61ac
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Mon Oct 23 15:31:02 2017 +0200
|
|     receive SidelinkUEInformation (eNB)
|
* commit 7abf1227
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Mon Oct 23 15:07:56 2017 +0200
|
|     generate/process SidelinkUEInformation
|
* commit afa442bb
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Thu Oct 19 17:20:59 2017 +0200
|
|     Added fill functions for rach and ulsch_cqi indications.
|
* commit 8314a264
| Merge: 2d50ccaf 2516216d
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Wed Oct 18 15:53:49 2017 +0200
|
|     Merge remote-tracking branch 'main/RU-RAU-split'
|
* commit 2d50ccaf
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Wed Oct 18 15:45:09 2017 +0200
|
|     Added fill functions for rx, crc and sr indications in phy_stub_UE. These functions will be getting called directly from the MAC layer of the UE. Rest of fill functions remain to be added.
|
* commit 22bcc7a5
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Tue Oct 17 15:14:46 2017 +0200
|
|     add SIB19 support - eNB
|
* commit 2de24be2
| Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr>
| Date:   Mon Oct 16 11:14:28 2017 +0200
|
|     add SIB18 support - eNB
|
* commit 931ae713
| Merge: d4e6d45c 493110af
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Fri Oct 13 11:00:14 2017 +0200
|
|     Merge with RU-RAU-split
|
* commit d4e6d45c
| Author: matzakos <panagiotis.matzakos@eurecom.fr>
| Date:   Fri Sep 22 19:57:43 2017 +0200
|
|     Definition of the UE<->eNB MAC to MAC interface based on nFAPI structures: Currently supporting the triggering of MAC layer Rx operations at the UE side based on the reception of NFAPI DL messages. Partial definition of Sidelink MAC subheaders.
|
* commit 0422bf8b
  Author: matzakos <panagiotis.matzakos@eurecom.fr>
  Date:   Mon Sep 4 10:12:55 2017 +0200

      Definition of the UE MAC interface: IF_Module_UE.h, IF_Module_UE.c, UE_MAC_interface.h and the supporting functions.
------------------------------------------------------------------------------
parent 184d51c6
......@@ -1084,6 +1084,9 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/slss.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sldch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/slsch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/group_hopping.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/srs_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/drs_modulation.c
......@@ -1176,6 +1179,9 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/slss.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sldch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/slsch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/group_hopping.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/srs_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/drs_modulation.c
......@@ -1351,6 +1357,7 @@ set(L2_SRC_UE
)
set (MAC_SRC
#${PHY_INTERFACE_DIR}/phy_stub_UE.c
${PHY_INTERFACE_DIR}/IF_Module.c
${MAC_DIR}/main.c
${MAC_DIR}/main_ue.c
......@@ -1373,6 +1380,7 @@ set (MAC_SRC
)
set (MAC_SRC_UE
${PHY_INTERFACE_DIR}/phy_stub_UE.c
${MAC_DIR}/main_ue.c
${MAC_DIR}/ue_procedures.c
${MAC_DIR}/ra_procedures.c
......@@ -1398,7 +1406,6 @@ add_library(L2_UE
${MAC_SRC_UE}
)
include_directories(${NFAPI_USER_DIR})
# L3 Libs
......@@ -1968,6 +1975,8 @@ add_executable(lte-softmodem
${OPENAIR_TARGETS}/COMMON/create_tasks.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c
......@@ -2009,6 +2018,8 @@ add_executable(lte-softmodem-nos1
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
${OPENAIR_DIR}/common/utils/system.c
${XFORMS_SOURCE}
${XFORMS_SOURCE_SOFTMODEM}
......@@ -2024,7 +2035,7 @@ target_link_libraries (lte-softmodem-nos1
-Wl,--end-group z dl )
target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 ${T_LIB})
......@@ -2043,6 +2054,8 @@ add_executable(lte-uesoftmodem
${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c
......@@ -2057,6 +2070,7 @@ target_link_libraries (lte-uesoftmodem
-Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_UE_LIB PHY_UE LFDS L2_UE
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl)
target_link_libraries (lte-uesoftmodem ${LIBXML2_LIBRARIES})
......@@ -2064,7 +2078,7 @@ target_link_libraries (lte-uesoftmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${
target_link_libraries (lte-uesoftmodem ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-uesoftmodem ${T_LIB})
# lte-softmodem-nos1 is both eNB and UE implementation
# lte-uesoftmodem-nos1 is UE implementation
###################################################
add_executable(lte-uesoftmodem-nos1
${rrc_h}
......@@ -2080,6 +2094,9 @@ add_executable(lte-uesoftmodem-nos1
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c
${XFORMS_SOURCE}
${XFORMS_SOURCE_SOFTMODEM}
......@@ -2087,10 +2104,12 @@ add_executable(lte-uesoftmodem-nos1
${CONFIG_SOURCES}
${SHLIB_LOADER_SOURCES}
)
target_link_libraries (lte-uesoftmodem-nos1
-Wl,--start-group
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_UE_LIB PHY_UE LFDS L2_UE ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB}
${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl )
target_link_libraries (lte-uesoftmodem-nos1 ${LIBXML2_LIBRARIES})
......
Scenario 1 : Off-network UE2UE link
SynchREF UE (UE1)
UE1(eth0 - 10.10.10.1)--------UE2(eno1 - 10.10.10.2)
Here's an example of /etc/network/interfaces configuration for UE1
auto eth0
iface eth0 inet static
address 10.10.10.1
netmask 255.255.255.0
gateway 10.10.10.1
Prepare the environment:
- git clone https://gitlab.eurecom.fr/matzakos/LTE-D2D.git #branch: master
This branch contains all the current development for DDPS
- UE MAC<-> UE MAC for Scenario 1
- eNB MAC<->UE MAC (NFAPI Transport)
- RRC Extensions for “on-network” cases
NFAPI configuration (required even for Scenario 1 target)
- git clone https://github.com/cisco/open-nFAPI.git
- cd open-nfapi
- patch -p1 --dry-run < $OPENAIR_HOME/open-nfapi.oai.patch
Validate that there are no errors
- patch -p1 < $OPENAIR_HOME/open-nfapi.oai.patch
OAI build/execute
- export NFAPI_DIR=XXX (place where NFAPI was installed)
- cd cmake_targets
- ./build_oai --UE
(if necessary, use ./build_oai -I --UE to install required packages)
- cd lte_build_oai/build/
- cp ../../../targets/bin/.ue* .
- cp ../../../targets/bin/.usim* .
- sudo insmod ../../../targets/bin/ue_ip.ko
UE1:
- sudo ifconfig oip0 10.0.0.1
- sudo iptables -A POSTROUTING -t mangle -o oip0 -d 224.0.0.3 -j MARK --set-mark 3
- (if necessary) sudo route add default gw 10.10.10.1 eth0
UE2:
- sudo ifconfig oip0 10.0.0.2
- sudo iptables -A POSTROUTING -t mangle -o oip0 -d 224.0.0.3 -j MARK --set-mark 3
- (if necessary) sudo route add default gw 10.10.10.1 eno1
UE1 and UE2: Get and build vencore_app from d2d-l3-stub (branch: l3_stub)
- gcc -I . vencore_app.c -o vencore_app -lpthread
--------------------------------
TEST ONE-TO-MANY
Run UE1 then UE2, for example:
UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
Test with Ping
- Sender - UE1: ping -I oip0 224.0.0.3
- Receiver - UE2: using wireshark
Test with Iperf
- Sender - UE1: iperf -c 224.0.0.3 -u -b 0.1M --bind 10.0.0.1 -t 100
- Receiver - UE2: sudo ./mcreceive 224.0.0.3 5001
Filter the incomming packets according to GroupL2Id: receiver (one-to-many) can discard the packets if it doesn't belong to this group.
For the moment, both sender and receiver use the same set of Ids (hardcoded)
UE1 (sender)
- sudo ./lte-softmodem-stub -U --emul-iface eth0
- ./vencore_app #send the sourceL2Id, groupL2Id to OAI
- ping -I oip0 224.0.0.3
UE2(receiver)
- sudo ./lte-softmodem-stub -U --emul-iface eno1
#we can see the incomming packets from OAI log, however, cannot see from Wireshark -> they are discarded at MAC layer
- ./vencore_app #we can see the packets appearing in Wireshark
--------------------------------------
TEST PC5-S (UE1 -sender, UE2 - receiver) and PC5-U for ONE-TO-ONE scenario
Configure UE1/UE2
UE1:
- sudo ifconfig oip0 10.0.0.1
- sudo iptables -A POSTROUTING -t mangle -o oip0 -d 10.0.0.2 -j MARK --set-mark 3
- sudo route add default gw 10.10.10.1 eth0
UE2:
- sudo ifconfig oip0 10.0.0.2
- sudo iptables -A POSTROUTING -t mangle -o oip0 -d 10.0.0.1 -j MARK --set-mark 3
- sudo route add default gw 10.10.10.1 eno1
step 1:
- UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
step 2:
- UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
- UE2: ./vencore_app -r #listen to incomming message from PC5-S
step 3:
- UE1: ./vencore_app -s #send a message via PC5-S (e.g., DirectCommunicationRequest)
Generate unicast traffic
UE1: ping -I oip0 10.0.0.2
--------------------------------------
TEST PC5-D
step 1:
- UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
- UE1: ./vencore_app -d #send a PC5-Discovery-Announcement via PC5D
step 2:
- UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
- UE2: ./vencore_app -d #send a PC5-Discovery-Announcement via PC5D
This diff is collapsed.
......@@ -1247,9 +1247,14 @@ void vnf_handle_timing_info(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
int16_t vnf_pnf_sfnsf_delta = NFAPI_SFNSF2DEC(vnf_p7->p7_connections[0].sfn_sf) - NFAPI_SFNSF2DEC(ind.last_sfn_sf);
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() PNF:SFN/SF:%d VNF:SFN/SF:%d deltaSFNSF:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind.last_sfn_sf), NFAPI_SFNSF2DEC(vnf_p7->p7_connections[0].sfn_sf), vnf_pnf_sfnsf_delta);
if (vnf_pnf_sfnsf_delta>1 || vnf_pnf_sfnsf_delta < -1)
// Panos: Careful here!!!
//if (vnf_pnf_sfnsf_delta>1 || vnf_pnf_sfnsf_delta < -1)
if (vnf_pnf_sfnsf_delta>0 || vnf_pnf_sfnsf_delta < 0)
{
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() LARGE SFN/SF DELTA between PNF and VNF delta:%d VNF:%d PNF:%d\n\n\n\n\n\n\n\n\n", __FUNCTION__, vnf_pnf_sfnsf_delta, NFAPI_SFNSF2DEC(vnf_p7->p7_connections[0].sfn_sf), NFAPI_SFNSF2DEC(ind.last_sfn_sf));
// Panos: Careful here!!!
vnf_p7->p7_connections[0].sfn_sf = ind.last_sfn_sf;
}
}
}
......
......@@ -34,6 +34,7 @@
uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10};
extern uint8_t nfapi_mode;
void phy_config_sib1_ue(uint8_t Mod_id,int CC_id,
uint8_t eNB_id,
......@@ -563,14 +564,17 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
phy_vars_ue->decode_SIB = 0;
phy_vars_ue->decode_MIB = 0;
}
//phy_vars_ue->pdcch_vars[1][eNB_id]->crnti = phy_vars_ue->pdcch_vars[0][eNB_id]->crnti;
if(phy_vars_ue->pdcch_vars[0][eNB_id]->crnti == 0x1234)
phy_vars_ue->pdcch_vars[0][eNB_id]->crnti = phy_vars_ue->pdcch_vars[1][eNB_id]->crnti;
else
phy_vars_ue->pdcch_vars[1][eNB_id]->crnti = phy_vars_ue->pdcch_vars[0][eNB_id]->crnti;
LOG_I(PHY,"C-RNTI %x %x \n", phy_vars_ue->pdcch_vars[0][eNB_id]->crnti,
phy_vars_ue->pdcch_vars[1][eNB_id]->crnti);
if(nfapi_mode!=3){
//phy_vars_ue->pdcch_vars[1][eNB_id]->crnti = phy_vars_ue->pdcch_vars[0][eNB_id]->crnti;
if(phy_vars_ue->pdcch_vars[0][eNB_id]->crnti == 0x1234)
phy_vars_ue->pdcch_vars[0][eNB_id]->crnti = phy_vars_ue->pdcch_vars[1][eNB_id]->crnti;
else
phy_vars_ue->pdcch_vars[1][eNB_id]->crnti = phy_vars_ue->pdcch_vars[0][eNB_id]->crnti;
LOG_I(PHY,"C-RNTI %x %x \n", phy_vars_ue->pdcch_vars[0][eNB_id]->crnti,
phy_vars_ue->pdcch_vars[1][eNB_id]->crnti);
}
}
......
......@@ -252,7 +252,7 @@ typedef struct {
// decode phich
uint8_t decode_phich;
} LTE_UL_UE_HARQ_t;
} LTE_UL_UE_HARQ_t;
#ifdef Rel14
typedef enum {
......@@ -265,7 +265,7 @@ typedef struct {
/// TX buffers for UE-spec transmission (antenna ports 5 or 7..14, prior to precoding)
int32_t *txdataF[8];
/// beamforming weights for UE-spec transmission (antenna ports 5 or 7..14), for each codeword, maximum 4 layers?
int32_t **ue_spec_bf_weights[4];
int32_t **ue_spec_bf_weights[4];
/// dl channel estimates (estimated from ul channel estimates)
int32_t **calib_dl_ch_estimates;
/// Allocated RNTI (0 means DLSCH_t is not currently used)
......@@ -413,7 +413,7 @@ typedef struct {
/// is done after a new scheduling
uint16_t previous_first_rb;
/// Current Number of RBs
uint16_t nb_rb;
uint16_t nb_rb;
/// Current Modulation order
uint8_t Qm;
/// Transport block size
......@@ -531,7 +531,7 @@ typedef enum {
HARQ_SR,
HARQ_CQI,
SR_CQI,
HARQ_SR_CQI
HARQ_SR_CQI
} UCI_type_t;
#ifdef Rel14
......@@ -556,7 +556,7 @@ typedef struct {
uint8_t srs_active;
/// PUCCH format to use
PUCCH_FMT_t pucch_fmt;
/// number of PUCCH antenna ports
/// number of PUCCH antenna ports
uint8_t num_antenna_ports;
/// number of PUCCH resources
uint8_t num_pucch_resources;
......@@ -864,11 +864,105 @@ typedef enum {
} RX_type_t;
#ifdef Rel14
typedef enum {
DCI_COMMON_SPACE,
DCI_UE_SPACE
} dci_space_t;
typedef struct {
uint16_t slss_id;
uint8_t *slmib;
} SLSS_t;
typedef struct {
// SL Configuration
/// Number of SL resource blocks (1-100)
uint32_t N_SL_RB;
/// prb-start (0-99)
uint32_t prb_Start;
/// prb-End (0-99)
uint32_t prb_End;
/// SL-OffsetIndicator (0-10239)
uint32_t SL_OffsetIndicator;
/// PSCCH subframe bitmap, first 64-bits (up to 40 bits for Rel 12)
uint64_t bitmap1;
/// PSCCH subframe bitmap, 2nd 64-bits (up to 100 bits for Rel 14)
uint64_t bitmap2;
// SCI parameters
/// npscch resource index
uint32_t n_pscch;
/// format of SCI (0,1)
uint32_t format;
/// SCI0 frequency hopping flag
uint32_t freq_hopping_flag;
/// SCI0 Resource Block Coding
uint32_t resource_block_coding;
/// SCI0 Time Resource Pattern for SLSCH
uint32_t time_resource_pattern;
/// SCI0 MCS for SLSCH
uint32_t mcs;
/// SCI0 Timing advance indication for SLSCH
uint32_t timing_advance_indication;
/// SCI0 Group Destination ID for SLSCH
uint32_t group_destination_id;
// SLSCH Parameters
/// Number of Subbands (36.213 14.1.1.2)
uint32_t Nsb;
/// N_RB_HO (36.213 14.1.1.2)
uint32_t N_RB_HO;
/// n_ss_PSSCH (36.211 9.2.4)
uint32_t n_ss_PSSCH;
/// n_ssf_PSSCH
uint32_t n_ssf_PSSCH;
/// cinit (36.331 hoppingParameter-r12)
uint32_t cinit;
/// redundancy version
uint32_t rvidx;
/// n_prime_VRB (36.213 14.1.1.2.1)
uint32_t n_prime_VRB;
/// M_RB_PSSCH_RP (36.213 14.1.3
uint32_t M_RB_PSSCH_RP;
/// n_prime_PRB (36.213 14.1.1.4
uint32_t n_prime_PRB;
/// m_nprime_PRB_PSSCH (36.213 14.1.3)
uint32_t m_nprime_PRB_PSCCH;
/// payload length
int payload_length;
/// pointer to payload
uint8_t *payload;
} SLSCH_t;
typedef struct {
/// payload length
int payload_length;
uint8_t payload[100];
} SLDCH_t;
#define TTI_SYNC 0
#define SLSS 1
#define SLDCH 2
#define SLSCH 3
typedef struct UE_tport_header_s {
int packet_type;
uint16_t absSF;
} UE_tport_header_t;
typedef struct UE_tport_s {
UE_tport_header_t header;
union {
SLSS_t slss;
SLDCH_t sldch;
SLSCH_t slsch;
};
uint8_t payload[1500];
} UE_tport_t;
#endif
/**@}*/
#endif
......@@ -1504,6 +1504,29 @@ uint8_t generate_dci_top_emul(PHY_VARS_eNB *phy_vars_eNB,
DCI_ALLOC_t *dci_alloc,
uint8_t subframe);
/*! \brief Top-level generation route for Sidelink BCH,PSS and SSS
\param ue pointer to UE descriptor
\param slss pointer to SLSS configuration and payload
\param frame_tx Frame number
\param subframe_tx subframe number
*/
void generate_slss(PHY_VARS_UE *ue,SLSS_t *slss,int frame_tx,int subframe_tx);
/*! \brief Top-level generation route for Sidelink Discovery Channel
\param ue pointer to UE descriptor
\param sldch pointer to SLDCH configuration and payload
\param frame_tx Frame number
\param subframe_tx subframe number
*/
void generate_sldch(PHY_VARS_UE *ue,SLDCH_t *sldch,int frame_tx,int subframe_tx);
/*! \brief Top-level generation route for Sidelink Shared Channel
\param ue pointer to UE descriptor
\param slsch pointer to SLSCH configuration and payload
\param frame_tx Frame number
\param subframe_tx subframe number
*/
void generate_slsch(PHY_VARS_UE *ue,SLSCH_t *slss,int frame_tx,int subframe_tx);
void generate_64qam_table(void);
void generate_16qam_table(void);
......
......@@ -1278,7 +1278,7 @@ uint16_t pucchfmt3_ChannelEstimation( int16_t SubCarrierDeMapData[NB_ANTENNAS_RX
int32_t IP_CsData_allsfavg[NB_ANTENNAS_RX][14][4][2];
int32_t IP_allavg[D_NPUCCH_SF5];
//int16_t temp_ch[2];
int16_t m[NUMBER_OF_UE_MAX], m_self, same_m_number;
int16_t m[NUMBER_OF_UE_MAX], m_self=0, same_m_number;
uint16_t n3_pucch_sameRB[NUMBER_OF_UE_MAX];
int16_t n_oc0[NUMBER_OF_UE_MAX];
int16_t n_oc1[NUMBER_OF_UE_MAX];
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/slss.c
* \brief Functions to Generate and Receive PSDCH
* \author R. Knopp
* \date 2017
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr
* \note
* \warning
*/
#ifndef __LTE_TRANSPORT_SLSS__C__
#define __LTE_TRANSPORT_SLSS__C__
#include "PHY/defs.h"
extern int multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP);
void generate_sldch(PHY_VARS_UE *ue,SLDCH_t *sldch,int frame_tx,int subframe_tx) {
UE_tport_t pdu;
size_t sldch_header_len = sizeof(UE_tport_header_t);
pdu.header.packet_type = SLDCH;
pdu.header.absSF = (frame_tx*10)+subframe_tx;
AssertFatal(sldch->payload_length <=1500-sldch_header_len - sizeof(SLDCH_t) + sizeof(uint8_t*),
"SLDCH payload length > %d\n",
1500-sldch_header_len - sizeof(SLDCH_t) + sizeof(uint8_t*));
memcpy((void*)&pdu.sldch,
(void*)sldch,
sizeof(SLDCH_t));
LOG_I(PHY,"SLDCH configuration %d bytes, TBS payload %d bytes => %d bytes\n",
sizeof(SLDCH_t)-sizeof(uint8_t*),
sldch->payload_length,
sldch_header_len+sizeof(SLDCH_t)-sizeof(uint8_t*)+sldch->payload_length);
multicast_link_write_sock(0,
&pdu,
sldch_header_len+sizeof(SLDCH_t));
}
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/slss.c
* \brief Functions to Generate and Receive PSSCH
* \author R. Knopp
* \date 2017
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr
* \note
* \warning
*/
#ifndef __LTE_TRANSPORT_SLSS__C__
#define __LTE_TRANSPORT_SLSS__C__
#include "PHY/defs.h"
extern int
multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP);
void generate_slsch(PHY_VARS_UE *ue,SLSCH_t *slsch,int frame_tx,int subframe_tx) {
UE_tport_t pdu;
size_t slsch_header_len = sizeof(UE_tport_header_t);
if (slsch->rvidx==0) {
pdu.header.packet_type = SLSCH;
pdu.header.absSF = (frame_tx*10)+subframe_tx;
memcpy((void*)&pdu.slsch,(void*)slsch,sizeof(SLSCH_t)-sizeof(uint8_t*));
AssertFatal(slsch->payload_length <=1500-slsch_header_len - sizeof(SLSCH_t) + sizeof(uint8_t*),
"SLSCH payload length > %d\n",
1500-slsch_header_len - sizeof(SLSCH_t) + sizeof(uint8_t*));
memcpy((void*)&pdu.payload[0],
(void*)slsch->payload,
slsch->payload_length);
LOG_I(PHY,"SLSCH configuration %d bytes, TBS payload %d bytes => %d bytes\n",
sizeof(SLSCH_t)-sizeof(uint8_t*),
slsch->payload_length,
slsch_header_len+sizeof(SLSCH_t)-sizeof(uint8_t*)+slsch->payload_length);
multicast_link_write_sock(0,
&pdu,
slsch_header_len+sizeof(SLSCH_t)-sizeof(uint8_t*)+slsch->payload_length);
}
}
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/slss.c
* \brief Functions to Generate and Received Sidelink PSS,SSS and PSBCH
* \author R. Knopp
* \date 2017
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr
* \note
* \warning
*/
#ifndef __LTE_TRANSPORT_SLSS__C__
#define __LTE_TRANSPORT_SLSS__C__
#include "PHY/defs.h"
void generate_slss(PHY_VARS_UE *ue,SLSS_t *slss,int frame_tx,int subframe_tx) {
AssertFatal(1==0,"Should get here yet for UE %d\n",ue->Mod_id);
}
#endif
......@@ -58,6 +58,7 @@
#include "msc.h"
#include "openair2/PHY_INTERFACE/IF_Module.h"
//#include "openair2/PHY_INTERFACE/IF_Module_UE.h"
//#include <complex.h>
#include "assertions.h"
......@@ -142,6 +143,8 @@ static inline void* malloc16_clear( size_t size )
#include "targets/ARCH/COMMON/common_lib.h"
#include "targets/COMMON/openairinterface5g_limits.h"
#include "openair2/LAYER2/MAC/defs.h"
#if defined(EXMIMO) || defined(OAI_USRP)
//#define NUMBER_OF_eNB_MAX 1
//#define NUMBER_OF_UE_MAX 16
......@@ -695,6 +698,22 @@ typedef struct {
UE_rxtx_proc_t proc_rxtx[RX_NB_TH];
} UE_proc_t;
/// Panos: Structure holding timer_thread related elements (phy_stub_UE mode)
typedef struct{
pthread_t pthread_timer;
/// Panos: mutex for waiting SF ticking
pthread_mutex_t mutex_ticking;
/// Panos: \brief ticking var for ticking thread.
/// \internal This variable is protected by \ref mutex_ticking.
int ticking_var;
/// condition variable for timer_thread;
pthread_cond_t cond_ticking;
//time_stats_t timer_stats;
}SF_ticking;
typedef enum {
LOCAL_RF =0,
REMOTE_IF5 =1,
......@@ -1497,6 +1516,11 @@ typedef struct {
time_stats_t dlsch_tc_intl1_stats;
time_stats_t dlsch_tc_intl2_stats;
time_stats_t tx_prach;
time_stats_t timer_stats;
pthread_mutex_t timer_mutex;
pthread_cond_t timer_cond;
int instance_cnt_timer;
/// RF and Interface devices per CC
......@@ -1666,6 +1690,25 @@ static inline void wait_sync(char *thread_name) {
}
static inline int wakeup_thread(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "error locking mutex for %s\n",name);
exit_fun("nothing to add");
return(-1);
}
*instance_cnt = *instance_cnt + 1;
// the thread can now be woken up
if (pthread_cond_signal(cond) != 0) {
LOG_E( PHY, "ERROR pthread_cond_signal\n");
exit_fun( "ERROR pthread_cond_signal" );
return(-1);
}
pthread_mutex_unlock(mutex);
return(0);
}
static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
if (pthread_mutex_lock(mutex) != 0) {
LOG_E( PHY, "[SCHED][eNB] error locking mutex for %s\n",name);
......@@ -1717,6 +1760,8 @@ static inline int release_thread(pthread_mutex_t *mutex,int *instance_cnt,char *
return(-1);
}
//LOG_D(PHY, "%s() name:%s instance_cnt:%u - about to decrement\n", __FUNCTION__, name, *instance_cnt);
*instance_cnt=*instance_cnt-1;
if (pthread_mutex_unlock(mutex) != 0) {
......
......@@ -272,7 +272,7 @@ typedef struct {
/// Measurement Variables
#define NUMBER_OF_SUBBANDS_MAX 13
//#define NUMBER_OF_SUBBANDS_MAX 13
#define NUMBER_OF_HARQ_PID_MAX 8
#define MAX_FRAME_NUMBER 0x400
......
......@@ -140,6 +140,19 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t
@param phy_vars_rn pointer to RN variables
*/
int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode,relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn);
/*! \brief Scheduling for UE Sidelink RX procedures in normal subframes.
@param ue Pointer to UE variables on which to act
@param proc Pointer to RXn_TXnp4 proc information
*/
void phy_procedures_UE_SL_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc);
/*! \brief Scheduling for UE Sidelink TX procedures in normal subframes.
@param ue Pointer to UE variables on which to act
@param proc Pointer to RXn_TXnp4 proc information
*/
void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc);
int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode,
relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn);
......
......@@ -35,6 +35,7 @@
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "nfapi_interface.h"
#include "nfapi_pnf_interface.h"
#include "fapi_l1.h"
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req);
......@@ -844,3 +845,25 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
}
}
}
/*Dummy functions*/
int memcpy_dl_config_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request_t* req)
{
return 0;
}
int memcpy_ul_config_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request_t* req)
{
return 0;
}
int memcpy_hi_dci0_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t* req)
{
return 0;
}
int memcpy_tx_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req)
{
return 0;
}
......@@ -506,6 +506,7 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id
{
int Mod_id = ue->Mod_id;
int CC_id = ue->CC_id;
// Panos: Substitute call to ue_get_SR() with the filled ue_SR_config->SR_payload (0, or 1).
SR_payload = ue_get_SR(Mod_id,
CC_id,
frame_tx,
......@@ -1454,8 +1455,6 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->tx_power_dBm[subframe_tx],
dB_fixed(prach_power),
ue->prach_vars[eNB_id]->amp);
if (ue->mac_enabled==1){
Msg1_transmitted(ue->Mod_id,
......@@ -1754,6 +1753,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
if (ue->ulsch[eNB_id]->harq_processes[harq_pid]->round==0) {
//if (ue->ulsch[eNB_id]->harq_processes[harq_pid]->calibration_flag == 0) {
access_mode=SCHEDULED_ACCESS;
ue_get_sdu(Mod_id,
CC_id,
frame_tx,
......@@ -2333,6 +2333,27 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
}
void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
int subframe_tx = proc->subframe_tx;
int frame_tx = proc->frame_tx;
SLSS_t *slss;
SLDCH_t *sldch;
SLSCH_t *slsch;
LOG_D(PHY,"****** start Sidelink TX-Chain for AbsSubframe %d.%d ******\n", frame_tx, subframe_tx);
// check for SLBCH/SLSS
if ((slss = ue_get_slss(ue->Mod_id,ue->CC_id,frame_tx,subframe_tx)) != NULL) generate_slss(ue,slss,frame_tx,subframe_tx);
// check for SLDCH
if ((sldch = ue_get_sldch(ue->Mod_id,ue->CC_id,frame_tx,subframe_tx)) != NULL) generate_sldch(ue,sldch,frame_tx,subframe_tx);
// check for SLSCH
if ((slsch = ue_get_slsch(ue->Mod_id,ue->CC_id,frame_tx,subframe_tx)) != NULL) generate_slsch(ue,slsch,frame_tx,subframe_tx);
}
void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,runmode_t mode,relaying_type_t r_type) {
......@@ -2727,6 +2748,7 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uin
ue->pbch_vars[eNB_id]->pdu_errors_conseq++;
ue->pbch_vars[eNB_id]->pdu_errors++;
// Panos: Substitute call to rrc_out_of_sync_ind() with fill_bch_incication(sync=0).
if (ue->mac_enabled == 1) rrc_out_of_sync_ind(ue->Mod_id,frame_rx,eNB_id);
else AssertFatal(ue->pbch_vars[eNB_id]->pdu_errors_conseq<100,
"More that 100 consecutive PBCH errors! Exiting!\n");
......@@ -2747,6 +2769,8 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uin
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES, VCD_FUNCTION_OUT);
}
int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t abstraction_flag)
{
......@@ -3397,6 +3421,7 @@ void process_rar(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, runmode_t mo
subframe_rx,
ue->prach_resources[eNB_id]->ra_PreambleIndex);
// Panos: Substitute call to ue_process_rar() with call to fill_dlsch_rar_indication()
timing_advance = ue_process_rar(ue->Mod_id,
ue->CC_id,
frame_rx,
......@@ -3727,6 +3752,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
switch (pdsch) {
case PDSCH:
// Panos: Substitute call to ue_send_sdu() with call to fill_dlsch_indication()
ue_send_sdu(ue->Mod_id,
CC_id,
frame_rx,
......@@ -3736,6 +3762,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
eNB_id);
break;
case SI_PDSCH:
// Panos: Substitute call with call to fill_dlsch_indication()
ue_decode_si(ue->Mod_id,
CC_id,
frame_rx,
......@@ -3744,7 +3771,8 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
break;
case P_PDSCH:
ue_decode_p(ue->Mod_id,
// Panos: Substitute call with call to fill_dlsch_indication()
ue_decode_p(ue->Mod_id,
CC_id,
frame_rx,
eNB_id,
......@@ -3752,6 +3780,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
break;
case RA_PDSCH:
// Panos: Substitute with call to fill_dlsch_rar_indication()
process_rar(ue,proc,eNB_id,mode,abstraction_flag);
break;
case PDSCH1:
......@@ -4654,6 +4683,11 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
#endif
void phy_procedures_UE_SL_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
}
int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode,
relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn) {
......
......@@ -35,6 +35,8 @@
#include "PHY/LTE_TRANSPORT/proto.h"
#include "PHY/extern.h"
extern uint8_t nfapi_mode;
// This is the formula from Section 5.1.1.1 in 36.213 100*10*log10((2^(MPR*Ks)-1)), where MPR is in the range [0,6] and Ks=1.25
int16_t hundred_times_delta_TF[100] = {-32768,-1268,-956,-768,-631,-523,-431,-352,-282,-219,-161,-107,-57,-9,36,79,120,159,197,234,269,304,337,370,402,434,465,495,525,555,583,612,640,668,696,723,750,777,803,829,856,881,907,933,958,983,1008,1033,1058,1083,1108,1132,1157,1181,1205,1229,1254,1278,1302,1325,1349,1373,1397,1421,1444,1468,1491,1515,1538,1562,1585,1609,1632,1655,1679,1702,1725,1748,1772,1795,1818,1841,1864,1887,1910,1933,1956,1980,2003,2026,2049,2072,2095,2118,2141,2164,2186,2209,2232,2255};
uint16_t hundred_times_log10_NPRB[100] = {0,301,477,602,698,778,845,903,954,1000,1041,1079,1113,1146,1176,1204,1230,1255,1278,1301,1322,1342,1361,1380,1397,1414,1431,1447,1462,1477,1491,1505,1518,1531,1544,1556,1568,1579,1591,1602,1612,1623,1633,1643,1653,1662,1672,1681,1690,1698,1707,1716,1724,1732,1740,1748,1755,1763,1770,1778,1785,1792,1799,1806,1812,1819,1826,1832,1838,1845,1851,1857,1863,1869,1875,1880,1886,1892,1897,1903,1908,1913,1919,1924,1929,1934,1939,1944,1949,1954,1959,1963,1968,1973,1977,1982,1986,1991,1995,2000};
......@@ -201,7 +203,10 @@ void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_
int8_t get_PHR(uint8_t Mod_id, uint8_t CC_id,uint8_t eNB_index)
{
return PHY_vars_UE_g[Mod_id][CC_id]->ulsch[eNB_index]->PHR;
if(nfapi_mode!=3)
return PHY_vars_UE_g[Mod_id][CC_id]->ulsch[eNB_index]->PHR;
else
return 40; // For nfapi_mode=3 consider ideal conditions
}
// uint8_t eNB_id,uint8_t harq_pid, uint8_t UE_id,
......
......@@ -113,7 +113,7 @@ multicast_link_init(void)
if (multicast_if != NULL) {
if (setsockopt(group_list[group].socket, SOL_SOCKET,SO_BINDTODEVICE,
multicast_if, 4) < 0) {
multicast_if, strlen(multicast_if)) < 0) {
LOG_E(EMU,
"[MULTICAST] ERROR : setsockopt:SO_BINDTODEVICE on interface %s, exiting ...\n",
multicast_if);
......
......@@ -364,10 +364,20 @@ typedef struct {
struct PMCH_InfoList_r9 *pmch_InfoList
#endif
);
unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char*);
unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char*
#ifdef Rel14
,uint32_t
,uint32_t
#endif
);
void (*mac_rlc_data_ind)(module_id_t, logical_chan_id_t, char*, tb_size_t, num_tb_t, crc_t* );
mac_rlc_status_resp_t (*mac_rlc_status_ind) (module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, sub_frame_t subframeP, eNB_flag_t eNB_flagP, MBMS_flag_t MBMS_flagP,
logical_chan_id_t channel_idP, tb_size_t tb_sizeP);
logical_chan_id_t channel_idP, tb_size_t tb_sizeP
#ifdef Rel14
,uint32_t sourceL2Id
,uint32_t destinationL2Id
#endif
);
signed int (*rrc_rlc_data_req)(module_id_t, rb_id_t, mui_t, confirm_t, sdu_size_t, char *);
void (*rrc_rlc_register_rrc) (void (*rrc_data_indP)(module_id_t , rb_id_t , sdu_size_t , char* ),
void (*rrc_data_confP) (module_id_t , rb_id_t , mui_t ) ) ;
......
......@@ -88,6 +88,10 @@ typedef boolean_t srb_flag_t;
#define SRB_FLAG_NO FALSE
#define SRB_FLAG_YES TRUE
typedef boolean_t sl_discovery_flag_t;
#define SL_DISCOVERY_FLAG_NO FALSE
#define SL_DISCOVERY_FLAG_YES TRUE
typedef enum link_direction_e {
UNKNOWN_DIR = 0,
DIR_UPLINK = 1,
......@@ -164,7 +168,9 @@ typedef enum ip_traffic_type_e {
TRAFFIC_IPV4_TYPE_UNICAST = 5,
TRAFFIC_IPV4_TYPE_MULTICAST = 6,
TRAFFIC_IPV4_TYPE_BROADCAST = 7,
TRAFFIC_IPV4_TYPE_UNKNOWN = 8
TRAFFIC_IPV4_TYPE_UNKNOWN = 8,
TRAFFIC_PC5S_SIGNALLING = 9,
TRAFFIC_PC5S_SESSION_INIT = 10
} ip_traffic_type_t;
//-----------------------------------------------------------------------------
......
......@@ -37,6 +37,12 @@
#else
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
#endif
#include "SL-OffsetIndicator-r12.h"
#include "SubframeBitmapSL-r12.h"
#include "SL-CP-Len-r12.h"
#include "SL-PeriodComm-r12.h"
#include "SL-DiscResourcePool-r12.h"
//-------------------------------------------------------------------------------------------//
// Messages for RRC logging
......@@ -168,6 +174,56 @@ typedef struct RrcConfigurationReq_s {
long ue_TimersAndConstants_n310[MAX_NUM_CCs];
long ue_TimersAndConstants_n311[MAX_NUM_CCs];
long ue_TransmissionMode[MAX_NUM_CCs];
//TTN - for D2D
//SIB18
e_SL_CP_Len_r12 rxPool_sc_CP_Len[MAX_NUM_CCs];
e_SL_PeriodComm_r12 rxPool_sc_Period[MAX_NUM_CCs];
e_SL_CP_Len_r12 rxPool_data_CP_Len[MAX_NUM_CCs];
long rxPool_ResourceConfig_prb_Num[MAX_NUM_CCs];
long rxPool_ResourceConfig_prb_Start[MAX_NUM_CCs];
long rxPool_ResourceConfig_prb_End[MAX_NUM_CCs];
SL_OffsetIndicator_r12_PR rxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long rxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
SubframeBitmapSL_r12_PR rxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
long rxPool_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
long rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
//SIB19
//for discRxPool
SL_CP_Len_r12_t discRxPool_cp_Len[MAX_NUM_CCs];
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPool_discPeriod[MAX_NUM_CCs];
long discRxPool_numRetx[MAX_NUM_CCs];
long discRxPool_numRepetition[MAX_NUM_CCs];
long discRxPool_ResourceConfig_prb_Num[MAX_NUM_CCs];
long discRxPool_ResourceConfig_prb_Start[MAX_NUM_CCs];
long discRxPool_ResourceConfig_prb_End[MAX_NUM_CCs];
SL_OffsetIndicator_r12_PR discRxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long discRxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
SubframeBitmapSL_r12_PR discRxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
//for discRxPoolPS
SL_CP_Len_r12_t discRxPoolPS_cp_Len[MAX_NUM_CCs];
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPoolPS_discPeriod[MAX_NUM_CCs];
long discRxPoolPS_numRetx[MAX_NUM_CCs];
long discRxPoolPS_numRepetition[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_prb_Num[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_prb_Start[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_prb_End[MAX_NUM_CCs];
SL_OffsetIndicator_r12_PR discRxPoolPS_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
SubframeBitmapSL_r12_PR discRxPoolPS_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
} RrcConfigurationReq;
#define MAX_NUM_NBIOT_CELEVELS 3
typedef struct NbIoTRrcConfigurationReq_s {
......
This diff is collapsed.
......@@ -97,6 +97,7 @@ extern void RCconfig_RU(void);
extern void RCconfig_flexran(void);
extern void RCconfig_L1(void);
extern void RCconfig_macrlc(void);
extern void UE_config_stub_pnf(void);
extern int RCconfig_gtpu(void );
extern void RCConfig(void);
......
This diff is collapsed.
......@@ -140,7 +140,11 @@ rlc_buffer_occupancy_t flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logi
rnti_t rnti = flexran_get_ue_crnti(mod_id, ue_id);
frame_t frame = flexran_get_current_frame(mod_id);
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0
#ifdef Rel14
,0, 0
#endif
);
return rlc_status.bytes_in_buffer;
}
......@@ -149,7 +153,11 @@ rlc_buffer_occupancy_t flexran_get_num_pdus_buffer(mid_t mod_id, mid_t ue_id, lo
rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
frame_t frame = flexran_get_current_frame(mod_id);
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0
#ifdef Rel14
,0, 0
#endif
);
return rlc_status.pdus_in_buffer;
}
......@@ -158,7 +166,11 @@ frame_t flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t chann
rnti_t rnti = flexran_get_ue_crnti(mod_id,ue_id);
frame_t frame = flexran_get_current_frame(mod_id);
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0
#ifdef Rel14
,0, 0
#endif
);
return rlc_status.head_sdu_creation_time;
}
......
......@@ -60,6 +60,8 @@
extern void mac_init_cell_params(int Mod_idP,int CC_idP);
extern void phy_reset_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
extern uint8_t nfapi_mode;
/* sec 5.9, 36.321: MAC Reset Procedure */
void ue_mac_reset(module_id_t module_idP, uint8_t eNB_index)
......@@ -134,6 +136,11 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
#endif
#ifdef CBA
, uint8_t num_active_cba_groups, uint16_t cba_rnti
#endif
#if defined(Rel14)
,config_action_t config_action
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
#endif
)
{
......@@ -228,9 +235,10 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
(uint16_t)
MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
}
phy_config_harq_ue(Mod_idP, 0, eNB_index,
UE_mac_inst[Mod_idP].
scheduling_info.maxHARQ_Tx);
if(nfapi_mode!=3)
phy_config_harq_ue(Mod_idP, 0, eNB_index,
UE_mac_inst[Mod_idP].
scheduling_info.maxHARQ_Tx);
if (mac_MainConfig->ul_SCH_Config->retxBSR_Timer) {
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
......@@ -348,8 +356,9 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
if (physicalConfigDedicated != NULL) {
phy_config_dedicated_ue(Mod_idP, 0, eNB_index,
physicalConfigDedicated);
if(nfapi_mode!=3)
phy_config_dedicated_ue(Mod_idP, 0, eNB_index,
physicalConfigDedicated);
UE_mac_inst[Mod_idP].physicalConfigDedicated = physicalConfigDedicated; // for SR proc
}
#if defined(Rel10) || defined(Rel14)
......@@ -579,6 +588,34 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
//for D2D
#if defined(Rel10) || defined(Rel14)
switch (config_action) {
case CONFIG_ACTION_ADD:
if (sourceL2Id){
UE_mac_inst[Mod_idP].sourceL2Id = *sourceL2Id;
LOG_I(MAC,"[UE %d] Configure source L2Id 0x%08x \n", Mod_idP, *sourceL2Id );
}
if (destinationL2Id) {
LOG_I(MAC,"[UE %d] Configure destination L2Id 0x%08x\n", Mod_idP, *destinationL2Id );
int j = 0;
int i = 0;
for (i=0; i< MAX_NUM_DEST; i++) {
if ((UE_mac_inst[Mod_idP].destinationList[i] == 0) && (j == 0)) j = i+1;
if (UE_mac_inst[Mod_idP].destinationList[i] == *destinationL2Id) break; //destination already exists!
}
if ((i == MAX_NUM_DEST) && (j > 0)) UE_mac_inst[Mod_idP].destinationList[j-1] = *destinationL2Id;
UE_mac_inst[Mod_idP].numCommFlows++;
}
break;
case CONFIG_ACTION_REMOVE:
//TODO
break;
default:
break;
}
#endif
return (0);
}
This diff is collapsed.
This diff is collapsed.
......@@ -174,9 +174,9 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
ra->Msg3_subframe);
LOG_D(MAC,
"Frame %d, Subframe %d Adding Msg3 UL Config Request for (%d,%d) : (%d,%d,%d)\n",
"Frame %d, Subframe %d Adding Msg3 UL Config Request for (%d,%d) : (%d,%d,%d) for rnti: %d\n",
frameP, subframeP, ra->Msg3_frame, ra->Msg3_subframe,
ra->msg3_nb_rb, ra->msg3_first_rb, ra->msg3_round);
ra->msg3_nb_rb, ra->msg3_first_rb, ra->msg3_round, ra->rnti);
ul_config_pdu = &ul_req_body->ul_config_pdu_list[ul_req_body->number_of_pdus];
......@@ -698,7 +698,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
else
ra->harq_pid = ((frameP * 10) + subframeP) & 7;
// Get RRCConnectionSetup for Piggyback
/* // Get RRCConnectionSetup for Piggyback
rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case
......@@ -708,7 +708,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n",
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);*/
#ifdef Rel14
......@@ -817,6 +817,20 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
// Program PDSCH
// Get RRCConnectionSetup for Piggyback
/*rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], ENB_FLAG_YES, module_idP, 0); // not used in this case*/
rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case
LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n",
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);
AssertFatal(rrc_sdu_length > 0,
"[MAC][eNB Scheduler] CCCH not allocated\n");
LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 BR with RRC Piggyback (ce_level %d RNTI %x)\n",
module_idP, CC_idP, frameP, subframeP,
......@@ -978,8 +992,27 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
} // rach_resource_type > 0
else
#endif
{ // This is normal LTE case
if ((ra->Msg4_frame == frameP) && (ra->Msg4_subframe == subframeP)) {
{
// This is normal LTE case
LOG_D(MAC, "Panos-D: generate_Msg4 1 ra->Msg4_frame SFN/SF: %d.%d, frameP SFN/SF: %d.%d FOR eNB_Mod: %d \n", ra->Msg4_frame, ra->Msg4_subframe, frameP, subframeP, module_idP);
if ((ra->Msg4_frame == frameP) && (ra->Msg4_subframe == subframeP)) {
// Get RRCConnectionSetup for Piggyback
/*rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], ENB_FLAG_YES, module_idP, 0); // not used in this case*/
rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH, 1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case
LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n",
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);
AssertFatal(rrc_sdu_length > 0,
"[MAC][eNB Scheduler] CCCH not allocated, rrc_sdu_length: %d\n", rrc_sdu_length);
LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 with RRC Piggyback (RNTI %x)\n",
module_idP, CC_idP, frameP, subframeP, ra->rnti);
......@@ -1233,8 +1266,8 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth);
LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Checking if Msg4 for harq_pid %d was acknowledged (round %d)\n",
module_idP, CC_idP, frameP, subframeP, ra->harq_pid, round);
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Checking if Msg4 for harq_pid %d was acknowledged (round %d), UE_id: %d \n",
module_idP, CC_idP, frameP, subframeP, ra->harq_pid, round, UE_id);
if (round != 8) {
......@@ -1283,6 +1316,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
ra->rnti, round, frameP, subframeP);
// DLSCH Config
//DJP - fix this pdu_index = -1
LOG_D(MAC, "Panos:D: check_Msg4_retransmission() before fill_nfapi_dlsch_config() with pdu_index = -1 \n");
fill_nfapi_dlsch_config(mac, dl_req_body, ra->msg4_TBsize,
-1
/* retransmission, no pdu_index */
......
......@@ -84,7 +84,6 @@ schedule_SIB1_BR(module_id_t module_idP,
frame_t frameP, sub_frame_t subframeP)
//------------------------------------------------------------------------------
{
int8_t bcch_sdu_length;
int CC_id;
eNB_MAC_INST *eNB = RC.mac[module_idP];
......@@ -509,7 +508,6 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
void
schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
{
eNB_MAC_INST *eNB = RC.mac[module_idP];
COMMON_channels_t *cc;
nfapi_dl_config_request_pdu_t *dl_config_pdu;
......
......@@ -1007,7 +1007,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
// RLC data on DCCH
if (TBS - ta_len - header_length_total - sdu_length_total - 3 > 0) {
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH,
TBS - ta_len - header_length_total - sdu_length_total - 3);
TBS - ta_len - header_length_total - sdu_length_total - 3
#ifdef Rel14
,0, 0
#endif
);
sdu_lengths[0] = 0;
......@@ -1018,7 +1022,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
sdu_lengths[0] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH,
TBS, //not used
(char *)&dlsch_buffer[0]);
(char *)&dlsch_buffer[0]
#ifdef Rel14
,0, 0
#endif
);
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
T_INT(CC_id), T_INT(rnti), T_INT(frameP),
......@@ -1057,7 +1065,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
// RLC data on DCCH1
if (TBS - ta_len - header_length_total - sdu_length_total - 3 > 0) {
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1,
TBS - ta_len - header_length_total - sdu_length_total - 3);
TBS - ta_len - header_length_total - sdu_length_total - 3
#ifdef Rel14
,0, 0
#endif
);
// DCCH SDU
sdu_lengths[num_sdus] = 0;
......@@ -1069,7 +1081,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
sdu_lengths[num_sdus] += mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1,
TBS, //not used
(char *)&dlsch_buffer[sdu_length_total]);
(char *)&dlsch_buffer[sdu_length_total]
#ifdef Rel14
,0, 0
#endif
);
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
T_INT(CC_id), T_INT(rnti), T_INT(frameP),
......@@ -1099,6 +1115,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
LOG_T(MAC, "\n");
#endif
}
}
......@@ -1119,7 +1136,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
ENB_FLAG_YES,
MBMS_FLAG_NO,
lcid,
TBS - ta_len - header_length_total - sdu_length_total - 3);
TBS - ta_len - header_length_total - sdu_length_total - 3
#ifdef Rel14
,0, 0
#endif
);
......@@ -1133,7 +1154,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, lcid,
TBS, //not used
(char *)&dlsch_buffer[sdu_length_total]);
(char *)&dlsch_buffer[sdu_length_total]
#ifdef Rel14
,0, 0
#endif
);
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
T_INT(CC_id), T_INT(rnti), T_INT(frameP),
......@@ -1505,7 +1530,6 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
} // CC_id loop
fill_DLSCH_dci(module_idP, frameP, subframeP, mbsfn_flag);
stop_meas(&eNB->schedule_dlsch);
......
......@@ -635,7 +635,12 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
module_idP, ENB_FLAG_YES, MBMS_FLAG_YES,
MTCH,
TBS - header_len_mcch - header_len_msi -
sdu_length_total - header_len_mtch);
sdu_length_total - header_len_mtch
#ifdef Rel14
,0, 0
#endif
);
LOG_D(MAC,
"e-MBMS log channel %u frameP %d, subframeP %d, rlc_status.bytes_in_buffer is %d\n",
MTCH, frameP, subframeP, rlc_status.bytes_in_buffer);
......@@ -649,8 +654,14 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, 0, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_YES, MTCH, 0, //not used
(char *)
&mch_buffer
[sdu_length_total]);
&mch_buffer[sdu_length_total]
#ifdef Rel14
,0,
0
#endif
);
//sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,frameP, MBMS_FLAG_NO, MTCH+(MAX_NUM_RB*(NUMBER_OF_UE_MAX+1)), (char*)&mch_buffer[sdu_length_total]);
LOG_I(MAC,
"[eNB %d][MBMS USER-PLANE] CC_id %d Got %d bytes for MTCH %d\n",
......
......@@ -128,13 +128,19 @@ store_dlsch_buffer(module_id_t Mod_id, slice_id_t slice_id, frame_t frameP,
UE_template->dl_buffer_head_sdu_remaining_size_to_send[i] = 0;
}
rnti = UE_RNTI(Mod_id, UE_id);
for (i = 0; i < MAX_NUM_LCID; i++) { // loop over all the logical channels
rlc_status =
mac_rlc_status_ind(Mod_id, rnti, Mod_id, frameP, subframeP,
ENB_FLAG_YES, MBMS_FLAG_NO, i, 0);
ENB_FLAG_YES, MBMS_FLAG_NO, i, 0
#ifdef Rel14
,0, 0
#endif
);
UE_template->dl_buffer_info[i] = rlc_status.bytes_in_buffer; //storing the dlsch buffer for each logical channel
UE_template->dl_pdus_in_buffer[i] = rlc_status.pdus_in_buffer;
UE_template->dl_buffer_head_sdu_creation_time[i] =
......@@ -211,7 +217,6 @@ assign_rbs_required(module_id_t Mod_id,
//update CQI information across component carriers
for (n = 0; n < UE_list->numactiveCCs[UE_id]; n++) {
CC_id = UE_list->ordered_CCids[n][UE_id];
eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id];
......@@ -1192,7 +1197,6 @@ dlsch_scheduler_pre_processor_reset(int module_idP,
&ue_sched_ctl->round[CC_id],
openair_harq_DL);
if (ue_sched_ctl->ta_timer == 0) {
// WE SHOULD PROTECT the eNB_UE_stats with a mutex here ...
......
......@@ -520,6 +520,15 @@ void ue_send_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frame,
sub_frame_t subframe, uint8_t * sdu, uint16_t sdu_len,
uint8_t CH_index);
void ue_send_sl_sdu(module_id_t module_idP,
uint8_t CC_id,
frame_t frameP,
sub_frame_t subframeP,
uint8_t* sdu,
uint16_t sdu_len,
uint8_t eNB_index,
sl_discovery_flag_t sl_discovery_flag
);
#if defined(Rel10) || defined(Rel14)
/* \brief Called by PHY to transfer MCH transport block to ue MAC.
......@@ -553,13 +562,36 @@ int ue_query_mch(uint8_t Mod_id, uint8_t CC_id, uint32_t frame,
@param eNB_id Index of eNB that UE is attached to
@param rnti C_RNTI of UE
@param subframe subframe number
@returns 0 for no SR, 1 for SR
*/
void ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
sub_frame_t subframe, uint8_t eNB_index,
uint8_t * ulsch_buffer, uint16_t buflen,
uint8_t * access_mode);
/* \brief Called by PHY to get sdu for PSBCH/SSS/PSS transmission.
@param Mod_id Instance id of UE in machine
@param frame_tx TX frame index
@param subframe_tx TX subframe index
@returns pointer to SLSS_t descriptor
*/
SLSS_t *ue_get_slss(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframe);
/* \brief Called by PHY to get sdu for PSDCH transmission.
@param Mod_id Instance id of UE in machine
@param frame_tx TX frame index
@param subframe_tx TX subframe index
@returns pointer to SLDCH_t descriptor
*/
SLDCH_t *ue_get_sldch(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframe);
/* \brief Called by PHY to get sdu for PSSCH transmission.
@param Mod_id Instance id of UE in machine
@param frame_tx TX frame index
@param subframe_tx TX subframe index
@returns pointer to SLSCH_t descriptor
*/
SLSCH_t *ue_get_slsch(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframe);
/* \brief Function called by PHY to retrieve information to be transmitted using the RA procedure. If the UE is not in PUSCH mode for a particular eNB index, this is assumed to be an Msg3 and MAC attempts to retrieves the CCCH message from RRC. If the UE is in PUSCH mode for a particular eNB index and PUCCH format 0 (Scheduling Request) is not activated, the MAC may use this resource for random-access to transmit a BSR along with the C-RNTI control element (see 5.1.4 from 36.321)
@param Mod_id Index of UE instance
@param Mod_id Component Carrier Index
......@@ -996,7 +1028,13 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
,
uint8_t num_active_cba_groups, uint16_t cba_rnti
#endif
);
#if defined(Rel14)
,config_action_t config_action
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
#endif
);
uint16_t getRIV(uint16_t N_RB_DL, uint16_t RBstart, uint16_t Lcrbs);
......
......@@ -49,7 +49,11 @@
#include "SIMULATION/TOOLS/defs.h" // for taus
int8_t get_DELTA_PREAMBLE(module_id_t module_idP, int CC_id)
extern uint8_t nfapi_mode;
extern UE_MODE_t get_ue_mode(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
int8_t get_DELTA_PREAMBLE(module_id_t module_idP,int CC_id)
{
AssertFatal(CC_id == 0,
......@@ -105,7 +109,6 @@ get_prach_resources(module_id_t module_idP,
uint8_t first_Msg3,
RACH_ConfigDedicated_t * rach_ConfigDedicated)
{
uint8_t Msg3_size = UE_mac_inst[module_idP].RA_Msg3_size;
PRACH_RESOURCES_t *prach_resources =
&UE_mac_inst[module_idP].RA_prach_resources;
......@@ -344,9 +347,18 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
sub_frame_t subframeP)
{
uint8_t Size = 0;
UE_MODE_t UE_mode = get_ue_mode(module_idP, 0, eNB_indexP);
UE_MODE_t UE_mode;
// Panos: Modification for phy_stub_ue operation
if(nfapi_mode == 3) { // Panos: phy_stub_ue mode
UE_mode = UE_mac_inst[module_idP].UE_mode[0];
LOG_D(MAC, "ue_get_rach , UE_mode: %d", UE_mode);
}
else { // Full stack mode
UE_mode = get_ue_mode(module_idP,0,eNB_indexP);
}
uint8_t lcid = CCCH;
uint16_t Size16;
struct RACH_ConfigCommon *rach_ConfigCommon =
......@@ -361,6 +373,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
"Transmission on secondary CCs is not supported yet\n");
if (UE_mode == PRACH) {
LOG_D(MAC, "ue_get_rach 3, RA_active value: %d", UE_mac_inst[module_idP].RA_active);
if (UE_mac_inst[module_idP].radioResourceConfigCommon) {
rach_ConfigCommon =
&UE_mac_inst[module_idP].
......@@ -392,7 +405,6 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
module_idP, frameP, Size);
if (Size > 0) {
UE_mac_inst[module_idP].RA_active = 1;
UE_mac_inst[module_idP].RA_PREAMBLE_TRANSMISSION_COUNTER =
1;
......@@ -447,7 +459,12 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
mac_rlc_status_ind(module_idP,
UE_mac_inst[module_idP].crnti,
eNB_indexP, frameP, subframeP,
ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6);
ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6
#ifdef Rel14
,0, 0
#endif
);
if (UE_mac_inst[module_idP].crnti_before_ho)
LOG_D(MAC,
......@@ -463,7 +480,13 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
dcch_header_len);
sdu_lengths[0] = mac_rlc_data_req(module_idP, UE_mac_inst[module_idP].crnti, eNB_indexP, frameP, ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6, //not used
(char *) &ulsch_buff[0]);
(char *) &ulsch_buff[0]
#ifdef Rel14
,0,
0
#endif
);
LOG_D(MAC, "[UE %d] TX Got %d bytes for DCCH\n",
module_idP, sdu_lengths[0]);
......
This diff is collapsed.
......@@ -83,6 +83,10 @@ boolean_t pdcp_data_req(
const sdu_size_t sdu_buffer_sizeP,
unsigned char *const sdu_buffer_pP,
const pdcp_transmission_mode_t modeP
#ifdef Rel14
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
#endif
)
//-----------------------------------------------------------------------------
{
......@@ -165,7 +169,11 @@ boolean_t pdcp_data_req(
(unsigned char*)&pdcp_pdu_p->data[0],
sdu_buffer_sizeP);
#endif
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p);
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p
#ifdef Rel14
,NULL, NULL
#endif
);
} else {
rlc_status = RLC_OP_STATUS_OUT_OF_RESSOURCES;
LOG_W(PDCP,PROTOCOL_CTXT_FMT" PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY \n",
......@@ -351,7 +359,12 @@ boolean_t pdcp_data_req(
LOG_F(PDCP,"\n");
#endif
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p);
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p
#ifdef Rel14
,sourceL2Id
,destinationL2Id
#endif
);
}
......@@ -780,6 +793,8 @@ pdcp_data_ind(
} else {
((pdcp_data_ind_header_t*) new_sdu_p->data)->rb_id = rb_id + (ctxt_pP->module_id * maxDRB);
}
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = ctxt_pP->module_id;
#ifdef DEBUG_PDCP_FIFO_FLUSH_SDU
static uint32_t pdcp_inst = 0;
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = pdcp_inst++;
......@@ -914,6 +929,7 @@ pdcp_run (
protocol_ctxt_t ctxt;
#endif
if (ctxt_pP->enb_flag) {
start_meas(&eNB_pdcp_stats[ctxt_pP->module_id].pdcp_run);
......@@ -965,7 +981,11 @@ pdcp_run (
RRC_DCCH_DATA_REQ (msg_p).confirmp,
RRC_DCCH_DATA_REQ (msg_p).sdu_size,
RRC_DCCH_DATA_REQ (msg_p).sdu_p,
RRC_DCCH_DATA_REQ (msg_p).mode);
RRC_DCCH_DATA_REQ (msg_p).mode
#ifdef Rel14
, NULL, NULL
#endif
);
if (result != TRUE)
LOG_E(PDCP, "PDCP data request failed!\n");
......@@ -1794,6 +1814,7 @@ rrc_pdcp_config_req (
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
pdcp_p->is_ue = TRUE;
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
} else {
pdcp_p->is_ue = FALSE;
}
......@@ -1812,9 +1833,9 @@ rrc_pdcp_config_req (
}
pdcp_p->first_missing_pdu = -1;
LOG_D(PDCP,PROTOCOL_PDCP_CTXT_FMT" Config request : Action ADD: radio bearer id %d (already added) configured\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p),
rb_idP);
LOG_D(PDCP,PROTOCOL_PDCP_CTXT_FMT" Config request : Action ADD: radio bearer id %d (already added) configured\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p),
rb_idP);
break;
case CONFIG_ACTION_MODIFY:
......@@ -1871,10 +1892,10 @@ rrc_pdcp_config_req (
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
pdcp_p->is_ue = TRUE;
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
} else {
pdcp_p->is_ue = FALSE;
}
}
pdcp_p->next_pdcp_tx_sn = 0;
pdcp_p->next_pdcp_rx_sn = 0;
......
......@@ -259,7 +259,12 @@ public_pdcp(boolean_t pdcp_data_req(
const confirm_t confirmP, \
const sdu_size_t sdu_buffer_size,
unsigned char* const sdu_buffer,
const pdcp_transmission_mode_t mode));
const pdcp_transmission_mode_t mode
#ifdef Rel14
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
#endif
));
/*! \fn boolean_t pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, boolean_t)
* \brief This functions handles data transfer indications coming from RLC
......@@ -432,6 +437,10 @@ typedef struct pdcp_data_req_header_s {
sdu_size_t data_size;
signed int inst;
ip_traffic_type_t traffic_type;
#ifdef Rel14
uint32_t sourceL2Id;
uint32_t destinationL2Id;
#endif
} pdcp_data_req_header_t;
typedef struct pdcp_data_ind_header_s {
......@@ -439,6 +448,10 @@ typedef struct pdcp_data_ind_header_s {
sdu_size_t data_size;
signed int inst;
ip_traffic_type_t dummy_traffic_type;
#ifdef Rel14
uint32_t sourceL2Id;
uint32_t destinationL2Id;
#endif
} pdcp_data_ind_header_t;
struct pdcp_netlink_element_s {
......@@ -448,6 +461,43 @@ struct pdcp_netlink_element_s {
uint8_t *data;
};
//TTN for D2D (PC5S)
#ifdef Rel14
#define PDCP_SOCKET_PORT_NO 9999 //temporary value
#define PC5_SIGNALLING_PAYLOAD_SIZE 100 //should be updated with a correct value
int pdcp_pc5_sockfd;
struct sockaddr_in prose_ctrl_addr;
struct sockaddr_in prose_pdcp_addr;
struct sockaddr_in pdcp_sin;
void pdcp_pc5_socket_init(void);
typedef struct {
rb_id_t rb_id;
sdu_size_t data_size;
signed int inst;
ip_traffic_type_t traffic_type;
uint32_t sourceL2Id;
uint32_t destinationL2Id;
} __attribute__((__packed__)) pc5s_header_t;
//new PC5S-message
typedef struct {
unsigned char bytes[PC5_SIGNALLING_PAYLOAD_SIZE];
} __attribute__((__packed__)) PC5SignallingMessage ;
//example of PC5-S messages
typedef struct {
pc5s_header_t pc5s_header;
union {
uint8_t status;
PC5SignallingMessage pc5_signalling_message;
} pc5sPrimitive;
} __attribute__((__packed__)) sidelink_pc5s_element;
#endif
#if 0
/*
* Missing PDU information struct, a copy of this will be enqueued
......
This diff is collapsed.
......@@ -52,7 +52,12 @@ extern int reception_from_rohc_bs(void);
#else
extern BOOL pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t * sduP, uint8_t is_data_plane);
extern BOOL pdcp_data_req (module_id_t module_id, uint32_t frame, uint8_t eNB_flag, rb_id_t rab_id, uint32_t muiP, uint32_t confirmP, sdu_size_t sdu_buffer_size, unsigned char* sdu_buffer,
uint8_t is_data_pdu);
uint8_t is_data_pdu
#ifdef Rel14
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
#endif
);
//extern BOOL pdcp_data_req (struct pdcp_entity *pdcpP, mem_block * sduP);
extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block * cprimitiveP);
extern void control_pdcp (struct pdcp_entity *pdcpP);
......@@ -63,4 +68,7 @@ extern void pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP);
extern void init_pdcp (struct pdcp_entity *pdcpP, struct rb_dispatcher *rbP, uint8_t rb_idP);
extern void *pdcp_tx (void *argP);
#endif
extern void pdcp_pc5_socket_init(void);
#endif
......@@ -93,7 +93,12 @@ void config_req_rlc_um_asn1 (
const UL_UM_RLC_t * const ul_rlc_pP,
const DL_UM_RLC_t * const dl_rlc_pP,
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP)
const logical_chan_id_t chan_idP
#ifdef Rel14
,const uint32_t sourceL2Id
,const uint32_t destinationL2Id
#endif
)
{
uint32_t ul_sn_FieldLength = 0;
uint32_t dl_sn_FieldLength = 0;
......@@ -117,10 +122,14 @@ void config_req_rlc_um_asn1 (
mbms_service_idP,
mbms_session_idP);
rlc_p = &rlc_union_p->rlc.um;
}
if ((sourceL2Id >0 ) && (destinationL2Id >0)){
key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, sourceL2Id, destinationL2Id, srb_flagP);
} else
#endif
{
key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
}
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
AssertFatal (h_rc == HASH_TABLE_OK, "RLC NOT FOUND enb id %u ue id %i enb flag %u rb id %u, srb flag %u",
ctxt_pP->module_id,
......@@ -129,7 +138,6 @@ void config_req_rlc_um_asn1 (
rb_idP,
srb_flagP);
rlc_p = &rlc_union_p->rlc.um;
}
//-----------------------------------------------------------------------------
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" CONFIG_REQ timer_reordering=%dms sn_field_length= RB %u \n",
......
......@@ -115,7 +115,12 @@ public_rlc_um_control_primitives( void config_req_rlc_um_asn1 (
const UL_UM_RLC_t * const ul_rlc_pP,
const DL_UM_RLC_t * const dl_rlc_pP,
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
const logical_chan_id_t chan_idP
#ifdef Rel14
,const uint32_t sourceL2Id
,const uint32_t destinationL2Id
#endif
);)
/*! \fn void rlc_um_init (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
* \brief Initialize a RLC UM protocol instance, initialize all variables, lists, allocate buffers for making this instance ready to be configured with protocol configuration parameters. After this initialization the RLC UM protocol instance will be in RLC_NULL_STATE state.
......
......@@ -314,7 +314,12 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
const mui_t muiP,
confirm_t confirmP,
sdu_size_t sdu_sizeP,
mem_block_t *sdu_pP)
mem_block_t *sdu_pP
#ifdef Rel14
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
#endif
)
{
//-----------------------------------------------------------------------------
mem_block_t *new_sdu_p = NULL;
......@@ -374,6 +379,10 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
}
key = RLC_COLL_KEY_MBMS_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, mbms_id_p->service_id, mbms_id_p->session_id);
}
if (sourceL2Id && destinationL2Id){
key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, *sourceL2Id, *destinationL2Id, srb_flagP);
//key_lcid = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, chan_idP, *sourceL2Id, *destinationL2Id, srb_flagP);
} else
#endif
{
......@@ -386,7 +395,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
rlc_mode = rlc_union_p->mode;
} else {
rlc_mode = RLC_MODE_NONE;
AssertFatal (0 , "RLC not configured key %ju\n", key);
//AssertFatal (0 , "RLC not configured key %ju\n", key);
}
if (MBMS_flagP == 0) {
......
......@@ -275,6 +275,23 @@ public_rlc(logical_chan_id_t rlc_mbms_rbid2lcid_eNB[NUMBER_OF_eNB_MAX][NB_RB_
(((hash_key_t)(iS_sRB)) << 33) | \
(((hash_key_t)(0x0a)) << 34))
#define RLC_COLL_KEY_SOURCE_DEST_VALUE(eNB_iD, rNTI, iS_eNB, lC_iD, sOURCE_iD, dEST_iD, iS_sRB) \
((hash_key_t)eNB_iD | \
(((hash_key_t)(rNTI)) << 8) | \
(((hash_key_t)(iS_eNB)) << 24) | \
(((hash_key_t)(lC_iD)) << 25) | \
(((hash_key_t)(dEST_iD)) << 33) | \
(((hash_key_t)(0x05)) << 57))
#define RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(eNB_iD, rNTI, iS_eNB, lC_iD, sOURCE_iD, dEST_iD, iS_sRB) \
((hash_key_t)eNB_iD | \
(((hash_key_t)(rNTI)) << 8) | \
(((hash_key_t)(iS_eNB)) << 24) | \
(((hash_key_t)(lC_iD)) << 25) | \
(((hash_key_t)(dEST_iD)) << 33) | \
(((hash_key_t)(0x0a)) << 57))
// service id max val is maxServiceCount = 16 (asn1_constants.h)
#define RLC_COLL_KEY_MBMS_VALUE(eNB_iD, rNTI, iS_eNB, sERVICE_ID, sESSION_ID) \
......@@ -324,7 +341,9 @@ public_rlc_rrc( rlc_op_status_t rrc_rlc_config_asn1_req (
const SRB_ToAddModList_t* const ,
const DRB_ToAddModList_t* const ,
const DRB_ToReleaseList_t* const ,
const PMCH_InfoList_r9_t * const pmch_info_listP);)
const PMCH_InfoList_r9_t * const pmch_info_listP ,
const uint32_t ,
const uint32_t );)
#else
/*! \fn rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t* const ctxtP, const SRB_ToAddModList_t* const srb2add_listP, const DRB_ToAddModList_t* const drb2add_listP, const DRB_ToReleaseList_t* const drb2release_listP)
* \brief Function for RRC to configure a Radio Bearer.
......@@ -379,7 +398,12 @@ public_rlc_rrc(rlc_op_status_t rrc_rlc_remove_rlc (const protocol_ctxt_t* cons
* \param[in] rlc_modeP Mode of RLC (AM, UM, TM).
* \return A status about the processing, OK or error code.
*/
private_rlc_rrc(rlc_union_t* rrc_rlc_add_rlc (const protocol_ctxt_t* const, const srb_flag_t, const MBMS_flag_t MBMS_flagP, const rb_id_t, logical_chan_id_t, rlc_mode_t);)
private_rlc_rrc(rlc_union_t* rrc_rlc_add_rlc (const protocol_ctxt_t* const, const srb_flag_t, const MBMS_flag_t MBMS_flagP, const rb_id_t, logical_chan_id_t, rlc_mode_t
#ifdef Rel14
,const uint32_t sourceL2Id,
const uint32_t destinationL2Id
#endif
);)
/*! \fn rlc_op_status_t rrc_rlc_config_req (
const protocol_ctxt_t* const ctxtP,
......@@ -440,7 +464,12 @@ public_rlc_rrc(void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_d
* \param [in,out] bufferP Memory area to fill with the bytes requested by MAC.
* \return A status about the processing, OK or error code.
*/
public_rlc_mac(tbs_size_t mac_rlc_data_req (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, const tb_size_t,char*);)
public_rlc_mac(tbs_size_t mac_rlc_data_req (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, const tb_size_t,char*
#ifdef Rel14
,const uint32_t sourceL2Id
,const uint32_t destinationL2Id
#endif
);)
/*! \fn void mac_rlc_data_ind (const module_id_t mod_idP, const rnti_t rntiP, const frame_t frameP, const eNB_flag_t eNB_flagP, const MBMS_flag_t MBMS_flagP, logical_chan_id_t rb_idP, uint32_t frameP, char* bufferP, tb_size_t tb_sizeP, num_tb_t num_tbP, crc_t *crcs)
* \brief Interface with MAC layer, deserialize the transport blocks sent by MAC, then map data indication to the RLC instance corresponding to the radio bearer identifier.
......@@ -470,7 +499,12 @@ public_rlc_mac(void mac_rlc_data_ind (const module_id_t, co
* \param[in] tb_sizeP Size of a transport block set in bytes.
* \return The maximum number of bytes that the RLC instance can send in the next transmission sequence.
*/
public_rlc_mac(mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const sub_frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, tb_size_t );)
public_rlc_mac(mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const sub_frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, tb_size_t
#ifdef Rel14
,const uint32_t sourceL2Id
,const uint32_t destinationL2Id
#endif
);)
/*! \fn rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(const module_id_t module_idP, const rnti_t rntiP, const eNB_index_t eNB_index, const frame_t frameP, const sub_frame_t subframeP,const eNB_flag_t enb_flagP, const logical_chan_id_t channel_idP)
* \brief Interface with MAC layer, UE only: request and get the number of bytes scheduled for transmission by the RLC instance corresponding to the radio bearer identifier.
......@@ -520,7 +554,12 @@ public_rlc(rlc_op_status_t rlc_data_req (
const mui_t ,
const confirm_t ,
const sdu_size_t ,
mem_block_t * const);)
mem_block_t * const
#ifdef Rel14
,const uint32_t * const
,const uint32_t * const
#endif
);)
/*! \fn void rlc_data_ind (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, const sdu_size_t sdu_sizeP, mem_block_t* sduP) {
* \brief Interface with higher layers, route SDUs coming from RLC protocol instances to upper layer instance.
......
......@@ -126,7 +126,12 @@ tbs_size_t mac_rlc_data_req(
const MBMS_flag_t MBMS_flagP,
const logical_chan_id_t channel_idP,
const tb_size_t tb_sizeP,
char *buffer_pP)
char *buffer_pP
#ifdef Rel14
,const uint32_t sourceL2Id
,const uint32_t destinationL2Id
#endif
)
{
//-----------------------------------------------------------------------------
struct mac_data_req data_request;
......@@ -143,7 +148,7 @@ tbs_size_t mac_rlc_data_req(
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ,VCD_FUNCTION_IN);
#ifdef DEBUG_MAC_INTERFACE
LOG_D(RLC, PROTOCOL_CTXT_FMT" MAC_RLC_DATA_REQ channel %d (%d) MAX RB %d, Num_tb %d\n",
LOG_D(RLC, PROTOCOL_CTXT_FMT" MAC_RLC_DATA_REQ channel %d (%d) MAX RB %d\n",
PROTOCOL_CTXT_ARGS((&ctxt)),
channel_idP,
RLC_MAX_LC,
......@@ -166,6 +171,10 @@ tbs_size_t mac_rlc_data_req(
}
} else {
key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
#ifdef Rel14
if ((sourceL2Id > 0) && (destinationL2Id > 0))
key = RLC_COLL_KEY_LCID_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag);
#endif
}
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
......@@ -189,7 +198,7 @@ tbs_size_t mac_rlc_data_req(
break;
case RLC_MODE_UM:
if (!enb_flagP) rlc_um_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.um,tb_sizeP);
if (!enb_flagP) rlc_um_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.um,tb_sizeP);
data_request = rlc_um_mac_data_request(&ctxt, &rlc_union_p->rlc.um,enb_flagP);
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
break;
......@@ -308,7 +317,12 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
const eNB_flag_t enb_flagP,
const MBMS_flag_t MBMS_flagP,
const logical_chan_id_t channel_idP,
const tb_size_t tb_sizeP)
const tb_size_t tb_sizeP
#ifdef Rel14
,const uint32_t sourceL2Id
,const uint32_t destinationL2Id
#endif
)
{
//-----------------------------------------------------------------------------
mac_rlc_status_resp_t mac_rlc_status_resp;
......@@ -337,16 +351,26 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
key = RLC_COLL_KEY_MBMS_VALUE(module_idP, rntiP, enb_flagP, mbms_id_p->service_id, mbms_id_p->session_id);
} else {
#ifdef Rel14
if ((sourceL2Id > 0) && (destinationL2Id > 0)) {
key = RLC_COLL_KEY_SOURCE_DEST_VALUE(module_idP, rntiP, enb_flagP, channel_idP, sourceL2Id, destinationL2Id, srb_flag);
} else
#endif
{
//LOG_I(RLC, "Panos-D mac_rlc_status_ind 1 enb_flagP: %d, channel_idP: %d, srb_flag: %d \n", enb_flagP, channel_idP, srb_flag);
key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
}
}
}
//LOG_I(RLC, "Panos-D mac_rlc_status_ind 2 enb_flagP: %d, channel_idP: %d, srb_flag: %d \n", enb_flagP, channel_idP, srb_flag);
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
if (h_rc == HASH_TABLE_OK) {
rlc_mode = rlc_union_p->mode;
} else {
rlc_mode = RLC_MODE_NONE;
//LOG_W(RLC , "[%s] RLC not configured rb id %u lcid %u module %u!\n", __FUNCTION__, rb_id, channel_idP, ue_module_idP);
//LOG_D(RLC , "Panos-D: mac_rlc_status_ind() In RLC_MODE_NONE \n");
//LOG_W(RLC , "[%s] RLC not configured lcid %u module %u!\n", __FUNCTION__, channel_idP, module_idP);
//LOG_D(RLC , "[%s] RLC not configured rb id %u lcid %u module %u!\n", __FUNCTION__, rb_id, channel_idP, ue_module_idP);
}
......
......@@ -40,6 +40,10 @@ rlc_op_status_t mpls_rlc_data_req (
{
//-----------------------------------------------------------------------------
// third arg should be set to 1 or 0
return rlc_data_req(ctxtP, SRB_FLAG_NO, MBMS_FLAG_NO, rb_idP, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, sdu_sizeP, sduP);
return rlc_data_req(ctxtP, SRB_FLAG_NO, MBMS_FLAG_NO, rb_idP, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, sdu_sizeP, sduP
#ifdef Rel14
,NULL, NULL
#endif
);
}
This diff is collapsed.
......@@ -248,6 +248,13 @@ ue_ip_common_ip2wireless(
//---------------------------------------------------------------------------
struct pdcp_data_req_header_s pdcph;
ue_ip_priv_t *priv_p=netdev_priv(ue_ip_dev[instP]);
#ifdef Rel14
ipversion_t *ipv_p = NULL;
unsigned int hard_header_len = 0;
unsigned char *src_addr = 0;
unsigned char *dst_addr = 0;
#endif
#ifdef LOOPBACK_TEST
int i;
#endif
......@@ -278,6 +285,37 @@ ue_ip_common_ip2wireless(
pdcph.inst = instP;
//pass source/destination IP addresses to PDCP header
hard_header_len = ue_ip_dev[instP]->hard_header_len;
ipv_p = (ipversion_t *)((void *)&(skb_pP->data[hard_header_len]));
switch (ipv_p->version) {
case 6:
printk("[UE_IP_DRV][%s] receive IPv6 message\n",__FUNCTION__);
//TODO
break;
case 4:
src_addr = (unsigned char *)&((struct iphdr *)&skb_pP->data[hard_header_len])->saddr;
if (src_addr) {
printk("[UE_IP_DRV][%s] Source %d.%d.%d.%d\n",__FUNCTION__, src_addr[0],src_addr[1],src_addr[2],src_addr[3]);
}
dst_addr = (unsigned char *)&((struct iphdr *)&skb_pP->data[hard_header_len])->daddr;
if (dst_addr) {
printk("[UE_IP_DRV][%s] Dest %d.%d.%d.%d\n",__FUNCTION__, dst_addr[0],dst_addr[1],dst_addr[2],dst_addr[3]);
}
//get Ipv4 address and pass to PCDP header
printk("[UE_IP_DRV] source Id: 0x%08x\n",pdcph.sourceL2Id );
printk("[UE_IP_DRV] destinationL2Id Id: 0x%08x\n",pdcph.destinationL2Id );
pdcph.sourceL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->saddr) & 0x00FFFFFF;
pdcph.destinationL2Id = ntohl( ((struct iphdr *)&skb_pP->data[hard_header_len])->daddr) & 0x00FFFFFF;
break;
default:
break;
}
bytes_wrote = ue_ip_netlink_send((char *)&pdcph,UE_IP_PDCPH_SIZE);
#ifdef OAI_DRV_DEBUG_SEND
......
......@@ -89,6 +89,10 @@ typedef struct pdcp_data_req_header_s {
sdu_size_t data_size;
signed int inst;
ip_traffic_type_t traffic_type;
#ifdef Rel14
uint32_t sourceL2Id;
uint32_t destinationL2Id;
#endif
} pdcp_data_req_header_t;
typedef struct pdcp_data_ind_header_s {
......@@ -96,6 +100,10 @@ typedef struct pdcp_data_ind_header_s {
sdu_size_t data_size;
signed int inst;
ip_traffic_type_t dummy_traffic_type;
#ifdef Rel14
uint32_t sourceL2Id;
uint32_t destinationL2Id;
#endif
} pdcp_data_ind_header_t;
......
This diff is collapsed.
This diff is collapsed.
/*
* phy_stub_UE.h
*
* Created on: Sep 14, 2017
* Author: montre
*/
#ifndef __PHY_STUB_UE__H__
#define __PHY_STUB_UE__H__
#include <stdint.h>
#include "openair2/PHY_INTERFACE/IF_Module.h"
#include "nfapi_interface.h"
#include "nfapi_pnf_interface.h"
//#include "openair1/PHY/LTE_TRANSPORT/defs.h"
//#include "openair1/PHY/defs.h"
//#include "openair1/PHY/LTE_TRANSPORT/defs.h"
UL_IND_t *UL_INFO;
nfapi_tx_request_pdu_t* tx_request_pdu_list;
// New
/// Panos: Pointers to config_request types. Used from nfapi callback functions.
nfapi_dl_config_request_t* dl_config_req;
nfapi_ul_config_request_t* ul_config_req;
nfapi_hi_dci0_request_t* hi_dci0_req;
int tx_req_num_elems;
int next_ra_frame;
module_id_t next_Mod_id;
eth_params_t stub_eth_params;
// Panos: This function should return all the sched_response config messages which concern a specific UE. Inside this
// function we should somehow make the translation of config message's rnti to Mod_ID.
Sched_Rsp_t get_nfapi_sched_response(uint8_t Mod_id);
// This function will be processing DL_config and Tx.requests and trigger all the MAC Rx related calls at the UE side,
// namely:ue_send_sdu(), or ue_decode_si(), or ue_decode_p(), or ue_process_rar() based on the rnti type.
//void handle_nfapi_UE_Rx(uint8_t Mod_id, Sched_Rsp_t *Sched_INFO, int eNB_id);
int pnf_ul_config_req_UE_MAC(nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request_t* req);
// This function will be processing UL and HI_DCI0 config requests to trigger all the MAC Tx related calls
// at the UE side, namely: ue_get_SR(), ue_get_rach(), ue_get_sdu() based on the pdu configuration type.
// The output of these calls will be put to an UL_IND_t structure which will then be the input to
// send_nfapi_UL_indications().
UL_IND_t generate_nfapi_UL_indications(Sched_Rsp_t sched_response);
// This function should pass the UL indication messages to the eNB side through the socket interface.
void send_nfapi_UL_indications(UL_IND_t UL_INFO);
// This function should be filling the nfapi ULSCH indications at the MAC level of the UE in a similar manner
// as fill_rx_indication() does. It should get called from ue_get_SDU()
//void fill_rx_indication_UE_MAC(module_id_t Mod_id,int frame,int subframe);
void fill_rx_indication_UE_MAC(module_id_t Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t *ulsch_buffer, uint16_t buflen, uint16_t rnti, int index);
// This function should be indicating directly to the eNB when there is a planned scheduling request at the MAC layer
// of the UE. It should get called from ue_get_SR()
void fill_sr_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint16_t rnti);
// In our case the this function will be always indicating ACK to the MAC of the eNB (i.e. always assuming)
// successful decoding.
void fill_crc_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t crc_flag, int index, uint16_t rnti);
void fill_rach_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint8_t ra_PreambleIndex, uint16_t ra_RNTI);
void fill_ulsch_cqi_indication_UE_MAC(int Mod_id, uint16_t frame,uint8_t subframe, UL_IND_t *UL_INFO, uint16_t rnti);
void fill_ulsch_harq_indication_UE_MAC(int Mod_id, int frame,int subframe, UL_IND_t *UL_INFO, nfapi_ul_config_ulsch_harq_information *harq_information, uint16_t rnti);
void fill_uci_harq_indication_UE_MAC(int Mod_id, int frame, int subframe, UL_IND_t *UL_INFO,nfapi_ul_config_harq_information *harq_information, uint16_t rnti
/*uint8_t tdd_mapping_mode,
uint16_t tdd_multiplexing_mask*/);
int ul_config_req_UE_MAC(nfapi_ul_config_request_t* req, int frame, int subframe, module_id_t Mod_id);
void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
nfapi_ul_config_request_pdu_t *ul_config_pdu,
uint16_t frame,uint8_t subframe,uint8_t srs_present, int index);
//int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req, nfapi_tx_request_pdu_t* tx_request_pdu_list);
int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req, module_id_t Mod_id);
int tx_req_UE_MAC(nfapi_tx_request_t* req);
int hi_dci0_req_UE_MAC(nfapi_hi_dci0_request_t* req, module_id_t Mod_id);
// The following set of memcpy functions should be getting called as callback functions from
// pnf_p7_subframe_ind.
int memcpy_dl_config_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_dl_config_request_t* req);
int memcpy_ul_config_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_ul_config_request_t* req);
int memcpy_tx_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_tx_request_t* req);
int memcpy_hi_dci0_req (nfapi_pnf_p7_config_t* pnf_p7, nfapi_hi_dci0_request_t* req);
void UE_config_stub_pnf(void);
#endif /* PHY_STUB_UE_H_ */
......@@ -71,6 +71,21 @@ mac_rrc_data_req_ue(
LOG_I(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%d\n",Mod_idP,Srb_id);
#endif
#ifdef Rel14
LOG_D(RRC,"[UE %d] Frame %d Filling SL DISCOVERY SRB_ID %d\n",Mod_idP,frameP,Srb_id);
LOG_D(RRC,"[UE %d] Frame %d buffer_pP status %d,\n",Mod_idP,frameP, UE_rrc_inst[Mod_idP].SL_Discovery[eNB_index].Tx_buffer.payload_size);
//TTN (for D2D)
if (Srb_id == SL_DISCOVERY && UE_rrc_inst[Mod_idP].SL_Discovery[eNB_index].Tx_buffer.payload_size > 0){
memcpy(&buffer_pP[0],&UE_rrc_inst[Mod_idP].SL_Discovery[eNB_index].Tx_buffer.Payload[0],UE_rrc_inst[Mod_idP].SL_Discovery[eNB_index].Tx_buffer.payload_size);
uint8_t Ret_size=UE_rrc_inst[Mod_idP].SL_Discovery[eNB_index].Tx_buffer.payload_size;
LOG_I(RRC,"[UE %d] Sending SL_Discovery, size %d bytes\n",Mod_idP,Ret_size);
UE_rrc_inst[Mod_idP].SL_Discovery[eNB_index].Tx_buffer.payload_size = 0;
return(Ret_size);
}
#endif
LOG_D(RRC,"[UE %d] Frame %d Filling CCCH SRB_ID %d\n",Mod_idP,frameP,Srb_id);
LOG_D(RRC,"[UE %d] Frame %d buffer_pP status %d,\n",Mod_idP,frameP, UE_rrc_inst[Mod_idP].Srb0[eNB_index].Tx_buffer.payload_size);
......@@ -241,6 +256,11 @@ mac_rrc_data_ind_ue(
decode_MCCH_Message(&ctxt, eNB_indexP, sduP, sdu_lenP, mbsfn_sync_areaP);
#endif
}
//TTN (for D2D)
if(srb_idP == SL_DISCOVERY) {
LOG_I(RRC,"[UE %d] Received SDU (%d bytes) for SL_DISCOVERY on SRB %d from eNB %d\n",module_idP, sdu_lenP, srb_idP,eNB_indexP);
decode_SL_Discovery_Message(&ctxt, eNB_indexP, sduP, sdu_lenP);
}
#endif // Rel10 || Rel14
......@@ -315,7 +335,11 @@ rrc_data_req_ue(
confirmP,
sdu_sizeP,
buffer_pP,
modeP);
modeP
#ifdef Rel14
,NULL, NULL
#endif
);
#endif
}
......@@ -384,6 +408,7 @@ void rrc_in_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index)
UE_rrc_inst[Mod_idP].Info[eNB_index].N310_cnt=0;
if (UE_rrc_inst[Mod_idP].Info[eNB_index].T310_active==1) {
LOG_D(RRC, "Panos-D: rrc_in_sync_ind 1 \n");
UE_rrc_inst[Mod_idP].Info[eNB_index].N311_cnt++;
}
......
This diff is collapsed.
......@@ -40,6 +40,7 @@
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
#include "RRC/LITE/defs.h"
#include "SL-DestinationInfoList-r12.h"
/*
* The variant of the above function which dumps the BASIC-XER (XER_F_BASIC)
......@@ -103,6 +104,14 @@ routine only generates an mo-data establishment cause.
uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv);
/**
\brief Generate an SidelinkUEInformation UL-DCCH-Message (UE).
@param destinationInfoList Pointer to a list of destination for which UE requests E-UTRAN to assign dedicated resources
@param discTxResourceReq Pointer to number of discovery messages for discovery announcements for which UE requests E-UTRAN to assign dedicated resources
@param mode Indicates different requests from upper layers
@returns Size of encoded bit stream in bytes*/
uint8_t do_SidelinkUEInformation(uint8_t Mod_id, uint8_t *buffer, SL_DestinationInfoList_r12_t *destinationInfoList, long *discTxResourceReq, SL_TRIGGER_t mode);
/** \brief Generate an RRCConnectionSetupComplete UL-DCCH-Message (UE)
@param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU
@returns Size of encoded bit stream in bytes*/
......@@ -186,7 +195,9 @@ do_RRCConnectionReconfiguration(
struct MeasConfig__speedStatePars *speedStatePars,
RSRP_Range_t *rsrp,
C_RNTI_t *cba_rnti,
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList* dedicatedInfoNASList
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList* dedicatedInfoNASList,
SL_CommConfig_r12_t *sl_CommConfig,
SL_DiscConfig_r12_t *sl_DiscConfig
#if defined(Rel10) || defined(Rel14)
, SCellToAddMod_r10_t *SCell_config
#endif
......
......@@ -45,6 +45,131 @@
#include "LAYER2/MAC/defs.h"
//for D2D
#define DEBUG_CTRL_SOCKET
#define BUFSIZE 1024
#define CONTROL_SOCKET_PORT_NO 8888
#define MAX_NUM_DEST 10
//netlink
//#define DEBUG_PDCP
#define UE_IP_PDCP_NETLINK_ID 31
#define PDCP_PID 1
#define NETLINK_HEADER_SIZE 16
#define SL_DEFAULT_RAB_ID 3
#define SLRB_ID 3
#define MAX_PAYLOAD 1024 /* maximum payload size*/
#define UE_STATE_NOTIFICATION_INTERVAL 50
#define IPV4_ADDR "%u.%u.%u.%u"
#define IPV4_ADDR_FORMAT(aDDRESS) \
(uint8_t)((aDDRESS) & 0x000000ff), \
(uint8_t)(((aDDRESS) & 0x0000ff00) >> 8 ), \
(uint8_t)(((aDDRESS) & 0x00ff0000) >> 16), \
(uint8_t)(((aDDRESS) & 0xff000000) >> 24)
//-----------------------------------------------------
// header for Control socket
//Primitives
#define SESSION_INIT_REQ 1
#define UE_STATUS_INFO 2
#define GROUP_COMMUNICATION_ESTABLISH_REQ 3
#define GROUP_COMMUNICATION_ESTABLISH_RSP 4
#define DIRECT_COMMUNICATION_ESTABLISH_REQ 5
#define DIRECT_COMMUNICATION_ESTABLISH_RSP 6
#define GROUP_COMMUNICATION_RELEASE_REQ 7
#define GROUP_COMMUNICATION_RELEASE_RSP 8
#define PC5S_ESTABLISH_REQ 9
#define PC5S_ESTABLISH_RSP 10
#define PC5_DISCOVERY_MESSAGE 11
#define PC5_DISCOVERY_PAYLOAD_SIZE 29
typedef enum {
UE_STATE_OFF_NETWORK,
UE_STATE_ON_NETWORK
} SL_UE_STATE_t;
typedef enum {
GROUP_COMMUNICATION_RELEASE_OK = 0,
GROUP_COMMUNICATION_RELEASE_FAILURE
} Group_Communication_Status_t;
struct GroupCommunicationEstablishReq {
uint32_t sourceL2Id;
uint32_t groupL2Id;
uint32_t groupIpAddress;
uint8_t pppp;
};
struct GroupCommunicationReleaseReq {
uint32_t sourceL2Id;
uint32_t groupL2Id;
int slrb_id;
};
struct DirectCommunicationEstablishReq {
uint32_t sourceL2Id;
uint32_t destinationL2Id;
uint32_t pppp;
};
struct PC5SEstablishReq{
uint8_t type;
uint32_t sourceL2Id;
uint32_t destinationL2Id;
};
struct PC5SEstablishRsp{
uint32_t slrbid_lcid28;
uint32_t slrbid_lcid29;
uint32_t slrbid_lcid30;
};
//PC5_DISCOVERY MESSAGE
typedef struct {
unsigned char payload[PC5_DISCOVERY_PAYLOAD_SIZE];
uint32_t measuredPower;
} __attribute__((__packed__)) PC5DiscoveryMessage ;
struct sidelink_ctrl_element {
unsigned short type;
union {
struct GroupCommunicationEstablishReq group_comm_establish_req;
struct DirectCommunicationEstablishReq direct_comm_establish_req;
Group_Communication_Status_t group_comm_release_rsp;
//struct DirectCommunicationReleaseReq direct_comm_release_req;
SL_UE_STATE_t ue_state;
int slrb_id;
struct PC5SEstablishReq pc5s_establish_req;
struct PC5SEstablishRsp pc5s_establish_rsp;
PC5DiscoveryMessage pc5_discovery_message;
} sidelinkPrimitive;
};
//global variables
extern struct sockaddr_in clientaddr;
extern int slrb_id;
extern pthread_mutex_t slrb_mutex;
//the thread function
void *send_UE_status_notification(void *);
//#include "COMMON/openair_defs.h"
#ifndef USER_MODE
//#include <rtai.h>
#endif
#include "SystemInformationBlockType1.h"
#include "SystemInformation.h"
#include "RRCConnectionReconfiguration.h"
......@@ -54,6 +179,7 @@
#include "RRCConnectionRequest.h"
#include "RRCConnectionReestablishmentRequest.h"
#include "BCCH-DL-SCH-Message.h"
#include "SBCCH-SL-BCH-MessageType.h"
#include "BCCH-BCH-Message.h"
#if defined(Rel10) || defined(Rel14)
#include "MCCH-Message.h"
......@@ -64,6 +190,7 @@
#include "AS-Context.h"
#include "UE-EUTRA-Capability.h"
#include "MeasResults.h"
#include "SidelinkUEInformation-r12.h"
/* for ImsiMobileIdentity_t */
#include "MobileIdentity.h"
......@@ -185,7 +312,7 @@ typedef struct uid_linear_allocator_s {
#define PROTOCOL_RRC_CTXT_FMT PROTOCOL_CTXT_FMT
#define PROTOCOL_RRC_CTXT_ARGS(CTXT_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp)
/** @defgroup _rrc RRC
/** @defgroup _rrc RRC
* @ingroup _oai2
* @{
*/
......@@ -219,6 +346,21 @@ typedef enum HO_STATE_e {
HO_COMPLETE // initiated by the target eNB
} HO_STATE_t;
typedef enum SL_TRIGGER_e {
SL_RECEIVE_COMMUNICATION=0,
SL_TRANSMIT_RELAY_ONE_TO_ONE,
SL_TRANSMIT_RELAY_ONE_TO_MANY,
SL_TRANSMIT_NON_RELAY_ONE_TO_ONE,
SL_TRANSMIT_NON_RELAY_ONE_TO_MANY,
SL_RECEIVE_DISCOVERY,
SL_TRANSMIT_NON_PS_DISCOVERY,
SL_TRANSMIT_PS_DISCOVERY,
SL_RECEIVE_V2X,
SL_TRANSMIT_V2X,
SL_REQUEST_DISCOVERY_TRANSMISSION_GAPS,
SL_REQUEST_DISCOVERY_RECEPTION_GAPS
} SL_TRIGGER_t;
//#define NUMBER_OF_UE_MAX MAX_MOBILES_PER_RG
#define RRM_FREE(p) if ( (p) != NULL) { free(p) ; p=NULL ; }
#define RRM_MALLOC(t,n) (t *) malloc16( sizeof(t) * n )
......@@ -355,7 +497,7 @@ typedef struct SRB_INFO_TABLE_ENTRY_s {
SRB_INFO Srb_info;
uint8_t Active;
uint8_t Status;
uint32_t Next_check_frame;
uint32_t Next_check_frame;
} SRB_INFO_TABLE_ENTRY;
typedef struct MEAS_REPORT_LIST_s {
......@@ -519,6 +661,11 @@ typedef struct {
MBSFNAreaConfiguration_r9_t *mcch_message;
SRB_INFO MCCH_MESS[8];// MAX_MBSFN_AREA
#endif
//TTN - SIB 18,19,21 for D2D
SystemInformationBlockType18_r12_t *sib18;
SystemInformationBlockType19_r12_t *sib19;
SystemInformationBlockType21_r14_t *sib21;
// End - TTN
SRB_INFO SI;
SRB_INFO Srb0;
uint8_t *paging[NUMBER_OF_UE_MAX];
......@@ -610,6 +757,27 @@ typedef struct UE_RRC_INST_s {
SystemInformationBlockType9_t *sib9[NB_CNX_UE];
SystemInformationBlockType10_t *sib10[NB_CNX_UE];
SystemInformationBlockType11_t *sib11[NB_CNX_UE];
uint8_t *MIB;
#ifdef Rel14
//SIB18
SystemInformationBlockType18_r12_t *sib18[NB_CNX_UE];
SystemInformationBlockType19_r12_t *sib19[NB_CNX_UE];
SystemInformationBlockType21_r14_t *sib21[NB_CNX_UE];
SBCCH_SL_BCH_MessageType_t mib_sl[NB_CNX_UE];
/// Preconfiguration for Sidelink
struct SL_Preconfiguration_r12 *SL_Preconfiguration[NB_CNX_UE];
//source L2 Id
uint32_t sourceL2Id;
//group L2 Id
uint32_t groupL2Id;
//current destination
uint32_t destinationL2Id;
//List of destinations
uint32_t destinationList[MAX_NUM_DEST];
//sl_discovery..
SRB_INFO SL_Discovery[NB_CNX_UE];
#endif
#if defined(Rel10) || defined(Rel14)
uint8_t MBMS_flag;
......@@ -657,6 +825,11 @@ typedef struct UE_RRC_INST_s {
/* Used integrity/ciphering algorithms */
CipheringAlgorithm_r12_t ciphering_algorithm;
e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
#ifdef Rel14
/// Used for Sidelink Preconfiguration
DRB_ToAddModList_t *DRB_configList;
#endif
} UE_RRC_INST;
typedef struct UE_PF_PO_s {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment