X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=docs%2FAPI%2Fu__plane__performance_8cc_source.html;fp=docs%2FAPI%2Fu__plane__performance_8cc_source.html;h=e8cae9ed0afe44dbd62362c6a9a4fa0fd4e69754;hb=870e1b86b0c74169b215c166dee787c7c1a20d06;hp=0000000000000000000000000000000000000000;hpb=298022ce50fa8133cc880507170c4b7120d227b5;p=o-du%2Fphy.git diff --git a/docs/API/u__plane__performance_8cc_source.html b/docs/API/u__plane__performance_8cc_source.html new file mode 100644 index 0000000..e8cae9e --- /dev/null +++ b/docs/API/u__plane__performance_8cc_source.html @@ -0,0 +1,108 @@ + + + + + + + +o-du/phy: u_plane_performance.cc Source File + + + + + + + + + +
+
+ + + + + + +
+
o-du/phy +
+
Intel O-RAN/X-RAN Generated Doxygen Documentation
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
u_plane_performance.cc
+
+
+Go to the documentation of this file.
1 /******************************************************************************
2 *
3 * Copyright (c) 2019 Intel.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *******************************************************************************/
18 
19 
20 #include "common.hpp"
21 
22 #include "xran_common.h"
23 #include "xran_fh_o_du.h"
24 #include "ethernet.h"
25 
26 #include <stdint.h>
27 
28 const std::string module_name = "u-plane";
29 
30 class U_planePerf : public KernelTests
31 {
32 
33 protected:
34  int32_t request;
35  int32_t response;
36 
37  struct rte_mbuf *test_buffer;
38  char * iq_offset;
39  struct rte_mempool *test_eth_mbuf_pool;
40 
41  void SetUp() override
42  {
43  /* Parameters stored in the functional section will be used. GTest will call
44  TEST_P (including SetUp and TearDown) for each case in the section. */
45  init_test("u_plane_performace");
46  test_eth_mbuf_pool = rte_pktmbuf_pool_create("mempool", NUM_MBUFS,
47  MBUF_CACHE, 0, MBUF_POOL_ELEMENT, rte_socket_id());
48 
49  /* buffer size defined as the maximum size of all inputs/outputs in BYTE */
50  const int buffer_size = 9600;
51  test_buffer = (struct rte_mbuf*)rte_pktmbuf_alloc(test_eth_mbuf_pool);
52 
53  iq_offset = rte_pktmbuf_mtod(test_buffer, char * );
54  iq_offset = iq_offset + sizeof(struct ether_hdr) +
55  sizeof (struct xran_ecpri_hdr) +
56  sizeof (struct radio_app_common_hdr) +
57  sizeof(struct data_section_hdr);
58  }
59 
60  /* It's called after an execution of the each test case.*/
61  void TearDown() override
62  {
63  rte_pktmbuf_free(test_buffer);
64  }
65 
66  void fucntional_dl(F function, int32_t* request, int32_t* response)
67  {
68  enum xran_pkt_dir direction = XRAN_DIR_DL;
69  uint16_t section_id = 0;
70  enum xran_input_byte_order iq_buf_byte_order = XRAN_CPU_LE_BYTE_ORDER;
71  uint8_t frame_id = 0;
72  uint8_t subframe_id = 0;
73  uint8_t slot_id = 0;
74  uint8_t symbol_no = 0;
75  int prb_start = 0;
76  int prb_num = 66;
77  uint8_t CC_ID = 0;
78  uint8_t RU_Port_ID = 0;
79  uint8_t seq_id =0;
80  uint32_t do_copy = 0;
81 
82  int32_t prep_bytes;
83 
84  prep_bytes = prepare_symbol_ex(direction,
85  section_id,
86  test_buffer,
87  (struct rb_map *)iq_offset,
88  iq_buf_byte_order,
89  frame_id,
90  subframe_id,
91  slot_id,
92  symbol_no,
93  prb_start,
94  prb_num,
95  CC_ID,
96  RU_Port_ID,
97  seq_id,
98  do_copy);
99 
100  //ASSERT_EQ(prep_bytes, 3168);
101  }
102 };
103 
105 {
107 }
108 
110  testing::ValuesIn(get_sequence(U_planePerf::get_number_of_cases("u_plane_performance"))));
111 
112 
xran_pkt_dir
Definition: xran_pkt.h:146
+
void fucntional_dl(F function, int32_t *request, int32_t *response)
+
#define MBUF_POOL_ELEMENT
Definition: ethernet.h:50
+
struct rte_mbuf * test_buffer
+
static unsigned get_number_of_cases(const std::string &type)
Definition: common.hpp:190
+
void performance(const std::string &isa, const std::string &module_name, F function, Args ... args)
Run performance test case for a given function.
Definition: common.hpp:253
+ + + +
int32_t prepare_symbol_ex(enum xran_pkt_dir direction, uint16_t section_id, struct rte_mbuf *mb, struct rb_map *data, uint8_t compMeth, uint8_t iqWidth, const enum xran_input_byte_order iq_buf_byte_order, uint8_t frame_id, uint8_t subframe_id, uint8_t slot_id, uint8_t symbol_no, int prb_start, int prb_num, uint8_t CC_ID, uint8_t RU_Port_ID, uint8_t seq_id, uint32_t do_copy)
Definition: xran_common.c:348
+ +
This file has all definitions for the Ethernet Data Interface Layer.
+ +
void TearDown() override
+
xran_input_byte_order
Definition: xran_fh_o_du.h:471
+
void init_test(const std::string &type)
Defines section in the conf.json that is used to load parameters from.
Definition: common.hpp:358
+ +
XRAN layer common functionality for both lls-CU and RU as well as C-plane and U-plane.
+
#define MBUF_CACHE
Definition: ethernet.h:47
+
const std::string module_name
+
INSTANTIATE_TEST_CASE_P(UnitTest, U_planePerf, testing::ValuesIn(get_sequence(U_planePerf::get_number_of_cases("u_plane_performance"))))
+ +
#define NUM_MBUFS
Definition: ethernet.h:46
+
This file provides public interface to xRAN Front Haul layer implementation as defined in the ORAN-WG...
+
TEST_P(U_planePerf, Test_DL)
+ +
void SetUp() override
+
std::vector< unsigned > get_sequence(const unsigned number)
For a given number return sequence of number from 0 to number - 1.
Definition: common.cpp:78
+ +
struct rte_mempool * test_eth_mbuf_pool
+
+ + + +