X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Fprog_guide%2Frte_flow.rst;h=7af132ebfee5ae2e61589112ccaf7eb3abac1a75;hb=7e323fea6c29ef95d66b54bf1e5627871ab63619;hp=92e0f89ad7d7d81dcef3b7e1ad9de451d502f7a4;hpb=2f82d143fb318042f47a50694baa4507b51b7381;p=dpdk.git diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index 92e0f89ad7..7af132ebfe 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -656,6 +656,36 @@ representor" depending on the kind of underlying device). | ``mask`` | ``id`` | zeroed to match any port ID | +----------+----------+-----------------------------+ +Item: ``MARK`` +^^^^^^^^^^^^^^ + +Matches an arbitrary integer value which was set using the ``MARK`` action in +a previously matched rule. + +This item can only specified once as a match criteria as the ``MARK`` action can +only be specified once in a flow action. + +Note the value of MARK field is arbitrary and application defined. + +Depending on the underlying implementation the MARK item may be supported on +the physical device, with virtual groups in the PMD or not at all. + +- Default ``mask`` matches any integer value. + +.. _table_rte_flow_item_mark: + +.. table:: MARK + + +----------+----------+---------------------------+ + | Field | Subfield | Value | + +==========+==========+===========================+ + | ``spec`` | ``id`` | integer value | + +----------+--------------------------------------+ + | ``last`` | ``id`` | upper range value | + +----------+----------+---------------------------+ + | ``mask`` | ``id`` | zeroed to match any value | + +----------+----------+---------------------------+ + Data matching item types ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1247,17 +1277,19 @@ Actions are performed in list order: .. table:: Mark, count then redirect - +-------+--------+-----------+-------+ - | Index | Action | Field | Value | - +=======+========+===========+=======+ - | 0 | MARK | ``mark`` | 0x2a | - +-------+--------+-----------+-------+ - | 1 | COUNT | - +-------+--------+-----------+-------+ - | 2 | QUEUE | ``queue`` | 10 | - +-------+--------+-----------+-------+ - | 3 | END | - +-------+----------------------------+ + +-------+--------+------------+-------+ + | Index | Action | Field | Value | + +=======+========+============+=======+ + | 0 | MARK | ``mark`` | 0x2a | + +-------+--------+------------+-------+ + | 1 | COUNT | ``shared`` | 0 | + | | +------------+-------+ + | | | ``id`` | 0 | + +-------+--------+------------+-------+ + | 2 | QUEUE | ``queue`` | 10 | + +-------+--------+------------+-------+ + | 3 | END | + +-------+-----------------------------+ | @@ -1486,23 +1518,36 @@ Drop packets. Action: ``COUNT`` ^^^^^^^^^^^^^^^^^ -Enables counters for this rule. +Adds a counter action to a matched flow. + +If more than one count action is specified in a single flow rule, then each +action must specify a unique id. -These counters can be retrieved and reset through ``rte_flow_query()``, see +Counters can be retrieved and reset through ``rte_flow_query()``, see ``struct rte_flow_query_count``. -- Counters can be retrieved with ``rte_flow_query()``. -- No configurable properties. +The shared flag indicates whether the counter is unique to the flow rule the +action is specified with, or whether it is a shared counter. + +For a count action with the shared flag set, then then a global device +namespace is assumed for the counter id, so that any matched flow rules using +a count action with the same counter id on the same port will contribute to +that counter. + +For ports within the same switch domain then the counter id namespace extends +to all ports within that switch domain. .. _table_rte_flow_action_count: .. table:: COUNT - +---------------+ - | Field | - +===============+ - | no properties | - +---------------+ + +------------+---------------------+ + | Field | Value | + +============+=====================+ + | ``shared`` | shared counter flag | + +------------+---------------------+ + | ``id`` | counter id | + +------------+---------------------+ Query structure to retrieve and reset flow rule counters: @@ -2252,7 +2297,7 @@ definition. int rte_flow_query(uint16_t port_id, struct rte_flow *flow, - enum rte_flow_action_type action, + const struct rte_flow_action *action, void *data, struct rte_flow_error *error); @@ -2260,7 +2305,7 @@ Arguments: - ``port_id``: port identifier of Ethernet device. - ``flow``: flow rule handle to query. -- ``action``: action type to query. +- ``action``: action to query, this must match prototype from flow rule. - ``data``: pointer to storage for the associated query data type. - ``error``: perform verbose error reporting if not NULL. PMDs initialize this structure in case of error only.