X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_ethdev%2Frte_flow.h;h=706dcfbda4182b6400dab2d11cd4573d87d41652;hb=99ef90317da69a5e6ecc831ad05c6d2053e2b065;hp=452d359a16db6045a73836e938a07a6fecdebe45;hpb=9bf26e1318e3cd7a04115c8201255505e90cab83;p=dpdk.git diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h index 452d359a16..706dcfbda4 100644 --- a/lib/librte_ethdev/rte_flow.h +++ b/lib/librte_ethdev/rte_flow.h @@ -502,7 +502,7 @@ enum rte_flow_item_type { */ RTE_FLOW_ITEM_TYPE_HIGIG2, - /* + /** * [META] * * Matches a tag value. @@ -510,6 +510,16 @@ enum rte_flow_item_type { * See struct rte_flow_item_tag. */ RTE_FLOW_ITEM_TYPE_TAG, + + /** + * Matches a L2TPv3 over IP header. + * + * Configure flow for L2TPv3 over IP packets. + * + * See struct rte_flow_item_l2tpv3oip. + */ + RTE_FLOW_ITEM_TYPE_L2TPV3OIP, + }; /** @@ -1373,6 +1383,23 @@ static const struct rte_flow_item_tag rte_flow_item_tag_mask = { }; #endif +/** + * RTE_FLOW_ITEM_TYPE_L2TPV3OIP. + * + * Matches a L2TPv3 over IP header. + */ +struct rte_flow_item_l2tpv3oip { + rte_be32_t session_id; /**< Session ID. */ +}; + +/** Default mask for RTE_FLOW_ITEM_TYPE_L2TPV3OIP. */ +#ifndef __cplusplus +static const struct rte_flow_item_l2tpv3oip rte_flow_item_l2tpv3oip_mask = { + .session_id = RTE_BE32(UINT32_MAX), +}; +#endif + + /** * @warning * @b EXPERIMENTAL: this structure may change without prior notice @@ -2004,6 +2031,26 @@ enum rte_flow_action_type { * See struct rte_flow_action_set_meta. */ RTE_FLOW_ACTION_TYPE_SET_META, + + /** + * Modify IPv4 DSCP in the outermost IP header. + * + * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_IPV4, + * then the PMD should return a RTE_FLOW_ERROR_TYPE_ACTION error. + * + * See struct rte_flow_action_set_dscp. + */ + RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP, + + /** + * Modify IPv6 DSCP in the outermost IP header. + * + * If flow pattern does not define a valid RTE_FLOW_ITEM_TYPE_IPV6, + * then the PMD should return a RTE_FLOW_ERROR_TYPE_ACTION error. + * + * See struct rte_flow_action_set_dscp. + */ + RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP, }; /** @@ -2530,6 +2577,17 @@ struct rte_flow_action_set_meta { uint32_t mask; }; +/** + * RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP + * RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP + * + * Set the DSCP value for IPv4/IPv6 header. + * DSCP in low 6 bits, rest ignored. + */ +struct rte_flow_action_set_dscp { + uint8_t dscp; +}; + /* Mbuf dynamic field offset for metadata. */ extern int rte_flow_dynf_metadata_offs;