ethdev: support flow aging
[dpdk.git] / lib / librte_ethdev / rte_ethdev.h
index 18a9def..2dba2ea 100644 (file)
@@ -158,6 +158,7 @@ extern "C" {
 #include <rte_config.h>
 #include <rte_ether.h>
 
+#include "rte_ethdev_trace_fp.h"
 #include "rte_dev_info.h"
 
 extern int rte_eth_dev_logtype;
@@ -310,7 +311,7 @@ struct rte_eth_link {
        uint16_t link_duplex  : 1;  /**< ETH_LINK_[HALF/FULL]_DUPLEX */
        uint16_t link_autoneg : 1;  /**< ETH_LINK_[AUTONEG/FIXED] */
        uint16_t link_status  : 1;  /**< ETH_LINK_[DOWN/UP] */
-} __attribute__((aligned(8)));      /**< aligned for atomic64 read/write */
+} __rte_aligned(8);      /**< aligned for atomic64 read/write */
 
 /* Utility constants */
 #define ETH_LINK_HALF_DUPLEX 0 /**< Half-duplex connection (see link_duplex). */
@@ -511,6 +512,9 @@ struct rte_eth_rss_conf {
 #define ETH_RSS_GENEVE             (1ULL << 20)
 #define ETH_RSS_NVGRE              (1ULL << 21)
 #define ETH_RSS_GTPU               (1ULL << 23)
+#define ETH_RSS_ESP                (1ULL << 27)
+#define ETH_RSS_AH                 (1ULL << 28)
+
 
 /*
  * We use the following macros to combine with above ETH_RSS_* for
@@ -1196,7 +1200,7 @@ struct rte_eth_dev_portconf {
  * Default values for switch domain id when ethdev does not support switch
  * domain definitions.
  */
-#define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID   (0)
+#define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID   (UINT16_MAX)
 
 /**
  * Ethernet device associated switch information
@@ -3015,6 +3019,7 @@ enum rte_eth_event_type {
        RTE_ETH_EVENT_NEW,      /**< port is probed */
        RTE_ETH_EVENT_DESTROY,  /**< port is released */
        RTE_ETH_EVENT_IPSEC,    /**< IPsec offload related event */
+       RTE_ETH_EVENT_FLOW_AGED,/**< New aged-out flows is detected */
        RTE_ETH_EVENT_MAX       /**< max value of this enum */
 };
 
@@ -4400,6 +4405,7 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
        }
 #endif
 
+       rte_ethdev_trace_rx_burst(port_id, queue_id, (void **)rx_pkts, nb_rx);
        return nb_rx;
 }
 
@@ -4663,6 +4669,8 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
        }
 #endif
 
+       rte_ethdev_trace_tx_burst(port_id, queue_id, (void **)tx_pkts,
+               nb_pkts);
        return (*dev->tx_pkt_burst)(dev->data->tx_queues[queue_id], tx_pkts, nb_pkts);
 }