ethdev: remove old syn filter API
[dpdk.git] / lib / librte_ether / rte_eth_ctrl.h
index 0ce241e..8748b87 100644 (file)
@@ -53,6 +53,8 @@ enum rte_filter_type {
        RTE_ETH_FILTER_NONE = 0,
        RTE_ETH_FILTER_MACVLAN,
        RTE_ETH_FILTER_ETHERTYPE,
+       RTE_ETH_FILTER_FLEXIBLE,
+       RTE_ETH_FILTER_SYN,
        RTE_ETH_FILTER_TUNNEL,
        RTE_ETH_FILTER_FDIR,
        RTE_ETH_FILTER_HASH,
@@ -116,6 +118,36 @@ struct rte_eth_ethertype_filter {
        uint16_t queue;               /**< Queue assigned to when match*/
 };
 
+#define RTE_FLEX_FILTER_MAXLEN 128     /**< bytes to use in flex filter. */
+#define RTE_FLEX_FILTER_MASK_SIZE      \
+       (RTE_ALIGN(RTE_FLEX_FILTER_MAXLEN, CHAR_BIT) / CHAR_BIT)
+                                       /**< mask bytes in flex filter. */
+
+/**
+ *  A structure used to define the flex filter entry
+ *  to support RTE_ETH_FILTER_FLEXIBLE with RTE_ETH_FILTER_ADD,
+ *  RTE_ETH_FILTER_DELETE and RTE_ETH_FILTER_GET operations.
+ */
+struct rte_eth_flex_filter {
+       uint16_t len;
+       uint8_t bytes[RTE_FLEX_FILTER_MAXLEN];  /**< flex bytes in big endian.*/
+       uint8_t mask[RTE_FLEX_FILTER_MASK_SIZE];    /**< if mask bit is 1b, do
+                                       not compare corresponding byte. */
+       uint8_t priority;
+       uint16_t queue;       /**< Queue assigned to when match. */
+};
+
+/**
+ * A structure used to define the TCP syn filter entry
+ * to support RTE_ETH_FILTER_SYN with RTE_ETH_FILTER_ADD,
+ * RTE_ETH_FILTER_DELETE and RTE_ETH_FILTER_GET operations.
+ */
+struct rte_eth_syn_filter {
+       uint8_t hig_pri;     /**< 1 - higher priority than other filters,
+                                 0 - lower priority. */
+       uint16_t queue;      /**< Queue assigned to when match */
+};
+
 /**
  * Tunneled type.
  */
@@ -183,6 +215,7 @@ struct rte_eth_tunnel_filter_conf {
  */
 enum rte_eth_flow_type {
        RTE_ETH_FLOW_TYPE_NONE = 0,
+       RTE_ETH_FLOW_TYPE_RAW,
        RTE_ETH_FLOW_TYPE_UDPV4,
        RTE_ETH_FLOW_TYPE_TCPV4,
        RTE_ETH_FLOW_TYPE_SCTPV4,
@@ -342,11 +375,24 @@ struct rte_eth_fdir_filter {
        struct rte_eth_fdir_action action;  /**< Action taken when match */
 };
 
+/**
+ *  A structure used to configure FDIR masks that are used by the device
+ *  to match the various fields of RX packet headers.
+ */
+struct rte_eth_fdir_masks {
+       uint16_t vlan_tci_mask;
+       struct rte_eth_ipv4_flow   ipv4_mask;
+       struct rte_eth_ipv6_flow   ipv6_mask;
+       uint16_t src_port_mask;
+       uint16_t dst_port_mask;
+};
+
 /**
  * Payload type
  */
 enum rte_eth_payload_type {
        RTE_ETH_PAYLOAD_UNKNOWN = 0,
+       RTE_ETH_RAW_PAYLOAD,
        RTE_ETH_L2_PAYLOAD,
        RTE_ETH_L3_PAYLOAD,
        RTE_ETH_L4_PAYLOAD,
@@ -407,6 +453,7 @@ enum rte_fdir_mode {
  */
 struct rte_eth_fdir_info {
        enum rte_fdir_mode mode;     /**< Flow director mode */
+       struct rte_eth_fdir_masks mask;
        struct rte_eth_fdir_flex_conf flex_conf;
        /**< Flex payload configuration information */
        uint32_t guarant_spc;          /**< Guaranteed spaces.*/