ipc: end multiprocess thread during cleanup
[dpdk.git] / lib / ethdev / ethdev_driver.h
index b530ac6..1c5b58f 100644 (file)
@@ -114,7 +114,7 @@ struct rte_eth_dev_data {
        /** Device Ethernet link address. @see rte_eth_dev_release_port() */
        struct rte_ether_addr *mac_addrs;
        /** Bitmap associating MAC addresses to pools */
-       uint64_t mac_pool_sel[ETH_NUM_RECEIVE_MAC_ADDR];
+       uint64_t mac_pool_sel[RTE_ETH_NUM_RECEIVE_MAC_ADDR];
        /**
         * Device Ethernet MAC addresses of hash filtering.
         * @see rte_eth_dev_release_port()
@@ -227,7 +227,7 @@ typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev);
  * @retval -E_RTE_SECONDARY
  *   Function was called from a secondary process instance and not supported.
  * @retval -ETIMEDOUT
- *   Attempt to enable promiscuos mode failed because of timeout.
+ *   Attempt to enable promiscuous mode failed because of timeout.
  * @retval -EAGAIN
  *   Failed to enable promiscuous mode.
  */
@@ -252,7 +252,7 @@ typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev);
  * @retval -E_RTE_SECONDARY
  *   Function was called from a secondary process instance and not supported.
  * @retval -ETIMEDOUT
- *   Attempt to disable promiscuos mode failed because of timeout.
+ *   Attempt to disable promiscuous mode failed because of timeout.
  * @retval -EAGAIN
  *   Failed to disable promiscuous mode.
  */
@@ -533,6 +533,13 @@ typedef int (*flow_ctrl_set_t)(struct rte_eth_dev *dev,
 typedef int (*priority_flow_ctrl_set_t)(struct rte_eth_dev *dev,
                                struct rte_eth_pfc_conf *pfc_conf);
 
+/** @internal Get info for queue based PFC on an Ethernet device. */
+typedef int (*priority_flow_ctrl_queue_info_get_t)(struct rte_eth_dev *dev,
+                       struct rte_eth_pfc_queue_info *pfc_queue_info);
+/** @internal Configure queue based PFC parameter on an Ethernet device. */
+typedef int (*priority_flow_ctrl_queue_config_t)(struct rte_eth_dev *dev,
+                       struct rte_eth_pfc_queue_conf *pfc_queue_conf);
+
 /** @internal Update RSS redirection table on an Ethernet device. */
 typedef int (*reta_update_t)(struct rte_eth_dev *dev,
                             struct rte_eth_rss_reta_entry64 *reta_conf,
@@ -1080,6 +1087,10 @@ struct eth_dev_ops {
        flow_ctrl_set_t            flow_ctrl_set; /**< Setup flow control */
        /** Setup priority flow control */
        priority_flow_ctrl_set_t   priority_flow_ctrl_set;
+       /** Priority flow control queue info get */
+       priority_flow_ctrl_queue_info_get_t priority_flow_ctrl_queue_info_get;
+       /** Priority flow control queue configure */
+       priority_flow_ctrl_queue_config_t priority_flow_ctrl_queue_config;
 
        /** Set Unicast Table Array */
        eth_uc_hash_table_set_t    uc_hash_table_set;
@@ -1629,6 +1640,24 @@ rte_eth_hairpin_queue_peer_bind(uint16_t cur_port, uint16_t cur_queue,
                                struct rte_hairpin_peer_info *peer_info,
                                uint32_t direction);
 
+/**
+ * @internal
+ * Get rte_eth_dev from device name. The device name should be specified
+ * as below:
+ * - PCIe address (Domain:Bus:Device.Function), for example 0000:2:00.0
+ * - SoC device name, for example fsl-gmac0
+ * - vdev dpdk name, for example net_[pcap0|null0|tap0]
+ *
+ * @param name
+ *   PCI address or name of the device
+ * @return
+ *   - rte_eth_dev if successful
+ *   - NULL on failure
+ */
+__rte_internal
+struct rte_eth_dev*
+rte_eth_dev_get_by_name(const char *name);
+
 /**
  * @internal
  * Reset the current queue state and configuration to disconnect (unbind) it
@@ -1700,23 +1729,23 @@ struct rte_eth_syn_filter {
 /**
  * filter type of tunneling packet
  */
-#define ETH_TUNNEL_FILTER_OMAC  0x01 /**< filter by outer MAC addr */
-#define ETH_TUNNEL_FILTER_OIP   0x02 /**< filter by outer IP Addr */
-#define ETH_TUNNEL_FILTER_TENID 0x04 /**< filter by tenant ID */
-#define ETH_TUNNEL_FILTER_IMAC  0x08 /**< filter by inner MAC addr */
-#define ETH_TUNNEL_FILTER_IVLAN 0x10 /**< filter by inner VLAN ID */
-#define ETH_TUNNEL_FILTER_IIP   0x20 /**< filter by inner IP addr */
-
-#define RTE_TUNNEL_FILTER_IMAC_IVLAN (ETH_TUNNEL_FILTER_IMAC | \
-                                       ETH_TUNNEL_FILTER_IVLAN)
-#define RTE_TUNNEL_FILTER_IMAC_IVLAN_TENID (ETH_TUNNEL_FILTER_IMAC | \
-                                       ETH_TUNNEL_FILTER_IVLAN | \
-                                       ETH_TUNNEL_FILTER_TENID)
-#define RTE_TUNNEL_FILTER_IMAC_TENID (ETH_TUNNEL_FILTER_IMAC | \
-                                       ETH_TUNNEL_FILTER_TENID)
-#define RTE_TUNNEL_FILTER_OMAC_TENID_IMAC (ETH_TUNNEL_FILTER_OMAC | \
-                                       ETH_TUNNEL_FILTER_TENID | \
-                                       ETH_TUNNEL_FILTER_IMAC)
+#define RTE_ETH_TUNNEL_FILTER_OMAC  0x01 /**< filter by outer MAC addr */
+#define RTE_ETH_TUNNEL_FILTER_OIP   0x02 /**< filter by outer IP Addr */
+#define RTE_ETH_TUNNEL_FILTER_TENID 0x04 /**< filter by tenant ID */
+#define RTE_ETH_TUNNEL_FILTER_IMAC  0x08 /**< filter by inner MAC addr */
+#define RTE_ETH_TUNNEL_FILTER_IVLAN 0x10 /**< filter by inner VLAN ID */
+#define RTE_ETH_TUNNEL_FILTER_IIP   0x20 /**< filter by inner IP addr */
+
+#define RTE_ETH_TUNNEL_FILTER_IMAC_IVLAN (RTE_ETH_TUNNEL_FILTER_IMAC | \
+                                         RTE_ETH_TUNNEL_FILTER_IVLAN)
+#define RTE_ETH_TUNNEL_FILTER_IMAC_IVLAN_TENID (RTE_ETH_TUNNEL_FILTER_IMAC | \
+                                               RTE_ETH_TUNNEL_FILTER_IVLAN | \
+                                               RTE_ETH_TUNNEL_FILTER_TENID)
+#define RTE_ETH_TUNNEL_FILTER_IMAC_TENID (RTE_ETH_TUNNEL_FILTER_IMAC | \
+                                         RTE_ETH_TUNNEL_FILTER_TENID)
+#define RTE_ETH_TUNNEL_FILTER_OMAC_TENID_IMAC (RTE_ETH_TUNNEL_FILTER_OMAC | \
+                                              RTE_ETH_TUNNEL_FILTER_TENID | \
+                                              RTE_ETH_TUNNEL_FILTER_IMAC)
 
 /**
  *  Select IPv4 or IPv6 for tunnel filters.