Commit cd5822e9 authored by Robert Schmidt's avatar Robert Schmidt

Update FHI 7.2 ORAN patch: unaligned access, detect/handle PRACH packets

parent 8abf975f
......@@ -109,6 +109,8 @@ elseif (xran_VERSION_STRING STREQUAL "oran_e_maintenance_release_v1.1")
set(xran_VERSION 5.1.1)
elseif (xran_VERSION_STRING STREQUAL "oran_e_maintenance_release_v1.2")
set(xran_VERSION 5.1.2)
elseif (xran_VERSION_STRING STREQUAL "oran_e_maintenance_release_v1.3")
set(xran_VERSION 5.1.3)
endif()
unset(xran_VERSION_LINE)
unset(xran_VERSION_STRING)
......
......@@ -7,7 +7,7 @@ index 7508117..0dbe0bd 100644
#include <rte_mbuf.h>
-#define VERSIONX "oran_e_maintenance_release_v1.0"
+#define VERSIONX "oran_e_maintenance_release_v1.2"
+#define VERSIONX "oran_e_maintenance_release_v1.3"
#define APP_O_DU 0
#define APP_O_RU 1
......@@ -114,7 +114,7 @@ index 7419ae1..a85f973 100644
* @ingroup xran
*
diff --git a/fhi_lib/lib/api/xran_up_api.h b/fhi_lib/lib/api/xran_up_api.h
index 7d3afc5..3e00c5a 100644
index 7d3afc5..e2f1f21 100644
--- a/fhi_lib/lib/api/xran_up_api.h
+++ b/fhi_lib/lib/api/xran_up_api.h
@@ -80,6 +80,7 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
......@@ -125,6 +125,16 @@ index 7d3afc5..3e00c5a 100644
union ecpri_seq_id *seq_id,
uint16_t *num_prbu,
uint16_t *start_prbu,
@@ -89,7 +90,8 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
int8_t expect_comp,
enum xran_comp_hdr_type staticComp,
uint8_t *compMeth,
- uint8_t *iqWidth);
+ uint8_t *iqWidth,
+ uint8_t *is_prach);
inline int xran_prepare_iq_symbol_portion(
struct rte_mbuf *mbuf,
diff --git a/fhi_lib/lib/ethernet/ethdi.c b/fhi_lib/lib/ethernet/ethdi.c
index b6ba257..b53325f 100644
--- a/fhi_lib/lib/ethernet/ethdi.c
......@@ -173,9 +183,18 @@ index e6d3067..8e0abee 100644
static int16_t saturateAbs(int16_t inVal)
{
diff --git a/fhi_lib/lib/src/xran_bfp_uplane.cpp b/fhi_lib/lib/src/xran_bfp_uplane.cpp
index a345df4..7831fa0 100644
index a345df4..109b05a 100644
--- a/fhi_lib/lib/src/xran_bfp_uplane.cpp
+++ b/fhi_lib/lib/src/xran_bfp_uplane.cpp
@@ -90,7 +90,7 @@ namespace BFP_UPlane
{
const __m512i* rawData = reinterpret_cast<const __m512i*>(dataIn.dataExpanded);
/// Abs
- const auto rawDataAbs = _mm512_abs_epi16(rawData[0]);
+ const auto rawDataAbs = _mm512_abs_epi16(_mm512_loadu_epi16(rawData));
/// No need to do a full horizontal max operation here, just do a max IQ step,
/// compute the exponents and then use a reduce max over all exponent values. This
/// is the fastest way to handle a single RB.
@@ -116,7 +116,7 @@ namespace BFP_UPlane
/// Get AVX512 pointer aligned to desired RB
const __m512i* rawDataIn = reinterpret_cast<const __m512i*>(dataIn.dataExpanded + numREOffset);
......@@ -195,10 +214,18 @@ index a345df4..7831fa0 100644
dataOut->dataCompressed[thisRBExpAddr] = thisExp;
/// Now have 1 RB worth of bytes separated into 3 chunks (1 per lane)
diff --git a/fhi_lib/lib/src/xran_common.c b/fhi_lib/lib/src/xran_common.c
index baa673f..edd4ecb 100644
index baa673f..00bfdf2 100644
--- a/fhi_lib/lib/src/xran_common.c
+++ b/fhi_lib/lib/src/xran_common.c
@@ -656,6 +656,7 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
@@ -650,12 +650,15 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
uint8_t compMeth = 0;
uint8_t iqWidth = 0;
+ uint8_t is_prach = 0;
+
void *pHandle = NULL;
int ret = MBUF_FREE;
uint32_t mb_free = 0;
int32_t valid_res = 0;
int expect_comp = (p_dev_ctx->fh_cfg.ru_conf.compMeth != XRAN_COMPMETHOD_NONE);
enum xran_comp_hdr_type staticComp = p_dev_ctx->fh_cfg.ru_conf.xranCompHdrType;
......@@ -206,7 +233,7 @@ index baa673f..edd4ecb 100644
if (staticComp == XRAN_COMP_HDR_TYPE_STATIC)
{
@@ -674,6 +675,7 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
@@ -674,6 +677,7 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
&subframe_id,
&slot_id,
&symb_id,
......@@ -214,7 +241,14 @@ index baa673f..edd4ecb 100644
&seq,
&num_prbu,
&start_prbu,
@@ -688,23 +690,9 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
@@ -683,28 +687,15 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
expect_comp,
staticComp,
&compMeth,
- &iqWidth);
+ &iqWidth,
+ &is_prach);
if (num_bytes <= 0){
print_err("num_bytes is wrong [%d]\n", num_bytes);
return MBUF_FREE;
}
......@@ -241,7 +275,16 @@ index baa673f..edd4ecb 100644
#ifndef FCN_ADAPT
if(valid_res != 0) {
print_dbg("valid_res is wrong [%d] ant %u (%u : %u : %u : %u) seq %u num_bytes %d\n", valid_res, Ant_ID, frame_id, subframe_id, slot_id, symb_id, seq.seq_id, num_bytes);
@@ -1189,7 +1177,7 @@ int generate_cpmsg_prach(void *pHandle, struct xran_cp_gen_params *params, struc
@@ -756,7 +747,7 @@ process_mbuf(struct rte_mbuf *pkt, void* handle, struct xran_eaxc_info *p_cid)
print_dbg("Transport layer fragmentation (eCPRI) is not supported\n");
}
- } else if (Ant_ID >= p_dev_ctx->PrachCPConfig.eAxC_offset && p_dev_ctx->fh_cfg.prachEnable) {
+ } else if (/*Ant_ID >= p_dev_ctx->PrachCPConfig.eAxC_offset && */p_dev_ctx->fh_cfg.prachEnable && is_prach) {
/* PRACH packet has ruportid = num_eAxc + ant_id */
Ant_ID -= p_dev_ctx->PrachCPConfig.eAxC_offset;
symbol_total_bytes[p_dev_ctx->xran_port_id][CC_ID][Ant_ID] += num_bytes;
@@ -1189,7 +1180,7 @@ int generate_cpmsg_prach(void *pHandle, struct xran_cp_gen_params *params, struc
timeOffset += startSymId * (2048 + 144);
}
timeOffset = timeOffset >> nNumerology; //original number is Tc, convert to Ts based on mu
......@@ -250,7 +293,7 @@ index baa673f..edd4ecb 100644
timeOffset += 16;
params->dir = XRAN_DIR_UL;
@@ -1295,8 +1283,7 @@ int32_t ring_processing_func(void* args)
@@ -1295,8 +1286,7 @@ int32_t ring_processing_func(void* args)
for (i = 0; i < ctx->io_cfg.num_vfs && i < XRAN_VF_MAX; i++){
for(qi = 0; qi < ctx->rxq_per_port[i]; qi++) {
......@@ -430,7 +473,7 @@ index 36bd72c..f7f5678 100644
int idx = 0;
uint16_t *psrc = (uint16_t *)iq_data_start;
diff --git a/fhi_lib/lib/src/xran_up_api.c b/fhi_lib/lib/src/xran_up_api.c
index 397853a..4a714b5 100644
index 397853a..8977e3d 100644
--- a/fhi_lib/lib/src/xran_up_api.c
+++ b/fhi_lib/lib/src/xran_up_api.c
@@ -329,6 +329,7 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
......@@ -441,7 +484,26 @@ index 397853a..4a714b5 100644
union ecpri_seq_id *seq_id,
uint16_t *num_prbu,
uint16_t *start_prbu,
@@ -387,6 +388,8 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
@@ -338,7 +339,8 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
int8_t expect_comp,
enum xran_comp_hdr_type staticComp,
uint8_t *compMeth,
- uint8_t *iqWidth)
+ uint8_t *iqWidth,
+ uint8_t *is_prach)
{
#if XRAN_MLOG_VAR
uint32_t mlogVar[10];
@@ -374,6 +376,8 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
return 0; /* packet too short */
radio_hdr->sf_slot_sym.value = rte_be_to_cpu_16(radio_hdr->sf_slot_sym.value);
+ if (radio_hdr->data_feature.filter_id > 0) *is_prach = 1;
+ else *is_prach = 0;
if (frame_id)
*frame_id = radio_hdr->frame_id;
@@ -387,6 +391,8 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
if (symb_id)
*symb_id = radio_hdr->sf_slot_sym.symb_id;
......@@ -450,7 +512,7 @@ index 397853a..4a714b5 100644
/* Process data section hdr */
struct data_section_hdr *data_hdr =
(void *)rte_pktmbuf_adj(mbuf, sizeof(*radio_hdr));
@@ -401,6 +404,7 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
@@ -401,6 +407,7 @@ int32_t xran_extract_iq_samples(struct rte_mbuf *mbuf,
*sym_inc = data_hdr->fields.sym_inc;
*rb = data_hdr->fields.rb;
*sect_id = data_hdr->fields.sect_id;
......
......@@ -2,7 +2,7 @@
pkg_check_modules(dpdk REQUIRED libdpdk)
pkg_check_modules(numa REQUIRED numa)
find_package(xran 5.1.2 EXACT REQUIRED) # E release -> 5
find_package(xran 5.1.3 EXACT REQUIRED) # E release -> 5
# Ignore xran-specific warning: we don't care/can't change the following warning, so suppress
# alignment 1 of 'struct XYZ' is less than 2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment