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
zzha zzha
OpenXG-RAN
Commits
2303a9bc
Commit
2303a9bc
authored
Nov 27, 2020
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CPPcheck errors + some warnings
parent
7955cb4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
+5
-7
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
+4
-0
No files found.
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
View file @
2303a9bc
...
...
@@ -270,7 +270,6 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
int
bytes_sent
=
0
;
eth_state_t
*
eth
=
(
eth_state_t
*
)
device
->
priv
;
int
sendto_flag
=
0
;
char
temp0
[
APP_HEADER_SIZE_BYTES
];
//sendto_flag|=flags;
eth
->
tx_nsamps
=
nsamps
;
...
...
@@ -316,7 +315,6 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
buff2 points to the position in tx buffer where the packet header will be placed */
void
*
buff2
=
((
void
*
)
buff_tx2
)
-
APP_HEADER_SIZE_BYTES
;
/* we don't want to ovewrite with the header info the previous tx buffer data so we store it*/
bytes_sent
=
0
;
...
...
@@ -388,9 +386,6 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
}
//}
/* tx buffer values restored */
memcpy
((
void
*
)
buff2
,(
void
*
)
temp0
,
APP_HEADER_SIZE_BYTES
);
return
(
bytes_sent
-
APP_HEADER_SIZE_BYTES
)
>>
2
;
}
...
...
@@ -407,6 +402,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
int
again_cnt
=
0
;
static
int
packet_cnt
=
0
;
int
payload_size
=
UDP_PACKET_SIZE_BYTES
(
nsamps
);
#if defined(__x86_64__) || defined(__i386__)
#ifdef __AVX2__
int
nsamps2
=
(
payload_size
>>
5
)
+
1
;
...
...
@@ -422,14 +418,16 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
int16x8_t
temp_rx
[
nsamps2
];
char
*
temp_rx0
=
((
char
*
)
&
temp_rx
[
1
])
-
APP_HEADER_SIZE_BYTES
;
#else
#error Unsupported CPU architecture, USRP device cannot be built
#error Unsupported CPU architecture device cannot be built
int
nsamps2
=
(
payload_size
>>
2
)
+
1
;
int32_t
temp_rx
[
payload_size
>>
2
];
char
*
*
temp_rx0
=
((
char
*
)
&
temp_rx
[
1
])
-
APP_HEADER_SIZE_BYTES
;
#endif
eth
->
rx_nsamps
=
nsamps
;
bytes_received
=
0
;
block_cnt
=
0
;
int
receive_bytes
;
AssertFatal
(
eth
->
compression
==
NO_COMPRESS
,
"IF5 compression not supported for now
\n
"
);
while
(
bytes_received
<
payload_size
)
{
...
...
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
View file @
2303a9bc
...
...
@@ -52,6 +52,10 @@ int num_devices_eth = 0;
struct
sockaddr_in
dest_addr
[
MAX_INST
];
int
dest_addr_len
[
MAX_INST
];
int
load_lib
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
,
eth_params_t
*
cfg
,
uint8_t
flag
);
int
trx_eth_start
(
openair0_device
*
device
)
{
...
...
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