Signed-off-by: Ilya Maximets <i.maxim...@samsung.com> --- lib/dpif-netdev.c | 16 +++++++++------- vswitchd/vswitch.xml | 5 +++-- 2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 0d78ae4..cf1591c 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -2825,7 +2825,7 @@ dpif_netdev_execute(struct dpif *dpif, struct dpif_execute *execute) struct dp_netdev *dp = get_dp_netdev(dpif); struct dp_netdev_pmd_thread *pmd; struct dp_packet_batch pp; - long long now = time_msec(); + long long now = time_usec(); if (dp_packet_size(execute->packet) < ETH_HEADER_LEN || dp_packet_size(execute->packet) > UINT16_MAX) { @@ -2925,7 +2925,7 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config) atomic_read_relaxed(&dp->output_max_latency, &cur_max_latency); if (output_max_latency != cur_max_latency) { atomic_store_relaxed(&dp->output_max_latency, output_max_latency); - VLOG_INFO("Output maximum latency set to %"PRIu32" ms", + VLOG_INFO("Output maximum latency set to %"PRIu32" us", output_max_latency); } @@ -3166,7 +3166,7 @@ dp_netdev_pmd_flush_output_packets(struct dp_netdev_pmd_thread *pmd, } if (!now) { - now = time_msec(); + now = time_usec(); } HMAP_FOR_EACH (p, node, &pmd->send_port_cache) { @@ -3190,7 +3190,7 @@ dp_netdev_process_rxq_port(struct dp_netdev_pmd_thread *pmd, dp_packet_batch_init(&batch); error = netdev_rxq_recv(rx, &batch); if (!error) { - long long now = time_msec(); + long long now = time_usec(); *recirc_depth_get() = 0; @@ -3768,7 +3768,7 @@ dpif_netdev_run(struct dpif *dpif) } cycles_count_end(non_pmd, PMD_CYCLES_IDLE); - dpif_netdev_xps_revalidate_pmd(non_pmd, time_msec(), false); + dpif_netdev_xps_revalidate_pmd(non_pmd, time_usec(), false); ovs_mutex_unlock(&dp->non_pmd_mutex); dp_netdev_pmd_unref(non_pmd); @@ -4742,7 +4742,7 @@ packet_batch_per_flow_execute(struct packet_batch_per_flow *batch, struct dp_netdev_flow *flow = batch->flow; dp_netdev_flow_used(flow, batch->array.count, batch->byte_count, - batch->tcp_flags, now); + batch->tcp_flags, now / 1000); actions = dp_netdev_flow_get_actions(flow); @@ -5111,7 +5111,7 @@ dpif_netdev_xps_revalidate_pmd(const struct dp_netdev_pmd_thread *pmd, if (!tx->port->dynamic_txqs) { continue; } - interval = now - tx->last_used; + interval = now / 1000 - tx->last_used; if (tx->qid >= 0 && (purge || interval >= XPS_TIMEOUT_MS)) { port = tx->port; ovs_mutex_lock(&port->txq_used_mutex); @@ -5132,6 +5132,8 @@ dpif_netdev_xps_get_tx_qid(const struct dp_netdev_pmd_thread *pmd, if (OVS_UNLIKELY(!now)) { now = time_msec(); + } else { + now /= 1000; } interval = now - tx->last_used; diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 23930f0..1c6ae7c 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -345,9 +345,10 @@ </column> <column name="other_config" key="output-max-latency" - type='{"type": "integer", "minInteger": 0, "maxInteger": 1000}'> + type='{"type": "integer", + "minInteger": 0, "maxInteger": 1000000}'> <p> - Specifies the time in milliseconds that a packet can wait in output + Specifies the time in microseconds that a packet can wait in output batch for sending i.e. amount of time that packet can spend in an intermediate output queue before sending to netdev. This option can be used to configure balance between throughput -- 2.7.4 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev