X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_ethdev%2Frte_flow.h;h=354cb1dd0f9269dc26270ab822ba8a0835f5640d;hb=fbb25a3878cc7c6de4c68c8cee01983d127e2205;hp=0e4e3a5a59b8a30b86c948a5b2c3f032ae9b7b13;hpb=09d9ae1ac9820c216991edc0d3c853fe28d37a66;p=dpdk.git diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h index 0e4e3a5a59..354cb1dd0f 100644 --- a/lib/librte_ethdev/rte_flow.h +++ b/lib/librte_ethdev/rte_flow.h @@ -421,6 +421,19 @@ enum rte_flow_item_type { * See struct rte_flow_item_meta. */ RTE_FLOW_ITEM_TYPE_META, + + /** + * Matches a GRE optional key field. + * + * The value should a big-endian 32bit integer. + * + * When this item present the K bit is implicitly matched as "1" + * in the default mask. + * + * @p spec/mask type: + * @code rte_be32_t * @endcode + */ + RTE_FLOW_ITEM_TYPE_GRE_KEY, }; /** @@ -692,7 +705,7 @@ static const struct rte_flow_item_icmp rte_flow_item_icmp_mask = { * Matches a UDP header. */ struct rte_flow_item_udp { - struct udp_hdr hdr; /**< UDP header definition. */ + struct rte_udp_hdr hdr; /**< UDP header definition. */ }; /** Default mask for RTE_FLOW_ITEM_TYPE_UDP. */ @@ -711,7 +724,7 @@ static const struct rte_flow_item_udp rte_flow_item_udp_mask = { * Matches a TCP header. */ struct rte_flow_item_tcp { - struct tcp_hdr hdr; /**< TCP header definition. */ + struct rte_tcp_hdr hdr; /**< TCP header definition. */ }; /** Default mask for RTE_FLOW_ITEM_TYPE_TCP. */ @@ -922,7 +935,7 @@ struct rte_flow_item_esp { #ifndef __cplusplus static const struct rte_flow_item_esp rte_flow_item_esp_mask = { .hdr = { - .spi = 0xffffffff, + .spi = RTE_BE32(0xffffffff), }, }; #endif @@ -1244,9 +1257,10 @@ struct rte_flow_item { /** * Action types. * - * Each possible action is represented by a type. Some have associated - * configuration structures. Several actions combined in a list can be - * assigned to a flow rule and are performed in order. + * Each possible action is represented by a type. + * An action can have an associated configuration object. + * Several actions combined in a list can be assigned + * to a flow rule and are performed in order. * * They fall in three categories: * @@ -1650,6 +1664,62 @@ enum rte_flow_action_type { * See struct rte_flow_action_set_mac. */ RTE_FLOW_ACTION_TYPE_SET_MAC_DST, + + /** + * Increase sequence number in the outermost TCP header. + * + * Action configuration specifies the value to increase + * TCP sequence number as a big-endian 32 bit integer. + * + * @p conf type: + * @code rte_be32_t * @endcode + * + * Using this action on non-matching traffic will result in + * undefined behavior. + */ + RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ, + + /** + * Decrease sequence number in the outermost TCP header. + * + * Action configuration specifies the value to decrease + * TCP sequence number as a big-endian 32 bit integer. + * + * @p conf type: + * @code rte_be32_t * @endcode + * + * Using this action on non-matching traffic will result in + * undefined behavior. + */ + RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ, + + /** + * Increase acknowledgment number in the outermost TCP header. + * + * Action configuration specifies the value to increase + * TCP acknowledgment number as a big-endian 32 bit integer. + * + * @p conf type: + * @code rte_be32_t * @endcode + + * Using this action on non-matching traffic will result in + * undefined behavior. + */ + RTE_FLOW_ACTION_TYPE_INC_TCP_ACK, + + /** + * Decrease acknowledgment number in the outermost TCP header. + * + * Action configuration specifies the value to decrease + * TCP acknowledgment number as a big-endian 32 bit integer. + * + * @p conf type: + * @code rte_be32_t * @endcode + * + * Using this action on non-matching traffic will result in + * undefined behavior. + */ + RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK, }; /** @@ -2136,11 +2206,11 @@ struct rte_flow_action_set_mac { * * A list of actions is terminated by a END action. * - * For simple actions without a configuration structure, conf remains NULL. + * For simple actions without a configuration object, conf remains NULL. */ struct rte_flow_action { enum rte_flow_action_type type; /**< Action type. */ - const void *conf; /**< Pointer to action configuration structure. */ + const void *conf; /**< Pointer to action configuration object. */ }; /**