X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Fethdev%2Fethdev_driver.h;h=69d9dc21d8c4e642cfa0dc13862e46cb70f2c342;hb=ea0d681efa86cb8902d93409679e3ac507755345;hp=1c5b58faa4b4d862f6ec61ab2f602780dc86fab7;hpb=0de345e9a0db54caea2e4c461a1c244d818442d2;p=dpdk.git diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h index 1c5b58faa4..69d9dc21d8 100644 --- a/lib/ethdev/ethdev_driver.h +++ b/lib/ethdev/ethdev_driver.h @@ -5,6 +5,10 @@ #ifndef _RTE_ETHDEV_DRIVER_H_ #define _RTE_ETHDEV_DRIVER_H_ +#ifdef __cplusplus +extern "C" { +#endif + /** * @file * @@ -138,7 +142,12 @@ struct rte_eth_dev_data { * Indicates whether the device is configured: * CONFIGURED(1) / NOT CONFIGURED(0) */ - dev_configured : 1; + dev_configured : 1, + /** + * Indicates whether the flow engine is configured: + * CONFIGURED(1) / NOT CONFIGURED(0) + */ + flow_configured : 1; /** Queues state: HAIRPIN(2) / STARTED(1) / STOPPED(0) */ uint8_t rx_queue_state[RTE_MAX_QUEUES_PER_PORT]; @@ -997,6 +1006,73 @@ typedef int (*eth_representor_info_get_t)(struct rte_eth_dev *dev, typedef int (*eth_rx_metadata_negotiate_t)(struct rte_eth_dev *dev, uint64_t *features); +/** + * @internal + * Get IP reassembly offload capability of a PMD. + * + * @param dev + * Port (ethdev) handle + * + * @param[out] conf + * IP reassembly capability supported by the PMD + * + * @return + * Negative errno value on error, zero otherwise + */ +typedef int (*eth_ip_reassembly_capability_get_t)(struct rte_eth_dev *dev, + struct rte_eth_ip_reassembly_params *capa); + +/** + * @internal + * Get IP reassembly offload configuration parameters set in PMD. + * + * @param dev + * Port (ethdev) handle + * + * @param[out] conf + * Configuration parameters for IP reassembly. + * + * @return + * Negative errno value on error, zero otherwise + */ +typedef int (*eth_ip_reassembly_conf_get_t)(struct rte_eth_dev *dev, + struct rte_eth_ip_reassembly_params *conf); + +/** + * @internal + * Set configuration parameters for enabling IP reassembly offload in hardware. + * + * @param dev + * Port (ethdev) handle + * + * @param[in] conf + * Configuration parameters for IP reassembly. + * + * @return + * Negative errno value on error, zero otherwise + */ +typedef int (*eth_ip_reassembly_conf_set_t)(struct rte_eth_dev *dev, + const struct rte_eth_ip_reassembly_params *conf); + +/** + * @internal + * Dump private info from device to a file. + * + * @param dev + * Port (ethdev) handle. + * @param file + * A pointer to a file for output. + * + * @return + * Negative value on error, 0 on success. + * + * @retval 0 + * Success + * @retval -EINVAL + * Invalid file + */ +typedef int (*eth_dev_priv_dump_t)(struct rte_eth_dev *dev, FILE *file); + /** * @internal A structure containing the functions exported by an Ethernet driver. */ @@ -1197,6 +1273,16 @@ struct eth_dev_ops { * kinds of metadata to the PMD */ eth_rx_metadata_negotiate_t rx_metadata_negotiate; + + /** Get IP reassembly capability */ + eth_ip_reassembly_capability_get_t ip_reassembly_capability_get; + /** Get IP reassembly configuration */ + eth_ip_reassembly_conf_get_t ip_reassembly_conf_get; + /** Set IP reassembly configuration */ + eth_ip_reassembly_conf_set_t ip_reassembly_conf_set; + + /** Dump private info from device */ + eth_dev_priv_dump_t eth_dev_priv_dump; }; /** @@ -1432,6 +1518,23 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev, *dst = __atomic_load_n(src, __ATOMIC_SEQ_CST); } +/** + * @internal + * Dummy DPDK callback for Rx/Tx packet burst. + * + * @param queue + * Pointer to Rx/Tx queue + * @param pkts + * Packet array + * @param nb_pkts + * Number of packets in packet array + */ +__rte_internal +uint16_t +rte_eth_pkt_burst_dummy(void *queue __rte_unused, + struct rte_mbuf **pkts __rte_unused, + uint16_t nb_pkts __rte_unused); + /** * Allocate an unique switch domain identifier. * @@ -1681,6 +1784,14 @@ int rte_eth_hairpin_queue_peer_unbind(uint16_t cur_port, uint16_t cur_queue, uint32_t direction); +/** + * @internal + * Register mbuf dynamic field and flag for IP reassembly incomplete case. + */ +__rte_internal +int +rte_eth_ip_reassembly_dynfield_register(int *field_offset, int *flag); + /* * Legacy ethdev API used internally by drivers. @@ -1779,4 +1890,8 @@ struct rte_eth_tunnel_filter_conf { uint16_t queue_id; /**< Queue assigned to if match */ }; +#ifdef __cplusplus +} +#endif + #endif /* _RTE_ETHDEV_DRIVER_H_ */