X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=o-du%2Fphy.git;a=blobdiff_plain;f=fhi_lib%2Flib%2Fsrc%2Fxran_ecpri_owd_measurements.h;fp=fhi_lib%2Flib%2Fsrc%2Fxran_ecpri_owd_measurements.h;h=15206cfb52254d0eed1af181fee2fdf7b3dffd2b;hp=0000000000000000000000000000000000000000;hb=2de97529a4c5a1922214ba0e6f0fb84cacbd0bc7;hpb=81a09690b36b3a4e89b4dae34f30933de13f7f90 diff --git a/fhi_lib/lib/src/xran_ecpri_owd_measurements.h b/fhi_lib/lib/src/xran_ecpri_owd_measurements.h new file mode 100644 index 0000000..15206cf --- /dev/null +++ b/fhi_lib/lib/src/xran_ecpri_owd_measurements.h @@ -0,0 +1,79 @@ +/****************************************************************************** +* +* Copyright (c) 2020 Intel. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*******************************************************************************/ +// Ecpri One-way delay measurement support definitions + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum xran_owdm_state +{ + XRAN_OWDM_IDLE = 0, + XRAN_OWDM_WAITRESP, + XRAN_OWDM_WAITREQ, + XRAN_OWDM_WAITFUP, + XRAN_OWDM_GENFUP, + XRAN_OWDM_WAITREQWFUP, + XRAN_OWDM_WAITREMREQ, + XRAN_OWDM_WAITREMREQWFUP, + XRAN_OWDM_DONE +}; + +enum xran_owd_meas_method +{ + XRAN_REQUEST = 0, + XRAN_REM_REQ, + XRAN_REQ_WFUP, + XRAN_REM_REQ_WFUP +}; + +enum xran_owdm_tx_state +{ + OWDMTX_INIT = 0, + OWDMTX_IDLE, + OWDMTX_ACTIVE, + OWDTX_DONE +}; + +#define DELAY_THRESHOLD 60000 /* in ns */ +#define ADJUSTMENT 60 /* in us */ +#define MIN_OWDM_PL_LENGTH 40 /* Minimum owdm Payload length in bytes */ +#define MAX_OWDM_PL_LENGTH 1400 /* Maximum owdm Payload length in bytes */ + +int xran_get_delay_measurements_results (void* Handle, uint16_t port_id, uint8_t id, uint64_t* pdelay_avg); + +void xran_adjust_timing_parameters(void* Handle); + +void xran_initialize_and_verify_owd_pl_length(void* Handle); + +int process_delay_meas(struct rte_mbuf *pkt, void* handle, uint16_t port_id); \ No newline at end of file