X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=fhi_lib%2Flib%2Fethernet%2Fethdi.h;h=d47dd76ab002e0ab5c172cb1ed06f460f4638912;hb=2fbf70096f64af622da983e88c5a64e90ad9bdbd;hp=3b00e15ad8b2ddf57adecb0119e757c7e4a0caa8;hpb=4745e5c88ba931c6d71cb6d8c681f76cf364eac5;p=o-du%2Fphy.git diff --git a/fhi_lib/lib/ethernet/ethdi.h b/fhi_lib/lib/ethernet/ethdi.h index 3b00e15..d47dd76 100644 --- a/fhi_lib/lib/ethernet/ethdi.h +++ b/fhi_lib/lib/ethernet/ethdi.h @@ -16,7 +16,6 @@ * *******************************************************************************/ - /** * @brief This file has all definitions for the Ethernet Data Interface Layer * @file ethdi.h @@ -36,7 +35,19 @@ extern "C" { #include #include +/* comment this to enable PDUMP + * DPDK has to be compiled with + * CONFIG_RTE_LIBRTE_PMD_PCAP=y + * CONFIG_RTE_LIBRTE_PDUMP=y + */ +#undef RTE_LIBRTE_PDUMP + +#ifdef RTE_LIBRTE_PDUMP +#include +#endif + #include "ethernet.h" +#include "xran_fh_o_du.h" #define XRAN_THREAD_DEFAULT_PRIO (98) @@ -53,14 +64,6 @@ extern "C" { #define TX_TIMER_INTERVAL ((rte_get_timer_hz() / 1000000000L)*interval_us*1000) /* nanosec */ #define TX_RX_LOOP_TIME rte_get_timer_hz() / 1 -extern enum xran_if_state xran_if_current_state; - -enum xran_if_state -{ - XRAN_RUNNING, - XRAN_STOPPED -}; - enum xran_ping_states { PING_IDLE, @@ -79,6 +82,8 @@ struct xran_io_loop_cfg { uint8_t id; char *dpdk_dev[ETHDI_VF_MAX]; + char *bbdev_dev[1]; + int bbdev_mode; int core; int system_core; /* Needed as DPDK will change your starting core. */ int pkt_proc_core; /* Needed for packet processing thread. */ @@ -132,6 +137,7 @@ enum { MBUF_FREE }; +extern enum xran_if_state xran_if_current_state; extern uint8_t ping_dst_id; extern struct ether_addr entities_addrs[]; @@ -154,12 +160,16 @@ int xran_register_ethertype_handler(uint16_t ethertype, ethertype_handler callba int xran_ethdi_init_dpdk_io(char *name, const struct xran_io_loop_cfg *io_cfg, int *lcore_id, struct ether_addr *p_lls_cu_addr, struct ether_addr *p_ru_addr, uint16_t cp_vlan, uint16_t up_vlan); -int xran_ethdi_dpdk_io_loop(void *); struct rte_mbuf *xran_ethdi_mbuf_alloc(void); int xran_ethdi_mbuf_send(struct rte_mbuf *mb, uint16_t ethertype); int xran_ethdi_mbuf_send_cp(struct rte_mbuf *mb, uint16_t ethertype); +#if 0 void xran_ethdi_stop_tx(void); +void xran_ethdi_ports_stats(void); +int xran_ethdi_dpdk_io_loop(void *); +#endif int xran_ethdi_filter_packet(struct rte_mbuf *pkt, uint64_t rx_time); +int32_t process_dpdk_io(void); #ifdef __cplusplus