* the same mempool and has refcnt = 1.
*/
#define DEV_TX_OFFLOAD_SECURITY 0x00020000
+/**
+ * Device supports generic UDP tunneled packet TSO.
+ * Application must set PKT_TX_TUNNEL_UDP and other mbuf fields required
+ * for tunnel TSO.
+ */
+#define DEV_TX_OFFLOAD_UDP_TNL_TSO 0x00040000
+/**
+ * Device supports generic IP tunneled packet TSO.
+ * Application must set PKT_TX_TUNNEL_IP and other mbuf fields required
+ * for tunnel TSO.
+ */
+#define DEV_TX_OFFLOAD_IP_TNL_TSO 0x00080000
+
+#define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP 0x00000001
+/**< Device supports Rx queue setup after device started*/
+#define RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP 0x00000002
+/**< Device supports Tx queue setup after device started*/
/*
* If new Tx offload capabilities are defined, they also must be
struct rte_eth_dev_portconf default_rxportconf;
/** Tx parameter recommendations */
struct rte_eth_dev_portconf default_txportconf;
+ /** Generic device capabilities (RTE_ETH_DEV_CAPA_). */
+ uint64_t dev_capa;
};
/**
#define RTE_ETH_DEV_INTR_RMV 0x0008
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
* Iterates over valid ethdev ports owned by a specific owner.
*
* @param port_id
* @return
* Next valid port id owned by owner_id, RTE_MAX_ETHPORTS if there is none.
*/
-uint64_t __rte_experimental rte_eth_find_next_owned_by(uint16_t port_id,
+uint64_t rte_eth_find_next_owned_by(uint16_t port_id,
const uint64_t owner_id);
/**
* @return
* The count of available Ethernet devices.
*/
-uint16_t __rte_experimental rte_eth_dev_count_avail(void);
+uint16_t rte_eth_dev_count_avail(void);
/**
* Get the total number of ports which are allocated.
int
rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt);
+/**
+ * Subtypes for IPsec offload event(@ref RTE_ETH_EVENT_IPSEC) raised by
+ * eth device.
+ */
+enum rte_eth_event_ipsec_subtype {
+ RTE_ETH_EVENT_IPSEC_UNKNOWN = 0,
+ /**< Unknown event type */
+ RTE_ETH_EVENT_IPSEC_ESN_OVERFLOW,
+ /**< Sequence number overflow */
+ RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY,
+ /**< Soft time expiry of SA */
+ RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY,
+ /**< Soft byte expiry of SA */
+ RTE_ETH_EVENT_IPSEC_MAX
+ /**< Max value of this enum */
+};
+
+/**
+ * Descriptor for @ref RTE_ETH_EVENT_IPSEC event. Used by eth dev to send extra
+ * information of the IPsec offload event.
+ */
+struct rte_eth_event_ipsec_desc {
+ enum rte_eth_event_ipsec_subtype subtype;
+ /**< Type of RTE_ETH_EVENT_IPSEC_* event */
+ uint64_t metadata;
+ /**< Event specific metadata
+ *
+ * For the following events, *userdata* registered
+ * with the *rte_security_session* would be returned
+ * as metadata,
+ *
+ * - @ref RTE_ETH_EVENT_IPSEC_ESN_OVERFLOW
+ * - @ref RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY
+ * - @ref RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY
+ *
+ * @see struct rte_security_session_conf
+ *
+ */
+};
+
/**
* The eth device event type for interrupt, and maybe others in the future.
*/
RTE_ETH_EVENT_INTR_RMV, /**< device removal event */
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_MAX /**< max value of this enum */
};
*/
int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Retrieve the type and size of plugin module EEPROM
+ *
+ * @param port_id
+ * The port identifier of the Ethernet device.
+ * @param modinfo
+ * The type and size of plugin module EEPROM.
+ * @return
+ * - (0) if successful.
+ * - (-ENOTSUP) if hardware doesn't support.
+ * - (-ENODEV) if *port_id* invalid.
+ * - (-EIO) if device is removed.
+ * - others depends on the specific operations implementation.
+ */
+int __rte_experimental
+rte_eth_dev_get_module_info(uint16_t port_id,
+ struct rte_eth_dev_module_info *modinfo);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Retrieve the data of plugin module EEPROM
+ *
+ * @param port_id
+ * The port identifier of the Ethernet device.
+ * @param info
+ * The template includes the plugin module EEPROM attributes, and the
+ * buffer for return plugin module EEPROM data.
+ * @return
+ * - (0) if successful.
+ * - (-ENOTSUP) if hardware doesn't support.
+ * - (-ENODEV) if *port_id* invalid.
+ * - (-EIO) if device is removed.
+ * - others depends on the specific operations implementation.
+ */
+int __rte_experimental
+rte_eth_dev_get_module_eeprom(uint16_t port_id,
+ struct rte_dev_eeprom_info *info);
+
/**
* Set the list of multicast addresses to filter on an Ethernet device.
*
* invoke this function concurrently on the same tx queue without SW lock.
* @see rte_eth_dev_info_get, struct rte_eth_txconf::txq_flags
*
+ * @see rte_eth_tx_prepare to perform some prior checks or adjustments
+ * for offloads.
+ *
* @param port_id
* The port identifier of the Ethernet device.
* @param queue_id