-#if 0
-static inline void xran_process_rx_burst(struct rte_mbuf *mbufs[], uint16_t n_mbufs,
- uint64_t rx_time)
-{
- int i;
-
- if (!n_mbufs)
- return;
-
- for (i = 0; i < n_mbufs; ++i)
- {
- if (xran_ethdi_filter_packet(mbufs[i], rx_time) == MBUF_FREE)
- rte_pktmbuf_free(mbufs[i]);
- }
-
-#ifdef DPDKIO_LATENCY_DEBUG
- struct timeval tv_now, tv_diff;
-
- gettimeofday(&tv_now, NULL);
- if (n_mbufs > 1)
- nlog("Warning - received %d mbufs in a row", n_mbufs);
-
- timersub(&tv_now, &rx_time, &tv_diff);
- nlog("rx processing took %d usec", tv_diff.tv_usec);
-#endif
-}
-
-/*
- * This is the main DPDK-IO loop.
- * This will sleep if there's no packets incoming and there's
- * no work enqueued, sleep lenth is defined in IDLE_SLEEP_MICROSECS
- */
-int xran_ethdi_dpdk_io_loop(void *io_loop_cfg)
-{
- struct sched_param sched_param;
- int res = 0;
- struct xran_ethdi_ctx *ctx = xran_ethdi_get_ctx();
- const struct xran_io_loop_cfg *const cfg = &(xran_ethdi_get_ctx()->io_cfg);
- const int port[ETHDI_VF_MAX] = {cfg->port[ETHDI_UP_VF], cfg->port[ETHDI_CP_VF]};
-
- printf("%s [PORT: %d %d] [CPU %2d] [PID: %6d]\n", __FUNCTION__, port[ETHDI_UP_VF], port[ETHDI_CP_VF] , rte_lcore_id(), getpid());
-
- printf("%s [CPU %2d] [PID: %6d]\n", __FUNCTION__, rte_lcore_id(), getpid());
- sched_param.sched_priority = XRAN_THREAD_DEFAULT_PRIO;
- if ((res = pthread_setschedparam(pthread_self(), SCHED_FIFO, &sched_param))) {
- printf("priority is not changed: coreId = %d, result1 = %d\n",rte_lcore_id(), res);
- }
-
- for (;;){
- if(process_dpdk_io()!=0)
- break;
- }
-
- fflush(stderr);
- fflush(stdout);
- puts("IO loop finished");
-
- return 0;
-}
-#endif
-