mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-18 23:20:32 +00:00
Compare commits
656 Commits
ues_test_t
...
2018.w25
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59b31dbb2d | ||
|
|
c221af02db | ||
|
|
b6fd23caaf | ||
|
|
45cf2e1b8b | ||
|
|
4dfaf50977 | ||
|
|
b04ff22645 | ||
|
|
b65af94d47 | ||
|
|
0c445bedda | ||
|
|
d579a74e54 | ||
|
|
9adf1999db | ||
|
|
2f639e45b6 | ||
|
|
68f0027830 | ||
|
|
4ba4d43aa6 | ||
|
|
437bd9cbe1 | ||
|
|
2e389d61a0 | ||
|
|
0fb553916b | ||
|
|
a7db85a6c2 | ||
|
|
49829f6928 | ||
|
|
6f6c90cba8 | ||
|
|
f9f7e7c5af | ||
|
|
4c92d6785e | ||
|
|
cce51f69bc | ||
|
|
dde219c81b | ||
|
|
86802258dd | ||
|
|
6cd761589e | ||
|
|
e84fd27ec1 | ||
|
|
5c6ad3142d | ||
|
|
c88284da05 | ||
|
|
076781915f | ||
|
|
9b51d61276 | ||
|
|
e4a772965a | ||
|
|
346e8fb719 | ||
|
|
432ad112c5 | ||
|
|
ee91f661fb | ||
|
|
6742d6f471 | ||
|
|
acbd1f1f7d | ||
|
|
f097cca7a5 | ||
|
|
9edcd9b961 | ||
|
|
c5c66eeb4a | ||
|
|
3fd2470533 | ||
|
|
a3329b562c | ||
|
|
f5239e0905 | ||
|
|
8471bd14e2 | ||
|
|
18bd37f913 | ||
|
|
fb054e6523 | ||
|
|
b036b18afe | ||
|
|
4b943d4b7b | ||
|
|
b66b872928 | ||
|
|
ed49592754 | ||
|
|
14740aec74 | ||
|
|
c652a883ff | ||
|
|
ab32cefbe2 | ||
|
|
91db46b6ba | ||
|
|
a37c29eb80 | ||
|
|
17c761afbe | ||
|
|
44210a0a88 | ||
|
|
81ac396187 | ||
|
|
fadba8a1ed | ||
|
|
843e7c8fc4 | ||
|
|
ff604660fe | ||
|
|
8bec50653f | ||
|
|
f55bd83d55 | ||
|
|
dc76ce82f3 | ||
|
|
677ad4298c | ||
|
|
f9aac56e84 | ||
|
|
343bbbac68 | ||
|
|
1038590489 | ||
|
|
96b1d47552 | ||
|
|
a42e2de0e0 | ||
|
|
bdda76430f | ||
|
|
0ffd0ffe18 | ||
|
|
f7b3ea03a3 | ||
|
|
689f98ea9d | ||
|
|
de1996ec3e | ||
|
|
11a1dd090c | ||
|
|
24c669f394 | ||
|
|
38363b10e3 | ||
|
|
5fcc9a6106 | ||
|
|
351ca5e726 | ||
|
|
7da4367cb7 | ||
|
|
68479fa4f8 | ||
|
|
899f50456e | ||
|
|
02aeb1c16d | ||
|
|
ad46183e23 | ||
|
|
bb6d116551 | ||
|
|
7807e677e7 | ||
|
|
54a36ff54d | ||
|
|
dc9b0fa53a | ||
|
|
f488673e80 | ||
|
|
11d9a286c1 | ||
|
|
0928f049bb | ||
|
|
f254107b24 | ||
|
|
a3e1a24947 | ||
|
|
f2db393923 | ||
|
|
f1cd05c1e0 | ||
|
|
6f4ee013d2 | ||
|
|
f994140a3c | ||
|
|
c73cada3f4 | ||
|
|
727b368df3 | ||
|
|
57eef276cb | ||
|
|
880d768729 | ||
|
|
52cf61de97 | ||
|
|
6cb04bb43a | ||
|
|
e4c44dd0a9 | ||
|
|
ea784f2b4b | ||
|
|
55ed45df8d | ||
|
|
30427be126 | ||
|
|
ebbc7fadd0 | ||
|
|
2160f8758c | ||
|
|
0604e146ff | ||
|
|
e7a221278c | ||
|
|
a60ac11320 | ||
|
|
596736afae | ||
|
|
c14dd7ffbb | ||
|
|
7576e3fa52 | ||
|
|
68b86d5f6f | ||
|
|
83b2f1c01c | ||
|
|
a3f5e632ea | ||
|
|
c5b3aaa2dd | ||
|
|
9a8ea23f9f | ||
|
|
20fd63b1e2 | ||
|
|
ef5ff53ecf | ||
|
|
0889d79969 | ||
|
|
861d06e855 | ||
|
|
c8267c2cf9 | ||
|
|
e2a1b98658 | ||
|
|
fad303fe37 | ||
|
|
2bf209e469 | ||
|
|
7813e898ba | ||
|
|
e2741d2b3d | ||
|
|
e35921cf96 | ||
|
|
72529e6c3a | ||
|
|
22da1eac0c | ||
|
|
aca606f90d | ||
|
|
fd2e093412 | ||
|
|
c03650fdc7 | ||
|
|
33b652c5df | ||
|
|
5c23af773a | ||
|
|
184d51c6ea | ||
|
|
79eb6eb4d2 | ||
|
|
6e7db95981 | ||
|
|
17dda7bd70 | ||
|
|
9cff72959a | ||
|
|
1043313175 | ||
|
|
b0798357b9 | ||
|
|
a8ab765fe5 | ||
|
|
675fd0af4e | ||
|
|
fa4a9a0cb9 | ||
|
|
a1a60dc19a | ||
|
|
5d06a1cabd | ||
|
|
afcdb1e6a9 | ||
|
|
7b4298a637 | ||
|
|
e29d500db6 | ||
|
|
1f446432f6 | ||
|
|
86599d47a9 | ||
|
|
bf678f7fb0 | ||
|
|
68fdd19cb7 | ||
|
|
597890ab61 | ||
|
|
b27984349d | ||
|
|
658aa00119 | ||
|
|
a32857885a | ||
|
|
b7a8889741 | ||
|
|
aca800dae9 | ||
|
|
7b0231f926 | ||
|
|
03232d30c2 | ||
|
|
b458c09841 | ||
|
|
8b1416b862 | ||
|
|
c5310874fa | ||
|
|
43382defec | ||
|
|
5e4f0a924d | ||
|
|
f8f149fd1b | ||
|
|
b58ecfc5d8 | ||
|
|
8b44c8bfb6 | ||
|
|
7ced1a2eb1 | ||
|
|
901c0da013 | ||
|
|
dcf3b235f5 | ||
|
|
ef719e7945 | ||
|
|
ac7cbf17e2 | ||
|
|
551f32cc20 | ||
|
|
0ab2b2b261 | ||
|
|
7bc1434733 | ||
|
|
cf45997110 | ||
|
|
eee7673893 | ||
|
|
be816fab6f | ||
|
|
fb4752a2cf | ||
|
|
3d8a21636a | ||
|
|
0f5470b913 | ||
|
|
9fa001c3c5 | ||
|
|
dbddecb775 | ||
|
|
1846c56d54 | ||
|
|
6d21972e43 | ||
|
|
8f86f38d58 | ||
|
|
5646b07870 | ||
|
|
1272cabb35 | ||
|
|
ff3c929ecf | ||
|
|
3288a6bbe4 | ||
|
|
f15b446469 | ||
|
|
b79e6bfb10 | ||
|
|
16cb7eba64 | ||
|
|
3a0d9339dc | ||
|
|
e7bca7fdac | ||
|
|
5fdc3077db | ||
|
|
9c47c860bc | ||
|
|
d54d415125 | ||
|
|
1854826053 | ||
|
|
e7a60fc992 | ||
|
|
2c83775087 | ||
|
|
8824d20cd3 | ||
|
|
846268fdd3 | ||
|
|
318e4a345e | ||
|
|
eaa3f533a5 | ||
|
|
3fe90157e6 | ||
|
|
89201888e3 | ||
|
|
d393814772 | ||
|
|
dad93fe297 | ||
|
|
6d2158f37a | ||
|
|
ece0996946 | ||
|
|
bf13e67b55 | ||
|
|
fe95f0f478 | ||
|
|
71a98a977e | ||
|
|
dbe3208302 | ||
|
|
f1f3b8a0a8 | ||
|
|
3da8cac59b | ||
|
|
8d90eda600 | ||
|
|
d943cd281d | ||
|
|
6295e57331 | ||
|
|
445524bc87 | ||
|
|
b2cc1252c6 | ||
|
|
2505f15eab | ||
|
|
485b7fc060 | ||
|
|
e56ae69bc3 | ||
|
|
e7cfe377db | ||
|
|
92bb82eb2b | ||
|
|
cd103f7c3d | ||
|
|
00f234029a | ||
|
|
727e29e3c0 | ||
|
|
3e99c7aa97 | ||
|
|
71e7f9713a | ||
|
|
da50d68b06 | ||
|
|
b04f3b54a4 | ||
|
|
45302792ee | ||
|
|
963805820c | ||
|
|
5a61f9944c | ||
|
|
1a8d81ba57 | ||
|
|
d45572446c | ||
|
|
f58d4aa05f | ||
|
|
8a89a16fde | ||
|
|
45655197eb | ||
|
|
957cdbab48 | ||
|
|
bcaabe513f | ||
|
|
822416e9e2 | ||
|
|
54cf2d9aef | ||
|
|
ac95f89aa5 | ||
|
|
23f5628735 | ||
|
|
4924b18ebd | ||
|
|
8cace6537e | ||
|
|
307e2f299a | ||
|
|
2f8dc35583 | ||
|
|
26d68e9c5e | ||
|
|
7f03a6e32a | ||
|
|
57a9156f88 | ||
|
|
1f9a6c1369 | ||
|
|
7d8d1588c3 | ||
|
|
4b02d81839 | ||
|
|
95f677f735 | ||
|
|
3d1b8a9cef | ||
|
|
af6ca15020 | ||
|
|
c9f89db89b | ||
|
|
87fb55c792 | ||
|
|
dab82a2705 | ||
|
|
5808ce3934 | ||
|
|
6858b55c60 | ||
|
|
9f1530c3c9 | ||
|
|
9f31d41b44 | ||
|
|
699bbcb80f | ||
|
|
0504659eb8 | ||
|
|
4b39203763 | ||
|
|
dc0638d7f6 | ||
|
|
37425ee967 | ||
|
|
cb4dc53042 | ||
|
|
b23a8ad0fe | ||
|
|
84882d9414 | ||
|
|
365ca71a4a | ||
|
|
8ca5fb4ef2 | ||
|
|
58eab7515f | ||
|
|
d5e179fa1f | ||
|
|
4fb2e609fd | ||
|
|
7b06a540d8 | ||
|
|
5e581a4b06 | ||
|
|
2d975ca61b | ||
|
|
e66bd0e2b1 | ||
|
|
1e2a7156e0 | ||
|
|
2f4c21ced3 | ||
|
|
1008080e31 | ||
|
|
5d91a36ebc | ||
|
|
59623646cf | ||
|
|
497a3275c6 | ||
|
|
56a32a22d4 | ||
|
|
9a9c867a75 | ||
|
|
869b9a5c6f | ||
|
|
19509f08eb | ||
|
|
10e91d4e2f | ||
|
|
62787a8893 | ||
|
|
ea3aecf486 | ||
|
|
a53e22c294 | ||
|
|
c80246a9a5 | ||
|
|
2194bc8564 | ||
|
|
1c46dd7c69 | ||
|
|
b42d83bead | ||
|
|
da83df84f1 | ||
|
|
e6be94eca2 | ||
|
|
a1dc99724b | ||
|
|
f7c58f27ca | ||
|
|
bf601fce71 | ||
|
|
5357ef2050 | ||
|
|
2d6dd02b95 | ||
|
|
c0be5a129c | ||
|
|
b2ac257ef5 | ||
|
|
de35844c42 | ||
|
|
d82ebce55b | ||
|
|
e4a5470d47 | ||
|
|
897d3c49df | ||
|
|
8cab562b9f | ||
|
|
4c0a8f88f9 | ||
|
|
91332d3906 | ||
|
|
a4f260f5a4 | ||
|
|
7e3b1f5d0a | ||
|
|
7b1afbb0bf | ||
|
|
9dcd1f9b89 | ||
|
|
50f7053159 | ||
|
|
d741b951fa | ||
|
|
df43d19c35 | ||
|
|
d8a6715395 | ||
|
|
9d05a9a3b1 | ||
|
|
ef78dcde55 | ||
|
|
e9d536972c | ||
|
|
2f1acb16ab | ||
|
|
22742a4c9c | ||
|
|
12ac8b180d | ||
|
|
c33e184dde | ||
|
|
a68d70a13d | ||
|
|
5865c141d0 | ||
|
|
1ba0155944 | ||
|
|
7b9422a8c5 | ||
|
|
831ce2e910 | ||
|
|
5eac636b34 | ||
|
|
ebecb55733 | ||
|
|
e794f920c7 | ||
|
|
0b5d0a1761 | ||
|
|
d68ddebe21 | ||
|
|
8d0f964755 | ||
|
|
94a11ee54e | ||
|
|
ddd3e97f14 | ||
|
|
4bf4ad8e98 | ||
|
|
6210eb056f | ||
|
|
54e803e71a | ||
|
|
135b06ae66 | ||
|
|
1056604b25 | ||
|
|
219b5bc92f | ||
|
|
adec4e39df | ||
|
|
3768723c62 | ||
|
|
ceece5694d | ||
|
|
8108d59a0b | ||
|
|
cf0a5ca920 | ||
|
|
a78aaa451c | ||
|
|
c641f334bb | ||
|
|
19a2b37c75 | ||
|
|
5a461002a1 | ||
|
|
bba24dc2fa | ||
|
|
2974c20c69 | ||
|
|
dcdda7ba35 | ||
|
|
4898d609e6 | ||
|
|
4070f0bfdf | ||
|
|
b073445f99 | ||
|
|
8877b18a9a | ||
|
|
e8e58e2594 | ||
|
|
d746ff6127 | ||
|
|
1eabadb137 | ||
|
|
386fd21c93 | ||
|
|
0684f6dda1 | ||
|
|
6868329384 | ||
|
|
26073a353b | ||
|
|
bb6fd31de6 | ||
|
|
6cff88b9c8 | ||
|
|
11fe5f97c7 | ||
|
|
c518ed89e2 | ||
|
|
1a1ad6ed8f | ||
|
|
c8ae5b7c09 | ||
|
|
a21bc513bb | ||
|
|
1bc258a729 | ||
|
|
593ebc4732 | ||
|
|
7ce1621622 | ||
|
|
9ba0355000 | ||
|
|
f3e7a72e55 | ||
|
|
724970e2ef | ||
|
|
89b261efe5 | ||
|
|
8fffe90dbe | ||
|
|
f6345f048e | ||
|
|
8e3ecf3399 | ||
|
|
d23b02af56 | ||
|
|
1fce1bbf82 | ||
|
|
0efa1185f3 | ||
|
|
c0bcd78673 | ||
|
|
9b7364a3ca | ||
|
|
eccb96c4c2 | ||
|
|
e8300aa944 | ||
|
|
367e076347 | ||
|
|
5c76360c2d | ||
|
|
a21c0b809f | ||
|
|
f55cbe475c | ||
|
|
f9f20c7300 | ||
|
|
5ece3937d4 | ||
|
|
4387070cda | ||
|
|
9c820805fa | ||
|
|
01f06bcf09 | ||
|
|
4af41d2a26 | ||
|
|
2c8443121d | ||
|
|
1a082041b8 | ||
|
|
10d7599d08 | ||
|
|
069ce49e9c | ||
|
|
be8d32d55f | ||
|
|
ea0d778176 | ||
|
|
3ea62dbdee | ||
|
|
ba8a111ea1 | ||
|
|
d42ddeac56 | ||
|
|
863c469d35 | ||
|
|
fcddbc2b44 | ||
|
|
6eeb257717 | ||
|
|
dd7d2ef63b | ||
|
|
e669f83dc1 | ||
|
|
6dcac9234c | ||
|
|
d092231181 | ||
|
|
4f1c51f38c | ||
|
|
2c8dd796e8 | ||
|
|
d5b8310fb9 | ||
|
|
3f043c7d73 | ||
|
|
811ada2429 | ||
|
|
8e9d9807ae | ||
|
|
a91a35877d | ||
|
|
9333c16ecb | ||
|
|
1576b7bd08 | ||
|
|
6179d9d748 | ||
|
|
356d406cff | ||
|
|
3740afecc7 | ||
|
|
56d4d0ebef | ||
|
|
6a6729bdac | ||
|
|
dfece3ff58 | ||
|
|
9b4d3bbae7 | ||
|
|
a03877e7f7 | ||
|
|
7dfac059b0 | ||
|
|
024904db90 | ||
|
|
a6098dbf09 | ||
|
|
b45a340b63 | ||
|
|
cdbf65f5af | ||
|
|
5f028730cd | ||
|
|
f0e10b0d89 | ||
|
|
200be2b1ee | ||
|
|
0d05de6382 | ||
|
|
ef4aee1e28 | ||
|
|
0dcc3dceaf | ||
|
|
664d1a4b5f | ||
|
|
098a177d6f | ||
|
|
dedd3c6344 | ||
|
|
b7e2a90ef4 | ||
|
|
3efaa38394 | ||
|
|
260a2a7d3d | ||
|
|
d9d28e3209 | ||
|
|
1547a45eae | ||
|
|
0105373cdc | ||
|
|
b44c83ef46 | ||
|
|
23b5b6ac20 | ||
|
|
13c8931bf2 | ||
|
|
2d610d95c8 | ||
|
|
fe1912a193 | ||
|
|
8b052dadd5 | ||
|
|
ceb4edf7e6 | ||
|
|
f8b0cd5bd4 | ||
|
|
866a23a136 | ||
|
|
a6db17ffcd | ||
|
|
6198a673f0 | ||
|
|
ab3f9dad49 | ||
|
|
fac968246d | ||
|
|
765d6370f6 | ||
|
|
0937339a53 | ||
|
|
78dd80b086 | ||
|
|
da94f64c95 | ||
|
|
573c703cd2 | ||
|
|
cd8e8458cf | ||
|
|
ecd4aebbe0 | ||
|
|
30d5f151c3 | ||
|
|
97ebc165cc | ||
|
|
b5513cadf1 | ||
|
|
4b5b556493 | ||
|
|
5d199f4500 | ||
|
|
70371e124d | ||
|
|
2efaf51280 | ||
|
|
b67c169145 | ||
|
|
38eacea022 | ||
|
|
70da4b5902 | ||
|
|
f59a509ec7 | ||
|
|
b350f8557e | ||
|
|
20c7af9a96 | ||
|
|
046589e76d | ||
|
|
91dd7ed4b6 | ||
|
|
3a867ac767 | ||
|
|
f0376d1b4f | ||
|
|
dd3dce8fcf | ||
|
|
dea858849e | ||
|
|
282f6a5077 | ||
|
|
cfec3ffd56 | ||
|
|
9c93307ab4 | ||
|
|
d32cdd1f33 | ||
|
|
5dc0d7ccea | ||
|
|
d100398658 | ||
|
|
8d2f0931a7 | ||
|
|
88d0b68c7b | ||
|
|
28497cae6f | ||
|
|
339905d191 | ||
|
|
da7a4a19cd | ||
|
|
ea3aff84e9 | ||
|
|
7943ea92d1 | ||
|
|
f4d19c0d63 | ||
|
|
f44064a221 | ||
|
|
2157727f5f | ||
|
|
dac7888f27 | ||
|
|
f7653f90b0 | ||
|
|
71a6b5d0f0 | ||
|
|
bbaf588352 | ||
|
|
d62fe071cb | ||
|
|
3e550e02ef | ||
|
|
cf0e9175dd | ||
|
|
8489e40659 | ||
|
|
55641754d9 | ||
|
|
c3ba7ba713 | ||
|
|
9c8b6e56f2 | ||
|
|
cb250cba35 | ||
|
|
922b5b595a | ||
|
|
7757b9e7e7 | ||
|
|
39d33dc4df | ||
|
|
3120f16610 | ||
|
|
8b5a963346 | ||
|
|
afcc9aabd8 | ||
|
|
1823ce9525 | ||
|
|
5a202db54d | ||
|
|
380222eefd | ||
|
|
9d03290858 | ||
|
|
67c37417b6 | ||
|
|
b74bab25b5 | ||
|
|
d1f7346c08 | ||
|
|
ec56a416b7 | ||
|
|
cabb4561d5 | ||
|
|
c5ca2bd862 | ||
|
|
b6b86292d0 | ||
|
|
55af824cc0 | ||
|
|
840d37edf3 | ||
|
|
02d18cc583 | ||
|
|
a09728addb | ||
|
|
b1acde2007 | ||
|
|
63ba3f9543 | ||
|
|
b049f0c820 | ||
|
|
ccac021050 | ||
|
|
409eadc937 | ||
|
|
7c27e09fcd | ||
|
|
22e7b1e6da | ||
|
|
d35f52a228 | ||
|
|
359e1528dd | ||
|
|
f39dd5df18 | ||
|
|
fea641220b | ||
|
|
022916305c | ||
|
|
730ffc76f4 | ||
|
|
eb2dfa1b70 | ||
|
|
c619f6eff7 | ||
|
|
e88a3cdf46 | ||
|
|
ea65ddad2c | ||
|
|
1aa5d2930a | ||
|
|
c313dff2ad | ||
|
|
c62be7a101 | ||
|
|
612ab055d7 | ||
|
|
6e6a462dc4 | ||
|
|
49ea474807 | ||
|
|
33696a4e93 | ||
|
|
79b11d6b93 | ||
|
|
b74c668ddb | ||
|
|
d82a0d900d | ||
|
|
b7a1661855 | ||
|
|
38627c85d0 | ||
|
|
9601ea66c5 | ||
|
|
7ac9d2ab81 | ||
|
|
acd996d2eb | ||
|
|
cd74f4d61b | ||
|
|
5e20c970e9 | ||
|
|
dc9cada6c2 | ||
|
|
1a5a029768 | ||
|
|
d174e15ac8 | ||
|
|
22911600a8 | ||
|
|
6b99b1b1e4 | ||
|
|
e996f5d0f5 | ||
|
|
8950c6ddd3 | ||
|
|
69e90fa6cb | ||
|
|
81177a8a73 | ||
|
|
29bc996641 | ||
|
|
3f6c5430a2 | ||
|
|
8d5dc07a15 | ||
|
|
c8420152de | ||
|
|
caef8c6e56 | ||
|
|
c84ddacd00 | ||
|
|
ecee5edcce | ||
|
|
ccba43e2f0 | ||
|
|
85ce7de775 | ||
|
|
2466f16ec3 | ||
|
|
5487c709b1 | ||
|
|
2dc1a602c6 | ||
|
|
23c54b8db4 | ||
|
|
c8c4b42317 | ||
|
|
c3adbb9545 | ||
|
|
4d3689a56c | ||
|
|
0b3e617089 | ||
|
|
1e857d5ba5 | ||
|
|
863e9404fc | ||
|
|
3cc3762ed9 | ||
|
|
d12f55d2ed | ||
|
|
8e5b174047 | ||
|
|
8de28502e1 | ||
|
|
9e7e57de74 | ||
|
|
e51d8d3fd7 | ||
|
|
e2ac251cc6 | ||
|
|
f7e376ed5f | ||
|
|
4b696e9341 | ||
|
|
1ecdcba33a | ||
|
|
7a86fd3216 | ||
|
|
8458c8fcf8 | ||
|
|
2e2b07ef9e | ||
|
|
042a16d1f6 | ||
|
|
5c7377e1c0 | ||
|
|
5de045b802 | ||
|
|
689eae92ee | ||
|
|
eee0c1b84b | ||
|
|
b9b45c4ac0 | ||
|
|
897c8da299 | ||
|
|
600c64a7f5 | ||
|
|
57129bc0af | ||
|
|
fdac4d178b | ||
|
|
5ce9858d63 | ||
|
|
169f33464e | ||
|
|
7df4a7813f | ||
|
|
3bd3bedcd2 | ||
|
|
e3df5d3de5 | ||
|
|
e36c5b6024 | ||
|
|
1603d3674d | ||
|
|
14fb9e2ba2 | ||
|
|
77c4d3742f | ||
|
|
714ad4d774 | ||
|
|
4cfa87b6b3 | ||
|
|
a08178fa0e | ||
|
|
1a516df2db | ||
|
|
0b83862fc2 |
106
ci-scripts/Jenkinsfile-gitlab
Normal file
106
ci-scripts/Jenkinsfile-gitlab
Normal file
@@ -0,0 +1,106 @@
|
||||
// Comments
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'bellatrix'
|
||||
}
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
timestamps()
|
||||
gitLabConnection('OAI GitLab')
|
||||
//gitlabBuilds(builds: ["Build", "Test"])
|
||||
gitlabBuilds(builds: ["Local Build"])
|
||||
}
|
||||
|
||||
stages {
|
||||
stage ("Verify Guidelines") {
|
||||
steps {
|
||||
echo "Git URL is ${GIT_URL}"
|
||||
echo "GitLab Act is ${env.gitlabActionType}"
|
||||
script {
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
// GitLab-Jenkins plugin integration is lacking to perform the merge by itself
|
||||
// Doing it manually --> it may have merge conflicts
|
||||
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
|
||||
|
||||
// Running astyle options on the list of modified files by the merge request
|
||||
// For the moment, there is no fail criteria. Just a notification of number of files that do not follow
|
||||
sh "./ci-scripts/checkCodingFormattingRules.sh --src-branch ${env.gitlabSourceBranch} --target-branch ${env.gitlabTargetBranch}"
|
||||
def res=readFile('./oai_rules_result.txt').trim();
|
||||
if ("0".equals(res)) {
|
||||
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): All Changed files in Merge Request follow OAI Formatting Rules"
|
||||
addGitLabMRComment comment: message
|
||||
} else {
|
||||
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): Some Changed files in Merge Request DO NOT follow OAI Formatting Rules"
|
||||
addGitLabMRComment comment: message
|
||||
}
|
||||
} else {
|
||||
echo "Git Branch is ${GIT_BRANCH}"
|
||||
echo "Git Commit is ${GIT_COMMIT}"
|
||||
|
||||
// Running astyle options on all C/H files in the repository
|
||||
// For the moment, there is no fail criteria. Just a notification of number of files that do not follow
|
||||
sh "./ci-scripts/checkCodingFormattingRules.sh"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Local Build") {
|
||||
steps {
|
||||
gitlabCommitStatus(name: "Local Build") {
|
||||
sh "./ci-scripts/buildLocally.sh --workspace $WORKSPACE"
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
if(fileExists('archives/local_build_logs.zip')) {
|
||||
archiveArtifacts artifacts: 'archives/local_build_logs.zip'
|
||||
}
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
sh "./ci-scripts/reportBuildLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
|
||||
} else {
|
||||
sh "./ci-scripts/reportBuildLocally.sh --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger push --branch ${GIT_BRANCH} --commit ${GIT_COMMIT}"
|
||||
}
|
||||
if(fileExists('build_results.html')) {
|
||||
archiveArtifacts artifacts: 'build_results.html'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
echo "End of script"
|
||||
}
|
||||
}
|
||||
success {
|
||||
script {
|
||||
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): passed (" + BUILD_URL + ")"
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
echo "This is a MERGE event"
|
||||
addGitLabMRComment comment: message
|
||||
def message2 = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): passed (" + BUILD_URL + ") -- MergeRequest #" + env.gitlabMergeRequestIid + " (" + env.gitlabMergeRequestTitle + ")"
|
||||
slackSend channel: 'ci-enb', color: 'good', message: message2
|
||||
} else {
|
||||
slackSend channel: 'ci-enb', color: 'good', message: message
|
||||
}
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): failed (" + BUILD_URL + ")"
|
||||
if ("MERGE".equals(env.gitlabActionType)) {
|
||||
echo "This is a MERGE event"
|
||||
addGitLabMRComment comment: message
|
||||
def message2 = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): failed (" + BUILD_URL + ") -- MergeRequest #" + env.gitlabMergeRequestIid + " (" + env.gitlabMergeRequestTitle + ")"
|
||||
slackSend channel: 'ci-enb', color: 'danger', message: message2
|
||||
} else {
|
||||
slackSend channel: 'ci-enb', color: 'danger', message: message
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
20
ci-scripts/astyle-options.txt
Normal file
20
ci-scripts/astyle-options.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
# OAI is using a style that is similar to the Google style
|
||||
--style=google
|
||||
# long options can be written without the preceding '--'
|
||||
# Convert tabs to spaces
|
||||
convert-tabs
|
||||
# Indentation is 2 spaces
|
||||
indent=spaces=2
|
||||
# Indent 'switch' blocks so that the 'case X:' statements are indented in the switch block.
|
||||
indent-switches
|
||||
# Indent C++ comments beginning in column one.
|
||||
indent-col1-comments
|
||||
# Pad empty lines around header blocks
|
||||
break-blocks
|
||||
delete-empty-lines
|
||||
# Attach a pointer or reference operator (*, &, or ^) to the variable name (right)
|
||||
align-pointer=name
|
||||
# The code line length is 200 characters/columns
|
||||
max-code-length=200
|
||||
break-after-logical
|
||||
lineend=linux
|
||||
153
ci-scripts/buildLocally.sh
Executable file
153
ci-scripts/buildLocally.sh
Executable file
@@ -0,0 +1,153 @@
|
||||
#!/bin/bash
|
||||
|
||||
function usage {
|
||||
echo "OAI Local Build Check script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo " buildLocally.sh [OPTIONS]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "--------"
|
||||
echo " --workspace #### OR -ws ####"
|
||||
echo " Specify the workspace"
|
||||
echo ""
|
||||
echo " --help OR -h"
|
||||
echo " Print this help message."
|
||||
echo ""
|
||||
}
|
||||
|
||||
if [ $# -ne 2 ] && [ $# -ne 1 ]
|
||||
then
|
||||
echo "Syntax Error: not the correct number of arguments"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-h|--help)
|
||||
shift
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-ws|--workspace)
|
||||
JENKINS_WKSP="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Syntax Error: unknown option: $key"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
esac
|
||||
done
|
||||
|
||||
cd $JENKINS_WKSP
|
||||
STATUS=0
|
||||
|
||||
############################################################
|
||||
# Creating a tmp folder to store results and artifacts
|
||||
############################################################
|
||||
if [ ! -d $JENKINS_WKSP/archives ]
|
||||
then
|
||||
mkdir $JENKINS_WKSP/archives
|
||||
fi
|
||||
|
||||
source oaienv
|
||||
cd $JENKINS_WKSP/cmake_targets
|
||||
|
||||
############################################################
|
||||
# Building eNb with USRP option
|
||||
############################################################
|
||||
ARCHIVES_LOC=$JENKINS_WKSP/archives/enb_usrp
|
||||
if [ ! -d $ARCHIVES_LOC ]
|
||||
then
|
||||
mkdir $ARCHIVES_LOC
|
||||
fi
|
||||
./build_oai --eNB -w USRP -c
|
||||
|
||||
# Generated log files:
|
||||
if [ -f $JENKINS_WKSP/cmake_targets/log/lte-softmodem.Rel14.txt ]
|
||||
then
|
||||
LOCAL_STAT=`egrep -c "Built target lte-softmodem" $JENKINS_WKSP/cmake_targets/log/lte-softmodem.Rel14.txt`
|
||||
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
|
||||
cp $JENKINS_WKSP/cmake_targets/log/lte-softmodem.Rel14.txt $ARCHIVES_LOC
|
||||
else
|
||||
STATUS=-1
|
||||
fi
|
||||
if [ -f $JENKINS_WKSP/cmake_targets/log/params_libconfig.Rel14.txt ]
|
||||
then
|
||||
LOCAL_STAT=`egrep -c "Built target params_libconfig" $JENKINS_WKSP/cmake_targets/log/params_libconfig.Rel14.txt`
|
||||
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
|
||||
cp $JENKINS_WKSP/cmake_targets/log/params_libconfig.Rel14.txt $ARCHIVES_LOC
|
||||
else
|
||||
STATUS=-1
|
||||
fi
|
||||
if [ -f $JENKINS_WKSP/cmake_targets/log/coding.Rel14.txt ]
|
||||
then
|
||||
LOCAL_STAT=`egrep -c "Built target coding" $JENKINS_WKSP/cmake_targets/log/coding.Rel14.txt`
|
||||
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
|
||||
cp $JENKINS_WKSP/cmake_targets/log/coding.Rel14.txt $ARCHIVES_LOC
|
||||
else
|
||||
STATUS=-1
|
||||
fi
|
||||
if [ -f $JENKINS_WKSP/cmake_targets/log/oai_usrpdevif.Rel14.txt ]
|
||||
then
|
||||
LOCAL_STAT=`egrep -c "Built target oai_usrpdevif" $JENKINS_WKSP/cmake_targets/log/oai_usrpdevif.Rel14.txt`
|
||||
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
|
||||
cp $JENKINS_WKSP/cmake_targets/log/oai_usrpdevif.Rel14.txt $ARCHIVES_LOC
|
||||
else
|
||||
STATUS=-1
|
||||
fi
|
||||
|
||||
############################################################
|
||||
# Building basic simulator
|
||||
############################################################
|
||||
ARCHIVES_LOC=$JENKINS_WKSP/archives/basic_sim
|
||||
if [ ! -d $ARCHIVES_LOC ]
|
||||
then
|
||||
mkdir $ARCHIVES_LOC
|
||||
fi
|
||||
cd $JENKINS_WKSP/cmake_targets
|
||||
./build_oai --basic-simulator -c
|
||||
|
||||
# Generated log files:
|
||||
if [ -f $JENKINS_WKSP/cmake_targets/log/basic_simulator_enb.txt ]
|
||||
then
|
||||
LOCAL_STAT=`egrep -c "Built target lte-softmodem" $JENKINS_WKSP/cmake_targets/log/basic_simulator_enb.txt`
|
||||
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
|
||||
cp $JENKINS_WKSP/cmake_targets/log/basic_simulator_enb.txt $ARCHIVES_LOC
|
||||
else
|
||||
STATUS=-1
|
||||
fi
|
||||
if [ -f $JENKINS_WKSP/cmake_targets/log/basic_simulator_ue.txt ]
|
||||
then
|
||||
LOCAL_STAT=`egrep -c "Built target lte-uesoftmodem" $JENKINS_WKSP/cmake_targets/log/basic_simulator_ue.txt`
|
||||
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
|
||||
cp $JENKINS_WKSP/cmake_targets/log/basic_simulator_ue.txt $ARCHIVES_LOC
|
||||
else
|
||||
STATUS=-1
|
||||
fi
|
||||
if [ -f $JENKINS_WKSP/cmake_targets/log/conf2uedata.Rel14.txt ]
|
||||
then
|
||||
LOCAL_STAT=`egrep -c "Built target conf2uedata" $JENKINS_WKSP/cmake_targets/log/conf2uedata.Rel14.txt`
|
||||
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
|
||||
cp $JENKINS_WKSP/cmake_targets/log/conf2uedata.Rel14.txt $ARCHIVES_LOC
|
||||
else
|
||||
STATUS=-1
|
||||
fi
|
||||
|
||||
############################################################
|
||||
# Creating a zip for Jenkins archiving
|
||||
############################################################
|
||||
cd $JENKINS_WKSP/archives/
|
||||
zip -r local_build_logs.zip basic_sim enb_usrp
|
||||
|
||||
exit $STATUS
|
||||
121
ci-scripts/checkCodingFormattingRules.sh
Executable file
121
ci-scripts/checkCodingFormattingRules.sh
Executable file
@@ -0,0 +1,121 @@
|
||||
#!/bin/bash
|
||||
|
||||
function usage {
|
||||
echo "OAI Coding / Formatting Guideline Check script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo ""
|
||||
echo " Requirement: astyle shall be installed"
|
||||
echo ""
|
||||
echo " By default (no options) the complete repository will be checked"
|
||||
echo " In case of merge request, provided source and target branch,"
|
||||
echo " the script will check only the modified files"
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo " checkCodingFormattingRules.sh [OPTIONS]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "--------"
|
||||
echo " --src-branch #### OR -sb ####"
|
||||
echo " Specify the source branch of the merge request."
|
||||
echo ""
|
||||
echo " --target-branch #### OR -tb ####"
|
||||
echo " Specify the target branch of the merge request (usually develop)."
|
||||
echo ""
|
||||
echo " --help OR -h"
|
||||
echo " Print this help message."
|
||||
echo ""
|
||||
}
|
||||
|
||||
if [ $# -ne 4 ] && [ $# -ne 1 ] && [ $# -ne 0 ]
|
||||
then
|
||||
echo "Syntax Error: not the correct number of arguments"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
echo " ---- Checking the whole repository ----"
|
||||
echo ""
|
||||
NB_FILES_TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt --recursive *.c *.h | grep -c Formatted `
|
||||
echo "Nb Files that do NOT follow OAI rules: $NB_FILES_TO_FORMAT"
|
||||
echo $NB_FILES_TO_FORMAT > ./oai_rules_result.txt
|
||||
exit 0
|
||||
fi
|
||||
|
||||
checker=0
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-h|--help)
|
||||
shift
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-sb|--src-branch)
|
||||
SOURCE_BRANCH="$2"
|
||||
let "checker|=0x1"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-tb|--target-branch)
|
||||
TARGET_BRANCH="$2"
|
||||
let "checker|=0x2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Syntax Error: unknown option: $key"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
|
||||
if [ $checker -ne 3 ]
|
||||
then
|
||||
echo "Source Branch is : $SOURCE_BRANCH"
|
||||
echo "Target Branch is : $TARGET_BRANCH"
|
||||
echo ""
|
||||
echo "Syntax Error: missing option"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Merge request scenario
|
||||
|
||||
MERGE_COMMMIT=`git log -n1 | grep commit | sed -e "s@commit @@"`
|
||||
TARGET_INIT_COMMIT=`cat .git/refs/remotes/origin/$TARGET_BRANCH`
|
||||
|
||||
echo " ---- Checking the modified files by the merge request ----"
|
||||
echo ""
|
||||
echo "Source Branch is : $SOURCE_BRANCH"
|
||||
echo "Target Branch is : $TARGET_BRANCH"
|
||||
echo "Merged Commit is : $MERGE_COMMMIT"
|
||||
echo "Target Init is : $TARGET_INIT_COMMIT"
|
||||
|
||||
# Retrieve the list of modified files since the latest develop commit
|
||||
MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-status | egrep "^M|^A" | sed -e "s@^M\t*@@" -e "s@^A\t*@@" | sort | uniq`
|
||||
NB_TO_FORMAT=0
|
||||
for FULLFILE in $MODIFIED_FILES
|
||||
do
|
||||
echo $FULLFILE
|
||||
filename=$(basename -- "$FULLFILE")
|
||||
EXT="${filename##*.}"
|
||||
if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ]
|
||||
then
|
||||
TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt $FULLFILE | grep -c Formatted `
|
||||
NB_TO_FORMAT=$((NB_TO_FORMAT + TO_FORMAT))
|
||||
fi
|
||||
done
|
||||
echo "Nb Files that do NOT follow OAI rules: $NB_TO_FORMAT"
|
||||
echo $NB_TO_FORMAT > ./oai_rules_result.txt
|
||||
|
||||
exit 0
|
||||
109
ci-scripts/doGitLabMerge.sh
Executable file
109
ci-scripts/doGitLabMerge.sh
Executable file
@@ -0,0 +1,109 @@
|
||||
#!/bin/bash
|
||||
|
||||
function usage {
|
||||
echo "OAI GitLab merge request applying script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo ""
|
||||
echo " doGitLabMerge.sh [OPTIONS] [MANDATORY_OPTIONS]"
|
||||
echo ""
|
||||
echo "Mandatory Options:"
|
||||
echo "------------------"
|
||||
echo ""
|
||||
echo " --src-branch #### OR -sb ####"
|
||||
echo " Specify the source branch of the merge request."
|
||||
echo ""
|
||||
echo " --src-commit #### OR -sc ####"
|
||||
echo " Specify the source commit ID (SHA-1) of the merge request."
|
||||
echo ""
|
||||
echo " --target-branch #### OR -tb ####"
|
||||
echo " Specify the target branch of the merge request (usually develop)."
|
||||
echo ""
|
||||
echo " --target-commit #### OR -tc ####"
|
||||
echo " Specify the target commit ID (SHA-1) of the merge request."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "--------"
|
||||
echo " --help OR -h"
|
||||
echo " Print this help message."
|
||||
echo ""
|
||||
}
|
||||
|
||||
if [ $# -ne 8 ] && [ $# -ne 1 ]
|
||||
then
|
||||
echo "Syntax Error: not the correct number of arguments"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
checker=0
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-h|--help)
|
||||
shift
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-sb|--src-branch)
|
||||
SOURCE_BRANCH="$2"
|
||||
let "checker|=0x1"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-sc|--src-commit)
|
||||
SOURCE_COMMIT_ID="$2"
|
||||
let "checker|=0x2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-tb|--target-branch)
|
||||
TARGET_BRANCH="$2"
|
||||
let "checker|=0x4"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-tc|--target-commit)
|
||||
TARGET_COMMIT_ID="$2"
|
||||
let "checker|=0x8"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Syntax Error: unknown option: $key"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
echo "Source Branch is : $SOURCE_BRANCH"
|
||||
echo "Source Commit ID is : $SOURCE_COMMIT_ID"
|
||||
echo "Target Branch is : $TARGET_BRANCH"
|
||||
echo "Target Commit ID is : $TARGET_COMMIT_ID"
|
||||
|
||||
if [ $checker -ne 15 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: missing option"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git config user.email "jenkins@openairinterface.org"
|
||||
git config user.name "OAI Jenkins"
|
||||
|
||||
git checkout -f $SOURCE_COMMIT_ID
|
||||
|
||||
git merge --ff $TARGET_COMMIT_ID -m "Temporary merge for CI"
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
535
ci-scripts/reportBuildLocally.sh
Executable file
535
ci-scripts/reportBuildLocally.sh
Executable file
@@ -0,0 +1,535 @@
|
||||
#!/bin/bash
|
||||
|
||||
function usage {
|
||||
echo "OAI Local Build Report script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "------"
|
||||
echo ""
|
||||
echo " reportBuildLocally.sh [OPTIONS]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo "--------"
|
||||
echo ""
|
||||
echo " --help OR -h"
|
||||
echo " Print this help message."
|
||||
echo ""
|
||||
echo "Job Options:"
|
||||
echo "------------"
|
||||
echo ""
|
||||
echo " --git-url #### OR -gu ####"
|
||||
echo " Specify the URL of the GIT Repository."
|
||||
echo ""
|
||||
echo " --job-name #### OR -jn ####"
|
||||
echo " Specify the name of the Jenkins job."
|
||||
echo ""
|
||||
echo " --build-id #### OR -id ####"
|
||||
echo " Specify the build ID of the Jenkins job."
|
||||
echo ""
|
||||
echo " --trigger merge-request OR -mr"
|
||||
echo " --trigger push OR -pu"
|
||||
echo " Specify trigger action of the Jenkins job. Either a merge-request event or a push event."
|
||||
echo ""
|
||||
echo "Merge-Request Options:"
|
||||
echo "----------------------"
|
||||
echo ""
|
||||
echo " --src-branch #### OR -sb ####"
|
||||
echo " Specify the source branch of the merge request."
|
||||
echo ""
|
||||
echo " --src-commit #### OR -sc ####"
|
||||
echo " Specify the source commit ID (SHA-1) of the merge request."
|
||||
echo ""
|
||||
echo " --target-branch #### OR -tb ####"
|
||||
echo " Specify the target branch of the merge request (usually develop)."
|
||||
echo ""
|
||||
echo " --target-commit #### OR -tc ####"
|
||||
echo " Specify the target commit ID (SHA-1) of the merge request."
|
||||
echo ""
|
||||
echo "Push Options:"
|
||||
echo "----------------------"
|
||||
echo ""
|
||||
echo " --branch #### OR -br ####"
|
||||
echo " Specify the branch of the push event."
|
||||
echo ""
|
||||
echo " --commit #### OR -co ####"
|
||||
echo " Specify the commit ID (SHA-1) of the push event."
|
||||
echo ""
|
||||
echo ""
|
||||
}
|
||||
|
||||
function trigger_usage {
|
||||
echo "OAI Local Build Report script"
|
||||
echo " Original Author: Raphael Defosseux"
|
||||
echo ""
|
||||
echo " --trigger merge-request OR -mr"
|
||||
echo " --trigger push OR -pu"
|
||||
echo " Specify trigger action of the Jenkins job. Either a merge-request event or a push event."
|
||||
echo ""
|
||||
}
|
||||
|
||||
jb_checker=0
|
||||
mr_checker=0
|
||||
pu_checker=0
|
||||
MR_TRIG=0
|
||||
PU_TRIG=0
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-h|--help)
|
||||
shift
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-gu|--git-url)
|
||||
GIT_URL="$2"
|
||||
let "jb_checker|=0x1"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-jn|--job-name)
|
||||
JOB_NAME="$2"
|
||||
let "jb_checker|=0x2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-id|--build-id)
|
||||
BUILD_ID="$2"
|
||||
let "jb_checker|=0x4"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
--trigger)
|
||||
TRIG="$2"
|
||||
case $TRIG in
|
||||
merge-request)
|
||||
MR_TRIG=1
|
||||
;;
|
||||
push)
|
||||
PU_TRIG=1
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
echo "Syntax Error: Invalid Trigger option -> $TRIG"
|
||||
echo ""
|
||||
trigger_usage
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
let "jb_checker|=0x8"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-mr)
|
||||
MR_TRIG=1
|
||||
let "jb_checker|=0x8"
|
||||
shift
|
||||
;;
|
||||
-pu)
|
||||
PU_TRIG=1
|
||||
let "jb_checker|=0x8"
|
||||
shift
|
||||
;;
|
||||
-sb|--src-branch)
|
||||
SOURCE_BRANCH="$2"
|
||||
let "mr_checker|=0x1"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-sc|--src-commit)
|
||||
SOURCE_COMMIT_ID="$2"
|
||||
let "mr_checker|=0x2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-tb|--target-branch)
|
||||
TARGET_BRANCH="$2"
|
||||
let "mr_checker|=0x4"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-tc|--target-commit)
|
||||
TARGET_COMMIT_ID="$2"
|
||||
let "mr_checker|=0x8"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-br|--branch)
|
||||
SOURCE_BRANCH="$2"
|
||||
let "pu_checker|=0x1"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-co|--commit)
|
||||
SOURCE_COMMIT_ID="$2"
|
||||
let "pu_checker|=0x2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Syntax Error: unknown option: $key"
|
||||
echo ""
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
if [ $jb_checker -ne 15 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: missing job information."
|
||||
# TODO : list missing info
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $PU_TRIG -eq 1 ] && [ $MR_TRIG -eq 1 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: trigger action incoherent."
|
||||
echo ""
|
||||
trigger_usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $PU_TRIG -eq 1 ]
|
||||
then
|
||||
if [ $pu_checker -ne 3 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: missing push information."
|
||||
# TODO : list missing info
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $MR_TRIG -eq 1 ]
|
||||
then
|
||||
if [ $mr_checker -ne 15 ]
|
||||
then
|
||||
echo ""
|
||||
echo "Syntax Error: missing merge-request information."
|
||||
# TODO : list missing info
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "<!DOCTYPE html>" > ./build_results.html
|
||||
echo "<html class=\"no-js\" lang=\"en-US\">" >> ./build_results.html
|
||||
echo "<head>" >> ./build_results.html
|
||||
echo " <title>Build Results for $JOB_NAME job build #$BUILD_ID</title>" >> ./build_results.html
|
||||
echo "</head>" >> ./build_results.html
|
||||
echo "<body>" >> ./build_results.html
|
||||
echo " <h1>Job Summary -- Job: $JOB_NAME -- Build-ID: $BUILD_ID</h1>" >> ./build_results.html
|
||||
echo " <table border = \"1\">" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >GIT Repository</td>" >> ./build_results.html
|
||||
echo " <td>$GIT_URL</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Job Trigger</td>" >> ./build_results.html
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <td>Push Event</td>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <td>Merge-Request</td>" >> ./build_results.html; fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
if [ $PU_TRIG -eq 1 ]
|
||||
then
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Branch</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_BRANCH</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Commit ID</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
fi
|
||||
if [ $MR_TRIG -eq 1 ]
|
||||
then
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Source Branch</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_BRANCH</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Source Commit ID</td>" >> ./build_results.html
|
||||
echo " <td>$SOURCE_COMMIT_ID</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Target Branch</td>" >> ./build_results.html
|
||||
echo " <td>$TARGET_BRANCH</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Target Commit ID</td>" >> ./build_results.html
|
||||
echo " <td>$TARGET_COMMIT_ID</td>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
fi
|
||||
echo " </table>" >> ./build_results.html
|
||||
echo " <h2>Build Summary</h2>" >> ./build_results.html
|
||||
|
||||
if [ -f ./oai_rules_result.txt ]
|
||||
then
|
||||
echo " <h3>OAI Coding / Formatting Guidelines Check</h3>" >> ./build_results.html
|
||||
echo " <table border = "1">" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Result:</td>" >> ./build_results.html
|
||||
NB_FILES=`cat ./oai_rules_result.txt`
|
||||
if [ $NB_FILES = "0" ]
|
||||
then
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <td bgcolor = \"green\">All files in repository follow OAI rules. </td>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <td bgcolor = \"green\">All modified files in Merge-Request follow OAI rules.</td>" >> ./build_results.html; fi
|
||||
else
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <td bgcolor = \"orange\">$NB_FILES files in repository DO NOT follow OAI rules. </td>" >> ./build_results.html; fi
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <td bgcolor = \"orange\">$NB_FILES modified files in Merge-Request DO NOT follow OAI rules.</td>" >> ./build_results.html; fi
|
||||
fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " </table>" >> ./build_results.html
|
||||
fi
|
||||
|
||||
echo " <h3>OAI Build eNb -- USRP option</h3>" >> ./build_results.html
|
||||
echo " <table border = "1">" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <th>Element</th>" >> ./build_results.html
|
||||
echo " <th>Status</th>" >> ./build_results.html
|
||||
echo " <th>Nb Errors</th>" >> ./build_results.html
|
||||
echo " <th>Nb Warnings</th>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >LTE SoftModem - Release 14</th>" >> ./build_results.html
|
||||
if [ -f ./archives/enb_usrp/lte-softmodem.Rel14.txt ]
|
||||
then
|
||||
STATUS=`egrep -c "Built target lte-softmodem" ./archives/enb_usrp/lte-softmodem.Rel14.txt`
|
||||
if [ $STATUS -eq 1 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >KO</th>" >> ./build_results.html
|
||||
fi
|
||||
STATUS=`egrep -c "error:" ./archives/enb_usrp/lte-softmodem.Rel14.txt`
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >$STATUS</th>" >> ./build_results.html
|
||||
fi
|
||||
STATUS=`egrep -c "warning:" ./archives/enb_usrp/lte-softmodem.Rel14.txt`
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"orange\" >$STATUS</th>" >> ./build_results.html
|
||||
fi
|
||||
else
|
||||
echo " <td bgcolor = \"lightgray\" >Unknown</th>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
|
||||
fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Coding - Release 14</th>" >> ./build_results.html
|
||||
if [ -f ./archives/enb_usrp/coding.Rel14.txt ]
|
||||
then
|
||||
STATUS=`egrep -c "Built target coding" ./archives/enb_usrp/coding.Rel14.txt`
|
||||
if [ $STATUS -eq 1 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >KO</th>" >> ./build_results.html
|
||||
fi
|
||||
STATUS=`egrep -c "error:" ./archives/enb_usrp/coding.Rel14.txt`
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >$STATUS</th>" >> ./build_results.html
|
||||
fi
|
||||
STATUS=`egrep -c "warning:" ./archives/enb_usrp/coding.Rel14.txt`
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"orange\" >$STATUS</th>" >> ./build_results.html
|
||||
fi
|
||||
else
|
||||
echo " <td bgcolor = \"lightgray\" >Unknown</th>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
|
||||
fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >OAI USRP device if - Release 14</th>" >> ./build_results.html
|
||||
if [ -f ./archives/enb_usrp/oai_usrpdevif.Rel14.txt ]
|
||||
then
|
||||
STATUS=`egrep -c "Built target oai_usrpdevif" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt`
|
||||
if [ $STATUS -eq 1 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >KO</th>" >> ./build_results.html
|
||||
fi
|
||||
STATUS=`egrep -c "error:" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt`
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >$STATUS</th>" >> ./build_results.html
|
||||
fi
|
||||
STATUS=`egrep -c "warning:" ./archives/enb_usrp/oai_usrpdevif.Rel14.txt`
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"orange\" >$STATUS</th>" >> ./build_results.html
|
||||
fi
|
||||
else
|
||||
echo " <td bgcolor = \"lightgray\" >Unknown</th>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
|
||||
fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Parameters Lib Config - Release 14</th>" >> ./build_results.html
|
||||
if [ -f ./archives/enb_usrp/params_libconfig.Rel14.txt ]
|
||||
then
|
||||
STATUS=`egrep -c "Built target params_libconfig" ./archives/enb_usrp/params_libconfig.Rel14.txt`
|
||||
if [ $STATUS -eq 1 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >KO</th>" >> ./build_results.html
|
||||
fi
|
||||
STATUS=`egrep -c "error:" ./archives/enb_usrp/params_libconfig.Rel14.txt`
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >$STATUS</th>" >> ./build_results.html
|
||||
fi
|
||||
STATUS=`egrep -c "warning:" ./archives/enb_usrp/params_libconfig.Rel14.txt`
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"orange\" >$STATUS</th>" >> ./build_results.html
|
||||
fi
|
||||
else
|
||||
echo " <td bgcolor = \"lightgray\" >Unknown</th>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
|
||||
fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " </table>" >> ./build_results.html
|
||||
|
||||
# conf2uedata.Rel14.txt
|
||||
# archives/basic_sim
|
||||
|
||||
echo " <h3>OAI Build basic simulator option</h3>" >> ./build_results.html
|
||||
echo " <table border = "1">" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <th>Element</th>" >> ./build_results.html
|
||||
echo " <th>Status</th>" >> ./build_results.html
|
||||
echo " <th>Nb Errors</th>" >> ./build_results.html
|
||||
echo " <th>Nb Warnings</th>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Basic Simulator eNb - Release 14</th>" >> ./build_results.html
|
||||
if [ -f ./archives/basic_sim/basic_simulator_enb.txt ]
|
||||
then
|
||||
STATUS=`egrep -c "Built target lte-softmodem" ./archives/basic_sim/basic_simulator_enb.txt`
|
||||
if [ $STATUS -eq 1 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >KO</th>" >> ./build_results.html
|
||||
fi
|
||||
STATUS=`egrep -c "error:" ./archives/basic_sim/basic_simulator_enb.txt`
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >$STATUS</th>" >> ./build_results.html
|
||||
fi
|
||||
STATUS=`egrep -c "warning:" ./archives/basic_sim/basic_simulator_enb.txt`
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"orange\" >$STATUS</th>" >> ./build_results.html
|
||||
fi
|
||||
else
|
||||
echo " <td bgcolor = \"lightgray\" >Unknown</th>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
|
||||
fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Basic Simulator UE - Release 14</th>" >> ./build_results.html
|
||||
if [ -f ./archives/basic_sim/basic_simulator_ue.txt ]
|
||||
then
|
||||
STATUS=`egrep -c "Built target lte-uesoftmodem" ./archives/basic_sim/basic_simulator_ue.txt`
|
||||
if [ $STATUS -eq 1 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >KO</th>" >> ./build_results.html
|
||||
fi
|
||||
STATUS=`egrep -c "error:" ./archives/basic_sim/basic_simulator_ue.txt`
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >$STATUS</th>" >> ./build_results.html
|
||||
fi
|
||||
STATUS=`egrep -c "warning:" ./archives/basic_sim/basic_simulator_ue.txt`
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"orange\" >$STATUS</th>" >> ./build_results.html
|
||||
fi
|
||||
else
|
||||
echo " <td bgcolor = \"lightgray\" >Unknown</th>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
|
||||
fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightcyan\" >Conf 2 UE data - Release 14</th>" >> ./build_results.html
|
||||
if [ -f ./archives/basic_sim/conf2uedata.Rel14.txt ]
|
||||
then
|
||||
STATUS=`egrep -c "Built target conf2uedata" ./archives/basic_sim/conf2uedata.Rel14.txt`
|
||||
if [ $STATUS -eq 1 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >OK</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >KO</th>" >> ./build_results.html
|
||||
fi
|
||||
STATUS=`egrep -c "error:" ./archives/basic_sim/conf2uedata.Rel14.txt`
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >$STATUS</th>" >> ./build_results.html
|
||||
fi
|
||||
STATUS=`egrep -c "warning:" ./archives/basic_sim/conf2uedata.Rel14.txt`
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$STATUS</th>" >> ./build_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"orange\" >$STATUS</th>" >> ./build_results.html
|
||||
fi
|
||||
else
|
||||
echo " <td bgcolor = \"lightgray\" >Unknown</th>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
|
||||
echo " <td bgcolor = \"lightgray\" >--</th>" >> ./build_results.html
|
||||
fi
|
||||
echo " </tr>" >> ./build_results.html
|
||||
echo " </table>" >> ./build_results.html
|
||||
|
||||
echo "</body>" >> ./build_results.html
|
||||
echo "</html>" >> ./build_results.html
|
||||
|
||||
exit 0
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -10,7 +10,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
@@ -49,7 +49,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -24;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -10,7 +10,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
@@ -49,7 +49,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -24;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -10,7 +10,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
@@ -49,7 +49,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -24;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -10,7 +10,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
@@ -49,7 +49,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -24;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -10,7 +10,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
@@ -49,7 +49,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -24;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -10,7 +10,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
@@ -49,7 +49,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -24;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -10,7 +10,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
@@ -49,7 +49,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -10,7 +10,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
@@ -49,7 +49,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -10,7 +10,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
@@ -49,7 +49,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -10,7 +10,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
@@ -49,7 +49,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -10,7 +10,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
@@ -49,7 +49,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
@@ -10,7 +10,7 @@ eNBs =
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = "1";
|
||||
@@ -49,7 +49,7 @@ eNBs =
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
|
||||
@@ -13,7 +13,7 @@ class connection:
|
||||
try:
|
||||
(pid, fd) = os.forkpty()
|
||||
except BaseException, e:
|
||||
log("ERROR: forkpty for '" + description + "': " + e)
|
||||
log("ERROR: forkpty for '" + description + "': " + str(e))
|
||||
(pid, fd) = (-1, -1)
|
||||
|
||||
if pid == -1:
|
||||
@@ -26,7 +26,7 @@ class connection:
|
||||
os.execvp('sshpass', ['sshpass', '-p', password,
|
||||
'ssh', user + '@' + host])
|
||||
except BaseException, e:
|
||||
log("ERROR: execvp for '" + description + "': " + e)
|
||||
log("ERROR: execvp for '" + description + "': " + str(e))
|
||||
log("ERROR: execvp failed for '" + description + "'")
|
||||
os._exit(1)
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@ conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
|
||||
|
||||
MSC_GEN="False"
|
||||
XFORMS="True"
|
||||
FLEXRAN_AGENT_SB_IF="True"
|
||||
UE_EXPANSION="False"
|
||||
PRINT_STATS="False"
|
||||
VCD_TIMING="False"
|
||||
@@ -69,6 +68,8 @@ UE_TIMING_TRACE="False"
|
||||
DISABLE_LOG_X="False"
|
||||
USRP_REC_PLAY="False"
|
||||
BUILD_ECLIPSE=0
|
||||
UE_NAS_USE_TUN="False"
|
||||
BASIC_SIMULATOR=0
|
||||
trap handle_ctrl_c INT
|
||||
|
||||
function print_help() {
|
||||
@@ -101,10 +102,6 @@ Options
|
||||
Specify conf_nvram_path (default \"$conf_nvram_path\")
|
||||
--UE-gen-nvram [output path]
|
||||
Specify gen_nvram_path (default \"$gen_nvram_path\")
|
||||
--RRH
|
||||
Makes the RRH
|
||||
-a | --agent
|
||||
Enables agent for software-defined control of the eNB
|
||||
-r | --3gpp-release
|
||||
default is Rel14,
|
||||
Rel8 limits the implementation to 3GPP Release 8 version
|
||||
@@ -162,6 +159,11 @@ Options
|
||||
Build eclipse project files. Paths are auto corrected by fixprj.sh
|
||||
--usrp-recplay
|
||||
Build for I/Q record-playback modes
|
||||
--ue-nas-use-tun
|
||||
Use TUN devices for the UEs instead of ue_ip.ko
|
||||
--basic-simulator
|
||||
Generates a basic [1 UE + 1 eNB + no channel] simulator.
|
||||
See targets/ARCH/tcp_bridge/README.tcp_bridge_oai for documentation.
|
||||
Usage (first build):
|
||||
oaisim (eNB + UE): ./build_oai -I --oaisim -x --install-system-files
|
||||
Eurecom EXMIMO + COTS UE : ./build_oai -I --eNB -x --install-system-files
|
||||
@@ -200,15 +202,14 @@ function main() {
|
||||
GDB=1
|
||||
CMAKE_BUILD_TYPE="Debug"
|
||||
echo_info "Will Compile with gdb symbols and disable compiler optimization"
|
||||
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=Debug"
|
||||
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=Debug --trace-expand"
|
||||
shift;;
|
||||
--eNB)
|
||||
eNB=1
|
||||
echo_info "Will compile eNB"
|
||||
shift;;
|
||||
-a | --agent)
|
||||
FLEXRAN_AGENT=1
|
||||
echo_info "Will compile eNB with agent support"
|
||||
echo_info "FlexRAN support is always compiled into the eNB"
|
||||
shift;;
|
||||
--UE)
|
||||
UE=1
|
||||
@@ -219,15 +220,11 @@ function main() {
|
||||
echo_info "Will compile with UE_EXPANSION"
|
||||
shift;;
|
||||
--UE-conf-nvram)
|
||||
conf_nvram_path=$(readlink -f "$1")
|
||||
conf_nvram_path=$(readlink -f $2)
|
||||
shift 2;;
|
||||
--UE-gen-nvram)
|
||||
gen_nvram_path=$(readlink -f $2)
|
||||
shift 2;;
|
||||
--RRH)
|
||||
RRH=1
|
||||
echo_info "Will compile RRH"
|
||||
shift;;
|
||||
-r | --3gpp-release)
|
||||
REL=$2
|
||||
echo_info "Setting release to: $REL"
|
||||
@@ -362,6 +359,14 @@ function main() {
|
||||
USRP_REC_PLAY="True"
|
||||
echo_info "Enabling USRP record playback mode"
|
||||
shift 1;;
|
||||
--ue-nas-use-tun)
|
||||
UE_NAS_USE_TUN="True"
|
||||
echo_info "Enabling UE NAS TUN device usage instead of ue_ip.ko"
|
||||
shift 1;;
|
||||
--basic-simulator)
|
||||
BASIC_SIMULATOR=1
|
||||
echo_info "Compiling the basic simulator"
|
||||
shift 1;;
|
||||
-h | --help)
|
||||
print_help
|
||||
exit 1;;
|
||||
@@ -374,9 +379,13 @@ function main() {
|
||||
|
||||
CMAKE_CMD="$CMAKE_CMD .."
|
||||
echo_info "CMAKE_CMD=$CMAKE_CMD"
|
||||
|
||||
if [ "$eNB" = "1" ] && [ "$UE" = "1" ]; then
|
||||
echo_error "Cannot build UE and eNB on one build_oai execution"
|
||||
echo_error "use 2 build_oai invocations"
|
||||
exit
|
||||
fi
|
||||
#########################################################
|
||||
# check validity of HW and TP parameters for RRH and eNB
|
||||
# check validity of HW and TP parameters for eNB
|
||||
#########################################################
|
||||
# to be discussed
|
||||
|
||||
@@ -392,15 +401,6 @@ function main() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$RRH" = "1" ] ; then
|
||||
if [ "$TP" = "None" ] ; then
|
||||
echo_fatal "A transport protocol (e.g. -t ETHERNET) must be defined!"
|
||||
fi
|
||||
if [ "$HW" = "None" ] ; then
|
||||
echo_info "No radio head has been selected (HW set to $HW)"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo_info "RF HW set to $HW"
|
||||
#Now we set flags to enable deadline scheduler settings
|
||||
#By default: USRP: disable,
|
||||
@@ -485,11 +485,9 @@ function main() {
|
||||
flash_firmware_bladerf
|
||||
fi
|
||||
fi
|
||||
if [ "$FLEXRAN_AGENT" == "1" ] ; then
|
||||
echo_info "installing protobuf/protobuf-c for flexran agent support"
|
||||
install_protobuf_from_source
|
||||
install_protobuf_c_from_source
|
||||
fi
|
||||
echo_info "installing protobuf/protobuf-c for flexran agent support"
|
||||
install_protobuf_from_source
|
||||
install_protobuf_c_from_source
|
||||
fi
|
||||
|
||||
if [ "$INSTALL_OPTIONAL" = "1" ] ; then
|
||||
@@ -514,10 +512,20 @@ function main() {
|
||||
DIR=$OPENAIR_DIR/cmake_targets
|
||||
if [ "$NOS1" = "1" ] ; then
|
||||
lte_build_dir=lte_noS1_build_oai
|
||||
lte_exec=lte-softmodem-nos1
|
||||
if [ "$eNB" = "1" ] ; then
|
||||
lte_exec=lte-softmodem-nos1
|
||||
fi
|
||||
if [ "$UE" = "1" ] ; then
|
||||
lte_exec=lte-uesoftmodem-nos1
|
||||
fi
|
||||
else
|
||||
lte_build_dir=lte_build_oai
|
||||
lte_exec=lte-softmodem
|
||||
if [ "$eNB" = "1" ] ; then
|
||||
lte_exec=lte-softmodem
|
||||
fi
|
||||
if [ "$UE" = "1" ] ; then
|
||||
lte_exec=lte-uesoftmodem
|
||||
fi
|
||||
fi
|
||||
|
||||
# configuration module libraries, one currently available, using libconfig
|
||||
@@ -537,10 +545,9 @@ function main() {
|
||||
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
|
||||
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
|
||||
echo "set ( XFORMS $XFORMS )" >> $cmake_file
|
||||
if [ "$FLEXRAN_AGENT" = "1" ] ; then
|
||||
echo "set ( FLEXRAN_AGENT_SB_IF $FLEXRAN_AGENT_SB_IF )" >> $cmake_file
|
||||
fi
|
||||
echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
||||
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
|
||||
@@ -574,6 +581,9 @@ function main() {
|
||||
compilations \
|
||||
$lte_build_dir $config_libconfig_shlib \
|
||||
lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
|
||||
compilations \
|
||||
$lte_build_dir coding \
|
||||
libcoding.so $dbin/libcoding.so
|
||||
|
||||
if [ "$NOS1" = "1" ] ; then
|
||||
compilations \
|
||||
@@ -639,12 +649,17 @@ function main() {
|
||||
if [ "$SIMUS_PHY" = "1" ] ; then
|
||||
# lte unitary simulators compilation
|
||||
echo_info "Compiling unitary tests simulators"
|
||||
simlist="dlsim_tm4 dlsim ulsim pucchsim prachsim pdcchsim pbchsim mbmssim"
|
||||
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
|
||||
#simlist="dlsim_tm4 dlsim ulsim pucchsim prachsim pdcchsim pbchsim mbmssim"
|
||||
simlist="dlsim ulsim"
|
||||
for f in $simlist ; do
|
||||
compilations \
|
||||
lte-simulators $f \
|
||||
$f $dbin/$f.$REL
|
||||
done
|
||||
compilations \
|
||||
lte-simulators coding \
|
||||
libcoding.so $dbin/libcoding.so
|
||||
fi
|
||||
|
||||
# Core simulators
|
||||
@@ -700,14 +715,14 @@ function main() {
|
||||
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
|
||||
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
|
||||
echo "set ( XFORMS $XFORMS )" >> $cmake_file
|
||||
if [ "$FLEXRAN_AGENT" = "1" ] ; then
|
||||
echo "set ( FLEXRAN_AGENT_SB_IF $FLEXRAN_AGENT_SB_IF )" >> $cmake_file
|
||||
fi
|
||||
echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( PRINT_STATS $PRINT_STATS )" >> $cmake_file
|
||||
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
||||
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
|
||||
echo "set ( UE_NAS_USE_TUN $UE_NAS_USE_TUN )" >> $cmake_file
|
||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/$oaisim_build_dir/build
|
||||
mkdir -p $DIR/$oaisim_build_dir/build
|
||||
@@ -716,6 +731,12 @@ function main() {
|
||||
compilations \
|
||||
$oaisim_build_dir $oaisim_exec \
|
||||
$oaisim_exec $dbin/$oaisim_exec.$REL
|
||||
compilations \
|
||||
$oaisim_build_dir $config_libconfig_shlib \
|
||||
lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
|
||||
compilations \
|
||||
$oaisim_build_dir coding \
|
||||
libcoding.so $dbin/libcoding.so
|
||||
|
||||
if [ "$NOS1" != "1" ] ; then
|
||||
|
||||
@@ -784,10 +805,9 @@ function main() {
|
||||
cp $DIR/oaisim_mme_build_oai/CMakeLists.template $cmake_file
|
||||
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
|
||||
echo "set ( XFORMS $XFORMS )" >> $cmake_file
|
||||
if [ "$FLEXRAN_AGENT" = "1" ] ; then
|
||||
echo "set ( FLEXRAN_AGENT_SB_IF $FLEXRAN_AGENT_SB_IF )" >> $cmake_file
|
||||
fi
|
||||
echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
||||
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
|
||||
@@ -801,61 +821,20 @@ function main() {
|
||||
# oaisim_mme $dbin/oaisim_mme.$REL
|
||||
fi
|
||||
|
||||
# RRH compilation
|
||||
#####################
|
||||
if [ "$RRH" = "1" ] ; then
|
||||
|
||||
rrh_exec=rrh_gw
|
||||
rrh_build_dir=rrh_gw
|
||||
|
||||
echo_info "Compiling $rrh_exec ..."
|
||||
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/rrh_gw/build
|
||||
mkdir -p $DIR/$rrh_build_dir/build
|
||||
cmake_file=$DIR/$rrh_build_dir/CMakeLists.txt
|
||||
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
|
||||
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
|
||||
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo "set ( ENABLE_ITTI False )" >> $cmake_file
|
||||
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
|
||||
echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
|
||||
echo 'set ( PACKAGE_NAME "\"rrh_gw\"")' >> $cmake_file
|
||||
echo "set ( DEADLINE_SCHEDULER \"${DEADLINE_SCHEDULER_FLAG_USER}\" )" >>$cmake_file
|
||||
echo "set ( CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file
|
||||
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
|
||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
|
||||
cd $DIR/$rrh_build_dir/build
|
||||
eval $CMAKE_CMD
|
||||
compilations \
|
||||
rrh_gw rrh_gw \
|
||||
rrh_gw $dbin/rrh_gw
|
||||
|
||||
fi
|
||||
# Telnet server compilation
|
||||
#####################
|
||||
if [ "$BUILD_TELNETSRV" = "1" ] ; then
|
||||
|
||||
telnetsrv_build_dir=telnetsrv
|
||||
mkdir -p $DIR/$telnetsrv_build_dir/build
|
||||
cd $DIR/$telnetsrv_build_dir/build
|
||||
echo_info "Compiling telnet server library ..."
|
||||
|
||||
[ "$CLEAN" = "1" ] && rm -rf $DIR/$telnetsrv_build_dir
|
||||
cmake_file=$OPENAIR_DIR/common/utils/$telnetsrv_build_dir/CMakeLists.txt
|
||||
cd $DIR/$telnetsrv_build_dir/build
|
||||
eval "$CMAKE_CMD $OPENAIR_DIR/common/utils/$telnetsrv_build_dir/"
|
||||
make
|
||||
build_dir=$lte_build_dir
|
||||
compilations \
|
||||
$build_dir telnetsrv \
|
||||
libtelnetsrv.so $dbin/libtelnetsrv.so
|
||||
|
||||
fi
|
||||
# build RF device and transport protocol libraries
|
||||
#####################################
|
||||
if [ "$eNB" = "1" -o "$UE" = "1" -o "$RRH" = "1" ] ; then
|
||||
if [ "$eNB" = "1" -o "$UE" = "1" ] ; then
|
||||
|
||||
if [ "$eNB" = "1" -o "$UE" = "1" ] ; then
|
||||
build_dir=$lte_build_dir
|
||||
else
|
||||
build_dir=$rrh_build_dir
|
||||
fi
|
||||
build_dir=$lte_build_dir
|
||||
|
||||
# build RF device libraries
|
||||
if [ "$HW" != "None" ] ; then
|
||||
@@ -962,6 +941,124 @@ fi
|
||||
else
|
||||
echo_info "10. Bypassing the Tests ..."
|
||||
fi
|
||||
|
||||
# basic simulator
|
||||
#####################
|
||||
if [ "$BASIC_SIMULATOR" = "1" ]; then
|
||||
echo_info "Build basic simulator"
|
||||
[ "$CLEAN" = "1" ] && rm -rf $OPENAIR_DIR/cmake_targets/basic_simulator
|
||||
[ "$CLEAN" = "1" ] && rm -rf $OPENAIR_DIR/cmake_targets/nas_sim_tools/build
|
||||
mkdir -p $OPENAIR_DIR/cmake_targets/basic_simulator
|
||||
mkdir -p $OPENAIR_DIR/cmake_targets/basic_simulator/enb
|
||||
mkdir -p $OPENAIR_DIR/cmake_targets/basic_simulator/ue
|
||||
mkdir -p $OPENAIR_DIR/cmake_targets/nas_sim_tools/build
|
||||
|
||||
# enb
|
||||
|
||||
cmake_file=$OPENAIR_DIR/cmake_targets/basic_simulator/enb/CMakeLists.txt
|
||||
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
|
||||
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
|
||||
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
|
||||
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
||||
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo "set ( XFORMS $XFORMS )" >> $cmake_file
|
||||
echo "set ( RF_BOARD \"OAI_USRP\")" >> $cmake_file
|
||||
echo "set ( TRANSP_PRO \"None\")" >> $cmake_file
|
||||
echo "set(PACKAGE_NAME \"simulator_enb\")" >> $cmake_file
|
||||
echo "set (DEADLINE_SCHEDULER \"False\" )" >> $cmake_file
|
||||
echo "set (CPU_AFFINITY \"False\" )" >> $cmake_file
|
||||
echo "set ( T_TRACER \"True\" )" >> $cmake_file
|
||||
echo "set (UE_AUTOTEST_TRACE $UE_AUTOTEST_TRACE)" >> $cmake_file
|
||||
echo "set (UE_DEBUG_TRACE $UE_DEBUG_TRACE)" >> $cmake_file
|
||||
echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file
|
||||
echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file
|
||||
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
|
||||
echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file
|
||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)' >> $cmake_file
|
||||
|
||||
echo_info "Build eNB"
|
||||
echo_info "logs are in $dlog/basic_simulator_enb.txt"
|
||||
set +e
|
||||
{
|
||||
cd $OPENAIR_DIR/cmake_targets/basic_simulator/enb
|
||||
cmake .
|
||||
make -j`nproc` lte-softmodem
|
||||
make -j`nproc` coding params_libconfig tcp_bridge_oai
|
||||
ln -sf libtcp_bridge_oai.so liboai_device.so
|
||||
cd ../..
|
||||
} > $dlog/basic_simulator_enb.txt 2>&1
|
||||
set -e
|
||||
if [ -s $OPENAIR_DIR/cmake_targets/basic_simulator/enb/lte-softmodem -a \
|
||||
-s $OPENAIR_DIR/cmake_targets/basic_simulator/enb/libcoding.so -a \
|
||||
-s $OPENAIR_DIR/cmake_targets/basic_simulator/enb/libparams_libconfig.so -a \
|
||||
-s $OPENAIR_DIR/cmake_targets/basic_simulator/enb/libtcp_bridge_oai.so ] ; then
|
||||
echo_success "eNB compiled"
|
||||
check_warnings "$dlog/basic_simulator_enb.txt"
|
||||
else
|
||||
echo_error "eNB compilation failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ue
|
||||
|
||||
echo_info "Compile conf2uedata"
|
||||
cd $OPENAIR_DIR/cmake_targets/nas_sim_tools/build
|
||||
eval $CMAKE_CMD
|
||||
compilations \
|
||||
nas_sim_tools conf2uedata \
|
||||
conf2uedata $dbin/conf2uedata
|
||||
|
||||
cmake_file=$OPENAIR_DIR/cmake_targets/basic_simulator/ue/CMakeLists.txt
|
||||
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
|
||||
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
|
||||
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
|
||||
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
||||
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo "set ( XFORMS $XFORMS )" >> $cmake_file
|
||||
echo "set ( RF_BOARD \"OAI_USRP\")" >> $cmake_file
|
||||
echo "set ( TRANSP_PRO \"None\")" >> $cmake_file
|
||||
echo "set(PACKAGE_NAME \"simulator_ue\")" >> $cmake_file
|
||||
echo "set (DEADLINE_SCHEDULER \"False\" )" >> $cmake_file
|
||||
echo "set (CPU_AFFINITY \"False\" )" >> $cmake_file
|
||||
echo "set ( T_TRACER \"False\" )" >> $cmake_file
|
||||
echo "set (UE_AUTOTEST_TRACE $UE_AUTOTEST_TRACE)" >> $cmake_file
|
||||
echo "set (UE_DEBUG_TRACE $UE_DEBUG_TRACE)" >> $cmake_file
|
||||
echo "set (UE_TIMING_TRACE $UE_TIMING_TRACE)" >> $cmake_file
|
||||
echo "set (DISABLE_LOG_X $DISABLE_LOG_X)" >> $cmake_file
|
||||
echo "set (USRP_REC_PLAY $USRP_REC_PLAY)" >> $cmake_file
|
||||
echo "set (LINUX True )" >> $cmake_file
|
||||
echo "set (PDCP_USE_NETLINK True )" >> $cmake_file
|
||||
echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file
|
||||
echo "set (UE_NAS_USE_TUN \"True\" )" >> $cmake_file
|
||||
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)' >> $cmake_file
|
||||
|
||||
echo_info "Build UE"
|
||||
echo_info "logs are in $dlog/basic_simulator_ue.txt"
|
||||
set +e
|
||||
{
|
||||
cd $OPENAIR_DIR/cmake_targets/basic_simulator/ue
|
||||
cmake .
|
||||
make -j`nproc` lte-uesoftmodem
|
||||
make -j`nproc` coding params_libconfig tcp_bridge_oai
|
||||
ln -sf libtcp_bridge_oai.so liboai_device.so
|
||||
cd ../..
|
||||
} > $dlog/basic_simulator_ue.txt 2>&1
|
||||
set -e
|
||||
if [ -s $OPENAIR_DIR/cmake_targets/basic_simulator/ue/lte-uesoftmodem -a \
|
||||
-s $OPENAIR_DIR/cmake_targets/basic_simulator/ue/libcoding.so -a \
|
||||
-s $OPENAIR_DIR/cmake_targets/basic_simulator/ue/libparams_libconfig.so -a \
|
||||
-s $OPENAIR_DIR/cmake_targets/basic_simulator/ue/libtcp_bridge_oai.so ] ; then
|
||||
echo_success "UE compiled"
|
||||
check_warnings "$dlog/basic_simulator_ue.txt"
|
||||
else
|
||||
echo_error "UE compilation failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo_info "Generate UE SIM data"
|
||||
$OPENAIR_DIR/targets/bin/conf2uedata -c $OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf -o $OPENAIR_DIR/cmake_targets/basic_simulator/ue
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
@@ -2,17 +2,13 @@ cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
||||
set ( ASN_DEBUG False)
|
||||
set ( ADDR_CONF False )
|
||||
set ( DEBUG_OMG False )
|
||||
set ( DISABLE_XER_PRINT False )
|
||||
set ( DRIVER2013 True )
|
||||
set ( EMOS False )
|
||||
set ( EMIT_ASN_DEBUG False )
|
||||
set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI True )
|
||||
set ( ENABLE_NAS_UE_LOGGING True )
|
||||
set ( ENABLE_NEW_MULTICAST True )
|
||||
set ( ENABLE_PGM_TRANSPORT True )
|
||||
set ( ENABLE_SECURITY True )
|
||||
set ( ENABLE_STANDALONE_EPC False)
|
||||
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
|
||||
@@ -21,7 +17,6 @@ set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True)
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
set ( ENB_MODE True )
|
||||
set ( EXMIMO_IOT True )
|
||||
set ( HARD_RT False )
|
||||
set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U True)
|
||||
@@ -33,7 +28,6 @@ set ( DEADLINE_SCHEDULER False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MESSAGE_CHART_GENERATOR False)
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX False )
|
||||
@@ -42,38 +36,25 @@ set ( NAS_MME False )
|
||||
set ( NAS_UE True )
|
||||
set ( NB_ANTENNAS_RX "2" )
|
||||
set ( NB_ANTENNAS_TX "2" )
|
||||
set ( NB_ANTENNAS_TXRX "2" )
|
||||
set ( NEW_FFT True )
|
||||
set ( NO_RRM True )
|
||||
set ( OAI_EMU False )
|
||||
set ( OAISIM False )
|
||||
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
|
||||
set ( OAI_NW_DRIVER_USE_NETLINK True )
|
||||
set ( OPENAIR1 True )
|
||||
set ( OPENAIR2 True )
|
||||
set ( OPENAIR_LTE True )
|
||||
set ( PACKAGE_NAME "epc_test" )
|
||||
set ( PBS_SIM False )
|
||||
set ( PDCP_USE_NETLINK True )
|
||||
set ( PC_DSP True )
|
||||
set ( PC_TARGET True )
|
||||
set ( PDCP_MSG_PRINT False )
|
||||
set ( PERFECT_CE False )
|
||||
set ( PHY_ABSTRACTION True )
|
||||
set ( PHY_CONTEXT False )
|
||||
set ( PHY_EMUL False )
|
||||
set ( PHYSIM True )
|
||||
set ( PUCCH True )
|
||||
set ( RANDOM_BF False )
|
||||
set ( RF_BOARD "False" )
|
||||
set ( RLC_STOP_ON_LOST_PDU False )
|
||||
set ( RRC_ASN1_VERSION "Rel10" )
|
||||
set ( RRC_DEFAULT_RAB_IS_AM True)
|
||||
set ( RRC_MSG_PRINT False )
|
||||
set ( RTAI False )
|
||||
set ( SECU False )
|
||||
set ( SMBV False )
|
||||
set ( TEST_OMG False )
|
||||
set ( USE_MME "R10" )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT True )
|
||||
|
||||
@@ -6,10 +6,7 @@ set(XFORMS True)
|
||||
set(ENABLE_ITTI False)
|
||||
set(DEBUG_PHY False)
|
||||
set(MU_RECIEVER False)
|
||||
set(RANDOM_BF False)
|
||||
set(PBS_SIM False)
|
||||
set(PERFECT_CE True)
|
||||
set(NAS_UE False)
|
||||
set(MESSAGE_CHART_GENERATOR False)
|
||||
|
||||
set(RRC_ASN1_VERSION "Rel14")
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
||||
set ( ADDR_CONF False )
|
||||
set ( DEBUG_OMG False )
|
||||
set ( DISABLE_XER_PRINT False )
|
||||
set ( DRIVER2013 True )
|
||||
set ( EMOS False )
|
||||
set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI True )
|
||||
set ( ENABLE_NAS_UE_LOGGING True )
|
||||
set ( ENABLE_NEW_MULTICAST True )
|
||||
set ( ENABLE_PGM_TRANSPORT True )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY True )
|
||||
set ( ENABLE_STANDALONE_EPC False)
|
||||
@@ -20,7 +16,6 @@ set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True)
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
set ( ENB_MODE True )
|
||||
set ( EXMIMO_IOT True )
|
||||
set ( HARD_RT False )
|
||||
set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U True)
|
||||
@@ -32,7 +27,6 @@ set ( DEADLINE_SCHEDULER False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MESSAGE_CHART_GENERATOR False)
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX False )
|
||||
@@ -41,40 +35,26 @@ set ( NAS_MME False )
|
||||
set ( NAS_UE True )
|
||||
set ( NB_ANTENNAS_RX "2" )
|
||||
set ( NB_ANTENNAS_TX "2" )
|
||||
set ( NB_ANTENNAS_TXRX "2" )
|
||||
set ( NEW_FFT True )
|
||||
set ( NO_RRM True )
|
||||
set ( OAI_EMU True )
|
||||
set ( OAISIM True )
|
||||
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
|
||||
set ( OAI_NW_DRIVER_USE_NETLINK True )
|
||||
set ( OPENAIR1 True )
|
||||
set ( OPENAIR2 True )
|
||||
set ( OPENAIR_LTE True )
|
||||
set ( PACKAGE_NAME "oaisim" )
|
||||
set ( PBS_SIM False )
|
||||
set ( PDCP_USE_NETLINK True )
|
||||
set ( PC_DSP True )
|
||||
set ( PC_TARGET True )
|
||||
set ( PDCP_MSG_PRINT False )
|
||||
set ( PERFECT_CE False )
|
||||
set ( PHY_ABSTRACTION True )
|
||||
set ( PHY_CONTEXT False )
|
||||
set ( PHY_EMUL False )
|
||||
set ( PHYSIM True )
|
||||
set ( PUCCH True )
|
||||
set ( RANDOM_BF False )
|
||||
set ( RF_BOARD "False" )
|
||||
set ( RLC_STOP_ON_LOST_PDU False )
|
||||
set ( RRC_ASN1_VERSION "Rel10" )
|
||||
set ( RRC_DEFAULT_RAB_IS_AM True)
|
||||
set ( RRC_MSG_PRINT False )
|
||||
set ( RTAI False )
|
||||
set ( SECU False )
|
||||
set ( SMBV False )
|
||||
set ( SPECTRA False )
|
||||
set ( TEST_OMG False )
|
||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||
set ( USE_MME "R10" )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT False )
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
||||
set ( ADDR_CONF False )
|
||||
set ( DEBUG_OMG False )
|
||||
set ( DISABLE_XER_PRINT False )
|
||||
set ( DRIVER2013 False )
|
||||
set ( EMOS False )
|
||||
set ( ENABLE_FXP False )
|
||||
set ( ENABLE_ITTI True )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST False )
|
||||
set ( ENABLE_PGM_TRANSPORT False )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False )
|
||||
@@ -21,7 +17,6 @@ set ( ENABLE_VCD_FIFO False )
|
||||
set ( ENB_MODE False )
|
||||
set ( EPC_BUILD True )
|
||||
set ( EXMIMO_IOT False )
|
||||
set ( HARD_RT False )
|
||||
set ( JUMBO_FRAME False )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U True)
|
||||
@@ -32,7 +27,6 @@ set ( LOG_NO_THREAD False )
|
||||
set ( DEADLINE_SCHEDULER False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX False )
|
||||
@@ -42,42 +36,27 @@ set ( NAS_NETLINK False )
|
||||
set ( NAS_UE False )
|
||||
set ( NB_ANTENNAS_RX "2" )
|
||||
set ( NB_ANTENNAS_TX "2" )
|
||||
set ( NB_ANTENNAS_TXRX "2" )
|
||||
set ( NEW_FFT False )
|
||||
set ( NO_RRM False )
|
||||
set ( OAI_EMU False )
|
||||
set ( OAISIM False )
|
||||
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
|
||||
set ( OAI_NW_DRIVER_USE_NETLINK False )
|
||||
set ( OPENAIR1 False )
|
||||
set ( OPENAIR2 False )
|
||||
set ( OPENAIR_EMU False )
|
||||
set ( OPENAIR_LTE False )
|
||||
set ( PACKAGE_NAME "EPC" )
|
||||
set ( PBS_SIM False )
|
||||
set ( PC_DSP False )
|
||||
set ( PC_TARGET False )
|
||||
set ( PDCP_MSG_PRINT False )
|
||||
set ( PERFECT_CE False )
|
||||
set ( PHY_ABSTRACTION False )
|
||||
set ( PHY_CONTEXT False )
|
||||
set ( PHY_EMUL False )
|
||||
set ( PHYSIM False )
|
||||
set ( PUCCH False )
|
||||
set ( RANDOM_BF False )
|
||||
set ( RF_BOARD "False" )
|
||||
set ( RRC_ASN1_VERSION "Rel10" )
|
||||
set ( RLC_STOP_ON_LOST_PDU False )
|
||||
set ( RRC_MSG_PRINT False )
|
||||
set ( RTAI False )
|
||||
set ( SECU False )
|
||||
set ( SMBV False )
|
||||
set ( SPECTRA False )
|
||||
set ( TEST_OMG False )
|
||||
set ( UPDATE_RELEASE_9 True)
|
||||
set ( UPDATE_RELEASE_10 True)
|
||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||
set ( USE_MME "R10" )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT False )
|
||||
set ( XFORMS False )
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set ( ADDR_CONF False )
|
||||
set ( DEBUG_OMG False )
|
||||
set ( DISABLE_XER_PRINT False )
|
||||
set ( DRIVER2013 True )
|
||||
set ( EMOS False )
|
||||
set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI True )
|
||||
set ( ENABLE_NAS_UE_LOGGING False )
|
||||
set ( ENABLE_NEW_MULTICAST True )
|
||||
set ( ENABLE_PGM_TRANSPORT True )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY False )
|
||||
set ( ENABLE_STANDALONE_EPC False)
|
||||
@@ -19,7 +15,6 @@ set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
set ( ENB_MODE True )
|
||||
set ( EXMIMO_IOT True )
|
||||
set ( HARD_RT False )
|
||||
set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U False)
|
||||
@@ -33,51 +28,35 @@ set ( MAX_NUM_CCs 1 )
|
||||
set ( MESSAGE_CHART_GENERATOR False )
|
||||
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
|
||||
set ( MESSAGE_CHART_GENERATOR_PHY False )
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX True )
|
||||
set ( NAS_ADDRESS_FIX False )
|
||||
set ( NAS_BUILT_IN_UE False)
|
||||
set ( NAS_MME False )
|
||||
set ( NAS_UE False )
|
||||
set ( NB_ANTENNAS_RX "2" )
|
||||
set ( NB_ANTENNAS_TX "2" )
|
||||
set ( NB_ANTENNAS_TXRX "2" )
|
||||
set ( NEW_FFT True )
|
||||
set ( NO_RRM True )
|
||||
set ( OAI_EMU True )
|
||||
set ( OAISIM True )
|
||||
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
|
||||
set ( OAI_NW_DRIVER_USE_NETLINK True )
|
||||
set ( OPENAIR1 True )
|
||||
set ( OPENAIR2 True )
|
||||
set ( OPENAIR_EMU False )
|
||||
set ( OPENAIR_LTE True )
|
||||
set ( PACKAGE_NAME "oaisim" )
|
||||
set ( PBS_SIM False )
|
||||
set ( PDCP_USE_NETLINK True )
|
||||
set ( PC_DSP True )
|
||||
set ( PC_TARGET True )
|
||||
set ( PDCP_MSG_PRINT False )
|
||||
set ( PERFECT_CE False )
|
||||
set ( PHY_ABSTRACTION True )
|
||||
set ( PHY_CONTEXT False )
|
||||
set ( PHY_EMUL False )
|
||||
set ( PHYSIM True )
|
||||
set ( PUCCH True )
|
||||
set ( RANDOM_BF False )
|
||||
set ( RF_BOARD "False" )
|
||||
set ( RRC_ASN1_VERSION "Rel10" )
|
||||
set ( RLC_STOP_ON_LOST_PDU False )
|
||||
set ( RRC_MSG_PRINT False )
|
||||
set ( RTAI False )
|
||||
set ( SECU False )
|
||||
set ( SMBV False )
|
||||
set ( SPECTRA False )
|
||||
set ( TEST_OMG False )
|
||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||
set ( USE_MME "R10" )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT False )
|
||||
set ( DEBUG_PHY False )
|
||||
set ( DEBUG_PHY_PROC False)
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
|
||||
set ( ADDR_CONF False )
|
||||
set ( DEBUG_OMG False )
|
||||
set ( DISABLE_XER_PRINT False )
|
||||
set ( DRIVER2013 True )
|
||||
set ( EMOS False )
|
||||
set ( ENABLE_FXP True )
|
||||
set ( ENABLE_ITTI True )
|
||||
set ( ENABLE_NAS_UE_LOGGING True )
|
||||
set ( ENABLE_NEW_MULTICAST True )
|
||||
set ( ENABLE_PDCP_NETLINK_FIFO False )
|
||||
set ( ENABLE_PGM_TRANSPORT True )
|
||||
set ( ENABLE_RAL False )
|
||||
set ( ENABLE_SECURITY True )
|
||||
set ( ENABLE_STANDALONE_EPC False)
|
||||
@@ -21,7 +17,6 @@ set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True)
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
set ( ENB_MODE True )
|
||||
set ( EXMIMO_IOT True )
|
||||
set ( HARD_RT False )
|
||||
set ( JUMBO_FRAME True )
|
||||
set ( LARGE_SCALE False )
|
||||
set ( LINK_ENB_PDCP_TO_GTPV1U True)
|
||||
@@ -33,7 +28,6 @@ set ( DEADLINE_SCHEDULER False )
|
||||
set ( MAC_CONTEXT 1 )
|
||||
set ( MAX_NUM_CCs 1 )
|
||||
set ( MESSAGE_CHART_GENERATOR False)
|
||||
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
|
||||
set ( MSG_PRINT False )
|
||||
set ( MU_RECEIVER False )
|
||||
set ( NAS_ADDRESS_FIX False )
|
||||
@@ -42,44 +36,30 @@ set ( NAS_MME False )
|
||||
set ( NAS_UE True )
|
||||
set ( NB_ANTENNAS_RX "2" )
|
||||
set ( NB_ANTENNAS_TX "2" )
|
||||
set ( NB_ANTENNAS_TXRX "2" )
|
||||
set ( NEW_FFT True )
|
||||
set ( NO_RRM True )
|
||||
set ( OAI_EMU True )
|
||||
set ( OAISIM True )
|
||||
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
|
||||
set ( OAI_NW_DRIVER_USE_NETLINK True )
|
||||
set ( OPENAIR1 True )
|
||||
set ( OPENAIR2 True )
|
||||
set ( OPENAIR_LTE True )
|
||||
set ( PACKAGE_NAME "oaisim" )
|
||||
set ( PBS_SIM False )
|
||||
set ( PDCP_USE_NETLINK True )
|
||||
set ( PC_DSP True )
|
||||
set ( PC_TARGET True )
|
||||
set ( PDCP_MSG_PRINT False )
|
||||
set ( PERFECT_CE False )
|
||||
set ( PHY_ABSTRACTION True )
|
||||
set ( PHY_CONTEXT False )
|
||||
set ( PHY_EMUL False )
|
||||
set ( PHYSIM True )
|
||||
set ( PUCCH True )
|
||||
set ( RANDOM_BF False )
|
||||
set ( RF_BOARD "False" )
|
||||
set ( RLC_STOP_ON_LOST_PDU False )
|
||||
set ( RRC_ASN1_VERSION "Rel10" )
|
||||
set ( RRC_DEFAULT_RAB_IS_AM True)
|
||||
set ( RRC_MSG_PRINT False )
|
||||
set ( RTAI False )
|
||||
set ( SECU False )
|
||||
set ( SMBV False )
|
||||
set ( SPECTRA False )
|
||||
set ( TEST_OMG False )
|
||||
|
||||
set ( TEST_S1C_MME True )
|
||||
|
||||
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
|
||||
set ( USE_MME "R10" )
|
||||
set ( USER_MODE True )
|
||||
set ( XER_PRINT False )
|
||||
set ( XFORMS False )
|
||||
|
||||
@@ -95,6 +95,9 @@ get_distribution_release() {
|
||||
check_supported_distribution() {
|
||||
local distribution=$(get_distribution_release)
|
||||
case "$distribution" in
|
||||
"ubuntu18.04") return 0 ;;
|
||||
"ubuntu17.10") return 0 ;;
|
||||
"ubuntu17.04") return 0 ;;
|
||||
"ubuntu16.04") return 0 ;;
|
||||
"ubuntu14.04") return 0 ;;
|
||||
"fedora24") return 0 ;;
|
||||
@@ -208,7 +211,7 @@ install_protobuf_from_source(){
|
||||
#cd protobuf-2.6.1/
|
||||
rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0
|
||||
wget https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
|
||||
tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $USER --group $USER --no-same-owner
|
||||
tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $USER --group $(groups | cut -d" " -f1) --no-same-owner
|
||||
cd protobuf-3.3.0/
|
||||
./configure
|
||||
echo "Compiling protobuf"
|
||||
@@ -230,6 +233,7 @@ install_protobuf_c_from_source(){
|
||||
rm -rf /tmp/protobuf-c
|
||||
git clone https://github.com/protobuf-c/protobuf-c.git
|
||||
cd protobuf-c
|
||||
git checkout 2a46af42784abf86804d536f6e0122d47cfeea45
|
||||
./autogen.sh
|
||||
./configure
|
||||
echo "Compiling protobuf-c"
|
||||
@@ -246,14 +250,14 @@ install_usrp_uhd_driver_from_source(){
|
||||
cd /tmp
|
||||
echo "Downloading UHD driver"
|
||||
rm -rf /tmp/uhd
|
||||
git clone git://github.com/EttusResearch/uhd.git
|
||||
git clone https://github.com/EttusResearch/uhd.git
|
||||
cd uhd
|
||||
git checkout tags/release_003_010_001_001
|
||||
mkdir -p host/build
|
||||
cd host/build
|
||||
$CMAKE ../
|
||||
echo "Compiling UHD"
|
||||
make
|
||||
make -j`nproc`
|
||||
make test
|
||||
$SUDO make install
|
||||
$SUDO ldconfig
|
||||
@@ -264,7 +268,7 @@ check_install_usrp_uhd_driver(){
|
||||
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
|
||||
#first we remove old installation
|
||||
$SUDO apt-get remove -y uhd || true
|
||||
$SUDO apt-get remove libuhd-dev libuhd003 uhd-host -y
|
||||
$SUDO apt-get remove libuhd-dev libuhd003 uhd-host -y || true
|
||||
v=$(lsb_release -cs)
|
||||
$SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
|
||||
#The new USRP repository
|
||||
@@ -274,10 +278,11 @@ check_install_usrp_uhd_driver(){
|
||||
$SUDO apt-get -y --allow-unauthenticated install libuhd-dev libuhd003 uhd-host
|
||||
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
|
||||
$SUDO $INSTALLER -y install python boost libusb-devel libusbx-devel boost-devel python-mako python-docutils cmake
|
||||
$SUDO pip install requests
|
||||
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
|
||||
# until EPEL repo hasn't bumped UHD driver to >=3.10 in EPEL, build driver from source
|
||||
$SUDO $INSTALLER -y remove uhd uhd-devel uhd-firmware
|
||||
install_ursp_uhd_driver_from_source
|
||||
install_usrp_uhd_driver_from_source
|
||||
else
|
||||
$SUDO $INSTALLER -y install uhd uhd-devel uhd-firmware
|
||||
fi
|
||||
@@ -479,16 +484,31 @@ check_install_oai_software() {
|
||||
fi
|
||||
$SUDO $INSTALLER update -y
|
||||
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
|
||||
local LAPACK_LIBNAME="liblapack.so"
|
||||
local LAPACK_TARGET="/usr/lib/atlas-base/atlas/liblapack.so"
|
||||
$SUDO apt install -y software-properties-common
|
||||
case "$(get_distribution_release)" in
|
||||
"ubuntu14.04")
|
||||
specific_packages="libtasn1-3-dev"
|
||||
specific_packages="libtasn1-3-dev gccxml libgnutls-dev libatlas-dev iproute libconfig8-dev"
|
||||
# For iperf3
|
||||
$SUDO add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports universe"
|
||||
$SUDO apt-get update
|
||||
;;
|
||||
"ubuntu16.04")
|
||||
specific_packages="libtasn1-6-dev"
|
||||
specific_packages="libtasn1-6-dev gccxml libgnutls-dev libatlas-dev iproute libconfig8-dev"
|
||||
;;
|
||||
"ubuntu17.04")
|
||||
specific_packages="libtasn1-6-dev castxml libgnutls28-dev libatlas-dev iproute libconfig8-dev"
|
||||
;;
|
||||
"ubuntu17.10")
|
||||
specific_packages="libtasn1-6-dev castxml libgnutls28-dev iproute libconfig8-dev"
|
||||
LAPACK_LIBNAME="liblapack.so-x86_64-linux-gnu"
|
||||
LAPACK_TARGET="/usr/lib/x86_64-linux-gnu/atlas/liblapack.so"
|
||||
;;
|
||||
"ubuntu18.04")
|
||||
specific_packages="libtasn1-6-dev castxml libgnutls28-dev iproute2 libconfig-dev"
|
||||
LAPACK_LIBNAME="liblapack.so-x86_64-linux-gnu"
|
||||
LAPACK_TARGET="/usr/lib/x86_64-linux-gnu/atlas/liblapack.so"
|
||||
;;
|
||||
esac
|
||||
$SUDO apt-get install -y \
|
||||
@@ -504,20 +524,16 @@ check_install_oai_software() {
|
||||
texlive-latex-base \
|
||||
ethtool \
|
||||
flex \
|
||||
gccxml \
|
||||
gdb \
|
||||
git \
|
||||
graphviz \
|
||||
gtkwave \
|
||||
guile-2.0-dev \
|
||||
iperf \
|
||||
iproute \
|
||||
iptables \
|
||||
iptables-dev \
|
||||
libatlas-base-dev \
|
||||
libatlas-dev \
|
||||
libblas-dev \
|
||||
libconfig8-dev \
|
||||
libffi-dev \
|
||||
libforms-bin \
|
||||
libforms-dev \
|
||||
@@ -553,11 +569,9 @@ check_install_oai_software() {
|
||||
wget \
|
||||
libxpm-dev
|
||||
|
||||
$SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so
|
||||
|
||||
$SUDO apt-get install -y nettle-dev nettle-bin
|
||||
$SUDO update-alternatives --set "$LAPACK_LIBNAME" "$LAPACK_TARGET"
|
||||
|
||||
$SUDO apt-get install -y libgnutls-dev
|
||||
$SUDO apt-get install -y nettle-dev nettle-bin
|
||||
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
|
||||
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
|
||||
if rpm -q epel-release > /dev/null; then
|
||||
@@ -635,7 +649,8 @@ check_install_oai_software() {
|
||||
lapack \
|
||||
lapack-devel \
|
||||
blas \
|
||||
blas-devel
|
||||
blas-devel \
|
||||
libyaml-devel
|
||||
fi
|
||||
|
||||
install_asn1c_from_source
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
RRC_Rel14=(
|
||||
"SystemInformation-r8-IEs.h" 4df485c5ddf2540eca271876cdc512caa19b0890 "fix_asn1.data/RRC.rel14/SystemInformation-r8-IEs.h.diff"
|
||||
"SystemInformation-NB-r13-IEs.h" 6d91332d5c39205819b06e5e36efe62ff8e5b33b "fix_asn1.data/RRC.rel14/SystemInformation-NB-r13-IEs.h.diff"
|
||||
)
|
||||
|
||||
RRC_Rel10=(
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
48a49,70
|
||||
> struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member {
|
||||
> SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member_PR present;
|
||||
> union SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member_u {
|
||||
> SystemInformationBlockType2_NB_r13_t sib2_r13;
|
||||
> SystemInformationBlockType3_NB_r13_t sib3_r13;
|
||||
> SystemInformationBlockType4_NB_r13_t sib4_r13;
|
||||
> SystemInformationBlockType5_NB_r13_t sib5_r13;
|
||||
> SystemInformationBlockType14_NB_r13_t sib14_r13;
|
||||
> SystemInformationBlockType16_NB_r13_t sib16_r13;
|
||||
> /*
|
||||
> * This type is extensible,
|
||||
> * possible extensions are below.
|
||||
> */
|
||||
> SystemInformationBlockType15_NB_r14_t sib15_v1430;
|
||||
> SystemInformationBlockType20_NB_r14_t sib20_v1430;
|
||||
> SystemInformationBlockType22_NB_r14_t sib22_v1430;
|
||||
> } choice;
|
||||
>
|
||||
> /* Context for parsing across buffer boundaries */
|
||||
> asn_struct_ctx_t _asn_ctx;
|
||||
> };
|
||||
>
|
||||
52,72c74
|
||||
< A_SEQUENCE_OF(struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member {
|
||||
< SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member_PR present;
|
||||
< union SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member_u {
|
||||
< SystemInformationBlockType2_NB_r13_t sib2_r13;
|
||||
< SystemInformationBlockType3_NB_r13_t sib3_r13;
|
||||
< SystemInformationBlockType4_NB_r13_t sib4_r13;
|
||||
< SystemInformationBlockType5_NB_r13_t sib5_r13;
|
||||
< SystemInformationBlockType14_NB_r13_t sib14_r13;
|
||||
< SystemInformationBlockType16_NB_r13_t sib16_r13;
|
||||
< /*
|
||||
< * This type is extensible,
|
||||
< * possible extensions are below.
|
||||
< */
|
||||
< SystemInformationBlockType15_NB_r14_t sib15_v1430;
|
||||
< SystemInformationBlockType20_NB_r14_t sib20_v1430;
|
||||
< SystemInformationBlockType22_NB_r14_t sib22_v1430;
|
||||
< } choice;
|
||||
<
|
||||
< /* Context for parsing across buffer boundaries */
|
||||
< asn_struct_ctx_t _asn_ctx;
|
||||
< } ) list;
|
||||
---
|
||||
> A_SEQUENCE_OF(struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member) list;
|
||||
@@ -44,11 +44,11 @@ load_module $OPENAIR_DIR/targets/bin/nasmesh.ko
|
||||
if [ "$1" = "eNB" ]; then
|
||||
echo "bring up oai0 interface for enb"
|
||||
sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
|
||||
$OPENAIR_DIR/targets/bin/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.9 -r 1
|
||||
$OPENAIR_DIR/targets/bin/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 1
|
||||
else
|
||||
if [ "$1" = "UE" ]; then
|
||||
echo "bring up oai0 interface for UE"
|
||||
sudo ifconfig oai0 10.0.1.9 netmask 255.255.255.0 broadcast 10.0.1.255
|
||||
$OPENAIR_DIR/targets/bin/rb_tool -a -c0 -i0 -z0 -s 10.0.1.9 -t 10.0.1.1 -r 1
|
||||
sudo ifconfig oai0 10.0.1.2 netmask 255.255.255.0 broadcast 10.0.1.255
|
||||
$OPENAIR_DIR/targets/bin/rb_tool -a -c0 -i0 -z0 -s 10.0.1.2 -t 10.0.1.1 -r 1
|
||||
fi
|
||||
fi
|
||||
|
||||
0
cmake_targets/tools/init_nas_s1
Normal file → Executable file
0
cmake_targets/tools/init_nas_s1
Normal file → Executable file
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -197,25 +197,40 @@ int i;
|
||||
return cfgptr;
|
||||
}
|
||||
|
||||
void end_configmodule()
|
||||
|
||||
/* free memory allocated when reading parameters */
|
||||
/* config module could be initialized again after this call */
|
||||
void end_configmodule(void)
|
||||
{
|
||||
if (cfgptr != NULL) {
|
||||
if (cfgptr->end != NULL) {
|
||||
printf ("[CONFIG] calling config module end function...\n");
|
||||
cfgptr->end();
|
||||
}
|
||||
|
||||
printf ("[CONFIG] free %u config value pointers\n",cfgptr->numptrs);
|
||||
for(int i=0; i<cfgptr->numptrs ; i++) {
|
||||
if (cfgptr->ptrs[i] != NULL) {
|
||||
free(cfgptr->ptrs[i]);
|
||||
cfgptr->ptrs[i]=NULL;
|
||||
}
|
||||
}
|
||||
cfgptr->numptrs=0;
|
||||
}
|
||||
}
|
||||
|
||||
/* free all memory used by config module */
|
||||
/* should be called only at program exit */
|
||||
void free_configmodule(void)
|
||||
{
|
||||
if (cfgptr != NULL) {
|
||||
end_configmodule();
|
||||
if( cfgptr->cfgmode != NULL) free(cfgptr->cfgmode);
|
||||
printf ("[CONFIG] free %u config parameter pointers\n",cfgptr->num_cfgP);
|
||||
for (int i=0; i<cfgptr->num_cfgP; i++) {
|
||||
if ( cfgptr->cfgP[i] != NULL) free(cfgptr->cfgP[i]);
|
||||
}
|
||||
printf ("[CONFIG] free %u config value pointers\n",cfgptr->numptrs);
|
||||
for(int i=0; i<cfgptr->numptrs ; i++) {
|
||||
if (cfgptr->ptrs[i] != NULL) {
|
||||
free(cfgptr->ptrs[i]);
|
||||
}
|
||||
cfgptr->ptrs[i]=NULL;
|
||||
}
|
||||
|
||||
|
||||
free(cfgptr);
|
||||
cfgptr=NULL;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -40,15 +40,18 @@
|
||||
#define CONFIG_MAX_OOPT_PARAMS 10 // maximum number of parameters in the -O option (-O <cfgmode>:P1:P2...
|
||||
#define CONFIG_MAX_ALLOCATEDPTRS 1024 // maximum number of parameters that can be dynamicaly allocated in the config module
|
||||
|
||||
/* default values for configuration module parameters */
|
||||
#define DEFAULT_CFGMODE "libconfig" // use libconfig file
|
||||
#define DEFAULT_CFGFILENAME "oai.conf" // default config file
|
||||
|
||||
/* rtflags bit position definitions */
|
||||
#define CONFIG_PRINTPARAMS 1 // print parameters values while processing
|
||||
#define CONFIG_DEBUGPTR 2 // print memory allocation/free debug messages
|
||||
#define CONFIG_DEBUGCMDLINE 4 // print command line processing messages
|
||||
#define CONFIG_HELP 8 // print help message
|
||||
#define CONFIG_ABORT 16 // config failed,abort execution
|
||||
#define CONFIG_NOOOPT 32 // no -O option found when parsing command line
|
||||
|
||||
|
||||
#define CONFIG_PRINTPARAMS 1 // print parameters values while processing
|
||||
#define CONFIG_DEBUGPTR 1<<1 // print memory allocation/free debug messages
|
||||
#define CONFIG_DEBUGCMDLINE 1<<2 // print command line processing messages
|
||||
#define CONFIG_NOABORTONCHKF 1<<3 // disable abort execution when parameter checking function fails
|
||||
#define CONFIG_HELP 1<<20 // print help message
|
||||
#define CONFIG_ABORT 1<<21 // config failed,abort execution
|
||||
#define CONFIG_NOOOPT 1<<22 // no -O option found when parsing command line
|
||||
typedef int(*configmodule_initfunc_t)(char *cfgP[],int numP);
|
||||
typedef int(*configmodule_getfunc_t)(paramdef_t *,int numparams, char *prefix);
|
||||
typedef int(*configmodule_getlistfunc_t)(paramlist_def_t *, paramdef_t *,int numparams, char *prefix);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -55,16 +55,61 @@
|
||||
#define PARAMFLAG_PARAMSET (1 << 16) // parameter has been explicitely set in get functions
|
||||
#define PARAMFLAG_PARAMSETDEF (1 << 17) // parameter has been set to default value in get functions
|
||||
|
||||
|
||||
/* checkedparam_t is possibly used in paramdef_t for specific parameter value validation */
|
||||
#define CONFIG_MAX_NUMCHECKVAL 20
|
||||
typedef struct paramdef paramdef_t;
|
||||
typedef union checkedparam {
|
||||
struct {
|
||||
int (*f1)(paramdef_t *param); /* check an integer against a list of authorized values */
|
||||
int okintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, store possible values */
|
||||
int num_okintval; /* number of valid values in the checkingval array */
|
||||
} s1;
|
||||
struct {
|
||||
int (*f1a)(paramdef_t *param); /* check an integer against a list of authorized values and set param value */
|
||||
/* to the corresponding item in setintval array (mainly for RRC params) */
|
||||
int okintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, store possible values in config file */
|
||||
int setintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, values set in the paramdef structure */
|
||||
int num_okintval; /* number of valid values in the checkingval array */
|
||||
} s1a;
|
||||
struct {
|
||||
int (*f2)(paramdef_t *param); /* check an integer against an authorized range, defined by its min and max value */
|
||||
int okintrange[CONFIG_MAX_NUMCHECKVAL]; /* integer array, store min and max values */
|
||||
|
||||
} s2;
|
||||
struct {
|
||||
int (*f3)(paramdef_t *param); /* check a string against a list of authorized values */
|
||||
char *okstrval[CONFIG_MAX_NUMCHECKVAL]; /* string array, store possible values */
|
||||
int num_okstrval; /* number of valid values in the checkingval array */
|
||||
} s3;
|
||||
struct {
|
||||
int (*f3a)(paramdef_t *param); /* check a string against a list of authorized values and set param value */
|
||||
/* to the corresponding item in setintval array (mainly for RRC params) */
|
||||
char *okstrval[CONFIG_MAX_NUMCHECKVAL]; /* string array, store possible values */
|
||||
int setintval[CONFIG_MAX_NUMCHECKVAL]; /* integer array, values set in the paramdef structure */
|
||||
int num_okstrval; /* number of valid values in the checkingval array */
|
||||
} s3a;
|
||||
struct {
|
||||
int (*f4)(paramdef_t *param); /* generic check function, no arguments but the param description */
|
||||
|
||||
} s4;
|
||||
struct {
|
||||
void (*checkfunc)(void) ;
|
||||
} s5;
|
||||
} checkedparam_t;
|
||||
|
||||
/* paramdef is used to describe a parameter, array of paramdef_t strustures is used as the main parameter in */
|
||||
/* config apis used to retrieve parameters values */
|
||||
typedef struct paramdef
|
||||
{
|
||||
char optname[MAX_OPTNAME_SIZE]; /* parameter name, can be used as long command line option */
|
||||
char *helpstr; /* help string */
|
||||
unsigned int paramflags; /* value is a "ored" combination of above PARAMFLAG_XXXX values */
|
||||
union { /* pointer to the parameter value, completed by the config module */
|
||||
char optname[MAX_OPTNAME_SIZE]; /* parameter name, can be used as long command line option */
|
||||
char *helpstr; /* help string */
|
||||
unsigned int paramflags; /* value is a "ored" combination of above PARAMFLAG_XXXX values */
|
||||
union { /* pointer to the parameter value, completed by the config module */
|
||||
char **strptr;
|
||||
char **strlistptr;
|
||||
uint8_t *u8ptr;
|
||||
char *i8ptr;
|
||||
int8_t *i8ptr;
|
||||
uint16_t *u16ptr;
|
||||
int16_t *i16ptr;
|
||||
uint32_t *uptr;
|
||||
@@ -72,18 +117,21 @@ typedef struct paramdef
|
||||
uint64_t *u64ptr;
|
||||
int64_t *i64ptr;
|
||||
double *dblptr;
|
||||
void *voidptr;
|
||||
} ;
|
||||
union { /* default parameter value, to be used when PARAMFLAG_MANDATORY is not specified */
|
||||
char *defstrval;
|
||||
char **defstrlistval;
|
||||
uint32_t defuintval;
|
||||
int defintval;
|
||||
uint64_t defint64val;
|
||||
int *defintarrayval;
|
||||
double defdblval;
|
||||
char *defstrval;
|
||||
char **defstrlistval;
|
||||
uint32_t defuintval;
|
||||
int defintval;
|
||||
uint64_t defint64val;
|
||||
int *defintarrayval;
|
||||
double defdblval;
|
||||
} ;
|
||||
char type; /* parameter value type, as listed below as TYPE_XXXX macro */
|
||||
int numelt; /* number of elements in a list or array parameters or max size of string value */
|
||||
checkedparam_t *chkPptr; /* possible pointer to the structure containing the info used to check parameter values */
|
||||
int *processedvalue; /* used to store integer values computed from string original value */
|
||||
} paramdef_t;
|
||||
|
||||
#define TYPE_INT TYPE_INT32
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <errno.h>
|
||||
#include <dlfcn.h>
|
||||
#include "config_userapi.h"
|
||||
extern void exit_fun(const char* s); // lte-softmodem clean exit function
|
||||
|
||||
|
||||
configmodule_interface_t *config_get_if(void)
|
||||
@@ -59,7 +60,7 @@ char * config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length)
|
||||
*ptr = malloc(length);
|
||||
if ( *ptr != NULL) {
|
||||
memset(*ptr,0,length);
|
||||
if ( (cfgoptions->paramflags & PARAMFLAG_NOFREE) != 0) {
|
||||
if ( (cfgoptions->paramflags & PARAMFLAG_NOFREE) == 0) {
|
||||
config_get_if()->ptrs[config_get_if()->numptrs] = *ptr;
|
||||
config_get_if()->numptrs++;
|
||||
}
|
||||
@@ -111,7 +112,29 @@ int tmpval=val;
|
||||
break;
|
||||
}
|
||||
}
|
||||
void config_assign_processedint(paramdef_t *cfgoption, int val) {
|
||||
cfgoption->processedvalue = malloc(sizeof(int));
|
||||
if ( cfgoption->processedvalue != NULL) {
|
||||
*(cfgoption->processedvalue) = val;
|
||||
} else {
|
||||
fprintf (stderr,"[CONFIG] %s %d malloc error\n",__FILE__, __LINE__);
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
int config_get_processedint(paramdef_t *cfgoption) {
|
||||
int ret;
|
||||
if ( cfgoption->processedvalue != NULL) {
|
||||
ret=*(cfgoption->processedvalue);
|
||||
free( cfgoption->processedvalue);
|
||||
cfgoption->processedvalue=NULL;
|
||||
printf_params("[CONFIG] %s: set from %s to %i\n",cfgoption->optname, *(cfgoption->strptr), ret);
|
||||
} else {
|
||||
fprintf (stderr,"[CONFIG] %s %d %s has no processed integer availablle\n",__FILE__, __LINE__, cfgoption->optname);
|
||||
ret=0;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
void config_printhelp(paramdef_t *params,int numparams)
|
||||
{
|
||||
for (int i=0 ; i<numparams ; i++) {
|
||||
@@ -124,6 +147,27 @@ void config_printhelp(paramdef_t *params,int numparams)
|
||||
}
|
||||
}
|
||||
|
||||
int config_execcheck(paramdef_t *params,int numparams, char *prefix)
|
||||
{
|
||||
int st=0;
|
||||
|
||||
for (int i=0 ; i<numparams ; i++) {
|
||||
if ( params[i].chkPptr == NULL) {
|
||||
continue;
|
||||
}
|
||||
if (params[i].chkPptr->s4.f4 != NULL) {
|
||||
st += params[i].chkPptr->s4.f4(&(params[i]));
|
||||
}
|
||||
}
|
||||
if (st != 0) {
|
||||
fprintf(stderr,"[CONFIG] config_execcheck: %i parameters with wrong value\n", -st);
|
||||
if ( CONFIG_ISFLAGSET(CONFIG_NOABORTONCHKF) == 0) {
|
||||
exit_fun("exit because configuration failed\n");
|
||||
}
|
||||
}
|
||||
return st;
|
||||
}
|
||||
|
||||
int config_get(paramdef_t *params,int numparams, char *prefix)
|
||||
{
|
||||
int ret= -1;
|
||||
@@ -137,6 +181,7 @@ configmodule_interface_t *cfgif = config_get_if();
|
||||
ret = config_get_if()->get(params, numparams,prefix);
|
||||
if (ret >= 0) {
|
||||
config_process_cmdline(params,numparams,prefix);
|
||||
config_execcheck(params,numparams,prefix);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -152,6 +197,89 @@ int config_isparamset(paramdef_t *params,int paramidx)
|
||||
}
|
||||
}
|
||||
|
||||
int config_getparamval_fromparamdefidx(paramdef_t *cfgoptions,int paramidx) {
|
||||
void print_intvalueerror(paramdef_t *param, char *fname, int *okval, int numokval) {
|
||||
fprintf(stderr,"[CONFIG] %s: %s: %i invalid value, authorized values:\n ",
|
||||
fname,param->optname, (int)*(param->uptr));
|
||||
for ( int i=0; i<numokval ; i++) {
|
||||
fprintf(stderr, " %i",okval[i]);
|
||||
}
|
||||
fprintf(stderr, " \n");
|
||||
}
|
||||
|
||||
int config_check_intval(paramdef_t *param)
|
||||
{
|
||||
if ( param == NULL ){
|
||||
fprintf(stderr,"[CONFIG] config_check_intval: NULL param argument\n");
|
||||
return -1;
|
||||
}
|
||||
for ( int i=0; i<param->chkPptr->s1.num_okintval ; i++) {
|
||||
if( *(param->uptr) == param->chkPptr->s1.okintval[i] ) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
print_intvalueerror(param,"config_check_intval", param->chkPptr->s1.okintval,param->chkPptr->s1.num_okintval);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int config_check_modify_integer(paramdef_t *param)
|
||||
{
|
||||
|
||||
for (int i=0; i < param->chkPptr->s1a.num_okintval ; i++) {
|
||||
if (*(param->uptr) == param->chkPptr->s1a.okintval[i] ) {
|
||||
printf_params("[CONFIG] %s: read value %i, set to %i\n",param->optname,*(param->uptr),param->chkPptr->s1a.setintval [i]);
|
||||
*(param->uptr) = param->chkPptr->s1a.setintval [i];
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
print_intvalueerror(param,"config_check_modify_integer", param->chkPptr->s1a.okintval,param->chkPptr->s1a.num_okintval);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int config_check_intrange(paramdef_t *param)
|
||||
{
|
||||
if( *(param->iptr) >= param->chkPptr->s2.okintrange[0] && *(param->iptr) <= param->chkPptr->s2.okintrange[1] ) {
|
||||
return 0;
|
||||
}
|
||||
fprintf(stderr,"[CONFIG] config_check_intrange: %s: %i invalid value, authorized range: %i %i\n",
|
||||
param->optname, (int)*(param->uptr), param->chkPptr->s2.okintrange[0], param->chkPptr->s2.okintrange[1]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
void print_strvalueerror(paramdef_t *param, char *fname, char **okval, int numokval) {
|
||||
fprintf(stderr,"[CONFIG] %s: %s: %s invalid value, authorized values:\n ",
|
||||
fname,param->optname, *(param->strptr));
|
||||
for ( int i=0; i<numokval ; i++) {
|
||||
fprintf(stderr, " %s",okval[i]);
|
||||
}
|
||||
fprintf(stderr, " \n");
|
||||
}
|
||||
|
||||
int config_check_strval(paramdef_t *param)
|
||||
{
|
||||
if ( param == NULL ){
|
||||
fprintf(stderr,"[CONFIG] config_check_strval: NULL param argument\n");
|
||||
return -1;
|
||||
}
|
||||
for ( int i=0; i<param->chkPptr->s3.num_okstrval ; i++) {
|
||||
if( strcasecmp(*(param->strptr),param->chkPptr->s3.okstrval[i] ) == 0) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
print_strvalueerror(param, "config_check_strval", param->chkPptr->s3.okstrval, param->chkPptr->s3.num_okstrval);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int config_checkstr_assign_integer(paramdef_t *param)
|
||||
{
|
||||
|
||||
|
||||
for (int i=0; i < param->chkPptr->s3a.num_okstrval ; i++) {
|
||||
if (strcasecmp(*(param->strptr),param->chkPptr->s3a.okstrval[i] ) == 0) {
|
||||
config_assign_processedint(param, param->chkPptr->s3a.setintval[i]);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
print_strvalueerror(param, "config_check_strval", param->chkPptr->s3a.okstrval, param->chkPptr->s3a.num_okstrval);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -38,24 +38,34 @@
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
#define DEFAULT_CFGFILENAME "oaisoftmodem.conf"
|
||||
#define DEFAULT_CFGMODE "libconfig"
|
||||
|
||||
#define CONFIG_GETSOURCE ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgmode )
|
||||
#define CONFIG_GETNUMP ( (config_get_if()==NULL) ? 0 : config_get_if()->num_cfgP )
|
||||
#define CONFIG_GETP(P) ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgP[P] )
|
||||
#define CONFIG_ISFLAGSET(P) ( (config_get_if()==NULL) ? 0 : !!(config_get_if()->rtflags & P))
|
||||
|
||||
#define CONFIG_ISPARAMFLAGSET(P,F) ( !!(P.paramflags & F))
|
||||
/* utility functions, to be used by configuration module and/or configuration libraries */
|
||||
extern configmodule_interface_t *config_get_if(void);
|
||||
extern char * config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) ;
|
||||
extern void config_printhelp(paramdef_t *,int numparams);
|
||||
extern int config_process_cmdline(paramdef_t *params,int numparams, char *prefix);
|
||||
extern int config_get(paramdef_t *params,int numparams, char *prefix);
|
||||
extern int config_isparamset(paramdef_t *params,int paramidx);
|
||||
extern void config_assign_processedint(paramdef_t *cfgoption, int val);
|
||||
extern void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val);
|
||||
extern int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix);
|
||||
extern int config_getparamval_fromparamdefidx(paramdef_t *cfgoptions,int paramidx);
|
||||
|
||||
/* apis to get parameters, to be used by oai modules, at configuration time */
|
||||
extern int config_get(paramdef_t *params,int numparams, char *prefix);
|
||||
#define config_getlist config_get_if()->getlist
|
||||
|
||||
/* apis to retrieve parameters info after calling get or getlist functions */
|
||||
extern int config_isparamset(paramdef_t *params,int paramidx);
|
||||
extern int config_get_processedint(paramdef_t *cfgoption);
|
||||
|
||||
/* functions to be used in parameters definition, to check parameters values */
|
||||
extern int config_check_intval(paramdef_t *param);
|
||||
extern int config_check_modify_integer(paramdef_t *param);
|
||||
extern int config_check_intrange(paramdef_t *param);
|
||||
extern int config_check_strval(paramdef_t *param);
|
||||
extern int config_checkstr_assign_integer(paramdef_t *param);
|
||||
|
||||
#define CONFIG_GETCONFFILE (config_get_if()->cfgP[0])
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -1,3 +1,33 @@
|
||||
/*
|
||||
* 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 common/config/libconfig/config_libconfig.c
|
||||
* \brief: implementation libconfig configuration library
|
||||
* \author Francois TABURET
|
||||
* \date 2017
|
||||
* \version 0.1
|
||||
* \company NOKIA BellLabs France
|
||||
* \email: francois.taburet@nokia-bell-labs.com
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
#define _GNU_SOURCE
|
||||
#include <libconfig.h>
|
||||
|
||||
@@ -21,21 +51,23 @@ int read_strlist(paramdef_t *cfgoptions,config_setting_t *setting, char *cfgpath
|
||||
{
|
||||
const char *str;
|
||||
int st;
|
||||
int numelt;
|
||||
|
||||
cfgoptions->numelt=config_setting_length(setting);
|
||||
cfgoptions->strlistptr=malloc(sizeof(char *) * (cfgoptions->numelt));
|
||||
numelt=config_setting_length(setting);
|
||||
config_check_valptr(cfgoptions,(char **)&(cfgoptions->strlistptr), sizeof(char *) * numelt);
|
||||
st=0;
|
||||
for (int i=0; i< cfgoptions->numelt && cfgoptions->strlistptr != NULL; i++) {
|
||||
for (int i=0; i< numelt ; i++) {
|
||||
str=config_setting_get_string_elem(setting,i);
|
||||
if (str==NULL) {
|
||||
printf("[LIBCONFIG] %s%i not found in config file\n", cfgoptions->optname,i);
|
||||
} else {
|
||||
cfgoptions->strlistptr[i]=malloc(strlen(str)+1);
|
||||
config_check_valptr(cfgoptions,&(cfgoptions->strlistptr[i]),strlen(str)+1);
|
||||
sprintf(cfgoptions->strlistptr[i],"%s",str);
|
||||
st++;
|
||||
printf_params("[LIBCONFIG] %s%i: %s\n", cfgpath,i,cfgoptions->strlistptr[i]);
|
||||
}
|
||||
}
|
||||
cfgoptions->numelt=numelt;
|
||||
return st;
|
||||
}
|
||||
|
||||
@@ -98,6 +130,7 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix )
|
||||
{
|
||||
case TYPE_STRING:
|
||||
|
||||
printf("call config_lookup_string for '%s' %p\n", cfgpath, &(libconfig_privdata.cfg)); fflush(stdout);
|
||||
if ( config_lookup_string(&(libconfig_privdata.cfg),cfgpath, (const char **)&str)) {
|
||||
if ( cfgoptions[i].numelt > 0 && str != NULL && strlen(str) >= cfgoptions[i].numelt ) {
|
||||
fprintf(stderr,"[LIBCONFIG] %s: %s exceeds maximum length of %i bytes, value truncated\n",
|
||||
@@ -108,10 +141,10 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix )
|
||||
config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *));
|
||||
config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(str)+1);
|
||||
sprintf( *(cfgoptions[i].strptr) , "%s", str);
|
||||
printf_params("[LIBCONFIG] %s: %s\n", cfgpath,*(cfgoptions[i].strptr) );
|
||||
printf_params("[LIBCONFIG] %s: \"%s\"\n", cfgpath,*(cfgoptions[i].strptr) );
|
||||
} else {
|
||||
sprintf( (char *)(cfgoptions[i].strptr) , "%s", str);
|
||||
printf_params("[LIBCONFIG] %s: %s\n", cfgpath,(char *)cfgoptions[i].strptr );
|
||||
printf_params("[LIBCONFIG] %s: \"%s\"\n", cfgpath,(char *)cfgoptions[i].strptr );
|
||||
}
|
||||
} else {
|
||||
if( cfgoptions[i].defstrval != NULL) {
|
||||
@@ -121,10 +154,10 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix )
|
||||
config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *));
|
||||
config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(cfgoptions[i].defstrval)+1);
|
||||
sprintf(*(cfgoptions[i].strptr), "%s",cfgoptions[i].defstrval);
|
||||
printf_params("[LIBCONFIG] %s set to default value %s\n", cfgpath, *(cfgoptions[i].strptr));
|
||||
printf_params("[LIBCONFIG] %s set to default value \"%s\"\n", cfgpath, *(cfgoptions[i].strptr));
|
||||
} else {
|
||||
sprintf((char *)(cfgoptions[i].strptr), "%s",cfgoptions[i].defstrval);
|
||||
printf_params("[LIBCONFIG] %s set to default value %s\n", cfgpath, (char *)cfgoptions[i].strptr);
|
||||
sprintf((char *)*(cfgoptions[i].strptr), "%s",cfgoptions[i].defstrval);
|
||||
printf_params("[LIBCONFIG] %s set to default value \"%s\"\n", cfgpath, (char *)*(cfgoptions[i].strptr));
|
||||
}
|
||||
} else {
|
||||
notfound=1;
|
||||
@@ -374,6 +407,7 @@ void config_libconfig_end(void )
|
||||
config_destroy(&(libconfig_privdata.cfg));
|
||||
if ( libconfig_privdata.configfile != NULL ) {
|
||||
free(libconfig_privdata.configfile);
|
||||
libconfig_privdata.configfile=NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -35,11 +35,12 @@
|
||||
|
||||
#include <pthread.h>
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/impl_defs_top.h"
|
||||
#include "PHY/impl_defs_lte.h"
|
||||
#include "RRC/LITE/defs.h"
|
||||
#include "RRC/LTE/rrc_defs.h"
|
||||
#include "flexran_agent_defs.h"
|
||||
|
||||
#include "gtpv1u.h"
|
||||
#include "NwGtpv1u.h"
|
||||
@@ -47,6 +48,8 @@
|
||||
#include "NwGtpv1uPrivate.h"
|
||||
#include "gtpv1u_eNB_defs.h"
|
||||
|
||||
#include "PHY/defs_L1_NB_IoT.h"
|
||||
#include "RRC/LTE/defs_NB_IoT.h"
|
||||
typedef struct {
|
||||
/// RAN context config file name
|
||||
char *config_file_name;
|
||||
@@ -54,22 +57,36 @@ typedef struct {
|
||||
int nb_inst;
|
||||
/// Number of Component Carriers per instance in this node
|
||||
int *nb_CC;
|
||||
/// Number of NB_IoT instances in this node
|
||||
int nb_nb_iot_rrc_inst;
|
||||
/// Number of MACRLC instances in this node
|
||||
int nb_macrlc_inst;
|
||||
/// Number of NB_IoT MACRLC instances in this node
|
||||
int nb_nb_iot_macrlc_inst;
|
||||
/// Number of component carriers per instance in this node
|
||||
int *nb_mac_CC;
|
||||
/// Number of L1 instances in this node
|
||||
int nb_L1_inst;
|
||||
/// Number of NB_IoT L1 instances in this node
|
||||
int nb_nb_iot_L1_inst;
|
||||
/// Number of Component Carriers per instance in this node
|
||||
int *nb_L1_CC;
|
||||
/// Number of RU instances in this node
|
||||
int nb_RU;
|
||||
/// FlexRAN context variables
|
||||
flexran_agent_info_t **flexran;
|
||||
/// eNB context variables
|
||||
struct PHY_VARS_eNB_s ***eNB;
|
||||
/// NB_IoT L1 context variables
|
||||
struct PHY_VARS_eNB_NB_IoT_s **L1_NB_IoT;
|
||||
/// RRC context variables
|
||||
struct eNB_RRC_INST_s **rrc;
|
||||
/// RRC context variables
|
||||
/// NB_IoT RRC context variables
|
||||
//struct eNB_RRC_INST_NB_IoT_s **nb_iot_rrc;
|
||||
/// MAC context variables
|
||||
struct eNB_MAC_INST_s **mac;
|
||||
/// NB_IoT MAC context variables
|
||||
struct eNB_MAC_INST_NB_IoT_s **nb_iot_mac;
|
||||
/// GTPu descriptor
|
||||
gtpv1u_data_t *gtpv1u_data_g;
|
||||
/// RU descriptors. These describe what each radio unit is supposed to do and contain the necessary functions for fronthaul interfaces
|
||||
|
||||
@@ -88,7 +88,7 @@ static void new_thread(void *(*f)(void *), void *data)
|
||||
|
||||
/* defined in local_tracer.c */
|
||||
void T_local_tracer_main(int remote_port, int wait_for_tracer,
|
||||
int local_socket);
|
||||
int local_socket, char *shm_file);
|
||||
|
||||
/* We monitor the tracee and the local tracer processes.
|
||||
* When one dies we forcefully kill the other.
|
||||
@@ -113,6 +113,9 @@ void T_init(int remote_port, int wait_for_tracer, int dont_fork)
|
||||
int s;
|
||||
int T_shm_fd;
|
||||
int child1, child2;
|
||||
char shm_file[128];
|
||||
|
||||
sprintf(shm_file, "/%s%d", T_SHM_FILENAME, getpid());
|
||||
|
||||
if (socketpair(AF_UNIX, SOCK_STREAM, 0, socket_pair))
|
||||
{ perror("socketpair"); abort(); }
|
||||
@@ -122,7 +125,8 @@ void T_init(int remote_port, int wait_for_tracer, int dont_fork)
|
||||
child1 = fork(); if (child1 == -1) abort();
|
||||
if (child1 == 0) {
|
||||
close(socket_pair[1]);
|
||||
T_local_tracer_main(remote_port, wait_for_tracer, socket_pair[0]);
|
||||
T_local_tracer_main(remote_port, wait_for_tracer, socket_pair[0],
|
||||
shm_file);
|
||||
exit(0);
|
||||
}
|
||||
close(socket_pair[0]);
|
||||
@@ -142,13 +146,13 @@ void T_init(int remote_port, int wait_for_tracer, int dont_fork)
|
||||
T_socket = s;
|
||||
|
||||
/* setup shared memory */
|
||||
T_shm_fd = shm_open(T_SHM_FILENAME, O_RDWR /*| O_SYNC*/, 0666);
|
||||
shm_unlink(T_SHM_FILENAME);
|
||||
if (T_shm_fd == -1) { perror(T_SHM_FILENAME); abort(); }
|
||||
T_shm_fd = shm_open(shm_file, O_RDWR /*| O_SYNC*/, 0666);
|
||||
shm_unlink(shm_file);
|
||||
if (T_shm_fd == -1) { perror(shm_file); abort(); }
|
||||
T_cache = mmap(NULL, T_CACHE_SIZE * sizeof(T_cache_t),
|
||||
PROT_READ | PROT_WRITE, MAP_SHARED, T_shm_fd, 0);
|
||||
if (T_cache == NULL)
|
||||
{ perror(T_SHM_FILENAME); abort(); }
|
||||
if (T_cache == MAP_FAILED)
|
||||
{ perror(shm_file); abort(); }
|
||||
close(T_shm_fd);
|
||||
|
||||
new_thread(T_receive_thread, NULL);
|
||||
|
||||
@@ -110,6 +110,16 @@ typedef struct {
|
||||
extern volatile int *T_freelist_head;
|
||||
extern T_cache_t *T_cache;
|
||||
|
||||
/* When running the basic simulator, we may fill the T cache too fast.
|
||||
* Let's not crash if it's full, just wait.
|
||||
*/
|
||||
#if BASIC_SIMULATOR
|
||||
# define T_BASIC_SIMULATOR_WAIT \
|
||||
while (T_cache[T_LOCAL_slot].busy) usleep(100)
|
||||
#else
|
||||
# define T_BASIC_SIMULATOR_WAIT /* */
|
||||
#endif
|
||||
|
||||
/* used at header of Tn, allocates buffer */
|
||||
#define T_LOCAL_DATA \
|
||||
char *T_LOCAL_buf; \
|
||||
@@ -118,6 +128,7 @@ extern T_cache_t *T_cache;
|
||||
T_LOCAL_slot = __sync_fetch_and_add(T_freelist_head, 1) \
|
||||
& (T_CACHE_SIZE - 1); \
|
||||
(void)__sync_fetch_and_and(T_freelist_head, T_CACHE_SIZE - 1); \
|
||||
T_BASIC_SIMULATOR_WAIT; \
|
||||
if (T_cache[T_LOCAL_slot].busy) { \
|
||||
printf("%s:%d:%s: T cache is full - consider increasing its size\n", \
|
||||
__FILE__, __LINE__, __FUNCTION__); \
|
||||
|
||||
@@ -8,10 +8,20 @@
|
||||
#define T_MAX_ARGS 16
|
||||
|
||||
/* maximum size of a message - increase if needed */
|
||||
#define T_BUFFER_MAX (1024*64)
|
||||
#if BASIC_SIMULATOR
|
||||
/* let's have 100 RBs functional for the basic simulator */
|
||||
# define T_BUFFER_MAX (1024*64*2)
|
||||
#else
|
||||
# define T_BUFFER_MAX (1024*64)
|
||||
#endif
|
||||
|
||||
/* size of the local cache for messages (must be pow(2,something)) */
|
||||
#define T_CACHE_SIZE (8192 * 2)
|
||||
#if BASIC_SIMULATOR
|
||||
/* we don't need much space for the basic simulator */
|
||||
# define T_CACHE_SIZE 1024
|
||||
#else
|
||||
# define T_CACHE_SIZE (8192 * 2)
|
||||
#endif
|
||||
|
||||
/* maximum number of bytes a message can contain */
|
||||
#ifdef T_SEND_TIME
|
||||
@@ -29,10 +39,10 @@ typedef struct {
|
||||
#define T_SHM_FILENAME "/T_shm_segment"
|
||||
|
||||
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
|
||||
#define VCD_NUM_FUNCTIONS 178
|
||||
#define VCD_NUM_FUNCTIONS 187
|
||||
|
||||
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
|
||||
#define VCD_NUM_VARIABLES 128
|
||||
#define VCD_NUM_VARIABLES 131
|
||||
|
||||
/* first VCD function (to be kept up to date! see in T_messages.txt) */
|
||||
#define VCD_FIRST_FUNCTION ((uintptr_t)T_VCD_FUNCTION_RT_SLEEP)
|
||||
|
||||
@@ -185,6 +185,10 @@ ID = ENB_RRC_CONNECTION_REESTABLISHMENT_REQUEST
|
||||
DESC = RRC connection reestablishment request
|
||||
GROUP = ALL:RRC:ENB
|
||||
FORMAT = int,eNB_ID : int,frame : int,subframe : int,rnti
|
||||
ID = ENB_RRC_CONNECTION_REESTABLISHMENT
|
||||
DESC = RRC connection reestablishment
|
||||
GROUP = ALL:RRC:ENB
|
||||
FORMAT = int,eNB_ID : int,frame : int,subframe : int,rnti
|
||||
ID = ENB_RRC_CONNECTION_REESTABLISHMENT_COMPLETE
|
||||
DESC = RRC connection reestablishment complete
|
||||
GROUP = ALL:RRC:ENB
|
||||
@@ -1438,6 +1442,18 @@ ID = VCD_VARIABLE_UE0_TRX_WRITE_NS_MISSING
|
||||
DESC = VCD variable UE0_TRX_WRITE_NS_MISSING
|
||||
GROUP = ALL:VCD:UE:VCD_VARIABLE
|
||||
FORMAT = ulong,value
|
||||
ID = VCD_VARIABLE_CPUID_ENB_THREAD_RXTX
|
||||
DESC = VCD variable CPUID_ENB_THREAD_RXTX
|
||||
GROUP = ALL:VCD:ENB:VCD_VARIABLE
|
||||
FORMAT = ulong,value
|
||||
ID = VCD_VARIABLE_CPUID_RU_THREAD
|
||||
DESC = VCD variable CPUID_RU_THREAD
|
||||
GROUP = ALL:VCD:ENB:VCD_VARIABLE
|
||||
FORMAT = ulong,value
|
||||
ID = VCD_VARIABLE_CPUID_RU_THREAD_TX
|
||||
DESC = VCD variable CPUID_RU_THREAD_TX
|
||||
GROUP = ALL:VCD:ENB:VCD_VARIABLE
|
||||
FORMAT = ulong,value
|
||||
|
||||
#functions
|
||||
|
||||
@@ -2157,3 +2173,39 @@ ID = VCD_FUNCTION_TRX_DECOMPR_IF
|
||||
DESC = VCD function TRX_DECOMPR_IF
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
ID = VCD_FUNCTION_NFAPI
|
||||
DESC = VCD function NFAPI
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
ID = VCD_FUNCTION_GENERATE_PCFICH
|
||||
DESC = VCD function GENERATE_PCFICH
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
ID = VCD_FUNCTION_GENERATE_DCI0
|
||||
DESC = VCD function GENERATE_DCI0
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
ID = VCD_FUNCTION_GENERATE_DLSCH
|
||||
DESC = VCD function GENERATE_DLSCH
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
ID = VCD_FUNCTION_GENERATE_PHICH
|
||||
DESC = VCD function GENERATE_PHICH
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
ID = VCD_FUNCTION_PDCCH_SCRAMBLING
|
||||
DESC = VCD function PDCCH_SCRAMBLING
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
ID = VCD_FUNCTION_PDCCH_MODULATION
|
||||
DESC = VCD function PDCCH_MODULATION
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
ID = VCD_FUNCTION_PDCCH_INTERLEAVING
|
||||
DESC = VCD function PDCCH_INTERLEAVING
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
ID = VCD_FUNCTION_PDCCH_TX
|
||||
DESC = VCD function PDCCH_TX
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
|
||||
@@ -300,6 +300,20 @@ static void forward(void *_forwarder, char *buf, int size)
|
||||
if (f->tail != NULL) f->tail->next = new;
|
||||
f->tail = new;
|
||||
|
||||
#if BASIC_SIMULATOR
|
||||
/* When runnng the basic simulator, the tracer may be too slow.
|
||||
* Let's not take too much memory in the tracee and
|
||||
* wait if there is too much data to send. 200MB is
|
||||
* arbitrary.
|
||||
*/
|
||||
while (f->memusage > 200 * 1024 * 1024) {
|
||||
if (pthread_cond_signal(&f->cond)) abort();
|
||||
if (pthread_mutex_unlock(&f->lock)) abort();
|
||||
usleep(1000);
|
||||
if (pthread_mutex_lock(&f->lock)) abort();
|
||||
}
|
||||
#endif /* BASIC_SIMULATOR */
|
||||
|
||||
f->memusage += size+4;
|
||||
/* warn every 100MB */
|
||||
if (f->memusage > f->last_warning_memusage &&
|
||||
@@ -326,17 +340,17 @@ static void wait_message(void)
|
||||
while (T_local_cache[T_busylist_head].busy == 0) usleep(1000);
|
||||
}
|
||||
|
||||
static void init_shm(void)
|
||||
static void init_shm(char *shm_file)
|
||||
{
|
||||
int i;
|
||||
int s = shm_open(T_SHM_FILENAME, O_RDWR | O_CREAT /*| O_SYNC*/, 0666);
|
||||
if (s == -1) { perror(T_SHM_FILENAME); abort(); }
|
||||
int s = shm_open(shm_file, O_RDWR | O_CREAT /*| O_SYNC*/, 0666);
|
||||
if (s == -1) { perror(shm_file); abort(); }
|
||||
if (ftruncate(s, T_CACHE_SIZE * sizeof(T_cache_t)))
|
||||
{ perror(T_SHM_FILENAME); abort(); }
|
||||
{ perror(shm_file); abort(); }
|
||||
T_local_cache = mmap(NULL, T_CACHE_SIZE * sizeof(T_cache_t),
|
||||
PROT_READ | PROT_WRITE, MAP_SHARED, s, 0);
|
||||
if (T_local_cache == NULL)
|
||||
{ perror(T_SHM_FILENAME); abort(); }
|
||||
if (T_local_cache == MAP_FAILED)
|
||||
{ perror(shm_file); abort(); }
|
||||
close(s);
|
||||
|
||||
/* let's garbage the memory to catch some potential problems
|
||||
@@ -347,7 +361,7 @@ static void init_shm(void)
|
||||
}
|
||||
|
||||
void T_local_tracer_main(int remote_port, int wait_for_tracer,
|
||||
int local_socket)
|
||||
int local_socket, char *shm_file)
|
||||
{
|
||||
int s;
|
||||
int port = remote_port;
|
||||
@@ -357,7 +371,7 @@ void T_local_tracer_main(int remote_port, int wait_for_tracer,
|
||||
/* write on a socket fails if the other end is closed and we get SIGPIPE */
|
||||
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) abort();
|
||||
|
||||
init_shm();
|
||||
init_shm(shm_file);
|
||||
s = local_socket;
|
||||
|
||||
if (dont_wait) {
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "gui/gui.h"
|
||||
#include "filter/filter.h"
|
||||
#include "utils.h"
|
||||
#include "../T_defs.h"
|
||||
#include "event_selector.h"
|
||||
#include "openair_logo.h"
|
||||
#include "config.h"
|
||||
@@ -875,6 +874,8 @@ int main(int n, char **v)
|
||||
if (pthread_mutex_init(&enb_data.lock, NULL)) abort();
|
||||
setup_event_selector(g, database, is_on, is_on_changed, &enb_data);
|
||||
|
||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||
|
||||
restart:
|
||||
clear_remote_config();
|
||||
enb_data.socket = connect_to(ip, port);
|
||||
@@ -884,9 +885,8 @@ restart:
|
||||
|
||||
/* read messages */
|
||||
while (1) {
|
||||
char v[T_BUFFER_MAX];
|
||||
event e;
|
||||
e = get_event(enb_data.socket, v, database);
|
||||
e = get_event(enb_data.socket, &ebuf, database);
|
||||
if (e.type == -1) goto restart;
|
||||
if (pthread_mutex_lock(&enb_data.lock)) abort();
|
||||
handle_event(h, e);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
event get_event(int socket, char *event_buffer, void *database)
|
||||
event get_event(int socket, OBUF *event_buffer, void *database)
|
||||
{
|
||||
#ifdef T_SEND_TIME
|
||||
struct timespec t;
|
||||
@@ -29,17 +29,23 @@ again:
|
||||
#endif
|
||||
if (fullread(socket, &type, sizeof(int)) == -1) goto read_error;
|
||||
length -= sizeof(int);
|
||||
if (fullread(socket, event_buffer, length) == -1) goto read_error;
|
||||
if (event_buffer->omaxsize < length) {
|
||||
event_buffer->omaxsize = (length + 65535) & ~65535;
|
||||
event_buffer->obuf = realloc(event_buffer->obuf, event_buffer->omaxsize);
|
||||
if (event_buffer->obuf == NULL) { printf("out of memory\n"); exit(1); }
|
||||
}
|
||||
if (fullread(socket, event_buffer->obuf, length) == -1) goto read_error;
|
||||
event_buffer->osize = length;
|
||||
|
||||
if (type == -1) append_received_config_chunk(event_buffer, length);
|
||||
if (type == -1) append_received_config_chunk(event_buffer->obuf, length);
|
||||
if (type == -2) verify_config();
|
||||
|
||||
if (type == -1 || type == -2) goto again;
|
||||
|
||||
#ifdef T_SEND_TIME
|
||||
return new_event(t, type, length, event_buffer, database);
|
||||
return new_event(t, type, length, event_buffer->obuf, database);
|
||||
#else
|
||||
return new_event(type, length, event_buffer, database);
|
||||
return new_event(type, length, event_buffer->obuf, database);
|
||||
#endif
|
||||
|
||||
read_error:
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef _EVENT_H_
|
||||
#define _EVENT_H_
|
||||
|
||||
#include "utils.h"
|
||||
#include "../T_defs.h"
|
||||
#ifdef T_SEND_TIME
|
||||
#include <time.h>
|
||||
@@ -37,7 +38,7 @@ typedef struct {
|
||||
int ecount;
|
||||
} event;
|
||||
|
||||
event get_event(int s, char *v, void *d);
|
||||
event get_event(int s, OBUF *v, void *d);
|
||||
|
||||
#ifdef T_SEND_TIME
|
||||
event new_event(struct timespec sending_time, int type,
|
||||
|
||||
@@ -99,10 +99,11 @@ int main(int n, char **v)
|
||||
|
||||
found = 0;
|
||||
|
||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||
|
||||
while (1) {
|
||||
char v[T_BUFFER_MAX];
|
||||
event e;
|
||||
e = get_event(fd, v, database);
|
||||
e = get_event(fd, &ebuf, database);
|
||||
if (e.type == -1) break;
|
||||
if (e.type != input_event_id) continue;
|
||||
for (i = 0; i < filter_count; i++)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "utils.h"
|
||||
#include "../T_defs.h"
|
||||
|
||||
void usage(void)
|
||||
@@ -35,14 +36,22 @@ int main(int n, char **v)
|
||||
in = fopen(input_filename, "r");
|
||||
if (in == NULL) { perror(input_filename); abort(); }
|
||||
|
||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||
|
||||
while (1) {
|
||||
int type;
|
||||
int32_t length;
|
||||
char v[T_BUFFER_MAX];
|
||||
char *v;
|
||||
int vpos = 0;
|
||||
|
||||
/* read event from file */
|
||||
if (fread(&length, 4, 1, in) != 1) break;
|
||||
if (ebuf.omaxsize < length) {
|
||||
ebuf.omaxsize = (length + 65535) & ~65535;
|
||||
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
|
||||
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
|
||||
}
|
||||
v = ebuf.obuf;
|
||||
memcpy(v+vpos, &length, 4);
|
||||
vpos += 4;
|
||||
#ifdef T_SEND_TIME
|
||||
|
||||
@@ -104,11 +104,12 @@ err:
|
||||
fd = open(file, O_RDONLY);
|
||||
if (fd == -1) { perror(file); exit(1); }
|
||||
|
||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||
|
||||
/* get wanted frame/subframe */
|
||||
while (1) {
|
||||
char v[T_BUFFER_MAX];
|
||||
event e;
|
||||
e = get_event(fd, v, database);
|
||||
e = get_event(fd, &ebuf, database);
|
||||
if (e.type == -1) break;
|
||||
if (e.type != input_event_id) continue;
|
||||
if (verbose)
|
||||
|
||||
@@ -100,10 +100,12 @@ err:
|
||||
int last_frame = -1;
|
||||
int last_subframe = -1;
|
||||
int subframe_written = 0;
|
||||
|
||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||
|
||||
while (1) {
|
||||
char v[T_BUFFER_MAX];
|
||||
event e;
|
||||
e = get_event(fd, v, database);
|
||||
e = get_event(fd, &ebuf, database);
|
||||
if (e.type == -1) break;
|
||||
if (e.type != output_event_id) continue;
|
||||
if (verbose)
|
||||
|
||||
@@ -73,17 +73,22 @@ int main(int n, char **v)
|
||||
socket_send(socket, is_on, number_of_events * sizeof(int)) == -1)
|
||||
abort();
|
||||
|
||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||
|
||||
char dump[10][T_BUFFER_MAX];
|
||||
event dump_ev[10];
|
||||
FILE *z = fopen("/tmp/dd", "w"); if (z == NULL) abort();
|
||||
while (1) {
|
||||
char v[T_BUFFER_MAX];
|
||||
char *v;
|
||||
event e;
|
||||
e = get_event(socket, v, database);
|
||||
e = get_event(socket, &ebuf, database);
|
||||
v = ebuf.obuf;
|
||||
if (e.type == -1) break;
|
||||
if (e.type == ev_input) {
|
||||
int sf = e.e[2].i;
|
||||
memcpy(dump[sf], v, T_BUFFER_MAX);
|
||||
if (ebuf.osize > T_BUFFER_MAX)
|
||||
{ printf("event size too big\n"); exit(1); }
|
||||
memcpy(dump[sf], ebuf.obuf, ebuf.osize);
|
||||
dump_ev[sf] = e;
|
||||
printf("input %d/%d\n", e.e[1].i, sf);
|
||||
if (fwrite(dump_ev[sf].e[4].b, dump_ev[sf].e[4].bsize, 1, z) != 1) abort();
|
||||
|
||||
@@ -84,11 +84,12 @@ int main(int n, char **v)
|
||||
socket_send(socket, is_on, number_of_events * sizeof(int)) == -1)
|
||||
abort();
|
||||
|
||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||
|
||||
while (1) {
|
||||
char v[T_BUFFER_MAX];
|
||||
event e;
|
||||
int on_off;
|
||||
e = get_event(socket, v, database);
|
||||
e = get_event(socket, &ebuf, database);
|
||||
if (e.type == -1) break;
|
||||
if (e.type != ev_fun)
|
||||
{ printf("unhandled event %d\n", e.type); continue; }
|
||||
|
||||
@@ -246,11 +246,12 @@ int main(int n, char **v)
|
||||
|
||||
new_thread(receiver, &d);
|
||||
|
||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||
|
||||
/* read messages */
|
||||
while (1) {
|
||||
char v[T_BUFFER_MAX];
|
||||
event e;
|
||||
e = get_event(in, v, database);
|
||||
e = get_event(in, &ebuf, database);
|
||||
if (e.type == -1) break;
|
||||
if (!(e.type == ul_id || e.type == dl_id)) continue;
|
||||
handle_event(h, e);
|
||||
|
||||
@@ -123,14 +123,22 @@ int main(int n, char **v)
|
||||
if (signal(SIGINT, force_stop) == SIG_ERR) abort();
|
||||
if (signal(SIGTSTP, force_stop) == SIG_ERR) abort();
|
||||
|
||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||
|
||||
/* read messages */
|
||||
while (run) {
|
||||
int type;
|
||||
int32_t length;
|
||||
char v[T_BUFFER_MAX];
|
||||
char *v;
|
||||
int vpos = 0;
|
||||
|
||||
if (fullread(socket, &length, 4) == -1) goto read_error;
|
||||
if (ebuf.omaxsize < length) {
|
||||
ebuf.omaxsize = (length + 65535) & ~65535;
|
||||
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
|
||||
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
|
||||
}
|
||||
v = ebuf.obuf;
|
||||
memcpy(v+vpos, &length, 4);
|
||||
vpos += 4;
|
||||
#ifdef T_SEND_TIME
|
||||
|
||||
@@ -136,14 +136,22 @@ int main(int n, char **v)
|
||||
|
||||
new_thread(get_message_thread, &socket);
|
||||
|
||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||
|
||||
while (1) {
|
||||
int type;
|
||||
int32_t length;
|
||||
char v[T_BUFFER_MAX];
|
||||
char *v;
|
||||
int vpos = 0;
|
||||
|
||||
/* read event from file */
|
||||
if (fread(&length, 4, 1, in) != 1) break;
|
||||
if (ebuf.omaxsize < length) {
|
||||
ebuf.omaxsize = (length + 65535) & ~65535;
|
||||
ebuf.obuf = realloc(ebuf.obuf, ebuf.omaxsize);
|
||||
if (ebuf.obuf == NULL) { printf("out of memory\n"); exit(1); }
|
||||
}
|
||||
v = ebuf.obuf;
|
||||
memcpy(v+vpos, &length, 4);
|
||||
vpos += 4;
|
||||
#ifdef T_SEND_TIME
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "view/view.h"
|
||||
#include "gui/gui.h"
|
||||
#include "utils.h"
|
||||
#include "../T_defs.h"
|
||||
#include "event_selector.h"
|
||||
#include "config.h"
|
||||
|
||||
@@ -182,11 +181,12 @@ int main(int n, char **v)
|
||||
/* send the first message - activate selected traces */
|
||||
is_on_changed(&textlog_data);
|
||||
|
||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||
|
||||
/* read messages */
|
||||
while (1) {
|
||||
char v[T_BUFFER_MAX];
|
||||
event e;
|
||||
e = get_event(textlog_data.socket, v, database);
|
||||
e = get_event(textlog_data.socket, &ebuf, database);
|
||||
if (e.type == -1) abort();
|
||||
handle_event(h, e);
|
||||
}
|
||||
|
||||
@@ -287,11 +287,12 @@ int main(int n, char **v)
|
||||
if (signal(SIGINT, force_stop) == SIG_ERR) abort();
|
||||
if (signal(SIGTSTP, force_stop) == SIG_ERR) abort();
|
||||
|
||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||
|
||||
/* read messages */
|
||||
while (run) {
|
||||
char v[T_BUFFER_MAX];
|
||||
event e;
|
||||
e = get_event(socket, v, database);
|
||||
e = get_event(socket, &ebuf, database);
|
||||
if (e.type == -1) { printf("disconnected? let's quit gently\n"); break; }
|
||||
handle_event(h, e);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "gui/gui.h"
|
||||
#include "filter/filter.h"
|
||||
#include "utils.h"
|
||||
#include "../T_defs.h"
|
||||
#include "event_selector.h"
|
||||
#include "openair_logo.h"
|
||||
#include "config.h"
|
||||
@@ -854,6 +853,8 @@ int main(int n, char **v)
|
||||
if (pthread_mutex_init(&ue_data.lock, NULL)) abort();
|
||||
setup_event_selector(g, database, is_on, is_on_changed, &ue_data);
|
||||
|
||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||
|
||||
restart:
|
||||
clear_remote_config();
|
||||
ue_data.socket = connect_to(ip, port);
|
||||
@@ -863,9 +864,8 @@ restart:
|
||||
|
||||
/* read messages */
|
||||
while (1) {
|
||||
char v[T_BUFFER_MAX];
|
||||
event e;
|
||||
e = get_event(ue_data.socket, v, database);
|
||||
e = get_event(ue_data.socket, &ebuf, database);
|
||||
if (e.type == -1) goto restart;
|
||||
if (pthread_mutex_lock(&ue_data.lock)) abort();
|
||||
handle_event(h, e);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "view/view.h"
|
||||
#include "gui/gui.h"
|
||||
#include "utils.h"
|
||||
#include "../T_defs.h"
|
||||
#include "event_selector.h"
|
||||
#include "config.h"
|
||||
|
||||
@@ -188,11 +187,12 @@ int main(int n, char **v)
|
||||
/* send the first message - activate selected traces */
|
||||
is_on_changed(&vcd_data);
|
||||
|
||||
OBUF ebuf = { osize: 0, omaxsize: 0, obuf: NULL };
|
||||
|
||||
/* read messages */
|
||||
while (1) {
|
||||
char v[T_BUFFER_MAX];
|
||||
event e;
|
||||
e = get_event(vcd_data.socket, v, database);
|
||||
e = get_event(vcd_data.socket, &ebuf, database);
|
||||
if (e.type == -1) abort();
|
||||
handle_event(h, e);
|
||||
}
|
||||
|
||||
@@ -35,9 +35,11 @@
|
||||
#ifndef ASSERTIONS_H_
|
||||
#define ASSERTIONS_H_
|
||||
|
||||
void output_log_mem(void);
|
||||
#define _Assert_Exit_ \
|
||||
{ \
|
||||
fprintf(stderr, "\nExiting execution\n"); \
|
||||
output_log_mem(); \
|
||||
display_backtrace(); \
|
||||
fflush(stdout); \
|
||||
fflush(stderr); \
|
||||
|
||||
@@ -31,10 +31,6 @@
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/eventfd.h>
|
||||
|
||||
#ifdef RTAI
|
||||
# include <rtai_shm.h>
|
||||
#endif
|
||||
|
||||
#if !defined(TRUE)
|
||||
#define TRUE 1
|
||||
#endif
|
||||
@@ -45,11 +41,6 @@
|
||||
#include "intertask_interface.h"
|
||||
#include "intertask_interface_dump.h"
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
# include "memory_pools.h"
|
||||
# include "vcd_signal_dumper.h"
|
||||
#endif
|
||||
|
||||
#if T_TRACER
|
||||
#include "T.h"
|
||||
#endif
|
||||
@@ -63,17 +54,6 @@
|
||||
|
||||
#include "signals.h"
|
||||
#include "timer.h"
|
||||
#ifdef UE_EXPANSION
|
||||
#include "log.h"
|
||||
#endif
|
||||
|
||||
#ifdef RTAI
|
||||
# include <rtai.h>
|
||||
# include <rtai_fifos.h>
|
||||
# define FIFO_PRINTF_MAX_STRING_SIZE 1000
|
||||
# define FIFO_PRINTF_NO 62
|
||||
# define FIFO_PRINTF_SIZE 65536
|
||||
#endif
|
||||
|
||||
/* ITTI DEBUG groups */
|
||||
#define ITTI_DEBUG_POLL (1<<0)
|
||||
@@ -86,21 +66,14 @@
|
||||
|
||||
const int itti_debug = (ITTI_DEBUG_ISSUES | ITTI_DEBUG_MP_STATISTICS);
|
||||
|
||||
/* Don't flush if using RTAI */
|
||||
#ifdef RTAI
|
||||
# define ITTI_DEBUG(m, x, args...) do { if ((m) & itti_debug) rt_log_debug (x, ##args); } while(0);
|
||||
#else
|
||||
# define ITTI_DEBUG(m, x, args...) do { if ((m) & itti_debug) {fprintf(stdout, "[ITTI][D]"x, ##args); fflush (stdout);} } while(0);
|
||||
#endif
|
||||
#define ITTI_ERROR(x, args...) do { fprintf(stdout, "[ITTI][E]"x, ##args); fflush (stdout); } while(0);
|
||||
|
||||
/* Global message size */
|
||||
#define MESSAGE_SIZE(mESSAGEiD) (sizeof(MessageHeader) + itti_desc.messages_info[mESSAGEiD].size)
|
||||
|
||||
#ifdef RTAI
|
||||
# define ITTI_MEM_PAGE_SIZE (1024)
|
||||
# define ITTI_MEM_SIZE (16 * 1024 * 1024)
|
||||
#endif
|
||||
|
||||
extern int emulate_rf;
|
||||
|
||||
typedef enum task_state_s {
|
||||
TASK_STATE_NOT_CONFIGURED, TASK_STATE_STARTING, TASK_STATE_READY, TASK_STATE_ENDED, TASK_STATE_MAX,
|
||||
@@ -140,13 +113,11 @@ typedef struct thread_desc_s {
|
||||
|
||||
int epoll_nb_events;
|
||||
|
||||
//#ifdef RTAI
|
||||
/* Flag to mark real time thread */
|
||||
unsigned real_time;
|
||||
|
||||
/* Counter to indicate from RTAI threads that messages are pending for the thread */
|
||||
/* Counter to indicate that messages are pending for the thread */
|
||||
unsigned messages_pending;
|
||||
//#endif
|
||||
} thread_desc_t;
|
||||
|
||||
typedef struct task_desc_s {
|
||||
@@ -178,17 +149,6 @@ typedef struct itti_desc_s {
|
||||
volatile uint32_t created_tasks;
|
||||
volatile uint32_t ready_tasks;
|
||||
volatile int wait_tasks;
|
||||
#ifdef RTAI
|
||||
pthread_t rt_relay_thread;
|
||||
#endif
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
memory_pools_handle_t memory_pools_handle;
|
||||
|
||||
uint64_t vcd_poll_msg;
|
||||
uint64_t vcd_receive_msg;
|
||||
uint64_t vcd_send_msg;
|
||||
#endif
|
||||
} itti_desc_t;
|
||||
|
||||
static itti_desc_t itti_desc;
|
||||
@@ -197,20 +157,8 @@ void *itti_malloc(task_id_t origin_task_id, task_id_t destination_task_id, ssize
|
||||
{
|
||||
void *ptr = NULL;
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
ptr = memory_pools_allocate (itti_desc.memory_pools_handle, size, origin_task_id, destination_task_id);
|
||||
|
||||
if (ptr == NULL) {
|
||||
char *statistics = memory_pools_statistics (itti_desc.memory_pools_handle);
|
||||
|
||||
ITTI_ERROR (" Memory pools statistics:\n%s", statistics);
|
||||
free (statistics);
|
||||
}
|
||||
|
||||
#else
|
||||
ptr = malloc (size);
|
||||
if (ptr) memset(ptr,0,size);
|
||||
#endif
|
||||
|
||||
AssertFatal (ptr != NULL, "Memory allocation of %d bytes failed (%d -> %d)!\n", (int) size, origin_task_id, destination_task_id);
|
||||
|
||||
@@ -222,13 +170,7 @@ int itti_free(task_id_t task_id, void *ptr)
|
||||
int result = EXIT_SUCCESS;
|
||||
AssertFatal (ptr != NULL, "Trying to free a NULL pointer (%d)!\n", task_id);
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
result = memory_pools_free (itti_desc.memory_pools_handle, ptr, task_id);
|
||||
|
||||
AssertError (result == EXIT_SUCCESS, {}, "Failed to free memory at %p (%d)!\n", ptr, task_id);
|
||||
#else
|
||||
free (ptr);
|
||||
#endif
|
||||
|
||||
return (result);
|
||||
}
|
||||
@@ -284,27 +226,6 @@ static task_id_t itti_get_current_task_id(void)
|
||||
return TASK_UNKNOWN;
|
||||
}
|
||||
|
||||
#ifdef RTAI
|
||||
static void rt_log_debug(char *format, ...)
|
||||
{
|
||||
task_id_t task_id;
|
||||
va_list args;
|
||||
char log_buffer[FIFO_PRINTF_MAX_STRING_SIZE];
|
||||
int len;
|
||||
|
||||
task_id = itti_get_current_task_id ();
|
||||
len = snprintf(log_buffer, FIFO_PRINTF_MAX_STRING_SIZE-1, "[ITTI][D][%s]", itti_get_task_name(task_id));
|
||||
va_start(args, format);
|
||||
len += vsnprintf(&log_buffer[len], FIFO_PRINTF_MAX_STRING_SIZE-1-len, format, args);
|
||||
va_end (args);
|
||||
|
||||
if (task_id != TASK_UNKNOWN)
|
||||
fwrite(log_buffer, len, 1, stdout);
|
||||
else
|
||||
rtf_put (FIFO_PRINTF_NO, log_buffer, len);
|
||||
}
|
||||
#endif
|
||||
|
||||
void itti_update_lte_time(uint32_t frame, uint8_t slot)
|
||||
{
|
||||
itti_desc.lte_time.frame = frame;
|
||||
@@ -361,10 +282,6 @@ MessageDef *itti_alloc_new_message_sized(task_id_t origin_task_id, MessagesIds m
|
||||
|
||||
AssertFatal (message_id < itti_desc.messages_id_max, "Message id (%d) is out of range (%d)!\n", message_id, itti_desc.messages_id_max);
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_ITTI_ALLOC_MSG, size);
|
||||
#endif
|
||||
|
||||
if (origin_task_id == TASK_UNKNOWN) {
|
||||
/* Try to identify real origin task ID */
|
||||
origin_task_id = itti_get_current_task_id();
|
||||
@@ -376,10 +293,6 @@ MessageDef *itti_alloc_new_message_sized(task_id_t origin_task_id, MessagesIds m
|
||||
temp->ittiMsgHeader.originTaskId = origin_task_id;
|
||||
temp->ittiMsgHeader.ittiMsgSize = size;
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_ITTI_ALLOC_MSG, 0);
|
||||
#endif
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
@@ -397,11 +310,6 @@ int itti_send_msg_to_task(task_id_t destination_task_id, instance_t instance, Me
|
||||
message_number_t message_number;
|
||||
uint32_t message_id;
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_ITTI_SEND_MSG,
|
||||
__sync_or_and_fetch (&itti_desc.vcd_send_msg, 1L << destination_task_id));
|
||||
#endif
|
||||
|
||||
AssertFatal (message != NULL, "Message is NULL!\n");
|
||||
AssertFatal (destination_task_id < itti_desc.task_max, "Destination task id (%d) is out of range (%d)\n", destination_task_id, itti_desc.task_max);
|
||||
|
||||
@@ -420,16 +328,115 @@ int itti_send_msg_to_task(task_id_t destination_task_id, instance_t instance, Me
|
||||
/* Increment the global message number */
|
||||
message_number = itti_increment_message_number ();
|
||||
|
||||
#if 0
|
||||
/* itti dump is disabled */
|
||||
itti_dump_queue_message (origin_task_id, message_number, message, itti_desc.messages_info[message_id].name,
|
||||
sizeof(MessageHeader) + message->ittiMsgHeader.ittiMsgSize);
|
||||
#endif
|
||||
|
||||
if (destination_task_id != TASK_UNKNOWN) {
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_ENQUEUE_MESSAGE, VCD_FUNCTION_IN);
|
||||
|
||||
memory_pools_set_info (itti_desc.memory_pools_handle, message, 1, destination_task_id);
|
||||
if (itti_desc.threads[destination_thread_id].task_state == TASK_STATE_ENDED) {
|
||||
ITTI_DEBUG(ITTI_DEBUG_ISSUES, " Message %s, number %lu with priority %d can not be sent from %s to queue (%u:%s), ended destination task!\n",
|
||||
itti_desc.messages_info[message_id].name,
|
||||
message_number,
|
||||
priority,
|
||||
itti_get_task_name(origin_task_id),
|
||||
destination_task_id,
|
||||
itti_get_task_name(destination_task_id));
|
||||
} else {
|
||||
if(!emulate_rf){
|
||||
/* We cannot send a message if the task is not running */
|
||||
AssertFatal (itti_desc.threads[destination_thread_id].task_state == TASK_STATE_READY,
|
||||
"Task %s Cannot send message %s (%d) to thread %d, it is not in ready state (%d)!\n",
|
||||
itti_get_task_name(origin_task_id),
|
||||
itti_desc.messages_info[message_id].name,
|
||||
message_id,
|
||||
destination_thread_id,
|
||||
itti_desc.threads[destination_thread_id].task_state);
|
||||
}
|
||||
|
||||
/* Allocate new list element */
|
||||
new = (message_list_t *) itti_malloc (origin_task_id, destination_task_id, sizeof(struct message_list_s));
|
||||
|
||||
/* Fill in members */
|
||||
new->msg = message;
|
||||
new->message_number = message_number;
|
||||
new->message_priority = priority;
|
||||
|
||||
/* Enqueue message in destination task queue */
|
||||
if (lfds611_queue_enqueue(itti_desc.tasks[destination_task_id].message_queue, new) == 0) {
|
||||
AssertFatal(0, "Error: lfds611_queue_enqueue returns 0, queue is full, exiting\n");
|
||||
}
|
||||
|
||||
{
|
||||
/* Only use event fd for tasks, subtasks will pool the queue */
|
||||
if (TASK_GET_PARENT_TASK_ID(destination_task_id) == TASK_UNKNOWN) {
|
||||
ssize_t write_ret;
|
||||
eventfd_t sem_counter = 1;
|
||||
|
||||
/* Call to write for an event fd must be of 8 bytes */
|
||||
write_ret = write (itti_desc.threads[destination_thread_id].task_event_fd, &sem_counter, sizeof(sem_counter));
|
||||
AssertFatal (write_ret == sizeof(sem_counter), "Write to task message FD (%d) failed (%d/%d)\n",
|
||||
destination_thread_id, (int) write_ret, (int) sizeof(sem_counter));
|
||||
}
|
||||
}
|
||||
|
||||
ITTI_DEBUG(ITTI_DEBUG_SEND, " Message %s, number %lu with priority %d successfully sent from %s to queue (%u:%s)\n",
|
||||
itti_desc.messages_info[message_id].name,
|
||||
message_number,
|
||||
priority,
|
||||
itti_get_task_name(origin_task_id),
|
||||
destination_task_id,
|
||||
itti_get_task_name(destination_task_id));
|
||||
}
|
||||
} else {
|
||||
/* This is a debug message to TASK_UNKNOWN, we can release safely release it */
|
||||
int result = itti_free(origin_task_id, message);
|
||||
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* same as itti_send_msg_to_task but returns -1 in case of failure instead of crashing */
|
||||
/* TODO: this is a hack - the whole logic needs a proper rework. */
|
||||
/* look for HACK_RLC_UM_LIMIT for others places related to the hack. Please do not remove this comment. */
|
||||
int itti_try_send_msg_to_task(task_id_t destination_task_id, instance_t instance, MessageDef *message)
|
||||
{
|
||||
thread_id_t destination_thread_id;
|
||||
task_id_t origin_task_id;
|
||||
message_list_t *new;
|
||||
uint32_t priority;
|
||||
message_number_t message_number;
|
||||
uint32_t message_id;
|
||||
|
||||
AssertFatal (message != NULL, "Message is NULL!\n");
|
||||
AssertFatal (destination_task_id < itti_desc.task_max, "Destination task id (%d) is out of range (%d)\n", destination_task_id, itti_desc.task_max);
|
||||
|
||||
destination_thread_id = TASK_GET_THREAD_ID(destination_task_id);
|
||||
message->ittiMsgHeader.destinationTaskId = destination_task_id;
|
||||
message->ittiMsgHeader.instance = instance;
|
||||
message->ittiMsgHeader.lte_time.frame = itti_desc.lte_time.frame;
|
||||
message->ittiMsgHeader.lte_time.slot = itti_desc.lte_time.slot;
|
||||
message_id = message->ittiMsgHeader.messageId;
|
||||
AssertFatal (message_id < itti_desc.messages_id_max, "Message id (%d) is out of range (%d)!\n", message_id, itti_desc.messages_id_max);
|
||||
|
||||
origin_task_id = ITTI_MSG_ORIGIN_ID(message);
|
||||
|
||||
priority = itti_get_message_priority (message_id);
|
||||
|
||||
/* Increment the global message number */
|
||||
message_number = itti_increment_message_number ();
|
||||
|
||||
#if 0
|
||||
/* itti dump is disabled */
|
||||
itti_dump_queue_message (origin_task_id, message_number, message, itti_desc.messages_info[message_id].name,
|
||||
sizeof(MessageHeader) + message->ittiMsgHeader.ittiMsgSize);
|
||||
#endif
|
||||
|
||||
if (destination_task_id != TASK_UNKNOWN) {
|
||||
|
||||
if (itti_desc.threads[destination_thread_id].task_state == TASK_STATE_ENDED) {
|
||||
ITTI_DEBUG(ITTI_DEBUG_ISSUES, " Message %s, number %lu with priority %d can not be sent from %s to queue (%u:%s), ended destination task!\n",
|
||||
itti_desc.messages_info[message_id].name,
|
||||
@@ -458,35 +465,10 @@ int itti_send_msg_to_task(task_id_t destination_task_id, instance_t instance, Me
|
||||
|
||||
/* Enqueue message in destination task queue */
|
||||
if (lfds611_queue_enqueue(itti_desc.tasks[destination_task_id].message_queue, new) == 0) {
|
||||
#ifdef UE_EXPANSION
|
||||
LOG_I(UDP_, " Assertion Message %s(id:%d), number %lu with priority %d can not be sent from (%u:%s) to queue (%u:%s). discarding...\n",
|
||||
itti_desc.messages_info[message_id].name,
|
||||
message_id,
|
||||
message_number,
|
||||
priority,
|
||||
origin_task_id,
|
||||
itti_get_task_name(origin_task_id),
|
||||
destination_task_id,
|
||||
itti_get_task_name(destination_task_id));
|
||||
int result = itti_free(origin_task_id, message);
|
||||
AssertFatal( result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
return 0;
|
||||
#else
|
||||
AssertFatal(0, "Error: lfds611_queue_enqueue returns 0, queue is full, exiting\n");
|
||||
#endif
|
||||
itti_free(origin_task_id, new);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_ENQUEUE_MESSAGE, VCD_FUNCTION_OUT);
|
||||
#endif
|
||||
|
||||
#ifdef RTAI
|
||||
|
||||
if (itti_desc.threads[TASK_GET_THREAD_ID(origin_task_id)].real_time) {
|
||||
/* This is a RT task, increase destination task messages pending counter */
|
||||
__sync_fetch_and_add (&itti_desc.threads[destination_thread_id].messages_pending, 1);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
/* Only use event fd for tasks, subtasks will pool the queue */
|
||||
if (TASK_GET_PARENT_TASK_ID(destination_task_id) == TASK_UNKNOWN) {
|
||||
@@ -514,11 +496,6 @@ int itti_send_msg_to_task(task_id_t destination_task_id, instance_t instance, Me
|
||||
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
}
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_ITTI_SEND_MSG,
|
||||
__sync_and_and_fetch (&itti_desc.vcd_send_msg, ~(1L << destination_task_id)));
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -643,14 +620,7 @@ static inline void itti_receive_msg_internal_event_fd(task_id_t task_id, uint8_t
|
||||
|
||||
if (lfds611_queue_dequeue (itti_desc.tasks[task_id].message_queue, (void **) &message) == 0) {
|
||||
/* No element in list -> this should not happen */
|
||||
#ifdef UE_EXPANSION
|
||||
LOG_I(UDP_, "Assertion No message in queue for task %d while there are %d events and some for the messages queue!\n", task_id, epoll_ret);
|
||||
/* Mark that the event has been processed */
|
||||
itti_desc.threads[thread_id].events[i].events &= ~EPOLLIN;
|
||||
return;
|
||||
#else
|
||||
AssertFatal (0, "No message in queue for task %d while there are %d events and some for the messages queue!\n", task_id, epoll_ret);
|
||||
#endif
|
||||
}
|
||||
|
||||
AssertFatal(message != NULL, "Message from message queue is NULL!\n");
|
||||
@@ -670,17 +640,9 @@ static inline void itti_receive_msg_internal_event_fd(task_id_t task_id, uint8_t
|
||||
|
||||
void itti_receive_msg(task_id_t task_id, MessageDef **received_msg)
|
||||
{
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_ITTI_RECV_MSG,
|
||||
__sync_and_and_fetch (&itti_desc.vcd_receive_msg, ~(1L << task_id)));
|
||||
#endif
|
||||
|
||||
itti_receive_msg_internal_event_fd(task_id, 0, received_msg);
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_ITTI_RECV_MSG,
|
||||
__sync_or_and_fetch (&itti_desc.vcd_receive_msg, 1L << task_id));
|
||||
#endif
|
||||
}
|
||||
|
||||
void itti_poll_msg(task_id_t task_id, MessageDef **received_msg)
|
||||
@@ -689,11 +651,6 @@ void itti_poll_msg(task_id_t task_id, MessageDef **received_msg)
|
||||
|
||||
*received_msg = NULL;
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_ITTI_POLL_MSG,
|
||||
__sync_or_and_fetch (&itti_desc.vcd_poll_msg, 1L << task_id));
|
||||
#endif
|
||||
|
||||
{
|
||||
struct message_list_s *message;
|
||||
|
||||
@@ -710,10 +667,6 @@ void itti_poll_msg(task_id_t task_id, MessageDef **received_msg)
|
||||
ITTI_DEBUG(ITTI_DEBUG_POLL, " No message in queue[(%u:%s)]\n", task_id, itti_get_task_name(task_id));
|
||||
}
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_ITTI_POLL_MSG,
|
||||
__sync_and_and_fetch (&itti_desc.vcd_poll_msg, ~(1L << task_id)));
|
||||
#endif
|
||||
}
|
||||
|
||||
int itti_create_task(task_id_t task_id, void *(*start_routine)(void *), void *args_p)
|
||||
@@ -745,7 +698,6 @@ int itti_create_task(task_id_t task_id, void *(*start_routine)(void *), void *ar
|
||||
return 0;
|
||||
}
|
||||
|
||||
//#ifdef RTAI
|
||||
void itti_set_task_real_time(task_id_t task_id)
|
||||
{
|
||||
thread_id_t thread_id = TASK_GET_THREAD_ID(task_id);
|
||||
@@ -754,7 +706,6 @@ void itti_set_task_real_time(task_id_t task_id)
|
||||
|
||||
itti_desc.threads[thread_id].real_time = TRUE;
|
||||
}
|
||||
//#endif
|
||||
|
||||
void itti_wait_ready(int wait_tasks)
|
||||
{
|
||||
@@ -776,13 +727,16 @@ void itti_mark_task_ready(task_id_t task_id)
|
||||
|
||||
AssertFatal (thread_id < itti_desc.thread_max, "Thread id (%d) is out of range (%d)!\n", thread_id, itti_desc.thread_max);
|
||||
|
||||
#if 0
|
||||
/* itti dump is disabled */
|
||||
/* Register the thread in itti dump */
|
||||
itti_dump_thread_use_ring_buffer();
|
||||
#endif
|
||||
|
||||
/* Mark the thread as using LFDS queue */
|
||||
lfds611_queue_use(itti_desc.tasks[task_id].message_queue);
|
||||
|
||||
#ifdef RTAI
|
||||
#if defined(UE_EXPANSION) || defined(RTAI)
|
||||
/* Assign low priority to created threads */
|
||||
{
|
||||
struct sched_param sched_param;
|
||||
@@ -803,15 +757,19 @@ void itti_mark_task_ready(task_id_t task_id)
|
||||
|
||||
void itti_exit_task(void)
|
||||
{
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
task_id_t task_id = itti_get_current_task_id();
|
||||
thread_id_t thread_id = TASK_GET_THREAD_ID(task_id);
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
if (task_id > TASK_UNKNOWN) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_ITTI_RECV_MSG,
|
||||
__sync_and_and_fetch (&itti_desc.vcd_receive_msg, ~(1L << task_id)));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
itti_desc.threads[thread_id].task_state = TASK_STATE_NOT_CONFIGURED;
|
||||
itti_desc.created_tasks--;
|
||||
ITTI_DEBUG(ITTI_DEBUG_EXIT, "Thread for task %s (%d) exits\n", itti_get_task_name(task_id), task_id);
|
||||
pthread_exit (NULL);
|
||||
}
|
||||
|
||||
@@ -827,45 +785,6 @@ void itti_terminate_tasks(task_id_t task_id)
|
||||
pthread_exit (NULL);
|
||||
}
|
||||
|
||||
#ifdef RTAI
|
||||
static void *itti_rt_relay_thread(void *arg)
|
||||
{
|
||||
thread_id_t thread_id;
|
||||
unsigned pending_messages;
|
||||
|
||||
while (itti_desc.running) {
|
||||
usleep (200); // Poll for messages a little more than 2 time by slot to get a small latency between RT and other tasks
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_RELAY_THREAD, VCD_FUNCTION_IN);
|
||||
#endif
|
||||
|
||||
/* Checks for all non real time tasks if they have pending messages */
|
||||
for (thread_id = THREAD_FIRST; thread_id < itti_desc.thread_max; thread_id++) {
|
||||
if ((itti_desc.threads[thread_id].task_state == TASK_STATE_READY)
|
||||
&& (itti_desc.threads[thread_id].real_time == FALSE)) {
|
||||
pending_messages = __sync_fetch_and_and (&itti_desc.threads[thread_id].messages_pending, 0);
|
||||
|
||||
if (pending_messages > 0) {
|
||||
ssize_t write_ret;
|
||||
eventfd_t sem_counter = pending_messages;
|
||||
|
||||
/* Call to write for an event fd must be of 8 bytes */
|
||||
write_ret = write (itti_desc.threads[thread_id].task_event_fd, &sem_counter, sizeof(sem_counter));
|
||||
DevCheck(write_ret == sizeof(sem_counter), write_ret, sem_counter, thread_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_RELAY_THREAD, VCD_FUNCTION_OUT);
|
||||
#endif
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
int itti_init(task_id_t task_max, thread_id_t thread_max, MessagesIds messages_id_max, const task_info_t *tasks_info,
|
||||
const message_info_t *messages_info, const char * const messages_definition_xml, const char * const dump_file_name)
|
||||
{
|
||||
@@ -946,46 +865,16 @@ int itti_init(task_id_t task_max, thread_id_t thread_max, MessagesIds messages_i
|
||||
ITTI_DEBUG(ITTI_DEBUG_EVEN_FD, " Successfully subscribed fd %d for thread %d\n",
|
||||
itti_desc.threads[thread_id].task_event_fd, thread_id);
|
||||
|
||||
#ifdef RTAI
|
||||
itti_desc.threads[thread_id].real_time = FALSE;
|
||||
itti_desc.threads[thread_id].messages_pending = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
itti_desc.running = 1;
|
||||
itti_desc.wait_tasks = 0;
|
||||
itti_desc.created_tasks = 0;
|
||||
itti_desc.ready_tasks = 0;
|
||||
#ifdef RTAI
|
||||
/* Start RT relay thread */
|
||||
DevAssert(pthread_create (&itti_desc.rt_relay_thread, NULL, itti_rt_relay_thread, NULL) >= 0);
|
||||
|
||||
rt_global_heap_open();
|
||||
#endif
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
itti_desc.memory_pools_handle = memory_pools_create (5);
|
||||
memory_pools_add_pool (itti_desc.memory_pools_handle, 1000 + ITTI_QUEUE_MAX_ELEMENTS, 50);
|
||||
memory_pools_add_pool (itti_desc.memory_pools_handle, 1000 + (2 * ITTI_QUEUE_MAX_ELEMENTS), 100);
|
||||
memory_pools_add_pool (itti_desc.memory_pools_handle, 10000, 1000);
|
||||
memory_pools_add_pool (itti_desc.memory_pools_handle, 400, 20050);
|
||||
memory_pools_add_pool (itti_desc.memory_pools_handle, 100, 30050);
|
||||
|
||||
{
|
||||
char *statistics = memory_pools_statistics (itti_desc.memory_pools_handle);
|
||||
|
||||
ITTI_DEBUG(ITTI_DEBUG_MP_STATISTICS, " Memory pools statistics:\n%s", statistics);
|
||||
free (statistics);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
itti_desc.vcd_poll_msg = 0;
|
||||
itti_desc.vcd_receive_msg = 0;
|
||||
itti_desc.vcd_send_msg = 0;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* itti dump is disabled */
|
||||
itti_dump_init (messages_definition_xml, dump_file_name);
|
||||
#endif
|
||||
|
||||
CHECK_INIT_RETURN(timer_init ());
|
||||
|
||||
@@ -1047,21 +936,15 @@ void itti_wait_tasks_end(void)
|
||||
|
||||
itti_desc.running = 0;
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
{
|
||||
char *statistics = memory_pools_statistics (itti_desc.memory_pools_handle);
|
||||
|
||||
ITTI_DEBUG(ITTI_DEBUG_MP_STATISTICS, " Memory pools statistics:\n%s", statistics);
|
||||
free (statistics);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ready_tasks > 0) {
|
||||
ITTI_DEBUG(ITTI_DEBUG_ISSUES, " Some threads are still running, force exit\n");
|
||||
exit (0);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* itti dump is disabled */
|
||||
itti_dump_exit();
|
||||
#endif
|
||||
}
|
||||
|
||||
void itti_send_terminate_message(task_id_t task_id)
|
||||
|
||||
@@ -27,10 +27,6 @@
|
||||
|
||||
#include <sys/epoll.h>
|
||||
|
||||
#ifdef RTAI
|
||||
# include <rtai_sem.h>
|
||||
#endif
|
||||
|
||||
#ifndef INTERTASK_INTERFACE_H_
|
||||
#define INTERTASK_INTERFACE_H_
|
||||
|
||||
@@ -112,6 +108,18 @@ int itti_send_broadcast_message(MessageDef *message_p);
|
||||
**/
|
||||
int itti_send_msg_to_task(task_id_t task_id, instance_t instance, MessageDef *message);
|
||||
|
||||
/* TODO: this is a hack. Almost no caller of itti_send_msg_to_task checks
|
||||
* the return value so it has been changed to crash the program in case
|
||||
* of failure instead of returning -1 as the documentation above says.
|
||||
* The RLC UM code may receive too much data when doing UDP at a higher
|
||||
* throughput than the link allows and so for this specific case we need
|
||||
* a version that actually returns -1 on failure.
|
||||
*
|
||||
* This needs to be cleaned at some point.
|
||||
*/
|
||||
/* look for HACK_RLC_UM_LIMIT for others places related to the hack. Please do not remove this comment. */
|
||||
int itti_try_send_msg_to_task(task_id_t task_id, instance_t instance, MessageDef *message);
|
||||
|
||||
/** \brief Add a new fd to monitor.
|
||||
* NOTE: it is up to the user to read data associated with the fd
|
||||
* \param task_id Task ID of the receiving task
|
||||
@@ -155,12 +163,10 @@ int itti_create_task(task_id_t task_id,
|
||||
void *(*start_routine) (void *),
|
||||
void *args_p);
|
||||
|
||||
//#ifdef RTAI
|
||||
/** \brief Mark the task as a real time task
|
||||
* \param task_id task to mark as real time
|
||||
**/
|
||||
void itti_set_task_real_time(task_id_t task_id);
|
||||
//#endif
|
||||
|
||||
/** \brief Indicates to ITTI if newly created tasks should wait for all tasks to be ready
|
||||
* \param wait_tasks non 0 to make new created tasks to wait, 0 to let created tasks to run
|
||||
|
||||
@@ -51,23 +51,14 @@
|
||||
#include "intertask_interface.h"
|
||||
#include "intertask_interface_dump.h"
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
#include "vcd_signal_dumper.h"
|
||||
#endif
|
||||
|
||||
#if T_TRACER
|
||||
#include "T.h"
|
||||
#endif
|
||||
|
||||
static const int itti_dump_debug = 0; // 0x8 | 0x4 | 0x2;
|
||||
|
||||
#ifdef RTAI
|
||||
# define ITTI_DUMP_DEBUG(m, x, args...) do { if ((m) & itti_dump_debug) rt_printk("[ITTI_DUMP][D]"x, ##args); } \
|
||||
while(0)
|
||||
#else
|
||||
# define ITTI_DUMP_DEBUG(m, x, args...) do { if ((m) & itti_dump_debug) fprintf(stdout, "[ITTI_DUMP][D]"x, ##args); } \
|
||||
while(0)
|
||||
#endif
|
||||
#define ITTI_DUMP_ERROR(x, args...) do { fprintf(stdout, "[ITTI_DUMP][E]"x, ##args); } \
|
||||
while(0)
|
||||
|
||||
@@ -99,13 +90,8 @@ typedef struct itti_desc_s {
|
||||
|
||||
int nb_connected;
|
||||
|
||||
#ifndef RTAI
|
||||
/* Event fd used to notify new messages (semaphore) */
|
||||
int event_fd;
|
||||
#else
|
||||
unsigned long messages_in_queue __attribute__((aligned(8)));
|
||||
#endif
|
||||
|
||||
int itti_listen_socket;
|
||||
|
||||
itti_client_desc_t itti_clients[ITTI_DUMP_MAX_CON];
|
||||
@@ -194,9 +180,7 @@ static int itti_dump_fwrite_message(itti_dump_queue_item_t *message)
|
||||
fwrite (&new_message_header, sizeof(itti_dump_message_t), 1, dump_file);
|
||||
fwrite (message->data, message->data_size, 1, dump_file);
|
||||
fwrite (&itti_dump_message_type_end, sizeof(itti_message_types_t), 1, dump_file);
|
||||
// #if !defined(RTAI)
|
||||
fflush (dump_file);
|
||||
// #endif
|
||||
return (1);
|
||||
}
|
||||
|
||||
@@ -280,10 +264,6 @@ static int itti_dump_enqueue_message(itti_dump_queue_item_t *new, uint32_t messa
|
||||
int overwrite_flag;
|
||||
AssertFatal (new != NULL, "Message to queue is NULL!\n");
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE, VCD_FUNCTION_IN);
|
||||
#endif
|
||||
|
||||
new->message_type = message_type;
|
||||
new->message_size = message_size;
|
||||
|
||||
@@ -303,9 +283,6 @@ static int itti_dump_enqueue_message(itti_dump_queue_item_t *new, uint32_t messa
|
||||
lfds611_ringbuffer_put_write_element(itti_dump_queue.itti_message_queue, new_queue_element);
|
||||
|
||||
if (overwrite_flag == 0) {
|
||||
#ifdef RTAI
|
||||
__sync_fetch_and_add (&itti_dump_queue.messages_in_queue, 1);
|
||||
#else
|
||||
{
|
||||
ssize_t write_ret;
|
||||
eventfd_t sem_counter = 1;
|
||||
@@ -314,25 +291,18 @@ static int itti_dump_enqueue_message(itti_dump_queue_item_t *new, uint32_t messa
|
||||
write_ret = write(itti_dump_queue.event_fd, &sem_counter, sizeof(sem_counter));
|
||||
AssertFatal (write_ret == sizeof(sem_counter), "Write to dump event failed (%d/%d)!\n", (int) write_ret, (int) sizeof(sem_counter));
|
||||
}
|
||||
#endif
|
||||
// add one to pending_messages, atomically
|
||||
__sync_fetch_and_add (&pending_messages, 1);
|
||||
}
|
||||
|
||||
ITTI_DUMP_DEBUG (0x2, " Added element to queue %p %p, pending %u, type %u\n", new_queue_element, new, pending_messages, message_type);
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE, VCD_FUNCTION_OUT);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void itti_dump_socket_exit(void)
|
||||
{
|
||||
#ifndef RTAI
|
||||
close(itti_dump_queue.event_fd);
|
||||
#endif
|
||||
close(itti_dump_queue.itti_listen_socket);
|
||||
|
||||
/* Leave the thread as we detected end signal */
|
||||
@@ -346,10 +316,6 @@ static int itti_dump_flush_ring_buffer(int flush_all)
|
||||
int j;
|
||||
int consumer;
|
||||
|
||||
#ifdef RTAI
|
||||
unsigned long number_of_messages;
|
||||
#endif
|
||||
|
||||
/* Check if there is a least one consumer */
|
||||
consumer = 0;
|
||||
|
||||
@@ -365,18 +331,6 @@ static int itti_dump_flush_ring_buffer(int flush_all)
|
||||
}
|
||||
|
||||
if (consumer > 0) {
|
||||
#ifdef RTAI
|
||||
number_of_messages = itti_dump_queue.messages_in_queue;
|
||||
|
||||
ITTI_DUMP_DEBUG(0x4, "%lu elements in queue\n", number_of_messages);
|
||||
|
||||
if (number_of_messages == 0) {
|
||||
return (consumer);
|
||||
}
|
||||
|
||||
__sync_sub_and_fetch(&itti_dump_queue.messages_in_queue, number_of_messages);
|
||||
#endif
|
||||
|
||||
do {
|
||||
/* Acquire the ring element */
|
||||
lfds611_ringbuffer_get_read_element(itti_dump_queue.itti_message_queue, &element);
|
||||
@@ -419,9 +373,6 @@ static int itti_dump_flush_ring_buffer(int flush_all)
|
||||
lfds611_ringbuffer_put_read_element(itti_dump_queue.itti_message_queue, element);
|
||||
}
|
||||
} while(flush_all
|
||||
#ifdef RTAI
|
||||
&& --number_of_messages
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
@@ -478,9 +429,6 @@ static void *itti_dump_socket(void *arg_p)
|
||||
struct sockaddr_in servaddr; /* socket address structure */
|
||||
|
||||
struct timeval *timeout_p = NULL;
|
||||
#ifdef RTAI
|
||||
struct timeval timeout;
|
||||
#endif
|
||||
|
||||
ITTI_DUMP_DEBUG(0x2, " Creating TCP dump socket on port %u\n", ITTI_PORT);
|
||||
|
||||
@@ -536,15 +484,11 @@ static void *itti_dump_socket(void *arg_p)
|
||||
/* Add the listener */
|
||||
FD_SET(itti_listen_socket, &read_set);
|
||||
|
||||
#ifndef RTAI
|
||||
/* Add the event fd */
|
||||
FD_SET(itti_dump_queue.event_fd, &read_set);
|
||||
|
||||
/* Max of both sd */
|
||||
max_sd = itti_listen_socket > itti_dump_queue.event_fd ? itti_listen_socket : itti_dump_queue.event_fd;
|
||||
#else
|
||||
max_sd = itti_listen_socket;
|
||||
#endif
|
||||
|
||||
itti_dump_queue.itti_listen_socket = itti_listen_socket;
|
||||
|
||||
@@ -557,14 +501,7 @@ static void *itti_dump_socket(void *arg_p)
|
||||
int i;
|
||||
|
||||
memcpy(&working_set, &read_set, sizeof(read_set));
|
||||
#ifdef RTAI
|
||||
timeout.tv_sec = 0;
|
||||
timeout.tv_usec = 100000;
|
||||
|
||||
timeout_p = &timeout;
|
||||
#else
|
||||
timeout_p = NULL;
|
||||
#endif
|
||||
|
||||
/* No timeout: select blocks till a new event has to be handled
|
||||
* on sd's.
|
||||
@@ -592,8 +529,6 @@ static void *itti_dump_socket(void *arg_p)
|
||||
if (FD_ISSET(i, &working_set)) {
|
||||
desc_ready -= 1;
|
||||
|
||||
#ifndef RTAI
|
||||
|
||||
if (i == itti_dump_queue.event_fd) {
|
||||
/* Notification of new element to dump from other tasks */
|
||||
eventfd_t sem_counter;
|
||||
@@ -613,7 +548,6 @@ static void *itti_dump_socket(void *arg_p)
|
||||
if (itti_dump_running) {
|
||||
ITTI_DUMP_DEBUG (0x4, " No messages consumers, waiting ...\n");
|
||||
usleep(100 * 1000);
|
||||
#ifndef RTAI
|
||||
{
|
||||
ssize_t write_ret;
|
||||
|
||||
@@ -622,7 +556,6 @@ static void *itti_dump_socket(void *arg_p)
|
||||
write_ret = write(itti_dump_queue.event_fd, &sem_counter, sizeof(sem_counter));
|
||||
AssertFatal (write_ret == sizeof(sem_counter), "Failed to write to dump event FD (%d/%d)!\n", (int) write_ret, (int) sem_counter);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
itti_dump_socket_exit();
|
||||
}
|
||||
@@ -630,7 +563,6 @@ static void *itti_dump_socket(void *arg_p)
|
||||
ITTI_DUMP_DEBUG(0x1, " Write element to file\n");
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
if (i == itti_listen_socket) {
|
||||
do {
|
||||
client_socket = accept(itti_listen_socket, NULL, NULL);
|
||||
@@ -719,21 +651,9 @@ int itti_dump_queue_message(task_id_t sender_task,
|
||||
AssertFatal (message_name != NULL, "Message name is NULL!\n");
|
||||
AssertFatal (message_p != NULL, "Message is NULL!\n");
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE_MALLOC, VCD_FUNCTION_IN);
|
||||
#endif
|
||||
new = itti_malloc(sender_task, TASK_MAX, sizeof(itti_dump_queue_item_t));
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE_MALLOC, VCD_FUNCTION_OUT);
|
||||
#endif
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE_MALLOC, VCD_FUNCTION_IN);
|
||||
#endif
|
||||
new->data = itti_malloc(sender_task, TASK_MAX, message_size);
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE_MALLOC, VCD_FUNCTION_OUT);
|
||||
#endif
|
||||
|
||||
memcpy(new->data, message_p, message_size);
|
||||
new->data_size = message_size;
|
||||
@@ -791,9 +711,6 @@ int itti_dump_init(const char * const messages_definition_xml, const char * cons
|
||||
AssertFatal (0, " Failed to create ring buffer!\n");
|
||||
}
|
||||
|
||||
#ifdef RTAI
|
||||
itti_dump_queue.messages_in_queue = 0;
|
||||
#else
|
||||
itti_dump_queue.event_fd = eventfd(0, EFD_SEMAPHORE);
|
||||
|
||||
if (itti_dump_queue.event_fd == -1) {
|
||||
@@ -801,8 +718,6 @@ int itti_dump_init(const char * const messages_definition_xml, const char * cons
|
||||
AssertFatal (0, "eventfd failed: %s!\n", strerror(errno));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
itti_dump_queue.nb_connected = 0;
|
||||
|
||||
for(i = 0; i < ITTI_DUMP_MAX_CON; i++) {
|
||||
|
||||
@@ -27,10 +27,17 @@
|
||||
#ifndef _ITTI_TYPES_H_
|
||||
#define _ITTI_TYPES_H_
|
||||
|
||||
#ifdef USER_MODE
|
||||
#include <stdint.h>
|
||||
/* The current file is included in the ue_ip.ko compilation.
|
||||
* For it to work we need to include linux/types.h and
|
||||
* not stdint.h.
|
||||
* A solution to this problem is to use #ifndef __KERNEL__.
|
||||
* Maybe a better solution would be to clean things up
|
||||
* so that ue_ip.ko does not include the current file.
|
||||
*/
|
||||
#ifndef __KERNEL__
|
||||
# include <stdint.h>
|
||||
#else
|
||||
#include <linux/types.h>
|
||||
# include <linux/types.h>
|
||||
#endif
|
||||
|
||||
#define CHARS_TO_UINT32(c1, c2, c3, c4) (((c4) << 24) | ((c3) << 16) | ((c2) << 8) | (c1))
|
||||
|
||||
@@ -19,15 +19,8 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifdef RTAI
|
||||
# include <rtai_shm.h>
|
||||
#endif
|
||||
|
||||
#include "assertions.h"
|
||||
#include "memory_pools.h"
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
# include "vcd_signal_dumper.h"
|
||||
#endif
|
||||
|
||||
#if T_TRACER
|
||||
#include <string.h>
|
||||
@@ -37,18 +30,8 @@
|
||||
/*------------------------------------------------------------------------------*/
|
||||
const static int mp_debug = 0;
|
||||
|
||||
#ifdef RTAI
|
||||
# define MP_DEBUG(x, args...) do { if (mp_debug) rt_printk("[MP][D]"x, ##args); } \
|
||||
while(0)
|
||||
#else
|
||||
# define MP_DEBUG(x, args...) do { if (mp_debug) fprintf(stdout, "[MP][D]"x, ##args); fflush (stdout); } \
|
||||
while(0)
|
||||
#endif
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
uint64_t vcd_mp_alloc;
|
||||
uint64_t vcd_mp_free;
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
#ifndef CHARS_TO_UINT32
|
||||
@@ -414,11 +397,6 @@ memory_pool_item_handle_t memory_pools_allocate (memory_pools_handle_t memory_po
|
||||
pool_id_t pool;
|
||||
items_group_index_t item_index = ITEMS_GROUP_INDEX_INVALID;
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_MP_ALLOC,
|
||||
__sync_or_and_fetch (&vcd_mp_alloc, 1L << info_0));
|
||||
#endif
|
||||
|
||||
/* Recover memory_pools */
|
||||
memory_pools = memory_pools_from_handler (memory_pools_handle);
|
||||
AssertError (memory_pools != NULL, {}, "Failed to retrieve memory pool for handle %p!\n", memory_pools_handle);
|
||||
@@ -464,11 +442,6 @@ memory_pool_item_handle_t memory_pools_allocate (memory_pools_handle_t memory_po
|
||||
MP_DEBUG(" Alloc [--][------]{------}, %3u %3u, %6u, failed!\n", info_0, info_1, item_size);
|
||||
}
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_MP_ALLOC,
|
||||
__sync_and_and_fetch (&vcd_mp_alloc, ~(1L << info_0)));
|
||||
#endif
|
||||
|
||||
return memory_pool_item_handle;
|
||||
}
|
||||
|
||||
@@ -493,11 +466,6 @@ int memory_pools_free (memory_pools_handle_t memory_pools_handle, memory_pool_it
|
||||
|
||||
info_1 = memory_pool_item->start.info[1];
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_MP_FREE,
|
||||
__sync_or_and_fetch (&vcd_mp_free, 1L << info_1));
|
||||
#endif
|
||||
|
||||
/* Recover pool index */
|
||||
pool = memory_pool_item->start.pool_id;
|
||||
AssertFatal (pool < memory_pools->pools_defined, "Pool index is invalid (%u/%u)!\n", pool, memory_pools->pools_defined);
|
||||
@@ -531,11 +499,6 @@ int memory_pools_free (memory_pools_handle_t memory_pools_handle, memory_pool_it
|
||||
|
||||
AssertError (result == EXIT_SUCCESS, {}, "Failed to free memory pool item (pool %u, item %d)!\n", pool, item_index);
|
||||
|
||||
#if defined(OAI_EMU) || defined(RTAI)
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLE_MP_FREE,
|
||||
__sync_and_and_fetch (&vcd_mp_free, ~(1L << info_1)));
|
||||
#endif
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
||||
@@ -117,16 +117,19 @@ int signal_handle(int *end)
|
||||
case SIGUSR1:
|
||||
SIG_DEBUG("Received SIGUSR1\n");
|
||||
*end = 1;
|
||||
output_log_mem();
|
||||
break;
|
||||
|
||||
case SIGSEGV: /* Fall through */
|
||||
case SIGABRT:
|
||||
SIG_DEBUG("Received SIGABORT\n");
|
||||
output_log_mem();
|
||||
backtrace_handle_signal(&info);
|
||||
break;
|
||||
|
||||
case SIGINT:
|
||||
printf("Received SIGINT\n");
|
||||
output_log_mem();
|
||||
itti_send_terminate_message(TASK_UNKNOWN);
|
||||
*end = 1;
|
||||
break;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -34,9 +34,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <dlfcn.h>
|
||||
#include "openair1/PHY/defs.h"
|
||||
#include "openair1/PHY/defs_common.h"
|
||||
#define LOAD_MODULE_SHLIB_MAIN
|
||||
|
||||
#include "common/config/config_userapi.h"
|
||||
@@ -44,68 +45,162 @@
|
||||
void loader_init(void) {
|
||||
paramdef_t LoaderParams[] = LOADER_PARAMS_DESC;
|
||||
|
||||
|
||||
loader_data.mainexec_buildversion = PACKAGE_VERSION;
|
||||
int ret = config_get( LoaderParams,sizeof(LoaderParams)/sizeof(paramdef_t),LOADER_CONFIG_PREFIX);
|
||||
if (ret <0) {
|
||||
fprintf(stderr,"[LOADER] configuration couldn't be performed");
|
||||
printf("[LOADER] configuration couldn't be performed via config module, parameters set to default values\n");
|
||||
if (loader_data.shlibpath == NULL) {
|
||||
loader_data.shlibpath=DEFAULT_PATH;
|
||||
}
|
||||
return;
|
||||
}
|
||||
loader_data.maxshlibs = DEFAULT_MAXSHLIBS;
|
||||
}
|
||||
loader_data.shlibs = malloc(loader_data.maxshlibs * sizeof(loader_shlibdesc_t));
|
||||
if(loader_data.shlibs == NULL) {
|
||||
fprintf(stderr,"[LOADER] %s %d memory allocation error %s\n",__FILE__, __LINE__,strerror(errno));
|
||||
exit_fun("[LOADER] unrecoverable error");
|
||||
}
|
||||
memset(loader_data.shlibs,0,loader_data.maxshlibs * sizeof(loader_shlibdesc_t));
|
||||
}
|
||||
|
||||
/* build the full shared lib name from the module name */
|
||||
char *loader_format_shlibpath(char *modname)
|
||||
{
|
||||
|
||||
char *tmpstr;
|
||||
char *shlibpath =NULL;
|
||||
char *shlibversion=NULL;
|
||||
char *cfgprefix;
|
||||
paramdef_t LoaderParams[] ={{"shlibpath", NULL, 0, strptr:&shlibpath, defstrval:NULL, TYPE_STRING, 0},
|
||||
{"shlibversion", NULL, 0, strptr:&shlibversion, defstrval:"", TYPE_STRING, 0}};
|
||||
|
||||
int ret;
|
||||
|
||||
|
||||
|
||||
|
||||
/* looks for specific path for this module in the config file */
|
||||
/* specific value for a module path and version is located in a modname subsection of the loader section */
|
||||
/* shared lib name is formatted as lib<module name><module version>.so */
|
||||
cfgprefix = malloc(sizeof(LOADER_CONFIG_PREFIX)+strlen(modname)+16);
|
||||
if (cfgprefix == NULL) {
|
||||
fprintf(stderr,"[LOADER] %s %d malloc error loading module %s, %s\n",__FILE__, __LINE__, modname, strerror(errno));
|
||||
exit_fun("[LOADER] unrecoverable error");
|
||||
} else {
|
||||
sprintf(cfgprefix,LOADER_CONFIG_PREFIX ".%s",modname);
|
||||
int ret = config_get( LoaderParams,sizeof(LoaderParams)/sizeof(paramdef_t),cfgprefix);
|
||||
if (ret <0) {
|
||||
fprintf(stderr,"[LOADER] %s %d couldn't retrieve config from section %s\n",__FILE__, __LINE__,cfgprefix);
|
||||
}
|
||||
}
|
||||
/* no specific path, use loader default shared lib path */
|
||||
if (shlibpath == NULL) {
|
||||
shlibpath = loader_data.shlibpath ;
|
||||
}
|
||||
/* no specific shared lib version */
|
||||
if (shlibversion == NULL) {
|
||||
shlibversion = "" ;
|
||||
}
|
||||
/* alloc memory for full module shared lib file name */
|
||||
tmpstr = malloc(strlen(shlibpath)+strlen(modname)+strlen(shlibversion)+16);
|
||||
if (tmpstr == NULL) {
|
||||
fprintf(stderr,"[LOADER] %s %d malloc error loading module %s, %s\n",__FILE__, __LINE__, modname, strerror(errno));
|
||||
exit_fun("[LOADER] unrecoverable error");
|
||||
}
|
||||
if(shlibpath[0] != 0) {
|
||||
ret=sprintf(tmpstr,"%s/",shlibpath);
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
sprintf(tmpstr+ret,"lib%s%s.so",modname,shlibversion);
|
||||
|
||||
|
||||
return tmpstr;
|
||||
}
|
||||
|
||||
int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf)
|
||||
{
|
||||
void *lib_handle;
|
||||
initfunc_t fpi;
|
||||
char *tmpstr;
|
||||
checkverfunc_t fpc;
|
||||
getfarrayfunc_t fpg;
|
||||
char *shlib_path;
|
||||
char *afname=NULL;
|
||||
int ret=0;
|
||||
|
||||
if (loader_data.shlibpath == NULL) {
|
||||
loader_init();
|
||||
}
|
||||
tmpstr = malloc(strlen(loader_data.shlibpath)+strlen(modname)+16);
|
||||
if (tmpstr == NULL) {
|
||||
fprintf(stderr,"[LOADER] %s %d malloc error loading module %s, %s\n",__FILE__, __LINE__, modname, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(loader_data.shlibpath[0] != 0) {
|
||||
ret=sprintf(tmpstr,"%s/",loader_data.shlibpath);
|
||||
}
|
||||
if(strstr(modname,".so") == NULL) {
|
||||
sprintf(tmpstr+ret,"lib%s.so",modname);
|
||||
} else {
|
||||
sprintf(tmpstr+ret,"%s",modname);
|
||||
}
|
||||
shlib_path = loader_format_shlibpath(modname);
|
||||
|
||||
ret = 0;
|
||||
lib_handle = dlopen(tmpstr, RTLD_LAZY|RTLD_NODELETE|RTLD_GLOBAL);
|
||||
lib_handle = dlopen(shlib_path, RTLD_LAZY|RTLD_NODELETE|RTLD_GLOBAL);
|
||||
if (!lib_handle) {
|
||||
fprintf(stderr,"[LOADER] library %s is not loaded: %s\n", tmpstr,dlerror());
|
||||
fprintf(stderr,"[LOADER] library %s is not loaded: %s\n", shlib_path,dlerror());
|
||||
ret = -1;
|
||||
} else {
|
||||
printf("[LOADER] library %s uccessfully loaded loaded\n", tmpstr);
|
||||
sprintf(tmpstr,"%s_autoinit",modname);
|
||||
fpi = dlsym(lib_handle,tmpstr);
|
||||
printf("[LOADER] library %s successfully loaded\n", shlib_path);
|
||||
afname=malloc(strlen(modname)+15);
|
||||
sprintf(afname,"%s_checkbuildver",modname);
|
||||
fpc = dlsym(lib_handle,afname);
|
||||
if (fpc != NULL ){
|
||||
int chkver_ret = fpc(loader_data.mainexec_buildversion, &(loader_data.shlibs[loader_data.numshlibs].shlib_buildversion));
|
||||
if (chkver_ret < 0) {
|
||||
fprintf(stderr,"[LOADER] %s %d lib %s, version mismatch",__FILE__, __LINE__, modname);
|
||||
exit_fun("[LOADER] unrecoverable error");
|
||||
}
|
||||
}
|
||||
sprintf(afname,"%s_autoinit",modname);
|
||||
fpi = dlsym(lib_handle,afname);
|
||||
|
||||
if (fpi != NULL )
|
||||
{
|
||||
if (fpi != NULL ) {
|
||||
fpi();
|
||||
}
|
||||
}
|
||||
|
||||
if (farray != NULL) {
|
||||
loader_data.shlibs[loader_data.numshlibs].funcarray=malloc(numf*sizeof(loader_shlibfunc_t));
|
||||
loader_data.shlibs[loader_data.numshlibs].numfunc=0;
|
||||
for (int i=0; i<numf; i++) {
|
||||
farray[i].fptr = dlsym(lib_handle,farray[i].fname);
|
||||
if (farray[i].fptr == NULL ) {
|
||||
fprintf(stderr,"[LOADER] %s %d %s function not found %s\n",__FILE__, __LINE__, dlerror(),farray[i].fname);
|
||||
ret= -1;
|
||||
}
|
||||
ret= -1;
|
||||
} else { /* farray[i].fptr == NULL */
|
||||
loader_data.shlibs[loader_data.numshlibs].funcarray[i].fname=strdup(farray[i].fname);
|
||||
loader_data.shlibs[loader_data.numshlibs].funcarray[i].fptr = farray[i].fptr;
|
||||
loader_data.shlibs[loader_data.numshlibs].numfunc++;
|
||||
}/* farray[i].fptr != NULL */
|
||||
} /* for int i... */
|
||||
} /* farray ! NULL */
|
||||
}
|
||||
} else { /* farray ! NULL */
|
||||
sprintf(afname,"%s_getfarray",modname);
|
||||
fpg = dlsym(lib_handle,afname);
|
||||
if (fpg != NULL ) {
|
||||
loader_data.shlibs[loader_data.numshlibs].numfunc = fpg(&(loader_data.shlibs[loader_data.numshlibs].funcarray));
|
||||
}
|
||||
} /* farray ! NULL */
|
||||
loader_data.shlibs[loader_data.numshlibs].name=strdup(modname);
|
||||
loader_data.shlibs[loader_data.numshlibs].thisshlib_path=strdup(shlib_path);
|
||||
|
||||
(loader_data.numshlibs)++;
|
||||
} /* lib_handle != NULL */
|
||||
|
||||
if (tmpstr != NULL) free(tmpstr);
|
||||
if ( shlib_path!= NULL) free(shlib_path);
|
||||
if ( afname!= NULL) free(afname);
|
||||
if (lib_handle != NULL) dlclose(lib_handle);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void * get_shlibmodule_fptr(char *modname, char *fname)
|
||||
{
|
||||
for (int i=0; i<loader_data.numshlibs && loader_data.shlibs[i].name != NULL; i++) {
|
||||
if ( strcmp(loader_data.shlibs[i].name, modname) == 0) {
|
||||
for (int j =0; j<loader_data.shlibs[i].numfunc ; j++) {
|
||||
if (strcmp(loader_data.shlibs[i].funcarray[j].fname, fname) == 0) {
|
||||
return loader_data.shlibs[i].funcarray[j].fptr;
|
||||
}
|
||||
} /* for j loop on module functions*/
|
||||
}
|
||||
} /* for i loop on modules */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -33,33 +33,60 @@
|
||||
#define LOAD_SHLIB_H
|
||||
|
||||
|
||||
typedef int(*initfunc_t)(void);
|
||||
|
||||
typedef struct {
|
||||
char *shlibpath;
|
||||
}loader_data_t;
|
||||
|
||||
typedef struct {
|
||||
char *fname;
|
||||
int (*fptr)(void);
|
||||
}loader_shlibfunc_t;
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
char *shlib_version; //
|
||||
char *shlib_buildversion;
|
||||
char *thisshlib_path;
|
||||
uint32_t numfunc;
|
||||
loader_shlibfunc_t *funcarray;
|
||||
}loader_shlibdesc_t;
|
||||
|
||||
typedef struct {
|
||||
char *mainexec_buildversion;
|
||||
char *shlibpath;
|
||||
uint32_t maxshlibs;
|
||||
uint32_t numshlibs;
|
||||
loader_shlibdesc_t *shlibs;
|
||||
}loader_data_t;
|
||||
|
||||
/* function type of functions which may be implemented by a module */
|
||||
/* 1: init function, called when loading, if found in the shared lib */
|
||||
typedef int(*initfunc_t)(void);
|
||||
/* 2: version checking function, called when loading, if it returns -1, trigger main exec abort */
|
||||
typedef int(*checkverfunc_t)(char * mainexec_version, char ** shlib_version);
|
||||
/* 3: get function array function, called when loading when a module doesn't provide */
|
||||
/* the function array when calling load_module_shlib (farray param NULL) */
|
||||
typedef int(*getfarrayfunc_t)(loader_shlibfunc_t **funcarray);
|
||||
|
||||
#ifdef LOAD_MODULE_SHLIB_MAIN
|
||||
#define LOADER_CONFIG_PREFIX "loader"
|
||||
#define DEFAULT_PATH ""
|
||||
#define DEFAULT_PATH ""
|
||||
#define DEFAULT_MAXSHLIBS 10
|
||||
loader_data_t loader_data;
|
||||
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* LOADER parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* LOADER parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define LOADER_PARAMS_DESC { \
|
||||
{"shlibpath", NULL, 0, strptr:(char **)&(loader_data.shlibpath), defstrval:DEFAULT_PATH, TYPE_STRING, 0} \
|
||||
{"shlibpath", NULL, PARAMFLAG_NOFREE, strptr:(char **)&(loader_data.shlibpath), defstrval:DEFAULT_PATH, TYPE_STRING, 0}, \
|
||||
{"maxshlibs", NULL, 0, uptr:&(loader_data.maxshlibs), defintval:DEFAULT_MAXSHLIBS, TYPE_UINT32, 0}, \
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------*/
|
||||
#else
|
||||
#else /* LOAD_MODULE_SHLIB_MAIN */
|
||||
extern int load_module_shlib(char *modname, loader_shlibfunc_t *farray, int numf);
|
||||
#endif
|
||||
extern void * get_shlibmodule_fptr(char *modname, char *fname);
|
||||
extern loader_data_t loader_data;
|
||||
#endif /* LOAD_MODULE_SHLIB_MAIN */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -99,6 +99,7 @@ void *msc_task(void *args_p)
|
||||
break;
|
||||
|
||||
case TERMINATE_MESSAGE: {
|
||||
fprintf(stderr, " *** Exiting MSC thread\n");
|
||||
timer_remove(timer_id);
|
||||
msc_end();
|
||||
itti_exit_task();
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
|
||||
IF(DEFINED ENV{OPENAIR_DIR})
|
||||
message("...using oai source files in $ENV{OPENAIR_DIR}")
|
||||
ELSE()
|
||||
message("OPENAIR_DIR is not defined. You must run \"source oaienv\" from the oai root dir")
|
||||
# exit early
|
||||
return()
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
||||
set(OPENAIR_DIR $ENV{OPENAIR_DIR})
|
||||
set(APPROOT ${OPENAIR_DIR}/common/utils/telnetsrv )
|
||||
set(OPENAIR_BUILD_DIR $ENV{OPENAIR_DIR}/cmake_targets)
|
||||
set(OPENAIR1_DIR $ENV{OPENAIR1_DIR})
|
||||
set(OPENAIR2_DIR $ENV{OPENAIR2_DIR})
|
||||
set(OPENAIR3_DIR $ENV{OPENAIR3_DIR})
|
||||
set(OPENAIR_PHY_DIR $ENV{OPENAIR1_DIR}/PHY)
|
||||
set(OPENAIR_TARGET_DIR $ENV{OPENAIR_DIR}/targets)
|
||||
set(OPENAIR_COMMONUTILS_DIR $ENV{OPENAIR_DIR}/common/utils)
|
||||
set(OPENAIR2_COMMON_DIR $ENV{OPENAIR_DIR}/openair2/COMMON)
|
||||
set(OPENAIR_ASN1INC ${OPENAIR_BUILD_DIR}/lte_build_oai/build/CMakeFiles/Rel14)
|
||||
set(OPENAIR_NFAPIINC $ENV{NFAPI_DIR} )
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX $ENV{OPENAIR_TARGETS})
|
||||
|
||||
add_definitions (-DRel14 -DCMAKER -DENABLE_FXP -DENABLE_ITTI -DENABLE_NAS_UE_LOGGING -DENABLE_SECURITY -DENABLE_USE_CPU_EXECUTION_TIME -DENABLE_USE_MME -DENABLE_VCD -DENB_AGENT -DENB_MODE -DETHERNET=1 -DEXMIMO_IOT -DJUMBO_FRAME -DLINK_ENB_PDCP_TO_GTPV1U -DLOG_NO_THREAD -DMAC_CONTEXT -DMAX_NUM_CCs=1 -DNAS_BUILT_IN_UE -DNAS_UE -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DNB_ANTENNAS_TXRX=2 -DNEW_FFT -DNO_RRM -DNone=1 -DOAI_NW_DRIVER_USE_NETLINK -DOPENAIR1 -DOPENAIR2 -DOPENAIR_LTE -DPC_DSP -DPC_TARGET -DPHYSIM -DPHY_CONTEXT -DPUCCH -DRel10=1 -DS1AP_VERSION=R10 -DTRACE_RLC_MUTEX -DUSER_MODE -DX2AP_VERSION=R11 -DXFORMS -mavx2 -msse4.1 -mssse3)
|
||||
add_compile_options( -fPIC -march=native -Ofast)
|
||||
|
||||
include_directories( ./ ${OPENAIR_COMMON_DIR} ${OPENAIR_DIR} ${OPENAIR1_DIR} ${OPENAIR2_DIR} ${OPENAIR2_COMMON_DIR} ${OPENAIR2_DIR}/UTIL/LOG
|
||||
${OPENAIR_COMMONUTILS_DIR}/msc ${OPENAIR_COMMONUTILS_DIR}/itti ${OPENAIR_COMMONUTILS_DIR}/hashtable ${OPENAIR_COMMONUTILS_DIR} ${OPENAIR_ASN1INC}
|
||||
${OPENAIR2_DIR}/LAYER2/RLC/AM_v9.3.0 ${OPENAIR_COMMONUTILS_DIR}/msc ${OPENAIR_COMMONUTILS_DIR}/itti ${OPENAIR_COMMONUTILS_DIR}/hashtable ${OPENAIR_COMMONUTILS_DIR} ${OPENAIR_ASN1INC}
|
||||
${OPENAIR2_DIR}/LAYER2/RLC ${OPENAIR2_DIR}/UTIL/LISTS ${OPENAIR2_DIR}/UTIL/MEM ${OPENAIR2_DIR}/LAYER2/RLC/UM_v9.3.0
|
||||
${OPENAIR2_DIR}/LAYER2/RLC/TM_v9.3.0 ${OPENAIR2_DIR}/RRC/LITE ${OPENAIR_TARGET_DIR}/COMMON ${OPENAIR_TARGET_DIR}/ARCH/COMMON
|
||||
${OPENAIR3_DIR}/NAS/COMMON/API/NETWORK ${OPENAIR3_DIR}/NAS/COMMON/EMM/MSG/ ${OPENAIR3_DIR}/NAS/COMMON/IES/ ${OPENAIR3_DIR}/NAS/COMMON/UTIL
|
||||
${OPENAIR3_DIR}/NAS/COMMON/ESM/MSG/ ${OPENAIR3_DIR}/GTPV1-U ${OPENAIR3_DIR}/GTPV1-U/nw-gtpv1u/shared ${OPENAIR3_DIR}/GTPV1-U/nw-gtpv1u/include
|
||||
${OPENAIR3_DIR}/UTILS ${OPENAIR_NFAPIINC})
|
||||
|
||||
set(TELNETSRV_SOURCE
|
||||
${APPROOT}/telnetsrv.c
|
||||
${APPROOT}/telnetsrv_phycmd.c
|
||||
${APPROOT}/telnetsrv_proccmd.c
|
||||
)
|
||||
|
||||
#set(TELNETSRV_ETHDEVCMD_SOURCE
|
||||
# ${APPROOT}/telnetsrv/telnetsrv_ethdevcmd.c
|
||||
# )
|
||||
|
||||
|
||||
|
||||
add_library(telnetsrv MODULE ${TELNETSRV_SOURCE} )
|
||||
#add_library(telnetsrv_ethdevcmd MODULE ${TELNETSRV_ETHDEVCMD_SOURCE} )
|
||||
|
||||
|
||||
install(TARGETS telnetsrv DESTINATION bin)
|
||||
|
||||
if (EXISTS "${OPENAIR_BUILD_DIR}/lte_build_oai/build" AND IS_DIRECTORY "${OPENAIR_BUILD_DIR}/lte_build_oai/build")
|
||||
install(TARGETS telnetsrv DESTINATION ${OPENAIR_BUILD_DIR}/lte_build_oai/build)
|
||||
endif (EXISTS "${OPENAIR_BUILD_DIR}/lte_build_oai/build" AND IS_DIRECTORY "${OPENAIR_BUILD_DIR}/lte_build_oai/build")
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -43,7 +43,7 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <pthread.h>
|
||||
#include <telnetsrv.h>
|
||||
#include "telnetsrv.h"
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
@@ -51,20 +51,27 @@
|
||||
#include <dlfcn.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
#include "common/utils/load_module_shlib.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
#include <readline/history.h>
|
||||
|
||||
|
||||
#include "telnetsrv_phycmd.h"
|
||||
#include "telnetsrv_proccmd.h"
|
||||
static char* telnet_defstatmod[] = {"softmodem","phy"};
|
||||
static char* telnet_defstatmod[] = {"softmodem","phy","loader"};
|
||||
static telnetsrv_params_t telnetparams;
|
||||
#define TELNETSRV_LISTENADDR 0
|
||||
#define TELNETSRV_LISTENPORT 1
|
||||
#define TELNETSRV_PRIORITY 2
|
||||
#define TELNETSRV_DEBUG 3
|
||||
#define TELNETSRV_STATICMOD 7
|
||||
#define TELNETSRV_SHRMOD 8
|
||||
#define TELNETSRV_LOOPC 4
|
||||
#define TELNETSRV_LOOPD 5
|
||||
#define TELNETSRV_HISFILE 6
|
||||
#define TELNETSRV_HISSIZE 7
|
||||
#define TELNETSRV_PHYBSIZE 8
|
||||
#define TELNETSRV_STATICMOD 9
|
||||
#define TELNETSRV_SHRMOD 10
|
||||
|
||||
paramdef_t telnetoptions[] = {
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* configuration parameters for telnet utility */
|
||||
@@ -72,19 +79,22 @@ paramdef_t telnetoptions[] = {
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
{"listenaddr", "<listen ip address>", 0, uptr:&telnetparams.listenaddr, defstrval:"0.0.0.0", TYPE_IPV4ADDR, 0 },
|
||||
{"listenport", "<local port>", 0, uptr:&(telnetparams.listenport), defuintval:9090, TYPE_UINT, 0 },
|
||||
{"priority", "<scheduling policy (0-99)", 0, uptr:&telnetparams.priority, defuintval:0, TYPE_INT, 0 },
|
||||
{"priority", "<scheduling policy (0-99)", 0, iptr:&telnetparams.priority, defuintval:0, TYPE_INT, 0 },
|
||||
{"debug", "<debug level>", 0, uptr:NULL, defuintval:0, TYPE_UINT, 0 },
|
||||
{"loopcount", "<loop command iterations>", 0, uptr:&(telnetparams.loopcount), defuintval:10, TYPE_UINT, 0 },
|
||||
{"loopdelay", "<loop command delay (ms)>", 0, uptr:&(telnetparams.loopdelay), defuintval:5000, TYPE_UINT, 0 },
|
||||
{"histfile", "<history file name>", PARAMFLAG_NOFREE, strptr:&(telnetparams.histfile), defstrval:"oaitelnet.history", TYPE_STRING, 0 },
|
||||
{"histsize", "<history sizes>", 0, iptr:&(telnetparams.histsize), defuintval:50, TYPE_INT, 0 },
|
||||
{"phypbsize", "<phy dump buff size (bytes)>",0, uptr:&(telnetparams.phyprntbuff_size),defuintval:65000, TYPE_UINT, 0 },
|
||||
{"staticmod", "<static modules selection>", 0, NULL, defstrlistval:telnet_defstatmod,TYPE_STRINGLIST,1},
|
||||
{"shrmod", "<static modules selection>", 0, NULL, NULL,TYPE_STRINGLIST,0 },
|
||||
{"staticmod", "<static modules selection>", 0, strlistptr:NULL, defstrlistval:telnet_defstatmod,TYPE_STRINGLIST,(sizeof(telnet_defstatmod)/sizeof(char *))},
|
||||
{"shrmod", "<dynamic modules selection>", 0, strlistptr:NULL, defstrlistval:NULL,TYPE_STRINGLIST,0 }
|
||||
};
|
||||
|
||||
int get_phybsize() {return telnetparams.phyprntbuff_size; };
|
||||
int get_phybsize(void) {return telnetparams.phyprntbuff_size; };
|
||||
int add_telnetcmd(char *modulename,telnetshell_vardef_t *var, telnetshell_cmddef_t *cmd );
|
||||
int setoutput(char *buff, int debug, telnet_printfunc_t prnt);
|
||||
int setparam(char *buff, int debug, telnet_printfunc_t prnt);
|
||||
int history_cmd(char *buff, int debug, telnet_printfunc_t prnt);
|
||||
|
||||
telnetshell_vardef_t telnet_vardef[] = {
|
||||
{"debug",TELNET_VARTYPE_INT32,&telnetparams.telnetdbg},
|
||||
@@ -92,12 +102,15 @@ telnetshell_vardef_t telnet_vardef[] = {
|
||||
{"loopc",TELNET_VARTYPE_INT32,&telnetparams.loopcount},
|
||||
{"loopd",TELNET_VARTYPE_INT32,&telnetparams.loopdelay},
|
||||
{"phypb",TELNET_VARTYPE_INT32,&telnetparams.phyprntbuff_size},
|
||||
{"hsize",TELNET_VARTYPE_INT32,&telnetparams.histsize},
|
||||
{"hfile",TELNET_VARTYPE_STRING,&telnetparams.histfile},
|
||||
{"",0,NULL}
|
||||
};
|
||||
|
||||
telnetshell_cmddef_t telnet_cmdarray[] = {
|
||||
{"redirlog","[here,file,off]",setoutput},
|
||||
{"param","[prio]",setparam},
|
||||
{"history","[list,reset]",history_cmd},
|
||||
{"","",NULL},
|
||||
};
|
||||
|
||||
@@ -131,41 +144,54 @@ char strpolicy[10];
|
||||
|
||||
|
||||
//sched_get_priority_max(SCHED_FIFO)
|
||||
if (priority < NICE_MIN)
|
||||
{
|
||||
if (priority < NICE_MIN) {
|
||||
policy=SCHED_FIFO;
|
||||
sprintf(strpolicy,"%s","fifo");
|
||||
schedp.sched_priority= NICE_MIN - priority ;
|
||||
schedp.sched_priority= NICE_MIN - priority ;
|
||||
if ( (schedp.sched_priority < sched_get_priority_min(SCHED_FIFO)) ||
|
||||
(schedp.sched_priority > sched_get_priority_max(SCHED_FIFO)) ) {
|
||||
client_printf("Error: %i invalid prio, should be %i to %i, \n",
|
||||
priority, NICE_MIN -sched_get_priority_min(SCHED_FIFO),
|
||||
NICE_MIN - sched_get_priority_max(SCHED_FIFO) );
|
||||
}
|
||||
else if (priority > NICE_MAX)
|
||||
{
|
||||
} else if (priority > NICE_MAX) {
|
||||
policy=SCHED_IDLE;
|
||||
sprintf(strpolicy,"%s","idle");
|
||||
schedp.sched_priority=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
policy=SCHED_OTHER;
|
||||
sprintf(strpolicy,"%s","other");
|
||||
schedp.sched_priority=0;
|
||||
}
|
||||
if( tid != 0)
|
||||
{
|
||||
}
|
||||
|
||||
if( tid != 0) {
|
||||
rt = pthread_setschedparam(tid, policy, &schedp);
|
||||
}
|
||||
else if(pid > 0)
|
||||
{
|
||||
} else if(pid > 0) {
|
||||
rt = sched_setscheduler( pid, policy,&schedp);
|
||||
}
|
||||
if (rt != 0)
|
||||
{
|
||||
} else {
|
||||
rt= -1;
|
||||
client_printf("Error: no pid or tid specified\n");
|
||||
}
|
||||
|
||||
if (rt != 0) {
|
||||
client_printf("Error %i: %s modifying sched param to %s:%i, \n",
|
||||
errno,strerror(errno),strpolicy,schedp.sched_priority);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
client_printf("policy set to %s, priority %i\n",strpolicy,schedp.sched_priority);
|
||||
if ( policy==SCHED_OTHER) {
|
||||
rt = getpriority(PRIO_PROCESS,tid);
|
||||
if (rt != -1) {
|
||||
rt = setpriority(PRIO_PROCESS,tid,priority);
|
||||
if (rt < 0) {
|
||||
client_printf("Error %i: %s trying to set nice value of thread %u to %i\n",
|
||||
errno,strerror(errno),tid,priority);
|
||||
}
|
||||
} else {
|
||||
client_printf("Error %i: %s trying to get nice value of thread %u \n",
|
||||
errno,strerror(errno),tid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -198,14 +224,13 @@ int rt;
|
||||
|
||||
CPU_ZERO(&cpuset);
|
||||
CPU_SET(coreid, &cpuset);
|
||||
if (tid > 0)
|
||||
{
|
||||
if (tid > 0) {
|
||||
rt = pthread_setaffinity_np((pthread_t)tid, sizeof(cpu_set_t), &cpuset);
|
||||
}
|
||||
else if (pid > 0)
|
||||
{
|
||||
} else if (pid > 0){
|
||||
rt = sched_setaffinity((pid_t)pid, sizeof(cpu_set_t), &cpuset);
|
||||
}
|
||||
} else {
|
||||
rt= -1;
|
||||
}
|
||||
if (rt != 0)
|
||||
{
|
||||
client_printf("Error %i: %s calling , xxx_setaffinity...\n",errno,strerror(errno));
|
||||
@@ -284,7 +309,6 @@ memset(cmds,0,sizeof(cmds));
|
||||
sscanf(buff,"%9s %9s %9s %9s %9s", cmds[0],cmds[1],cmds[2],cmds[3],cmds[4] );
|
||||
if (strncasecmp(cmds[0],"prio",4) == 0)
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int prio;
|
||||
prio=(int)strtol(cmds[1],NULL,0);
|
||||
if (errno == ERANGE)
|
||||
@@ -305,6 +329,35 @@ if (strncasecmp(cmds[0],"aff",3) == 0)
|
||||
|
||||
return CMDSTATUS_NOTFOUND;
|
||||
} /* setparam */
|
||||
|
||||
int history_cmd(char *buff, int debug, telnet_printfunc_t prnt)
|
||||
{
|
||||
char cmds[TELNET_MAX_MSGLENGTH/TELNET_CMD_MAXSIZE][TELNET_CMD_MAXSIZE];
|
||||
|
||||
|
||||
memset(cmds,0,sizeof(cmds));
|
||||
sscanf(buff,"%9s %9s %9s %9s %9s", cmds[0],cmds[1],cmds[2],cmds[3],cmds[4] );
|
||||
if (cmds[0] == NULL)
|
||||
return CMDSTATUS_VARNOTFOUND;
|
||||
if (strncasecmp(cmds[0],"list",4) == 0)
|
||||
{
|
||||
HIST_ENTRY **hist = history_list();
|
||||
if (hist) {
|
||||
for (int i = 0; hist[i]; i++) {
|
||||
prnt ("%d: %s\n", i + history_base, hist[i]->line);
|
||||
}
|
||||
}
|
||||
return CMDSTATUS_FOUND;
|
||||
}
|
||||
if (strncasecmp(cmds[0],"reset",5) == 0)
|
||||
{
|
||||
clear_history();
|
||||
write_history(telnetparams.histfile);
|
||||
return CMDSTATUS_FOUND;
|
||||
}
|
||||
|
||||
return CMDSTATUS_NOTFOUND;
|
||||
} /* history_cmd */
|
||||
/*-------------------------------------------------------------------------------------------------------*/
|
||||
/*
|
||||
generic commands available for all modules loaded by the server
|
||||
@@ -314,11 +367,11 @@ int setgetvar(int moduleindex,char getorset,char *params)
|
||||
{
|
||||
int n,i;
|
||||
char varname[TELNET_CMD_MAXSIZE];
|
||||
char varval[TELNET_CMD_MAXSIZE];
|
||||
char *varval=NULL;
|
||||
|
||||
memset(varname,0,sizeof(varname));
|
||||
memset(varval,0,sizeof(varval));
|
||||
n = sscanf(params,"%s %s",varname,varval);
|
||||
|
||||
n = sscanf(params,"%s %ms",varname,&varval);
|
||||
for ( i=0 ; telnetparams.CmdParsers[moduleindex].var[i].varvalptr != NULL ; i++)
|
||||
{
|
||||
if ( strncasecmp(telnetparams.CmdParsers[moduleindex].var[i].varname,varname,strlen(telnetparams.CmdParsers[moduleindex].var[i].varname)) == 0)
|
||||
@@ -330,7 +383,10 @@ char varval[TELNET_CMD_MAXSIZE];
|
||||
switch(telnetparams.CmdParsers[moduleindex].var[i].vartype)
|
||||
{
|
||||
case TELNET_VARTYPE_INT32:
|
||||
client_printf("%i\n",*(int *)(telnetparams.CmdParsers[moduleindex].var[i].varvalptr));
|
||||
client_printf("%i\n",*(int32_t *)(telnetparams.CmdParsers[moduleindex].var[i].varvalptr));
|
||||
break;
|
||||
case TELNET_VARTYPE_INT64:
|
||||
client_printf("%lli\n",*(int64_t *)(telnetparams.CmdParsers[moduleindex].var[i].varvalptr));
|
||||
break;
|
||||
case TELNET_VARTYPE_INT16:
|
||||
client_printf("%hi\n",*(short *)(telnetparams.CmdParsers[moduleindex].var[i].varvalptr));
|
||||
@@ -338,8 +394,8 @@ char varval[TELNET_CMD_MAXSIZE];
|
||||
case TELNET_VARTYPE_DOUBLE:
|
||||
client_printf("%g\n",*(double *)(telnetparams.CmdParsers[moduleindex].var[i].varvalptr));
|
||||
break;
|
||||
case TELNET_VARTYPE_PTR:
|
||||
client_printf("0x%08x\n",*((unsigned int *)(telnetparams.CmdParsers[moduleindex].var[i].varvalptr)));
|
||||
case TELNET_VARTYPE_STRING:
|
||||
client_printf("\"%s\"\n",*(char **)(telnetparams.CmdParsers[moduleindex].var[i].varvalptr));
|
||||
break;
|
||||
default:
|
||||
client_printf("unknown type\n");
|
||||
@@ -364,6 +420,10 @@ char varval[TELNET_CMD_MAXSIZE];
|
||||
case TELNET_VARTYPE_DOUBLE:
|
||||
*(double *)(telnetparams.CmdParsers[moduleindex].var[i].varvalptr) = strtod(varval,NULL);
|
||||
client_printf("%g\n",*(double *)(telnetparams.CmdParsers[moduleindex].var[i].varvalptr));
|
||||
break;
|
||||
case TELNET_VARTYPE_STRING:
|
||||
sprintf(*(char **)(telnetparams.CmdParsers[moduleindex].var[i].varvalptr),"%s", varval);
|
||||
client_printf("\"%s\"\n",*(char **)(telnetparams.CmdParsers[moduleindex].var[i].varvalptr));
|
||||
break;
|
||||
default:
|
||||
client_printf("unknown type\n");
|
||||
@@ -372,6 +432,9 @@ char varval[TELNET_CMD_MAXSIZE];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (n>1 && varval != NULL) {
|
||||
free(varval);
|
||||
}
|
||||
return CMDSTATUS_VARNOTFOUND;
|
||||
}
|
||||
/*----------------------------------------------------------------------------------------------------*/
|
||||
@@ -515,13 +578,14 @@ if(listen(sock, 1) == -1)
|
||||
fprintf(stderr,"[TELNETSRV] Error %s on listen call\n",strerror(errno));
|
||||
|
||||
|
||||
using_history();
|
||||
|
||||
printf("\nInitializing telnet server...\n");
|
||||
while( (telnetparams.new_socket = accept(sock, &cli_addr, &cli_len)) )
|
||||
{
|
||||
printf("[TELNETSRV] Telnet client connected....\n");
|
||||
|
||||
|
||||
read_history(telnetparams.histfile);
|
||||
stifle_history(telnetparams.histsize);
|
||||
if(telnetparams.new_socket < 0)
|
||||
fprintf(stderr,"[TELNETSRV] Error %s on accept call\n",strerror(errno));
|
||||
|
||||
@@ -548,31 +612,43 @@ while( (telnetparams.new_socket = accept(sock, &cli_addr, &cli_len)) )
|
||||
break;
|
||||
}
|
||||
if (telnetparams.telnetdbg > 0)
|
||||
printf("[TELNETSRV] Command received: readc %i filled %i %s\n", readc, filled ,buf);
|
||||
if (strlen(buf) >= 2 )
|
||||
printf("[TELNETSRV] Command received: readc %i filled %i \"%s\"\n", readc, filled ,buf);
|
||||
if (buf[0] == '!') {
|
||||
if (buf[1] == '!') {
|
||||
sprintf(buf,"%s","telnet history list");
|
||||
} else {
|
||||
HIST_ENTRY *hisentry = history_get(strtol(buf+1,NULL,0));
|
||||
if (hisentry) {
|
||||
char msg[TELNET_MAX_MSGLENGTH + sizeof(TELNET_PROMPT) +10];
|
||||
sprintf(buf,"%s",hisentry->line);
|
||||
sprintf(msg,"%s %s\n",TELNET_PROMPT, hisentry->line);
|
||||
send(telnetparams.new_socket, msg, strlen(msg), MSG_NOSIGNAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (strlen(buf) > 2 )
|
||||
{
|
||||
status=process_command(buf);
|
||||
}
|
||||
else
|
||||
status=CMDSTATUS_NOCMD;
|
||||
|
||||
if (status != CMDSTATUS_EXIT)
|
||||
{
|
||||
if (status == CMDSTATUS_NOTFOUND)
|
||||
{
|
||||
if (status != CMDSTATUS_EXIT) {
|
||||
if (status == CMDSTATUS_NOTFOUND) {
|
||||
char msg[TELNET_MAX_MSGLENGTH + 50];
|
||||
sprintf(msg,"Error: \n %s\n is not a softmodem command\n",buf);
|
||||
send(telnetparams.new_socket, msg, strlen(msg), MSG_NOSIGNAL);
|
||||
}
|
||||
} else if (status == CMDSTATUS_FOUND) {
|
||||
add_history(buf);
|
||||
}
|
||||
send(telnetparams.new_socket, TELNET_PROMPT, sizeof(TELNET_PROMPT), MSG_NOSIGNAL);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
printf ("[TELNETSRV] Closing telnet connection...\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
write_history(telnetparams.histfile);
|
||||
clear_history();
|
||||
close(telnetparams.new_socket);
|
||||
printf ("[TELNETSRV] Telnet server waitting for connection...\n");
|
||||
}
|
||||
@@ -588,7 +664,7 @@ return;
|
||||
*/
|
||||
void exec_moduleinit(char *modname)
|
||||
{
|
||||
void (*fptr)();
|
||||
void (*fptr)(void);
|
||||
char initfunc[TELNET_CMD_MAXSIZE+9];
|
||||
|
||||
if (strlen(modname) > TELNET_CMD_MAXSIZE)
|
||||
@@ -609,23 +685,26 @@ char initfunc[TELNET_CMD_MAXSIZE+9];
|
||||
}
|
||||
}
|
||||
|
||||
int add_embeddedmodules()
|
||||
int add_embeddedmodules(void)
|
||||
{
|
||||
|
||||
int ret=0;
|
||||
|
||||
|
||||
|
||||
for(int i=0; i<telnetoptions[TELNETSRV_STATICMOD].numelt;i++)
|
||||
{
|
||||
ret++;
|
||||
exec_moduleinit(telnetoptions[TELNETSRV_STATICMOD].strlistptr[i]);
|
||||
}
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
int add_sharedmodules()
|
||||
int add_sharedmodules(void)
|
||||
{
|
||||
char initfunc[TELNET_CMD_MAXSIZE+9];
|
||||
void (*fptr)();
|
||||
|
||||
void (*fptr)(void);
|
||||
int ret=0;
|
||||
|
||||
for(int i=0; i<telnetoptions[TELNETSRV_SHRMOD].numelt;i++)
|
||||
{
|
||||
@@ -634,22 +713,23 @@ void (*fptr)();
|
||||
if ( fptr != NULL)
|
||||
{
|
||||
fptr();
|
||||
ret++;
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr,"[TELNETSRV] couldn't find %s for module %s \n",initfunc,telnetoptions[TELNETSRV_STATICMOD].strlistptr[i]);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int init_telnetsrv(char *cfgfile)
|
||||
int telnetsrv_autoinit(void)
|
||||
{
|
||||
void *lib_handle;
|
||||
char** moduleslist;
|
||||
|
||||
|
||||
memset(&telnetparams,0,sizeof(telnetparams));
|
||||
|
||||
config_get( telnetoptions,sizeof(telnetoptions)/sizeof(paramdef_t),NULL);
|
||||
config_get( telnetoptions,sizeof(telnetoptions)/sizeof(paramdef_t),"telnetsrv");
|
||||
|
||||
|
||||
if(pthread_create(&telnetparams.telnet_pthread,NULL, (void *(*)(void *))run_telnetsrv, NULL) != 0)
|
||||
@@ -691,6 +771,26 @@ int add_telnetcmd(char *modulename, telnetshell_vardef_t *var, telnetshell_cmdde
|
||||
}
|
||||
|
||||
|
||||
/* function which will be called by the shared lib loader, to check shared lib version
|
||||
against main exec version. version mismatch no considered as fatal (interfaces not supposed to change)
|
||||
*/
|
||||
int telnetsrv_checkbuildver(char * mainexec_buildversion, char ** shlib_buildversion)
|
||||
{
|
||||
#ifndef PACKAGE_VERSION
|
||||
#define PACKAGE_VERSION "standalone built: " __DATE__ __TIME__
|
||||
#endif
|
||||
*shlib_buildversion = PACKAGE_VERSION;
|
||||
if (strcmp(mainexec_buildversion, *shlib_buildversion) != 0) {
|
||||
fprintf(stderr,"[TELNETSRV] shared lib version %s, doesn't match main version %s, compatibility should be checked\n",
|
||||
mainexec_buildversion,*shlib_buildversion);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int telnetsrv_getfarray(loader_shlibfunc_t **farray)
|
||||
{
|
||||
*farray=malloc(sizeof(loader_shlibfunc_t));
|
||||
(*farray)[0].fname=TELNET_ADDCMD_FNAME;
|
||||
(*farray)[0].fptr=(int (*)(void) )add_telnetcmd;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -18,7 +18,6 @@
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file common/utils/telnetsrv/telnetsrv.h
|
||||
* \brief: include file for telnet server implementation
|
||||
* \author Francois TABURET
|
||||
@@ -38,7 +37,7 @@
|
||||
#define TELNET_MAX_MSGLENGTH 2048
|
||||
#define TELNET_PROMPT "softmodem> "
|
||||
#define TELNET_MAXCMD 20
|
||||
#define TELNET_CMD_MAXSIZE 10
|
||||
#define TELNET_CMD_MAXSIZE 20
|
||||
#define TELNET_HELPSTR_SIZE 80
|
||||
|
||||
/* status return by the command parser after it analysed user input */
|
||||
@@ -70,7 +69,7 @@ typedef struct cmddef {
|
||||
#define TELNET_VARTYPE_INT64 3
|
||||
#define TELNET_VARTYPE_STRING 4
|
||||
#define TELNET_VARTYPE_DOUBLE 5
|
||||
#define TELNET_VARTYPE_PTR 6
|
||||
//#define TELNET_VARTYPE_PTR 6
|
||||
typedef struct variabledef {
|
||||
char varname[TELNET_CMD_MAXSIZE];
|
||||
char vartype;
|
||||
@@ -96,6 +95,8 @@ typedef struct {
|
||||
pthread_t telnet_pthread; // thread id of the telnet server
|
||||
int telnetdbg; // debug level of the server
|
||||
int priority; // server running priority
|
||||
char *histfile; // command history
|
||||
int histsize; // command history length
|
||||
int new_socket; // socket of the client connection
|
||||
int logfilefd; // file id of the log file when log output is redirected to a file
|
||||
int saved_stdout; // file id of the previous stdout, used to be able to restore original stdout
|
||||
@@ -130,10 +131,12 @@ VT escape sequence definition, for smarter display....
|
||||
#define STDFMT "\x1b[0m"
|
||||
|
||||
/*---------------------------------------------------------------------------------------------*/
|
||||
#define TELNET_ADDCMD_FNAME "add_telnetcmd"
|
||||
typedef int(*add_telnetcmd_func_t)(char *, telnetshell_vardef_t *, telnetshell_cmddef_t *);
|
||||
#ifdef TELNETSERVERCODE
|
||||
int add_telnetcmd(char *modulename, telnetshell_vardef_t *var, telnetshell_cmddef_t *cmd);
|
||||
void set_sched(pthread_t tid, int pid,int priority);
|
||||
void set_affinity(pthread_t tid, int pid, int coreid);
|
||||
extern int get_phybsize();
|
||||
extern int get_phybsize(void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
28
common/utils/telnetsrv/telnetsrv_CMakeLists.txt
Normal file
28
common/utils/telnetsrv/telnetsrv_CMakeLists.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
|
||||
set(TELNETROOT ${OPENAIR_DIR}/common/utils/telnetsrv )
|
||||
|
||||
|
||||
|
||||
set(TELNETSRV_SOURCE
|
||||
${TELNETROOT}/telnetsrv.c
|
||||
${TELNETROOT}/telnetsrv_phycmd.c
|
||||
${TELNETROOT}/telnetsrv_proccmd.c
|
||||
${TELNETROOT}/telnetsrv_loader.c
|
||||
)
|
||||
|
||||
#set(TELNETSRV_ETHDEVCMD_SOURCE
|
||||
# ${APPROOT}/telnetsrv/telnetsrv_ethdevcmd.c
|
||||
# )
|
||||
|
||||
|
||||
|
||||
add_library(telnetsrv MODULE ${TELNETSRV_SOURCE} )
|
||||
#add_library(telnetsrv_ethdevcmd MODULE ${TELNETSRV_ETHDEVCMD_SOURCE} )
|
||||
target_link_libraries(telnetsrv PRIVATE history)
|
||||
|
||||
install(TARGETS telnetsrv DESTINATION bin)
|
||||
|
||||
if (EXISTS "${OPENAIR_BUILD_DIR}/lte_build_oai/build" AND IS_DIRECTORY "${OPENAIR_BUILD_DIR}/lte_build_oai/build")
|
||||
install(TARGETS telnetsrv DESTINATION ${OPENAIR_BUILD_DIR}/lte_build_oai/build)
|
||||
endif (EXISTS "${OPENAIR_BUILD_DIR}/lte_build_oai/build" AND IS_DIRECTORY "${OPENAIR_BUILD_DIR}/lte_build_oai/build")
|
||||
84
common/utils/telnetsrv/telnetsrv_loader.c
Normal file
84
common/utils/telnetsrv/telnetsrv_loader.c
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* 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 common/utils/telnetsrv/telnetsrv_loader.c
|
||||
* \brief: implementation of telnet commands related to softmodem linux process
|
||||
* \author Francois TABURET
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company NOKIA BellLabs France
|
||||
* \email: francois.taburet@nokia-bell-labs.com
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
|
||||
|
||||
#define TELNETSERVERCODE
|
||||
#include "telnetsrv.h"
|
||||
#define TELNETSRV_LOADER_MAIN
|
||||
#include "telnetsrv_loader.h"
|
||||
|
||||
|
||||
int loader_show_cmd(char *buff, int debug, telnet_printfunc_t prnt);
|
||||
telnetshell_cmddef_t loader_cmdarray[] = {
|
||||
{"show","[params,modules]",loader_show_cmd},
|
||||
{"","",NULL},
|
||||
};
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------------------*/
|
||||
int loader_show_cmd(char *buff, int debug, telnet_printfunc_t prnt)
|
||||
{
|
||||
if (debug > 0)
|
||||
prnt( "loader_show_cmd received %s\n",buff);
|
||||
|
||||
if (strcasestr(buff,"params") != NULL) {
|
||||
prnt( "loader parameters:\n");
|
||||
prnt( " Main executable build version: \"%s\"\n", loader_data.mainexec_buildversion);
|
||||
prnt( " Default shared lib path: \"%s\"\n", loader_data.shlibpath);
|
||||
prnt( " Max number of shared lib : %i\n", loader_data.maxshlibs);
|
||||
}
|
||||
else if (strcasestr(buff,"modules") != NULL) {
|
||||
prnt( "%i shared lib have been dynamicaly loaded by the oai loader\n", loader_data.numshlibs);
|
||||
for (int i=0 ; i<loader_data.numshlibs ; i++) {
|
||||
prnt( " Module %i: %s\n", i,loader_data.shlibs[i].name);
|
||||
prnt( " Shared library build version: \"%s\"\n",((loader_data.shlibs[i].shlib_buildversion == NULL )?"":loader_data.shlibs[i].shlib_buildversion));
|
||||
prnt( " Shared library path: \"%s\"\n", loader_data.shlibs[i].thisshlib_path);
|
||||
prnt( " %i function pointers registered:\n", loader_data.shlibs[i].numfunc);
|
||||
for(int j=0 ; j<loader_data.shlibs[i].numfunc;j++) {
|
||||
prnt( " function %i %s at %p\n",j,
|
||||
loader_data.shlibs[i].funcarray[j].fname, loader_data.shlibs[i].funcarray[j].fptr);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
prnt("%s: wrong loader command...\n",buff);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void add_loader_cmds(void)
|
||||
{
|
||||
|
||||
add_telnetcmd("loader", loader_globalvardef, loader_cmdarray);
|
||||
}
|
||||
@@ -19,30 +19,37 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file rrh_gw_extern.h
|
||||
* \brief rrh gatewy external vars
|
||||
* \author Navid Nikaein, Katerina Trilyraki, Raymond Knopp
|
||||
* \date 2015
|
||||
/*! \file common/utils/telnetsrv_proccmd.h
|
||||
* \brief: Include file defining telnet commands related to softmodem linux process
|
||||
* \author Francois TABURET
|
||||
* \date 2018
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \maintainer: navid.nikaein@eurecom.fr
|
||||
* \company NOKIA BellLabs France
|
||||
* \email: francois.taburet@nokia-bell-labs.com
|
||||
* \note
|
||||
* \warning very experimental
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef RRH_GW_EXTERNS_H_
|
||||
#define RRH_GW_EXTERNS_H_
|
||||
extern char rf_config_file[1024];
|
||||
#ifdef TELNETSRV_LOADER_MAIN
|
||||
|
||||
extern openair0_timestamp timestamp_UE_tx[4] ,timestamp_UE_rx[4] ,timestamp_eNB_rx[4],timestamp_eNB_tx[4];
|
||||
extern openair0_vtimestamp hw_counter;
|
||||
extern int32_t UE_tx_started,UE_rx_started,eNB_rx_started ,eNB_tx_started;
|
||||
extern int32_t nsamps_UE[4],nsamps_eNB[4];
|
||||
extern int32_t overflow_rx_buffer_eNB[4],overflow_rx_buffer_UE[4];
|
||||
extern uint8_t rrh_exit;
|
||||
extern int32_t **rx_buffer_eNB, **rx_buffer_UE;
|
||||
extern unsigned int rt_period;
|
||||
extern pthread_mutex_t timer_mutex;
|
||||
#include "UTIL/LOG/log.h"
|
||||
|
||||
|
||||
#endif
|
||||
#include "common/utils/load_module_shlib.h"
|
||||
|
||||
|
||||
telnetshell_vardef_t loader_globalvardef[] = {
|
||||
{"mainversion",TELNET_VARTYPE_STRING,&(loader_data.mainexec_buildversion)},
|
||||
{"defpath",TELNET_VARTYPE_STRING,&(loader_data.shlibpath)},
|
||||
{"maxshlibs",TELNET_VARTYPE_INT32,&(loader_data.maxshlibs)},
|
||||
{"numshlibs",TELNET_VARTYPE_INT32,&(loader_data.numshlibs)},
|
||||
{"",0,NULL}
|
||||
};
|
||||
telnetshell_vardef_t *loader_modulesvardef;
|
||||
|
||||
extern void add_loader_cmds(void);
|
||||
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -41,7 +41,7 @@
|
||||
char *prnbuff;
|
||||
extern int dump_eNB_stats(PHY_VARS_eNB *eNB, char* buffer, int length);
|
||||
|
||||
void init_phytelnet()
|
||||
void init_phytelnet(void)
|
||||
{
|
||||
prnbuff=malloc(get_phybsize() );
|
||||
if (prnbuff == NULL)
|
||||
@@ -134,7 +134,7 @@ telnetshell_cmddef_t phy_cmdarray[] = {
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------------------*/
|
||||
void add_phy_cmds()
|
||||
void add_phy_cmds(void)
|
||||
{
|
||||
|
||||
init_phytelnet();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -42,8 +42,6 @@
|
||||
#define TELNETVAR_PHYCC1 1
|
||||
|
||||
telnetshell_vardef_t phy_vardef[] = {
|
||||
{"phycc1",TELNET_VARTYPE_PTR,NULL},
|
||||
{"phycc2",TELNET_VARTYPE_PTR,NULL},
|
||||
//{"iqmax",TELNET_VARTYPE_INT16,NULL},
|
||||
//{"iqmin",TELNET_VARTYPE_INT16,NULL},
|
||||
//{"loglvl",TELNET_VARTYPE_INT32,NULL},
|
||||
@@ -57,7 +55,7 @@ telnetshell_vardef_t phy_vardef[] = {
|
||||
|
||||
#else
|
||||
|
||||
extern void add_phy_cmds();
|
||||
extern void add_phy_cmds(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -54,6 +54,8 @@
|
||||
#define TELNETSRV_PROCCMD_MAIN
|
||||
#include "log.h"
|
||||
#include "log_extern.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "openair1/PHY/extern.h"
|
||||
#include "telnetsrv_proccmd.h"
|
||||
|
||||
void decode_procstat(char *record, int debug, telnet_printfunc_t prnt)
|
||||
@@ -70,14 +72,13 @@ char toksep[2];
|
||||
lptr= prntline;
|
||||
/*http://man7.org/linux/man-pages/man5/proc.5.html gives the structure of the stat file */
|
||||
|
||||
while( procfile_fiels != NULL && fieldcnt < 42)
|
||||
{
|
||||
while( procfile_fiels != NULL && fieldcnt < 42) {
|
||||
long int policy;
|
||||
if (strlen(procfile_fiels) == 0)
|
||||
continue;
|
||||
fieldcnt++;
|
||||
sprintf(toksep," ");
|
||||
switch(fieldcnt)
|
||||
{
|
||||
switch(fieldcnt) {
|
||||
case 1: /* id */
|
||||
lptr+=sprintf(lptr,"%9.9s ",procfile_fiels);
|
||||
sprintf(toksep,")");
|
||||
@@ -104,12 +105,36 @@ char toksep[2];
|
||||
break;
|
||||
case 41: //policy
|
||||
lptr+=sprintf(lptr,"%3.3s ",procfile_fiels);
|
||||
policy=strtol(procfile_fiels,NULL,0);
|
||||
switch(policy) {
|
||||
case SCHED_FIFO:
|
||||
lptr+=sprintf(lptr,"%s ","rt: fifo");
|
||||
break;
|
||||
case SCHED_OTHER:
|
||||
lptr+=sprintf(lptr,"%s ","other");
|
||||
break;
|
||||
case SCHED_IDLE:
|
||||
lptr+=sprintf(lptr,"%s ","idle");
|
||||
break;
|
||||
case SCHED_BATCH:
|
||||
lptr+=sprintf(lptr,"%s ","batch");
|
||||
break;
|
||||
case SCHED_RR:
|
||||
lptr+=sprintf(lptr,"%s ","rt: rr");
|
||||
break;
|
||||
case SCHED_DEADLINE:
|
||||
lptr+=sprintf(lptr,"%s ","rt: deadline");
|
||||
break;
|
||||
default:
|
||||
lptr+=sprintf(lptr,"%s ","????");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}/* switch on fieldcnr */
|
||||
}/* switch on fieldcnr */
|
||||
procfile_fiels =strtok_r(NULL,toksep,&strtokptr);
|
||||
} /* while on proc_fields != NULL */
|
||||
} /* while on proc_fields != NULL */
|
||||
prnt("%s\n",prntline);
|
||||
} /*decode_procstat */
|
||||
|
||||
@@ -141,7 +166,7 @@ char aname[256];
|
||||
DIR *proc_dir;
|
||||
struct dirent *entry;
|
||||
|
||||
int rt;
|
||||
|
||||
|
||||
prnt(" id name state USRmod KRNmod prio nice vsize proc pol \n\n");
|
||||
snprintf(aname, sizeof(aname), "/proc/%d/stat", getpid());
|
||||
@@ -172,14 +197,51 @@ extern log_t *g_log;
|
||||
|
||||
if (debug > 0)
|
||||
prnt(" proccmd_show received %s\n",buf);
|
||||
if (strcasestr(buf,"thread") != NULL)
|
||||
{
|
||||
if (strcasestr(buf,"thread") != NULL) {
|
||||
print_threads(buf,debug,prnt);
|
||||
}
|
||||
}
|
||||
if (strcasestr(buf,"loglvl") != NULL) {
|
||||
for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++){
|
||||
prnt("\t%s:\t%s\t%s\n",g_log->log_component[i].name, map_int_to_str(log_verbosity_names,g_log->log_component[i].flag),
|
||||
map_int_to_str(log_level_names,g_log->log_component[i].level));
|
||||
prnt("component verbosity level enabled\n");
|
||||
for (int i=MIN_LOG_COMPONENTS; i < MAX_LOG_COMPONENTS; i++) {
|
||||
prnt("%02i %17.17s:%10.10s%10.10s %s\n",i ,g_log->log_component[i].name,
|
||||
map_int_to_str(log_verbosity_names,g_log->log_component[i].flag),
|
||||
map_int_to_str(log_level_names,g_log->log_component[i].level),
|
||||
((g_log->log_component[i].interval>0)?"Y":"N") );
|
||||
}
|
||||
}
|
||||
if (strcasestr(buf,"config") != NULL) {
|
||||
prnt("Command line arguments:\n");
|
||||
for (int i=0; i < config_get_if()->argc; i++) {
|
||||
prnt(" %02i %s\n",i ,config_get_if()->argv[i]);
|
||||
}
|
||||
prnt("Config module flags ( -O <cfg source>:<xxx>:dbgl<flags>): 0x%08x\n", config_get_if()->rtflags);
|
||||
|
||||
prnt(" Print config debug msg, params values (flag %u): %s\n",CONFIG_PRINTPARAMS,
|
||||
((config_get_if()->rtflags & CONFIG_PRINTPARAMS) ? "Y" : "N") );
|
||||
prnt(" Print config debug msg, memory management(flag %u): %s\n",CONFIG_DEBUGPTR,
|
||||
((config_get_if()->rtflags & CONFIG_DEBUGPTR) ? "Y" : "N") );
|
||||
prnt(" Print config debug msg, command line processing (flag %u): %s\n",CONFIG_DEBUGCMDLINE,
|
||||
((config_get_if()->rtflags & CONFIG_DEBUGCMDLINE) ? "Y" : "N") );
|
||||
prnt(" Don't exit if param check fails (flag %u): %s\n",CONFIG_NOABORTONCHKF,
|
||||
((config_get_if()->rtflags & CONFIG_NOABORTONCHKF) ? "Y" : "N") );
|
||||
prnt("Config source: %s, parameters:\n",CONFIG_GETSOURCE );
|
||||
for (int i=0; i < config_get_if()->num_cfgP; i++) {
|
||||
prnt(" %02i %s\n",i ,config_get_if()->cfgP[i]);
|
||||
}
|
||||
prnt("Softmodem components:\n");
|
||||
prnt(" %02i Ru(s)\n", RC.nb_RU);
|
||||
prnt(" %02i lte RRc(s), %02i NbIoT RRC(s)\n", RC.nb_inst, RC.nb_nb_iot_rrc_inst);
|
||||
prnt(" %02i lte MACRLC(s), %02i NbIoT MACRLC(s)\n", RC.nb_macrlc_inst, RC.nb_nb_iot_macrlc_inst);
|
||||
prnt(" %02i lte L1, %02i NbIoT L1\n", RC.nb_L1_inst, RC.nb_nb_iot_L1_inst);
|
||||
|
||||
for(int i=0; i<RC.nb_inst; i++) {
|
||||
prnt(" lte RRC %i: %02i CC(s) \n",i,((RC.nb_CC == NULL)?0:RC.nb_CC[i]));
|
||||
}
|
||||
for(int i=0; i<RC.nb_L1_inst; i++) {
|
||||
prnt(" lte L1 %i: %02i CC(s)\n",i,((RC.nb_L1_CC == NULL)?0:RC.nb_L1_CC[i]));
|
||||
}
|
||||
for(int i=0; i<RC.nb_macrlc_inst; i++) {
|
||||
prnt(" lte macrlc %i: %02i CC(s)\n",i,((RC.nb_mac_CC == NULL)?0:RC.nb_mac_CC[i]));
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -190,12 +252,16 @@ int proccmd_thread(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
int bv1,bv2;
|
||||
int res;
|
||||
char sv1[64];
|
||||
char tname[32];
|
||||
|
||||
bv1=0;
|
||||
bv2=0;
|
||||
sv1[0]=0;
|
||||
if (debug > 0)
|
||||
prnt("proccmd_thread received %s\n",buf);
|
||||
if (strcasestr(buf,"help") != NULL) {
|
||||
prnt(PROCCMD_THREAD_HELP_STRING);
|
||||
return 0;
|
||||
}
|
||||
res=sscanf(buf,"%i %9s %i",&bv1,sv1,&bv2);
|
||||
if (debug > 0)
|
||||
prnt(" proccmd_thread: %i params = %i,%s,%i\n",res,bv1,sv1,bv2);
|
||||
@@ -231,32 +297,95 @@ extern void exit_fun(const char* s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int proccmd_log(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
{
|
||||
int idx1=0;
|
||||
int idx2=NUM_LOG_LEVEL-1;
|
||||
int s = sscanf(buf,"%*s %i-%i",&idx1,&idx2);
|
||||
char *logsubcmd=NULL;
|
||||
|
||||
int s = sscanf(buf,"%ms %i-%i\n",&logsubcmd, &idx1,&idx2);
|
||||
|
||||
if (debug > 0)
|
||||
prnt("process module received %s\n",buf);
|
||||
prnt( "proccmd_log received %s\n s=%i sub command %s\n",buf,s,((logsubcmd==NULL)?"":logsubcmd));
|
||||
|
||||
if (s == 1 && logsubcmd != NULL) {
|
||||
if (strcasestr(logsubcmd,"online") != NULL) {
|
||||
if (strcasestr(buf,"noonline") != NULL) {
|
||||
set_glog_onlinelog(0);
|
||||
prnt("online logging disabled\n",buf);
|
||||
} else {
|
||||
set_glog_onlinelog(1);
|
||||
prnt("online logging enabled\n",buf);
|
||||
}
|
||||
}
|
||||
else if (strcasestr(logsubcmd,"show") != NULL) {
|
||||
prnt("Available log levels: \n ");
|
||||
for (int i=0; log_level_names[i].name != NULL; i++)
|
||||
prnt("%s ",log_level_names[i].name);
|
||||
prnt("\nAvailable verbosity: \n ");
|
||||
for (int i=0; log_verbosity_names[i].name != NULL; i++)
|
||||
prnt("%s ",log_verbosity_names[i].name);
|
||||
prnt("\n");
|
||||
proccmd_show("loglvl",debug,prnt);
|
||||
}
|
||||
else if (strcasestr(logsubcmd,"help") != NULL) {
|
||||
prnt(PROCCMD_LOG_HELP_STRING);
|
||||
} else {
|
||||
prnt("%s: wrong log command...\n",logsubcmd);
|
||||
}
|
||||
} else if ( s == 3 && logsubcmd != NULL) {
|
||||
int level, verbosity, interval;
|
||||
char *tmpstr=NULL;
|
||||
char *logparam=NULL;
|
||||
int l;
|
||||
|
||||
level = verbosity = interval = -1;
|
||||
l=sscanf(logsubcmd,"%m[^'_']_%m[^'_']",&logparam,&tmpstr);
|
||||
if (debug > 0)
|
||||
prnt("l=%i, %s %s\n",l,((logparam==NULL)?"\"\"":logparam), ((tmpstr==NULL)?"\"\"":tmpstr));
|
||||
if (l ==2 ) {
|
||||
if (strcmp(logparam,"level") == 0) {
|
||||
level=map_str_to_int(log_level_names,tmpstr);
|
||||
if (level < 0) prnt("level %s unknown\n",tmpstr);
|
||||
} else if (strcmp(logparam,"verbos") == 0) {
|
||||
verbosity=map_str_to_int(log_verbosity_names,tmpstr);
|
||||
if (verbosity < 0) prnt("verbosity %s unknown\n",tmpstr);
|
||||
} else {
|
||||
prnt("%s%s unknown log sub command \n",logparam, tmpstr);
|
||||
}
|
||||
} else if (l ==1 ) {
|
||||
if (strcmp(logparam,"enable") == 0) {
|
||||
interval = 1;
|
||||
} else if (strcmp(logparam,"disable") == 0) {
|
||||
interval = 0;
|
||||
} else {
|
||||
prnt("%s%s unknown log sub command \n",logparam, tmpstr);
|
||||
}
|
||||
} else {
|
||||
prnt("%s unknown log sub command \n",logsubcmd);
|
||||
}
|
||||
if (logparam != NULL) free(logparam);
|
||||
if (tmpstr != NULL) free(tmpstr);
|
||||
for (int i=idx1; i<=idx2 ; i++) {
|
||||
set_comp_log(i, level, verbosity, interval);
|
||||
prnt("log level/verbosity comp %i %s set to %s / %s (%s)\n",
|
||||
i,((g_log->log_component[i].name==NULL)?"":g_log->log_component[i].name),
|
||||
map_int_to_str(log_level_names,g_log->log_component[i].level),
|
||||
map_int_to_str(log_verbosity_names,g_log->log_component[i].flag),
|
||||
((g_log->log_component[i].interval>0)?"enabled":"disabled"));
|
||||
|
||||
|
||||
}
|
||||
} else {
|
||||
prnt("%s: wrong log command...\n",buf);
|
||||
}
|
||||
|
||||
if (strcasestr(buf,"enable") != NULL)
|
||||
{
|
||||
set_glog_onlinelog(1);
|
||||
}
|
||||
if (strcasestr(buf,"disable") != NULL)
|
||||
{
|
||||
set_glog_onlinelog(0);
|
||||
}
|
||||
if (strcasestr(buf,"show") != NULL)
|
||||
{
|
||||
proccmd_show("loglvl",debug,prnt);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*-------------------------------------------------------------------------------------*/
|
||||
|
||||
void add_softmodem_cmds()
|
||||
void add_softmodem_cmds(void)
|
||||
{
|
||||
add_telnetcmd("softmodem",proc_vardef,proc_cmdarray);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 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.0 (the "License"); you may not use this file
|
||||
* 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
|
||||
*
|
||||
@@ -19,6 +19,7 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
|
||||
/*! \file common/utils/telnetsrv/telnetsrv_proccmd.h
|
||||
* \brief: Include file defining telnet commands related to this linux process
|
||||
* \author Francois TABURET
|
||||
@@ -43,15 +44,33 @@ extern int proccmd_log(char *buf, int debug, telnet_printfunc_t prnt);
|
||||
telnetshell_vardef_t proc_vardef[] = {
|
||||
{"",0,NULL}
|
||||
};
|
||||
#define PROCCMD_LOG_HELP_STRING " log sub commands: \n\
|
||||
show: display current log configuration \n\
|
||||
online, noonline: enable or disable console logs \n\
|
||||
enable, disable id1-id2: enable or disable logs for components index id1 to id2 \n\
|
||||
level_<level> id1-id2: set log level to <level> for components index id1 to id2 \n\
|
||||
level_<verbosity> id1-id2: set log verbosity to <verbosity> for components index id1 to id2 \n\
|
||||
use the show command to get the values for <level>, <verbosity> and the list of component indexes \
|
||||
that can be used for id1 and id2 \n"
|
||||
|
||||
#define PROCCMD_THREAD_HELP_STRING " thread sub commands: \n\
|
||||
<thread id> aff <core> : set affinity of thread <thread id> to core <core> \n\
|
||||
<thread id> prio <prio> : set scheduling parameters for thread <thread id> \n\
|
||||
if prio < -20: linux scheduling policy set to FIFO, \n\
|
||||
with priority = -20 - prio \n\
|
||||
if prio > 19: linux scheduling policy set to OTHER, \n\
|
||||
with priority (nice value) = prio \n\
|
||||
use \"softmodem show thread\" to get <thread id> \n"
|
||||
|
||||
|
||||
telnetshell_cmddef_t proc_cmdarray[] = {
|
||||
{"show","loglvl|thread", proccmd_show},
|
||||
{"log","[enable,disable]", proccmd_log},
|
||||
{"thread","<id> aff|prio <aff|prio>", proccmd_thread},
|
||||
{"show","loglvl|thread|config", proccmd_show},
|
||||
{"log","(enter help for details)", proccmd_log},
|
||||
{"thread","(enter help for details)", proccmd_thread},
|
||||
{"exit","", proccmd_exit},
|
||||
{"","",NULL},
|
||||
};
|
||||
#else
|
||||
extern void add_proccmd_cmds();
|
||||
extern void add_proccmd_cmds(void);
|
||||
#endif /* TELNETSRV_PROCCMD_MAIN */
|
||||
|
||||
|
||||
107
d2d_emulator_setup.txt
Normal file
107
d2d_emulator_setup.txt
Normal file
@@ -0,0 +1,107 @@
|
||||
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
|
||||
|
||||
15
nfapi/README
Normal file
15
nfapi/README
Normal file
@@ -0,0 +1,15 @@
|
||||
This directory contains the NFAPI code.
|
||||
|
||||
It comes in two parts:
|
||||
|
||||
1 - open-nFAPI
|
||||
|
||||
This is a clone of the github repository
|
||||
(https://github.com/cisco/open-nFAPI,
|
||||
commit b3bc579b1697eab829d5d8a2de59c93a61b88fa4).
|
||||
The patch open-nfapi.oai.patch has then been applied.
|
||||
|
||||
2 - oai_integration
|
||||
|
||||
This is code written by David Price from Cisco to integrate
|
||||
open-nFAPI into OpenAirInterface.
|
||||
@@ -19,31 +19,33 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef _IOCTL_H
|
||||
#define _IOCTL_H
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <net/if.h>
|
||||
#include <linux/ipv6.h>
|
||||
#include <linux/in.h>
|
||||
#include <linux/in6.h>
|
||||
//#include <linux/netdevice.h>
|
||||
#include <pthread.h>
|
||||
|
||||
//#include <graal_constant.h>
|
||||
//#define GRAAL_STATE_IDLE 0
|
||||
//#define GRAAL_STATE_CONNECTED 1
|
||||
//#define GRAAL_STATE_ESTABLISHMENT_REQUEST 2
|
||||
//#define GRAAL_STATE_ESTABLISHMENT_FAILURE 3
|
||||
//#define GRAAL_STATE_RELEASE_FAILURE 4
|
||||
void set_thread_priority(int priority)
|
||||
{
|
||||
//printf("%s(priority:%d)\n", __FUNCTION__, priority);
|
||||
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
pthread_attr_t ptAttr;
|
||||
|
||||
extern int inet_pton(int af, const char *src, void *dst);
|
||||
extern char *inet_ntop(int af, const void *src, char *dst, size_t sise);
|
||||
struct sched_param schedParam;
|
||||
schedParam.__sched_priority = priority; //79;
|
||||
if(sched_setscheduler(0, SCHED_RR, &schedParam) != 0)
|
||||
{
|
||||
printf("Failed to set scheduler to SCHED_RR\n");
|
||||
}
|
||||
|
||||
#endif //_IOCTL_H
|
||||
if(pthread_attr_setschedpolicy(&ptAttr, SCHED_RR) != 0)
|
||||
{
|
||||
printf("Failed to set pthread sched policy SCHED_RR\n");
|
||||
}
|
||||
|
||||
pthread_attr_setinheritsched(&ptAttr, PTHREAD_EXPLICIT_SCHED);
|
||||
|
||||
struct sched_param thread_params;
|
||||
thread_params.sched_priority = 20;
|
||||
if(pthread_attr_setschedparam(&ptAttr, &thread_params) != 0)
|
||||
{
|
||||
printf("failed to set sched param\n");
|
||||
}
|
||||
}
|
||||
1697
nfapi/oai_integration/nfapi_pnf.c
Normal file
1697
nfapi/oai_integration/nfapi_pnf.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -19,13 +19,9 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
mod_sym_t qpsk_table[4];
|
||||
mod_sym_t qam16_table[16];
|
||||
mod_sym_t qam64_table[64];
|
||||
#if !defined(NFAPI_PNF_H__)
|
||||
#define NFAPI_PNF_H__
|
||||
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
|
||||
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
|
||||
|
||||
int16_t kHz75_25PRB[1024] = {};
|
||||
int16_t kHz75_6PRB = {};
|
||||
int16_t kHz75_15PRB = {};
|
||||
int16_t kHz75_50PRB = {};
|
||||
int16_t kHz75_75PRB = {};
|
||||
int16_t kHz75_100PRB = {};
|
||||
#endif
|
||||
1222
nfapi/oai_integration/nfapi_vnf.c
Normal file
1222
nfapi/oai_integration/nfapi_vnf.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -19,6 +19,9 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
extern unsigned short f1f2mat_old[2*188];
|
||||
#if !defined(NFAPI_VNF_H__)
|
||||
#define NFAPI_VNF_H__
|
||||
|
||||
void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port);
|
||||
|
||||
#endif
|
||||
67
nfapi/oai_integration/vendor_ext.h
Normal file
67
nfapi/oai_integration/vendor_ext.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright 2017 Cisco Systems, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _VENDOR_EXT_H_
|
||||
#define _VENDOR_EXT_H_
|
||||
|
||||
#include "nfapi_interface.h"
|
||||
|
||||
typedef enum {
|
||||
P5_VENDOR_EXT_REQ = NFAPI_VENDOR_EXT_MSG_MIN,
|
||||
P5_VENDOR_EXT_RSP,
|
||||
|
||||
P7_VENDOR_EXT_REQ,
|
||||
P7_VENDOR_EXT_IND
|
||||
|
||||
} vendor_ext_message_id_e;
|
||||
|
||||
typedef struct {
|
||||
nfapi_p4_p5_message_header_t header;
|
||||
uint16_t dummy1;
|
||||
uint16_t dummy2;
|
||||
} vendor_ext_p5_req;
|
||||
|
||||
typedef struct {
|
||||
nfapi_p4_p5_message_header_t header;
|
||||
uint16_t error_code;
|
||||
} vendor_ext_p5_rsp;
|
||||
|
||||
typedef struct {
|
||||
nfapi_p7_message_header_t header;
|
||||
uint16_t dummy1;
|
||||
uint16_t dummy2;
|
||||
} vendor_ext_p7_req;
|
||||
|
||||
typedef struct {
|
||||
nfapi_p7_message_header_t header;
|
||||
uint16_t error_code;
|
||||
} vendor_ext_p7_ind;
|
||||
|
||||
typedef struct {
|
||||
nfapi_tl_t tl;
|
||||
uint32_t dummy;
|
||||
} vendor_ext_tlv_1;
|
||||
|
||||
#define VENDOR_EXT_TLV_1_TAG 0xF001
|
||||
|
||||
typedef struct {
|
||||
nfapi_tl_t tl;
|
||||
uint32_t dummy;
|
||||
} vendor_ext_tlv_2;
|
||||
|
||||
#define VENDOR_EXT_TLV_2_TAG 0xF002
|
||||
|
||||
#endif // _VENDOR_EXT_
|
||||
36
nfapi/open-nFAPI/.travis.yml
Normal file
36
nfapi/open-nFAPI/.travis.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
env:
|
||||
global:
|
||||
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
|
||||
# via the "travis encrypt" command using the project repo's public key
|
||||
- secure: "oNj8JhGBN/zjzrAU7y2Nn/wxSxA/MDp2Y8fVLLp6fhx+y2mWdlMZhgCjeKSpdbGtroUnxErX1P8t+8EPz2+mMoq+G809Q9t7eJjd1+6nkVhEEfDXN83BmJkvIylC0/IKJiT2wCa8LzbdhpQUFyZ1Gk1WKZozAW5HotfFjm6/NFi/GX4uA7S0tU5E4yC3r4yqH9cLZ+arWMOEY/X0lrx0n6tLjDe921kFwkZQGFzAzrbXN2fZXKQ3xFcpREWEgEWsY7H2n4T7oJI3nEPY4P/4kvCjeQMjnlATEwtcciBiUbHRew4WWSTndF54crRlqFlzFcEf/Ouz27U/d2xYHJWcWNi88l+/qsb+V0uobwhiGUJGbVhf9IkgEO3tr/zbwkPDFrXpa/1xuSoc6jDm8i61gKQkcBhQsRFXlciPvwLhiL07gzeAfZD1Yke3tE+0geHPbEA0czzwtHe35jorAKYWsFXOXmcoK9t9SpnvBRFz6JuEsHPooafze43sTJg3qkgBszkU+U38CneeAVwo/uTA3Zw1ZrtOQv56v0UvAHze/VAF5z3rFJPl1oJl60OI8V5UBg4yIa2bySKhO//zwd4MGmsBpcWwDuu2BHUVasfk0vaetVxVVtdXG/2BuBP+IXinpJtI48NSFs6PT82dHz4cDF/iLDs0hPC6sbV258PY8F0="
|
||||
|
||||
language: cpp
|
||||
|
||||
dist: trusty
|
||||
sudo: required
|
||||
|
||||
compiler:
|
||||
- g++
|
||||
|
||||
before_install:
|
||||
- sudo apt-get install doxygen
|
||||
- sudo apt-get install libcunit1-dev
|
||||
- sudo apt-get install libz-dev
|
||||
- sudo apt-get install libsctp-dev
|
||||
- sudo apt-get install libboost-all-dev
|
||||
- autoreconf -i
|
||||
|
||||
addons:
|
||||
coverity_scan:
|
||||
project:
|
||||
name: cisco-open-nFAPI
|
||||
version: 1.0
|
||||
description: Build submitted via Travis CI
|
||||
notification_email: xxx@cisco.com
|
||||
build_command_prepend: ./configure
|
||||
build_command: make
|
||||
branch_pattern: coverity_scan
|
||||
|
||||
script:
|
||||
- ./configure && make && make check
|
||||
0
nfapi/open-nFAPI/CHANGELOG.md
Normal file
0
nfapi/open-nFAPI/CHANGELOG.md
Normal file
201
nfapi/open-nFAPI/LICENSE.md
Normal file
201
nfapi/open-nFAPI/LICENSE.md
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
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.
|
||||
15
nfapi/open-nFAPI/Makefile.am
Normal file
15
nfapi/open-nFAPI/Makefile.am
Normal file
@@ -0,0 +1,15 @@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
SUBDIRS =common/ \
|
||||
sim_common/ \
|
||||
nfapi/ \
|
||||
pnf/ \
|
||||
vnf/ \
|
||||
nfapi/tests \
|
||||
pnf/tests \
|
||||
vnf/tests \
|
||||
pnf_sim/ \
|
||||
vnf_sim/ \
|
||||
integration_tests/ \
|
||||
docs/ \
|
||||
$(NULL)
|
||||
138
nfapi/open-nFAPI/README.md
Normal file
138
nfapi/open-nFAPI/README.md
Normal file
@@ -0,0 +1,138 @@
|
||||
[](https://travis-ci.org/cisco/open-nFAPI)
|
||||
[](https://scan.coverity.com/projects/cisco-open-nfapi)
|
||||
|
||||
# open-nFAPI
|
||||
|
||||
Open-nFAPI is implementation of the Small Cell Forum's network functional API or nFAPI for short.
|
||||
nFAPI defines a network protocol that is used to connect a Physical Network Function (PNF)
|
||||
running LTE Layer 1 to a Virtual Network Function (VNF) running LTE layer 2 and above. The specification
|
||||
can be found at http://scf.io/documents/082.
|
||||
|
||||
The aim of open-nFAPI is to provide an open interface between LTE layer 1 and layer 2 to allow for
|
||||
interoperability between the PNF and VNF & also to facilitate the sharing of PNF's between
|
||||
different VNF's
|
||||
|
||||
Open-nFAPI implements the P4, P5 and P7 interfaces as defined by the nFAPI specification.
|
||||
* The P5 interface allows the VNF to query and configure the 'resources' of the PNF; i.e slice it into
|
||||
1 or more PHY instances.
|
||||
* The P7 interface is used to send the subframe information between the PNF and VNF for a PHY instance
|
||||
* The P4 interface allows the VNF to request the PNF PHY instance to perform measurements of the surrounding network
|
||||
|
||||
The remaining interfaces are currently outside of the scope of this project.
|
||||
|
||||
Supports release 082.09.05 of the nFAPI specification
|
||||
|
||||
**The Small Cell Forum cordially requests that any derivative work that looks to
|
||||
extend the nFAPI libraries use the specified vendor extension techniques,
|
||||
so ensuring the widest interoperability of the baseline nFAPI specification
|
||||
in those derivative works.**
|
||||
|
||||
## Awards
|
||||
|
||||
The Open-nFAPI project has won the Small Cell Forum Judges Choice award 2017. (http://www.smallcellforum.org/awards-2/winners-2017/)
|
||||
|
||||
## Licensing
|
||||
|
||||
The open-nFAPI libraries are release by CISCO under an Apache 2 license. See `LICENSE.md` file for details
|
||||
|
||||
## Downloading
|
||||
|
||||
The open-nFAPI project can be pulled from git hub
|
||||
|
||||
```
|
||||
git clone https://github.com/cisco/open-nFAPI.git nfapi
|
||||
```
|
||||
|
||||
The following dependencies are required. These are based on a fresh ubuntu installation.
|
||||
|
||||
```
|
||||
sudo apt-get install autoconf
|
||||
sudo apt-get install gcc
|
||||
sudo apt-get install g++
|
||||
sudo apt-get install libtool
|
||||
sudo apt-get install make
|
||||
sudo apt-get install doxygen
|
||||
sudo apt-get install libcunit1-dev
|
||||
sudo apt-get install libz-dev
|
||||
sudo apt-get install libsctp-dev
|
||||
sudo apt-get install libboost-all-dev
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Building
|
||||
|
||||
To build the open-nFAPI project
|
||||
|
||||
```
|
||||
autoreconf -i
|
||||
./configure
|
||||
make
|
||||
```
|
||||
|
||||
To run the unit and integration tests
|
||||
|
||||
```
|
||||
make check
|
||||
```
|
||||
|
||||
You may notice in the console output of the final integration tests the following
|
||||
|
||||
```
|
||||
*** Missing subframe 123 125
|
||||
```
|
||||
|
||||
Out of the box the machine on which you are running has not be configured for real time operation as a result
|
||||
the vnf may not be scheduled at the correct times and hence it may risk 'missing' subframe opportunities. This
|
||||
warning indicates this has happened.
|
||||
|
||||
## Running the simulator
|
||||
|
||||
The vnf and pnf simulator can be run using the following commands. The pnf and vnf simulator support sourcing and sinking
|
||||
data over udp. Review the xml configuration files for the details of the port and address to configure. Console logging will show
|
||||
which address:port is being used
|
||||
|
||||
Note : Pinning the simulators to unused cores will produce more consistent behaviour.
|
||||
|
||||
Note : You may have to run the processes with sudo to be able to set the real time scheduling and priority
|
||||
|
||||
### vnf simulator
|
||||
|
||||
To run the vnf simulator you need to specify the port the vnf will listen for p5 connection request upon and also the xml configuration file
|
||||
|
||||
```
|
||||
vnfsim <port> <xml config file>
|
||||
```
|
||||
|
||||
### pnf simulator
|
||||
|
||||
To run the vnf simulator you need to specify the addrss & port the pnf will connect to the vnf on and also the xml configuration file
|
||||
|
||||
```
|
||||
pnfsim <address> <port> <xml config file>
|
||||
```
|
||||
|
||||
|
||||
## Directory structure
|
||||
|
||||
```
|
||||
docs doxgen documentation
|
||||
common common code used by the nfapi libraries
|
||||
nfapi the nfapi library including message definitions & encode/decode functions
|
||||
pnf the pnf library for p4, p5, & p7 interfaces
|
||||
vnf the vnf library for p4, p5, & p7 interfaces
|
||||
sim_common common simulation for used by the vnf and pnf sim
|
||||
vnf_sim a vnf simulator including a stub mac implementation
|
||||
pnf_sim a pnf simualtor including a fapi interface defintion and stub implementation
|
||||
xml xml configuration files for the vnf and pnf simulator
|
||||
wireshark code for a wireshark dissector for the nFAPI protocol
|
||||
```
|
||||
|
||||
## Coverity
|
||||
|
||||
Coverity runs on the coverity-scan branch. Changes must be merged to the coverity-scan branch to be checked.
|
||||
|
||||
|
||||
## eNB Integration - Open Air Interface
|
||||
|
||||
The open-nFAPI implementation has been integrated with the Open Air Interface solution here (https://gitlab.eurecom.fr/oai/openairinterface5g) and is (at the time of writing) here (https://gitlab.eurecom.fr/daveprice/openairinterface5g/tree/nfapi-ru-rau-split). The open-nFAPI implementation is integrated with the source eNB implementation with any changes required applied as a patch on top of the baseline open-nFAPI library. Any extensions required must be implemented through the vendor extensions as specified by the Small Cell Forum documentation. Any integration wrapping of functionality must be done within the target environment as shown in the Open Air Interface implementation nfapi directory which is defined by the $NFAPI_DIR location at the top level.
|
||||
31
nfapi/open-nFAPI/common/Makefile.am
Normal file
31
nfapi/open-nFAPI/common/Makefile.am
Normal file
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# Copyright 2017 Cisco Systems, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/common/public_inc -g -Wall -Werror
|
||||
|
||||
noinst_LIBRARIES =libnfapi_common.a
|
||||
|
||||
libnfapi_common_a_SOURCES = src/debug.c
|
||||
|
||||
libnfapi_common_a_CFLAGS =$(AM_CFLAGS)
|
||||
|
||||
lib_LTLIBRARIES =libnfapi_common.la
|
||||
|
||||
libnfapi_common_la_SOURCES = src/debug.c
|
||||
|
||||
|
||||
|
||||
|
||||
51
nfapi/open-nFAPI/common/public_inc/debug.h
Normal file
51
nfapi/open-nFAPI/common/public_inc/debug.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2017 Cisco Systems, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _DEBUG_H_
|
||||
#define _DEBUG_H_
|
||||
|
||||
/*! The trace levels used by the nfapi libraries */
|
||||
typedef enum nfapi_trace_level
|
||||
{
|
||||
NFAPI_TRACE_ERROR = 1,
|
||||
NFAPI_TRACE_WARN,
|
||||
NFAPI_TRACE_NOTE,
|
||||
NFAPI_TRACE_INFO,
|
||||
|
||||
NFAPI_TRACE_LEVEL_MAX
|
||||
} nfapi_trace_level_t;
|
||||
|
||||
/*! The trace function pointer */
|
||||
typedef void (*nfapi_trace_fn_t)(nfapi_trace_level_t level, const char* format, ...);
|
||||
|
||||
/*! Global trace function */
|
||||
extern nfapi_trace_fn_t nfapi_trace_g;
|
||||
|
||||
/*! Global trace level */
|
||||
extern nfapi_trace_level_t nfapi_trace_level_g;
|
||||
|
||||
/*! NFAPI trace macro */
|
||||
//#define NFAPI_TRACE(level, format, ...) { if(nfapi_trace_g && ((nfapi_trace_level_t)level <= nfapi_trace_level_g)) (*nfapi_trace_g)(level, format, ##__VA_ARGS__); }
|
||||
#define NFAPI_TRACE(level, format, ...) { if (nfapi_trace_g) (*nfapi_trace_g)(level, format, ##__VA_ARGS__); }
|
||||
|
||||
/*! Function to change the trace level
|
||||
* \param new_level The modified trace level
|
||||
*/
|
||||
|
||||
void nfapi_set_trace_level(nfapi_trace_level_t new_level);
|
||||
|
||||
#endif /* _DEBUG_H_ */
|
||||
76
nfapi/open-nFAPI/common/src/debug.c
Normal file
76
nfapi/open-nFAPI/common/src/debug.c
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Copyright 2017 Cisco Systems, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <pthread.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#define MAX_MSG_LENGTH 2096
|
||||
#define TRACE_HEADER_LENGTH 44
|
||||
|
||||
void nfapi_trace_dbg(nfapi_trace_level_t level, const char *format, ...);
|
||||
|
||||
// initialize the trace function to 0
|
||||
void (*nfapi_trace_g)(nfapi_trace_level_t level, const char* format, ...) = &nfapi_trace_dbg;
|
||||
|
||||
nfapi_trace_level_t nfapi_trace_level_g = NFAPI_TRACE_INFO;
|
||||
//nfapi_trace_level_t nfapi_trace_level_g = NFAPI_TRACE_WARN;
|
||||
|
||||
void nfapi_set_trace_level(nfapi_trace_level_t new_level)
|
||||
{
|
||||
nfapi_trace_level_g = new_level;
|
||||
}
|
||||
|
||||
void nfapi_trace_dbg(nfapi_trace_level_t level, const char *format, ...)
|
||||
{
|
||||
char trace_buff[MAX_MSG_LENGTH + TRACE_HEADER_LENGTH];
|
||||
uint32_t num_chars;
|
||||
va_list p_args;
|
||||
struct timeval tv;
|
||||
pthread_t tid = pthread_self();
|
||||
|
||||
(void)gettimeofday(&tv, NULL);
|
||||
|
||||
num_chars = (uint32_t)snprintf(trace_buff, TRACE_HEADER_LENGTH, "%04u.%06u: 0x%02x: %10u: ", ((uint32_t)tv.tv_sec) & 0x1FFF, (uint32_t)tv.tv_usec, (uint32_t)level, (uint32_t)tid);
|
||||
|
||||
if (num_chars > TRACE_HEADER_LENGTH)
|
||||
{
|
||||
printf("trace_dbg: Error, num_chars is too large: %d", num_chars);
|
||||
return;
|
||||
}
|
||||
|
||||
va_start(p_args, format);
|
||||
if ((num_chars = (uint32_t)vsnprintf(&trace_buff[num_chars], MAX_MSG_LENGTH, format, p_args)))
|
||||
{
|
||||
if (level <= NFAPI_TRACE_WARN)
|
||||
{
|
||||
printf("%s", trace_buff);
|
||||
}
|
||||
printf("%s", trace_buff);
|
||||
}
|
||||
va_end(p_args);
|
||||
}
|
||||
45
nfapi/open-nFAPI/configure.ac
Normal file
45
nfapi/open-nFAPI/configure.ac
Normal file
@@ -0,0 +1,45 @@
|
||||
AC_INIT([open-nFAPI], [1.0])
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign serial-tests])
|
||||
AM_PROG_AR
|
||||
|
||||
LT_INIT([shared static])
|
||||
|
||||
# Dependencies
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_AWK
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AC_CHECK_FILE([/usr/include/CUnit/CUnit.h],
|
||||
[CFLAGS_CUNIT=-I/usr/include/CUnit AC_SUBST(CFLAGS_CUNIT)],
|
||||
[AC_MSG_NOTICE([Have cunit *************])])
|
||||
|
||||
# Need doxygen
|
||||
AC_CHECK_PROGS([DOXYGEN], [doxygen])
|
||||
if test -z "$DOXYGEN";
|
||||
then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile])])
|
||||
|
||||
AC_REQUIRE_AUX_FILE([tap-driver.sh])
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
sim_common/Makefile
|
||||
common/Makefile
|
||||
nfapi/Makefile
|
||||
pnf/Makefile
|
||||
vnf/Makefile
|
||||
nfapi/tests/Makefile
|
||||
pnf/tests/Makefile
|
||||
vnf/tests/Makefile
|
||||
pnf_sim/Makefile
|
||||
vnf_sim/Makefile
|
||||
integration_tests/Makefile
|
||||
docs/Makefile
|
||||
])
|
||||
AC_OUTPUT
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user