diff options
author | Dave Barach <dave@barachs.net> | 2018-06-14 18:52:46 -0400 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-06-21 14:57:02 +0000 |
commit | 85aa49019f4b4b2b7a4fce4313fdc0f2de65c277 (patch) | |
tree | 14c2ef301403f64e1dd08f7912c86a2cb1bffed3 /src/plugins/dpdk/device/node.c | |
parent | cb3b7052357b57ab927edf178baa1412d7df81d5 (diff) |
configurable per-dispatch-cycle sleep
Workaround for lack of driver interrupt support. Also quite handy for
home gateway, laptop/vagrant, other use-cases not requiring maximum
vectors/second for proper operation.
Change-Id: Ifc4b98112450664beef67b89ab8a6940a3bf24b5
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/plugins/dpdk/device/node.c')
-rw-r--r-- | src/plugins/dpdk/device/node.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/plugins/dpdk/device/node.c b/src/plugins/dpdk/device/node.c index bdd0bd0a5c4..8fc8f410ee3 100644 --- a/src/plugins/dpdk/device/node.c +++ b/src/plugins/dpdk/device/node.c @@ -156,24 +156,6 @@ dpdk_prefetch_buffer_data_x4 (struct rte_mbuf *mb[]) CLIB_PREFETCH (b->data, CLIB_CACHE_LINE_BYTES, LOAD); } -static inline void -poll_rate_limit (dpdk_main_t * dm) -{ - /* Limit the poll rate by sleeping for N msec between polls */ - if (PREDICT_FALSE (dm->poll_sleep_usec != 0)) - { - struct timespec ts, tsrem; - - ts.tv_sec = 0; - ts.tv_nsec = 1000 * dm->poll_sleep_usec; - - while (nanosleep (&ts, &tsrem) < 0) - { - ts = tsrem; - } - } -} - /** \brief Main DPDK input node @node dpdk-input @@ -659,9 +641,6 @@ VLIB_NODE_FN (dpdk_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node, dq->queue_id); } /* *INDENT-ON* */ - - poll_rate_limit (dm); - return n_rx_packets; } |