net/bonding: convert to dynamic logging
[dpdk.git] / lib / librte_ether / rte_ethdev.h
index b9eb8ae..7ccf4ba 100644 (file)
@@ -980,6 +980,23 @@ struct rte_eth_conf {
  *   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
@@ -1009,6 +1026,28 @@ struct rte_eth_dev_portconf {
        uint16_t nb_queues; /**< Device-preferred number of queues */
 };
 
+/**
+ * Default values for switch domain id when ethdev does not support switch
+ * domain definitions.
+ */
+#define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID   (0)
+
+/**
+ * Ethernet device associated switch information
+ */
+struct rte_eth_switch_info {
+       const char *name;       /**< switch name */
+       uint16_t domain_id;     /**< switch domain id */
+       uint16_t port_id;
+       /**<
+        * mapping to the devices physical switch port as enumerated from the
+        * perspective of the embedded interconnect/switch. For SR-IOV enabled
+        * device this may correspond to the VF_ID of each virtual function,
+        * but each driver should explicitly define the mapping of switch
+        * port identifier to that physical interconnect/switch
+        */
+};
+
 /**
  * Ethernet device information
  */
@@ -1017,6 +1056,7 @@ struct rte_eth_dev_info {
        const char *driver_name; /**< Device Driver name. */
        unsigned int if_index; /**< Index to bound host interface, or 0 if none.
                Use if_indextoname() to translate into an interface name. */
+       const uint32_t *dev_flags; /**< Device flags */
        uint32_t min_rx_bufsize; /**< Minimum size of RX buffer. */
        uint32_t max_rx_pktlen; /**< Maximum configurable length of RX pkt. */
        uint16_t max_rx_queues; /**< Maximum number of RX queues. */
@@ -1054,6 +1094,13 @@ struct rte_eth_dev_info {
        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;
+       /**
+        * Switching information for ports on a device with a
+        * embedded managed interconnect/switch.
+        */
+       struct rte_eth_switch_info switch_info;
 };
 
 /**
@@ -1256,11 +1303,10 @@ struct rte_eth_dev_owner {
 #define RTE_ETH_DEV_BONDED_SLAVE 0x0004
 /** Device supports device removal interrupt */
 #define RTE_ETH_DEV_INTR_RMV     0x0008
+/** Device is port representor */
+#define RTE_ETH_DEV_REPRESENTOR  0x0010
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * Iterates over valid ethdev ports owned by a specific owner.
  *
  * @param port_id
@@ -1271,7 +1317,7 @@ struct rte_eth_dev_owner {
  * @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);
 
 /**
@@ -1398,7 +1444,7 @@ uint16_t rte_eth_dev_count(void);
  * @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.
@@ -3351,6 +3397,49 @@ int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
  */
 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.
  *