git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/mlx5: support scheduling on send routine template
[dpdk.git]
/
doc
/
guides
/
sample_app_ug
/
rxtx_callbacks.rst
diff --git
a/doc/guides/sample_app_ug/rxtx_callbacks.rst
b/doc/guides/sample_app_ug/rxtx_callbacks.rst
index
1ca959c
..
0a69ec7
100644
(file)
--- a/
doc/guides/sample_app_ug/rxtx_callbacks.rst
+++ b/
doc/guides/sample_app_ug/rxtx_callbacks.rst
@@
-13,6
+13,10
@@
In the sample application a user defined callback is applied to all received
packets to add a timestamp. A separate callback is applied to all packets
prior to transmission to calculate the elapsed time, in CPU cycles.
packets to add a timestamp. A separate callback is applied to all packets
prior to transmission to calculate the elapsed time, in CPU cycles.
+If hardware timestamping is supported by the NIC, the sample application will
+also display the average latency since the packet was timestamped in hardware,
+on top of the latency since the packet was received and processed by the RX
+callback.
Compiling the Application
-------------------------
Compiling the Application
-------------------------
@@
-36,7
+40,10
@@
To run the example in a ``linux`` environment:
.. code-block:: console
.. code-block:: console
- ./build/rxtx_callbacks -l 1 -n 4
+ ./build/rxtx_callbacks -l 1 -n 4 -- [-t]
+
+Use -t to enable hardware timestamping. If not supported by the NIC, an error
+will be displayed.
Refer to *DPDK Getting Started Guide* for general information on running
applications and the Environment Abstraction Layer (EAL) options.
Refer to *DPDK Getting Started Guide* for general information on running
applications and the Environment Abstraction Layer (EAL) options.
@@
-110,8
+117,9
@@
comments:
return retval;
/* Enable RX in promiscuous mode for the Ethernet device. */
return retval;
/* Enable RX in promiscuous mode for the Ethernet device. */
- rte_eth_promiscuous_enable(port);
-
+ retval = rte_eth_promiscuous_enable(port);
+ if (retval != 0)
+ return retval;
/* Add the callbacks for RX and TX.*/
rte_eth_add_rx_callback(port, 0, add_timestamps, NULL);
/* Add the callbacks for RX and TX.*/
rte_eth_add_rx_callback(port, 0, add_timestamps, NULL);