summaryrefslogtreecommitdiff
path: root/doc/guides/sample_app_ug/quota_watermark.rst
diff options
context:
space:
mode:
authorJohn McNamara <john.mcnamara@intel.com>2015-05-18 12:34:06 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-05-25 15:59:36 +0200
commit4a22e6ee3d2f8be8afd5b374a8916e232ab7fe97 (patch)
treea0747fbf3e75e6d7d90abdec44e2f2fc6abe177b /doc/guides/sample_app_ug/quota_watermark.rst
parent536884d6963164ebba88f3633d2e22e5bbcc069c (diff)
downloaddpdk-4a22e6ee3d2f8be8afd5b374a8916e232ab7fe97.zip
dpdk-4a22e6ee3d2f8be8afd5b374a8916e232ab7fe97.tar.gz
dpdk-4a22e6ee3d2f8be8afd5b374a8916e232ab7fe97.tar.xz
doc: refactor figure numbers into references
This change adds automatic figure references to the docs. The figure numbers in the generated Html and PDF docs are now automatically numbered based on section. Requires Sphinx >= 1.3.1. The patch makes the following changes. * Changes image:: tag to figure:: and moves image caption to the figure. * Adds captions to figures that didn't previously have any. * Un-templates the |image-name| substitution definitions into explicit figure:: tags. They weren't used more than once anyway and Sphinx doesn't support them for figure. * Adds a target to each image that didn't previously have one so that they can be cross-referenced. * Renamed existing image target to match the image name for consistency. * Replaces the Figures lists with automatic :numref: :ref: entries to generate automatic numbering and captions. * Replaces "Figure" references with automatic :numref: references. Signed-off-by: John McNamara <john.mcnamara@intel.com>
Diffstat (limited to 'doc/guides/sample_app_ug/quota_watermark.rst')
-rw-r--r--doc/guides/sample_app_ug/quota_watermark.rst36
1 files changed, 12 insertions, 24 deletions
diff --git a/doc/guides/sample_app_ug/quota_watermark.rst b/doc/guides/sample_app_ug/quota_watermark.rst
index 4274223..c56683a 100644
--- a/doc/guides/sample_app_ug/quota_watermark.rst
+++ b/doc/guides/sample_app_ug/quota_watermark.rst
@@ -54,15 +54,14 @@ and ports 2 and 3 forward into each other.
The MAC addresses of the forwarded Ethernet frames are not affected.
Internally, packets are pulled from the ports by the master logical core and put on a variable length processing pipeline,
-each stage of which being connected by rings, as shown in Figure 12.
+each stage of which being connected by rings, as shown in :numref:`figure_pipeline_overview`.
-.. _figure_12:
+.. _figure_pipeline_overview:
-**Figure 12. Pipeline Overview**
+.. figure:: img/pipeline_overview.*
-.. image15_png has been renamed
+ Pipeline Overview
-|pipeline_overview|
An adjustable quota value controls how many packets are being moved through the pipeline per enqueue and dequeue.
Adjustable watermark values associated with the rings control a back-off mechanism that
@@ -79,15 +78,14 @@ eventually lead to an Ethernet flow control frame being send to the source.
On top of serving as an example of quota and watermark usage,
this application can be used to benchmark ring based processing pipelines performance using a traffic- generator,
-as shown in Figure 13.
+as shown in :numref:`figure_ring_pipeline_perf_setup`.
-.. _figure_13:
+.. _figure_ring_pipeline_perf_setup:
-**Figure 13. Ring-based Processing Pipeline Performance Setup**
+.. figure:: img/ring_pipeline_perf_setup.*
-.. image16_png has been renamed
+ Ring-based Processing Pipeline Performance Setup
-|ring_pipeline_perf_setup|
Compiling the Application
-------------------------
@@ -311,7 +309,7 @@ Logical Cores Assignment
The application uses the master logical core to poll all the ports for new packets and enqueue them on a ring associated with the port.
Each logical core except the last runs pipeline_stage() after a ring for each used port is initialized on that core.
-pipeline_stage() on core X dequeues packets from core X-1's rings and enqueue them on its own rings. See Figure 14.
+pipeline_stage() on core X dequeues packets from core X-1's rings and enqueue them on its own rings. See :numref:`figure_threads_pipelines`.
.. code-block:: c
@@ -340,16 +338,12 @@ sending them out on the destination port setup by pair_ports().
Receive, Process and Transmit Packets
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-.. _figure_14:
+.. _figure_threads_pipelines:
-Figure 14 shows where each thread in the pipeline is.
-It should be used as a reference while reading the rest of this section.
+.. figure:: img/threads_pipelines.*
-**Figure 14. Threads and Pipelines**
+ Threads and Pipelines
-.. image17_png has been renamed
-
-|threads_pipelines|
In the receive_stage() function running on the master logical core,
the main task is to read ingress packets from the RX ports and enqueue them
@@ -498,9 +492,3 @@ low_watermark from the rte_memzone previously created by qw.
low_watermark = (unsigned int *) qw_memzone->addr + sizeof(int);
}
-
-.. |pipeline_overview| image:: img/pipeline_overview.*
-
-.. |ring_pipeline_perf_setup| image:: img/ring_pipeline_perf_setup.*
-
-.. |threads_pipelines| image:: img/threads_pipelines.*