+/**
+ * @internal
+ * Get Forward Error Correction(FEC) capability.
+ *
+ * @param dev
+ * ethdev handle of port.
+ * @param speed_fec_capa
+ * speed_fec_capa is out only with per-speed capabilities.
+ * @param num
+ * a number of elements in an speed_fec_capa array.
+ *
+ * @return
+ * Negative errno value on error, positive value on success.
+ *
+ * @retval positive value
+ * A non-negative value lower or equal to num: success. The return value
+ * is the number of entries filled in the fec capa array.
+ * A non-negative value higher than num: error, the given fec capa array
+ * is too small. The return value corresponds to the num that should
+ * be given to succeed. The entries in the fec capa array are not valid
+ * and shall not be used by the caller.
+ * @retval -ENOTSUP
+ * Operation is not supported.
+ * @retval -EIO
+ * Device is removed.
+ * @retval -EINVAL
+ * *num* or *speed_fec_capa* invalid.
+ */
+typedef int (*eth_fec_get_capability_t)(struct rte_eth_dev *dev,
+ struct rte_eth_fec_capa *speed_fec_capa, unsigned int num);
+
+/**
+ * @internal
+ * Get Forward Error Correction(FEC) mode.
+ *
+ * @param dev
+ * ethdev handle of port.
+ * @param fec_capa
+ * a bitmask of enabled FEC modes. If AUTO bit is set, other
+ * bits specify FEC modes which may be negotiated. If AUTO
+ * bit is clear, specify FEC modes to be used (only one valid
+ * mode per speed may be set).
+ *
+ * @return
+ * Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ * Success, get FEC success.
+ * @retval -ENOTSUP
+ * Operation is not supported.
+ * @retval -EIO
+ * Device is removed.
+ */
+typedef int (*eth_fec_get_t)(struct rte_eth_dev *dev,
+ uint32_t *fec_capa);
+
+/**
+ * @internal
+ * Set Forward Error Correction(FEC) mode.
+ *
+ * @param dev
+ * ethdev handle of port.
+ * @param fec_capa
+ * bitmask of allowed FEC modes. It must be only one
+ * if AUTO is disabled. If AUTO is enabled, other
+ * bits specify FEC modes which may be negotiated.
+ *
+ * @return
+ * Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ * Success, set FEC success.
+ * @retval -ENOTSUP
+ * Operation is not supported.
+ * @retval -EINVAL
+ * Unsupported FEC mode requested.
+ * @retval -EIO
+ * Device is removed.
+ */
+typedef int (*eth_fec_set_t)(struct rte_eth_dev *dev, uint32_t fec_capa);
+
+/**
+ * @internal
+ * Get all hairpin Tx/Rx peer ports of the current device, if any.
+ *
+ * @param dev
+ * ethdev handle of port.
+ * @param peer_ports
+ * array to save the ports list.
+ * @param len
+ * array length.
+ * @param direction
+ * value to decide the current to peer direction
+ * positive - used as Tx to get all peer Rx ports.
+ * zero - used as Rx to get all peer Tx ports.
+ *
+ * @return
+ * Negative errno value on error, 0 or positive on success.
+ *
+ * @retval 0
+ * Success, no peer ports.
+ * @retval >0
+ * Actual number of the peer ports.
+ * @retval -ENOTSUP
+ * Get peer ports API is not supported.
+ * @retval -EINVAL
+ * One of the parameters is invalid.
+ */
+typedef int (*hairpin_get_peer_ports_t)(struct rte_eth_dev *dev,
+ uint16_t *peer_ports, size_t len,
+ uint32_t direction);
+
+/**
+ * @internal
+ * Bind all hairpin Tx queues of one port to the Rx queues of the peer port.
+ *
+ * @param dev
+ * ethdev handle of port.
+ * @param rx_port
+ * the peer Rx port.
+ *
+ * @return
+ * Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ * Success, bind successfully.
+ * @retval -ENOTSUP
+ * Bind API is not supported.
+ * @retval -EINVAL
+ * One of the parameters is invalid.
+ * @retval -EBUSY
+ * Device is not started.
+ */
+typedef int (*eth_hairpin_bind_t)(struct rte_eth_dev *dev,
+ uint16_t rx_port);
+
+/**
+ * @internal
+ * Unbind all hairpin Tx queues of one port from the Rx queues of the peer port.
+ *
+ * @param dev
+ * ethdev handle of port.
+ * @param rx_port
+ * the peer Rx port.
+ *
+ * @return
+ * Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ * Success, unbind successfully.
+ * @retval -ENOTSUP
+ * Bind API is not supported.
+ * @retval -EINVAL
+ * One of the parameters is invalid.
+ * @retval -EBUSY
+ * Device is already stopped.
+ */
+typedef int (*eth_hairpin_unbind_t)(struct rte_eth_dev *dev,
+ uint16_t rx_port);
+
+typedef int (*eth_hairpin_queue_peer_update_t)
+ (struct rte_eth_dev *dev, uint16_t peer_queue,
+ struct rte_hairpin_peer_info *current_info,
+ struct rte_hairpin_peer_info *peer_info, uint32_t direction);
+/**< @internal Update and fetch peer queue information. */
+
+typedef int (*eth_hairpin_queue_peer_bind_t)
+ (struct rte_eth_dev *dev, uint16_t cur_queue,
+ struct rte_hairpin_peer_info *peer_info, uint32_t direction);
+/**< @internal Bind peer queue to the current queue with fetched information. */
+
+typedef int (*eth_hairpin_queue_peer_unbind_t)
+ (struct rte_eth_dev *dev, uint16_t cur_queue, uint32_t direction);
+/**< @internal Unbind peer queue from the current queue. */
+