X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Fprog_guide%2Frte_flow.rst;h=2d2d87f1db639ee039b08f4891e4c33c66c75b3b;hb=6cc51b1293ceac4a77d4bf7ac91a8bbd59e1f78c;hp=5957b8df4f83c27667c0861fcc871bbc5341ad1f;hpb=9d2a349b388a21d0ee7c22c2864730dffa79c75c;p=dpdk.git diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index 5957b8df4f..2d2d87f1db 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -701,9 +701,9 @@ Item: ``META`` Matches 32 bit metadata item set. On egress, metadata can be set either by mbuf metadata field with -PKT_TX_DYNF_METADATA flag or ``SET_META`` action. On ingress, ``SET_META`` +RTE_MBUF_DYNFLAG_TX_METADATA flag or ``SET_META`` action. On ingress, ``SET_META`` action sets metadata for a packet and the metadata will be reported via -``metadata`` dynamic field of ``rte_mbuf`` with PKT_RX_DYNF_METADATA flag. +``metadata`` dynamic field of ``rte_mbuf`` with RTE_MBUF_DYNFLAG_RX_METADATA flag. - Default ``mask`` matches the specified Rx metadata value. @@ -1548,6 +1548,56 @@ This item is meant to use the same structure as `Item: PORT_REPRESENTOR`_. See also `Action: REPRESENTED_PORT`_. +Item: ``FLEX`` +^^^^^^^^^^^^^^ + +Matches with the custom network protocol header that was created +using rte_flow_flex_item_create() API. The application describes +the desired header structure, defines the header fields attributes +and header relations with preceding and following protocols and +configures the ethernet devices accordingly via +rte_flow_flex_item_create() routine. + +- ``handle``: the flex item handle returned by the PMD on successful + rte_flow_flex_item_create() call, mask for this field is ignored. +- ``length``: match pattern length in bytes. If the length does not cover + all fields defined in item configuration, the pattern spec and mask are + considered by the driver as padded with trailing zeroes till the full + configured item pattern length. +- ``pattern``: pattern to match. The pattern is concatenation of bit fields + configured at item creation. At configuration the fields are presented + by sample_data array. The order of the bitfields is defined by the order + of sample_data elements. The width of each bitfield is defined by the width + specified in the corresponding sample_data element as well. If pattern + length is smaller than configured fields overall length it is considered + as padded with trailing zeroes up to full configured length, both for + value and mask. + +Item: ``L2TPV2`` +^^^^^^^^^^^^^^^^^^^ + +Matches a L2TPv2 header. + +- ``flags_version``: flags(12b), version(4b). +- ``length``: total length of the message. +- ``tunnel_id``: identifier for the control connection. +- ``session_id``: identifier for a session within a tunnel. +- ``ns``: sequence number for this date or control message. +- ``nr``: sequence number expected in the next control message to be received. +- ``offset_size``: offset of payload data. +- ``offset_padding``: offset padding, variable length. +- Default ``mask`` matches flags_version only. + +Item: ``PPP`` +^^^^^^^^^^^^^^^^^^^ + +Matches a PPP header. + +- ``addr``: PPP address. +- ``ctrl``: PPP control. +- ``proto_id``: PPP protocol identifier. +- Default ``mask`` matches addr, ctrl, proto_id. + Actions ~~~~~~~ @@ -1777,8 +1827,8 @@ flows to loop between groups. Action: ``MARK`` ^^^^^^^^^^^^^^^^ -Attaches an integer value to packets and sets ``PKT_RX_FDIR`` and -``PKT_RX_FDIR_ID`` mbuf flags. +Attaches an integer value to packets and sets ``RTE_MBUF_F_RX_FDIR`` and +``RTE_MBUF_F_RX_FDIR_ID`` mbuf flags. This value is arbitrary and application-defined. Maximum allowed value depends on the underlying implementation. It is returned in the @@ -1798,7 +1848,7 @@ Action: ``FLAG`` ^^^^^^^^^^^^^^^^ Flags packets. Similar to `Action: MARK`_ without a specific value; only -sets the ``PKT_RX_FDIR`` mbuf flag. +sets the ``RTE_MBUF_F_RX_FDIR`` mbuf flag. - No configurable properties. @@ -1943,23 +1993,23 @@ only matching traffic goes through. .. table:: RSS - +---------------+---------------------------------------------+ - | Field | Value | - +===============+=============================================+ - | ``func`` | RSS hash function to apply | - +---------------+---------------------------------------------+ - | ``level`` | encapsulation level for ``types`` | - +---------------+---------------------------------------------+ - | ``types`` | specific RSS hash types (see ``ETH_RSS_*``) | - +---------------+---------------------------------------------+ - | ``key_len`` | hash key length in bytes | - +---------------+---------------------------------------------+ - | ``queue_num`` | number of entries in ``queue`` | - +---------------+---------------------------------------------+ - | ``key`` | hash key | - +---------------+---------------------------------------------+ - | ``queue`` | queue indices to use | - +---------------+---------------------------------------------+ + +---------------+-------------------------------------------------+ + | Field | Value | + +===============+=================================================+ + | ``func`` | RSS hash function to apply | + +---------------+-------------------------------------------------+ + | ``level`` | encapsulation level for ``types`` | + +---------------+-------------------------------------------------+ + | ``types`` | specific RSS hash types (see ``RTE_ETH_RSS_*``) | + +---------------+-------------------------------------------------+ + | ``key_len`` | hash key length in bytes | + +---------------+-------------------------------------------------+ + | ``queue_num`` | number of entries in ``queue`` | + +---------------+-------------------------------------------------+ + | ``key`` | hash key | + +---------------+-------------------------------------------------+ + | ``queue`` | queue indices to use | + +---------------+-------------------------------------------------+ Action: ``PF`` ^^^^^^^^^^^^^^ @@ -2759,10 +2809,10 @@ Action: ``SET_META`` Set metadata. Item ``META`` matches metadata. -Metadata set by mbuf metadata field with PKT_TX_DYNF_METADATA flag on egress +Metadata set by mbuf metadata field with RTE_MBUF_DYNFLAG_TX_METADATA flag on egress will be overridden by this action. On ingress, the metadata will be carried by ``metadata`` dynamic field of ``rte_mbuf`` which can be accessed by -``RTE_FLOW_DYNF_METADATA()``. PKT_RX_DYNF_METADATA flag will be set along +``RTE_FLOW_DYNF_METADATA()``. RTE_MBUF_DYNFLAG_RX_METADATA flag will be set along with the data. The mbuf dynamic field must be registered by calling @@ -2959,6 +3009,22 @@ a packet to any other part of it. ``value`` sets an immediate value to be used as a source or points to a location of the value in memory. It is used instead of ``level`` and ``offset`` for ``RTE_FLOW_FIELD_VALUE`` and ``RTE_FLOW_FIELD_POINTER`` respectively. +The data in memory should be presented exactly in the same byte order and +length as in the relevant flow item, i.e. data for field with type +``RTE_FLOW_FIELD_MAC_DST`` should follow the conventions of ``dst`` field +in ``rte_flow_item_eth`` structure, with type ``RTE_FLOW_FIELD_IPV6_SRC`` - +``rte_flow_item_ipv6`` conventions, and so on. If the field size is larger than +16 bytes the pattern can be provided as pointer only. + +The bitfield extracted from the memory being applied as second operation +parameter is defined by action width and by the destination field offset. +Application should provide the data in immediate value memory (either as +buffer or by pointer) exactly as item field without any applied explicit offset, +and destination packet field (with specified width and bit offset) will be +replaced by immediate source bits from the same bit offset. For example, +to replace the third byte of MAC address with value 0x85, application should +specify destination width as 8, destination offset as 16, and provide immediate +value as sequence of bytes {xxx, xxx, 0x85, xxx, xxx, xxx}. .. _table_rte_flow_action_modify_field: @@ -2989,7 +3055,13 @@ for ``RTE_FLOW_FIELD_VALUE`` and ``RTE_FLOW_FIELD_POINTER`` respectively. +---------------+----------------------------------------------------------+ | ``offset`` | number of bits to skip at the beginning | +---------------+----------------------------------------------------------+ - | ``value`` | immediate value or a pointer to this value | + | ``value`` | immediate value buffer (source field only, not | + | | applicable to destination) for RTE_FLOW_FIELD_VALUE | + | | field type | + +---------------+----------------------------------------------------------+ + | ``pvalue`` | pointer to immediate value data (source field only, not | + | | applicable to destination) for RTE_FLOW_FIELD_POINTER | + | | field type | +---------------+----------------------------------------------------------+ Action: ``CONNTRACK``