X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fguides%2Fprog_guide%2Fpacket_distrib_lib.rst;h=ee2b1a668f6a47e339551eb800133a6aa0eeb175;hb=7db274b9ada2221acb7110204a3b2c6a37d2614a;hp=c95291d4f664b44744cdde4f571c1b311a8e1ea2;hpb=fc1f2750a3ec6da919e3c86e59d56f34ec97154b;p=dpdk.git diff --git a/doc/guides/prog_guide/packet_distrib_lib.rst b/doc/guides/prog_guide/packet_distrib_lib.rst index c95291d4f6..ee2b1a668f 100644 --- a/doc/guides/prog_guide/packet_distrib_lib.rst +++ b/doc/guides/prog_guide/packet_distrib_lib.rst @@ -31,14 +31,21 @@ Packet Distributor Library ========================== -The Intel® DPDK Packet Distributor library is a library designed to be used for dynamic load balancing of traffic +The DPDK Packet Distributor library is a library designed to be used for dynamic load balancing of traffic while supporting single packet at a time operation. When using this library, the logical cores in use are to be considered in two roles: firstly a distributor lcore, which is responsible for load balancing or distributing packets, and a set of worker lcores which are responsible for receiving the packets from the distributor and operating on them. The model of operation is shown in the diagram below. -|packet_distributor1| +.. figure:: img/packet_distributor1.* + + Packet Distributor mode of operation + +There are two modes of operation of the API in the distributor library, +one which sends one packet at a time to workers using 32-bits for flow_id, +and an optimized mode which sends bursts of up to 8 packets at a time to workers, using 15 bits of flow_id. +The mode is selected by the type field in the ``rte_distributor_create()`` function. Distributor Core Operation -------------------------- @@ -91,13 +98,15 @@ No packet ordering guarantees are made about packets which do not share a common Using the process and returned_pkts API, the following application workflow can be used, while allowing packet order within a packet flow -- identified by a tag -- to be maintained. -.. image41_png has been renamed -|packet_distributor2| +.. figure:: img/packet_distributor2.* + + Application workflow + The flush and clear_returns API calls, mentioned previously, are likely of less use that the process and returned_pkts APIS, and are principally provided to aid in unit testing of the library. -Descriptions of these functions and their use can be found in the Intel® DPDK API Reference document. +Descriptions of these functions and their use can be found in the DPDK API Reference document. Worker Operation ---------------- @@ -110,7 +119,3 @@ Since it may be desirable to vary the number of worker cores, depending on the t i.e. to save power at times of lighter load, it is possible to have a worker stop processing packets by calling "rte_distributor_return_pkt()" to indicate that it has finished the current packet and does not want a new one. - -.. |packet_distributor1| image:: img/packet_distributor1.png - -.. |packet_distributor2| image:: img/packet_distributor2.png