Code Review
/
o-du
/
phy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
* INTC Contribution to the O-RAN F Release for O-DU Low
[o-du/phy.git]
/
fhi_lib
/
test
/
test_xran
/
u_plane_functional.cc
diff --git
a/fhi_lib/test/test_xran/u_plane_functional.cc
b/fhi_lib/test/test_xran/u_plane_functional.cc
index
5dba388
..
599819b
100644
(file)
--- a/
fhi_lib/test/test_xran/u_plane_functional.cc
+++ b/
fhi_lib/test/test_xran/u_plane_functional.cc
@@
-1,6
+1,6
@@
/******************************************************************************
*
/******************************************************************************
*
-* Copyright (c) 20
19
Intel.
+* Copyright (c) 20
20
Intel.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-16,7
+16,6
@@
*
*******************************************************************************/
*
*******************************************************************************/
-
#include "common.hpp"
#include "xran_common.h"
#include "xran_up_api.h"
#include "common.hpp"
#include "xran_common.h"
#include "xran_up_api.h"
@@
-44,7
+43,7
@@
protected:
return;
}
iq_offset = rte_pktmbuf_mtod(test_buffer, char * );
return;
}
iq_offset = rte_pktmbuf_mtod(test_buffer, char * );
- iq_offset = iq_offset + sizeof(struct ether_hdr) +
+ iq_offset = iq_offset + sizeof(struct
rte_
ether_hdr) +
sizeof (struct xran_ecpri_hdr) +
sizeof (struct radio_app_common_hdr) +
sizeof(struct data_section_hdr);
sizeof (struct xran_ecpri_hdr) +
sizeof (struct radio_app_common_hdr) +
sizeof(struct data_section_hdr);
@@
-62,6
+61,7
@@
TEST_P(U_planeCheck, Test_DLUL)
{
enum xran_pkt_dir direction = XRAN_DIR_DL;
uint16_t section_id = 7;
{
enum xran_pkt_dir direction = XRAN_DIR_DL;
uint16_t section_id = 7;
+ uint16_t num_sections = 1;
enum xran_input_byte_order iq_buf_byte_order = XRAN_CPU_LE_BYTE_ORDER;
uint8_t frame_id = 99;
uint8_t subframe_id = 9;
enum xran_input_byte_order iq_buf_byte_order = XRAN_CPU_LE_BYTE_ORDER;
uint8_t frame_id = 99;
uint8_t subframe_id = 9;
@@
-74,6
+74,7
@@
TEST_P(U_planeCheck, Test_DLUL)
uint8_t seq_id =0;
uint32_t do_copy = 0;
uint8_t compMeth = 0;
uint8_t seq_id =0;
uint32_t do_copy = 0;
uint8_t compMeth = 0;
+ enum xran_comp_hdr_type staticEn = XRAN_COMP_HDR_TYPE_DYNAMIC;
uint8_t iqWidth = 16;
int32_t prep_bytes;
uint8_t iqWidth = 16;
int32_t prep_bytes;
@@
-88,7
+89,7
@@
TEST_P(U_planeCheck, Test_DLUL)
prep_bytes = prepare_symbol_ex(direction,
section_id,
test_buffer,
prep_bytes = prepare_symbol_ex(direction,
section_id,
test_buffer,
- (
struct rb_map
*)iq_offset,
+ (
uint8_t
*)iq_offset,
compMeth,
iqWidth,
iq_buf_byte_order,
compMeth,
iqWidth,
iq_buf_byte_order,
@@
-101,24
+102,27
@@
TEST_P(U_planeCheck, Test_DLUL)
CC_ID,
RU_Port_ID,
seq_id,
CC_ID,
RU_Port_ID,
seq_id,
- do_copy);
+ do_copy,
+ staticEn,
+ num_sections,
+ 0);
ASSERT_EQ(prep_bytes, 3168);
pChar = rte_pktmbuf_mtod(test_buffer, char*);
ASSERT_EQ(prep_bytes, 3168);
pChar = rte_pktmbuf_mtod(test_buffer, char*);
- ecpri_hdr = (struct xran_ecpri_hdr *)(pChar + sizeof(struct ether_hdr));
- app_hdr = (struct radio_app_common_hdr *)(pChar + sizeof(struct ether_hdr)
+ ecpri_hdr = (struct xran_ecpri_hdr *)(pChar + sizeof(struct
rte_
ether_hdr));
+ app_hdr = (struct radio_app_common_hdr *)(pChar + sizeof(struct
rte_
ether_hdr)
+ sizeof (struct xran_ecpri_hdr));
+ sizeof (struct xran_ecpri_hdr));
- section_hdr = (struct data_section_hdr *)(pChar + sizeof(struct ether_hdr) +
+ section_hdr = (struct data_section_hdr *)(pChar + sizeof(struct
rte_
ether_hdr) +
sizeof (struct xran_ecpri_hdr) +
sizeof(struct radio_app_common_hdr));
sizeof (struct xran_ecpri_hdr) +
sizeof(struct radio_app_common_hdr));
- ASSERT_EQ (ecpri_hdr->cmnhdr.ecpri_mesg_type, ECPRI_IQ_DATA);
- payl_size = rte_be_to_cpu_16(ecpri_hdr->cmnhdr.ecpri_payl_size);
+ ASSERT_EQ (ecpri_hdr->cmnhdr.
bits.
ecpri_mesg_type, ECPRI_IQ_DATA);
+ payl_size = rte_be_to_cpu_16(ecpri_hdr->cmnhdr.
bits.
ecpri_payl_size);
ASSERT_EQ (payl_size, 3180);
ASSERT_EQ (payl_size, 3180);
- ASSERT_EQ(app_hdr->data_direction, direction);
+ ASSERT_EQ(app_hdr->data_
feature.data_
direction, direction);
ASSERT_EQ(app_hdr->frame_id, frame_id);
res_sect.fields.all_bits = rte_be_to_cpu_32(section_hdr->fields.all_bits);
ASSERT_EQ(app_hdr->frame_id, frame_id);
res_sect.fields.all_bits = rte_be_to_cpu_32(section_hdr->fields.all_bits);
@@
-128,7
+132,7
@@
TEST_P(U_planeCheck, Test_DLUL)
{
/* UL direction */
void *iq_samp_buf;
{
/* UL direction */
void *iq_samp_buf;
-
struct
ecpri_seq_id seq;
+
union
ecpri_seq_id seq;
int num_bytes = 0;
uint8_t CC_ID = 0;
int num_bytes = 0;
uint8_t CC_ID = 0;
@@
-168,6
+172,7
@@
TEST_P(U_planeCheck, Test_DLUL)
&rb,
§_id,
0,
&rb,
§_id,
0,
+ XRAN_COMP_HDR_TYPE_DYNAMIC,
&compMeth,
&iqWidth);
&compMeth,
&iqWidth);