Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canghaiwuhen
OpenXG-RAN
Commits
ba24109d
Commit
ba24109d
authored
Sep 14, 2019
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added UDP configuration in ORI data structures
parent
0e419d23
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
+4
-4
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
+2
-2
No files found.
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
View file @
ba24109d
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
#include "ethernet_lib.h"
#include "ethernet_lib.h"
#include "common/ran_context.h"
#include "common/ran_context.h"
#define DEBUG
0
#define DEBUG
1
// These are for IF5 and must be put into the device structure if multiple RUs in the same RAU !!!!!!!!!!!!!!!!!
// These are for IF5 and must be put into the device structure if multiple RUs in the same RAU !!!!!!!!!!!!!!!!!
uint16_t
pck_seq_num
=
1
;
uint16_t
pck_seq_num
=
1
;
...
@@ -142,8 +142,8 @@ int eth_socket_init_udp(openair0_device *device) {
...
@@ -142,8 +142,8 @@ int eth_socket_init_udp(openair0_device *device) {
perror
(
"ETHERNET: Cannot set SO_REUSEADDR option on socket (control)"
);
perror
(
"ETHERNET: Cannot set SO_REUSEADDR option on socket (control)"
);
exit
(
0
);
exit
(
0
);
}
}
if
(
setsockopt
(
eth
->
sockfdd
,
SOL_SOCKET
,
SO_
REUSEADDR
,
&
enable
,
sizeof
(
int
)))
{
if
(
setsockopt
(
eth
->
sockfdd
,
SOL_SOCKET
,
SO_
NO_CHECK
,
&
enable
,
sizeof
(
int
)))
{
perror
(
"ETHERNET: Cannot set SO_
REUSEADDR
option on socket (user)"
);
perror
(
"ETHERNET: Cannot set SO_
NO_CHECK
option on socket (user)"
);
exit
(
0
);
exit
(
0
);
}
}
...
@@ -404,7 +404,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
...
@@ -404,7 +404,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
perror
(
"ETHERNET READ: "
);
perror
(
"ETHERNET READ: "
);
exit
(
-
1
);
exit
(
-
1
);
}
else
{
}
else
{
printf
(
"AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN
\n
"
)
;
bytes_received
=
0
;
goto
again
;
goto
again
;
}
}
}
else
if
(
errno
==
EWOULDBLOCK
)
{
}
else
if
(
errno
==
EWOULDBLOCK
)
{
...
...
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
View file @
ba24109d
...
@@ -60,6 +60,7 @@ int trx_eth_start(openair0_device *device) {
...
@@ -60,6 +60,7 @@ int trx_eth_start(openair0_device *device) {
if
(
eth
->
flags
==
ETH_UDP_IF5_ORI_MODE
)
{
if
(
eth
->
flags
==
ETH_UDP_IF5_ORI_MODE
)
{
AssertFatal
(
device
->
thirdparty_init
!=
NULL
,
"device->thirdparty_init is null
\n
"
);
AssertFatal
(
device
->
thirdparty_init
!=
NULL
,
"device->thirdparty_init is null
\n
"
);
AssertFatal
(
device
->
thirdparty_init
(
device
)
==
0
,
"third-party init failed
\n
"
);
AssertFatal
(
device
->
thirdparty_init
(
device
)
==
0
,
"third-party init failed
\n
"
);
device
->
openair0_cfg
->
samples_per_packet
=
256
;
}
}
/* initialize socket */
/* initialize socket */
if
(
eth
->
flags
==
ETH_RAW_MODE
)
{
if
(
eth
->
flags
==
ETH_RAW_MODE
)
{
...
@@ -136,8 +137,7 @@ int trx_eth_start(openair0_device *device) {
...
@@ -136,8 +137,7 @@ int trx_eth_start(openair0_device *device) {
if(eth_get_dev_conf_udp(device)!=0) return -1;
if(eth_get_dev_conf_udp(device)!=0) return -1;
}*/
}*/
/* adjust MTU wrt number of samples per packet */
//if(ethernet_tune (device,MTU_SIZE,UDP_IF4p5_PRACH_SIZE_BYTES)!=0) return -1;
if
(
ethernet_tune
(
device
,
MTU_SIZE
,
UDP_IF4p5_PRACH_SIZE_BYTES
)
!=
0
)
return
-
1
;
if
(
ethernet_tune
(
device
,
RCV_TIMEOUT
,
999999
)
!=
0
)
return
-
1
;
if
(
ethernet_tune
(
device
,
RCV_TIMEOUT
,
999999
)
!=
0
)
return
-
1
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment