X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_ethdev%2Frte_flow.h;h=da8bfa54899a6d5170ce7d0368b91ef3d277d86b;hb=a748d24d797aa8560913735e719a22059a2b9e8c;hp=fab44f6c0ba0f0463ea3291bee50bb6d1ff8f0c4;hpb=44bf3c796be3f747eba5d4904d93614ff300e688;p=dpdk.git diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h index fab44f6c0b..da8bfa5489 100644 --- a/lib/librte_ethdev/rte_flow.h +++ b/lib/librte_ethdev/rte_flow.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -527,6 +528,15 @@ enum rte_flow_item_type { */ RTE_FLOW_ITEM_TYPE_PFCP, + /** + * Matches eCPRI Header. + * + * Configure flow for eCPRI over ETH or UDP packets. + * + * See struct rte_flow_item_ecpri. + */ + RTE_FLOW_ITEM_TYPE_ECPRI, + }; /** @@ -710,6 +720,12 @@ static const struct rte_flow_item_raw rte_flow_item_raw_mask = { * the latter case, @p type refers to that of the outer header, with the * inner EtherType/TPID provided by the subsequent pattern item. This is the * same order as on the wire. + * If the @p type field contains a TPID value, then only tagged packets with the + * specified TPID will match the pattern. + * Otherwise, only untagged packets will match the pattern. + * If the @p ETH item is the only item in the pattern, and the @p type field + * is not specified, then both tagged and untagged packets will match the + * pattern. */ struct rte_flow_item_eth { struct rte_ether_addr dst; /**< Destination MAC. */ @@ -734,6 +750,8 @@ static const struct rte_flow_item_eth rte_flow_item_eth_mask = { * The corresponding standard outer EtherType (TPID) values are * RTE_ETHER_TYPE_VLAN or RTE_ETHER_TYPE_QINQ. It can be overridden by * the preceding pattern item. + * If a @p VLAN item is present in the pattern, then only tagged packets will + * match the pattern. */ struct rte_flow_item_vlan { rte_be16_t tci; /**< Tag control information. */ @@ -1534,7 +1552,30 @@ struct rte_flow_item_pfcp { #ifndef __cplusplus static const struct rte_flow_item_pfcp rte_flow_item_pfcp_mask = { .s_field = 0x01, - .seid = RTE_BE64(0xffffffffffffffff), + .seid = RTE_BE64(UINT64_C(0xffffffffffffffff)), +}; +#endif + +/** + * @warning + * @b EXPERIMENTAL: this structure may change without prior notice + * + * RTE_FLOW_ITEM_TYPE_ECPRI + * + * Match eCPRI Header + */ +struct rte_flow_item_ecpri { + struct rte_ecpri_combined_msg_hdr hdr; +}; + +/** Default mask for RTE_FLOW_ITEM_TYPE_ECPRI. */ +#ifndef __cplusplus +static const struct rte_flow_item_ecpri rte_flow_item_ecpri_mask = { + .hdr = { + .common = { + .u32 = 0x0, + }, + }, }; #endif @@ -2653,7 +2694,7 @@ struct rte_flow_action_set_dscp { }; /* Mbuf dynamic field offset for metadata. */ -extern int rte_flow_dynf_metadata_offs; +extern int32_t rte_flow_dynf_metadata_offs; /* Mbuf dynamic field flag mask for metadata. */ extern uint64_t rte_flow_dynf_metadata_mask;