1efa79e68SOri Kam /* SPDX-License-Identifier: BSD-3-Clause 2efa79e68SOri Kam * Copyright 2020 Mellanox Technologies, Ltd 3efa79e68SOri Kam */ 4efa79e68SOri Kam 5efa79e68SOri Kam #ifndef RTE_PMD_PRIVATE_MLX5_H_ 6efa79e68SOri Kam #define RTE_PMD_PRIVATE_MLX5_H_ 7efa79e68SOri Kam 81094dd94SDavid Marchand #include <rte_compat.h> 91094dd94SDavid Marchand 10efa79e68SOri Kam /** 11efa79e68SOri Kam * @file 12efa79e68SOri Kam * MLX5 public header. 13efa79e68SOri Kam * 14efa79e68SOri Kam * This interface provides the ability to support private PMD 15efa79e68SOri Kam * dynamic flags. 16efa79e68SOri Kam */ 17efa79e68SOri Kam 188e83ba28SElena Agostini #ifdef __cplusplus 198e83ba28SElena Agostini extern "C" { 208e83ba28SElena Agostini #endif 218e83ba28SElena Agostini 22efa79e68SOri Kam #define RTE_PMD_MLX5_FINE_GRANULARITY_INLINE "mlx5_fine_granularity_inline" 23efa79e68SOri Kam 24efa79e68SOri Kam /** 25efa79e68SOri Kam * Returns the dynamic flags name, that are supported. 26efa79e68SOri Kam * 27efa79e68SOri Kam * @param[out] names 28efa79e68SOri Kam * Array that is used to return the supported dynamic flags names. 29efa79e68SOri Kam * @param[in] n 30efa79e68SOri Kam * The number of elements in the names array. 31efa79e68SOri Kam * 32efa79e68SOri Kam * @return 33efa79e68SOri Kam * The number of dynamic flags that were copied if not negative. 34efa79e68SOri Kam * Otherwise: 35efa79e68SOri Kam * - ENOMEM - not enough entries in the array 36efa79e68SOri Kam * - EINVAL - invalid array entry 37efa79e68SOri Kam */ 38efa79e68SOri Kam __rte_experimental 39efa79e68SOri Kam int rte_pmd_mlx5_get_dyn_flag_names(char *names[], unsigned int n); 40efa79e68SOri Kam 4186647d46SThomas Monjalon #define RTE_PMD_MLX5_DOMAIN_BIT_NIC_RX (1 << 0) /**< NIC RX domain bit mask. */ 4286647d46SThomas Monjalon #define RTE_PMD_MLX5_DOMAIN_BIT_NIC_TX (1 << 1) /**< NIC TX domain bit mask. */ 4386647d46SThomas Monjalon #define RTE_PMD_MLX5_DOMAIN_BIT_FDB (1 << 2) /**< FDB (TX + RX) domain bit mask. */ 4423f627e0SBing Zhao 4523f627e0SBing Zhao /** 4623f627e0SBing Zhao * Synchronize the flows to make them take effort on hardware. 4723f627e0SBing Zhao * It only supports DR flows now. For DV and Verbs flows, there is no need to 4823f627e0SBing Zhao * call this function, and a success will return directly in case of Verbs. 4923f627e0SBing Zhao * 5023f627e0SBing Zhao * @param[in] port_id 5123f627e0SBing Zhao * The port identifier of the Ethernet device. 5223f627e0SBing Zhao * @param[in] domains 5323f627e0SBing Zhao * Refer to "/usr/include/infiniband/mlx5dv.h". 5423f627e0SBing Zhao * Bitmask of domains in which the synchronization will be done. 5586647d46SThomas Monjalon * RTE_PMD_MLX5_DOMAIN_BIT_* macros are used to specify the domains. 5623f627e0SBing Zhao * An ADD or OR operation could be used to synchronize flows in more than 5723f627e0SBing Zhao * one domain per call. 5823f627e0SBing Zhao * 5923f627e0SBing Zhao * @return 6023f627e0SBing Zhao * - (0) if successful. 6123f627e0SBing Zhao * - Negative value if an error. 6223f627e0SBing Zhao */ 6323f627e0SBing Zhao __rte_experimental 6423f627e0SBing Zhao int rte_pmd_mlx5_sync_flow(uint16_t port_id, uint32_t domains); 6523f627e0SBing Zhao 6680f872eeSMichael Baum /** 6780f872eeSMichael Baum * External Rx queue rte_flow index minimal value. 6880f872eeSMichael Baum */ 6986647d46SThomas Monjalon #define RTE_PMD_MLX5_EXTERNAL_RX_QUEUE_ID_MIN (UINT16_MAX - 1000 + 1) 7080f872eeSMichael Baum 7180f872eeSMichael Baum /** 721944fbc3SSuanming Mou * External Tx queue rte_flow index minimal value. 731944fbc3SSuanming Mou */ 741944fbc3SSuanming Mou #define MLX5_EXTERNAL_TX_QUEUE_ID_MIN (UINT16_MAX - 1000 + 1) 751944fbc3SSuanming Mou 761944fbc3SSuanming Mou /** 775f5e2f86SAlexander Kozyrev * Tag level to set the linear hash index. 785f5e2f86SAlexander Kozyrev */ 7986647d46SThomas Monjalon #define RTE_PMD_MLX5_LINEAR_HASH_TAG_INDEX 255 805f5e2f86SAlexander Kozyrev 815f5e2f86SAlexander Kozyrev /** 8280f872eeSMichael Baum * Update mapping between rte_flow queue index (16 bits) and HW queue index (32 8380f872eeSMichael Baum * bits) for RxQs which is created outside the PMD. 8480f872eeSMichael Baum * 8580f872eeSMichael Baum * @param[in] port_id 8680f872eeSMichael Baum * The port identifier of the Ethernet device. 8780f872eeSMichael Baum * @param[in] dpdk_idx 8880f872eeSMichael Baum * Queue index in rte_flow. 8980f872eeSMichael Baum * @param[in] hw_idx 9080f872eeSMichael Baum * Queue index in hardware. 9180f872eeSMichael Baum * 9280f872eeSMichael Baum * @return 9380f872eeSMichael Baum * 0 on success, a negative errno value otherwise and rte_errno is set. 9480f872eeSMichael Baum * Possible values for rte_errno: 9580f872eeSMichael Baum * - EEXIST - a mapping with the same rte_flow index already exists. 9680f872eeSMichael Baum * - EINVAL - invalid rte_flow index, out of range. 9780f872eeSMichael Baum * - ENODEV - there is no Ethernet device for this port id. 9880f872eeSMichael Baum * - ENOTSUP - the port doesn't support external RxQ. 9980f872eeSMichael Baum */ 10080f872eeSMichael Baum __rte_experimental 10180f872eeSMichael Baum int rte_pmd_mlx5_external_rx_queue_id_map(uint16_t port_id, uint16_t dpdk_idx, 10280f872eeSMichael Baum uint32_t hw_idx); 10380f872eeSMichael Baum 10480f872eeSMichael Baum /** 10580f872eeSMichael Baum * Remove mapping between rte_flow queue index (16 bits) and HW queue index (32 10680f872eeSMichael Baum * bits) for RxQs which is created outside the PMD. 10780f872eeSMichael Baum * 10880f872eeSMichael Baum * @param[in] port_id 10980f872eeSMichael Baum * The port identifier of the Ethernet device. 11080f872eeSMichael Baum * @param[in] dpdk_idx 11180f872eeSMichael Baum * Queue index in rte_flow. 11280f872eeSMichael Baum * 11380f872eeSMichael Baum * @return 11480f872eeSMichael Baum * 0 on success, a negative errno value otherwise and rte_errno is set. 11580f872eeSMichael Baum * Possible values for rte_errno: 11680f872eeSMichael Baum * - EINVAL - invalid index, out of range, still referenced or doesn't exist. 11780f872eeSMichael Baum * - ENODEV - there is no Ethernet device for this port id. 11880f872eeSMichael Baum * - ENOTSUP - the port doesn't support external RxQ. 11980f872eeSMichael Baum */ 12080f872eeSMichael Baum __rte_experimental 12180f872eeSMichael Baum int rte_pmd_mlx5_external_rx_queue_id_unmap(uint16_t port_id, 12280f872eeSMichael Baum uint16_t dpdk_idx); 12380f872eeSMichael Baum 1242235fcdaSSpike Du /** 1251944fbc3SSuanming Mou * Update mapping between rte_flow Tx queue index (16 bits) and HW queue index (32 1261944fbc3SSuanming Mou * bits) for TxQs which is created outside the PMD. 1271944fbc3SSuanming Mou * 1281944fbc3SSuanming Mou * @param[in] port_id 1291944fbc3SSuanming Mou * The port identifier of the Ethernet device. 1301944fbc3SSuanming Mou * @param[in] dpdk_idx 1311944fbc3SSuanming Mou * Queue index in rte_flow. 1321944fbc3SSuanming Mou * @param[in] hw_idx 1331944fbc3SSuanming Mou * Queue index in hardware. 1341944fbc3SSuanming Mou * 1351944fbc3SSuanming Mou * @return 1361944fbc3SSuanming Mou * 0 on success, a negative errno value otherwise and rte_errno is set. 1371944fbc3SSuanming Mou * Possible values for rte_errno: 1381944fbc3SSuanming Mou * - EEXIST - a mapping with the same rte_flow index already exists. 1391944fbc3SSuanming Mou * - EINVAL - invalid rte_flow index, out of range. 1401944fbc3SSuanming Mou * - ENODEV - there is no Ethernet device for this port id. 1411944fbc3SSuanming Mou * - ENOTSUP - the port doesn't support external TxQ. 1421944fbc3SSuanming Mou */ 1431944fbc3SSuanming Mou __rte_experimental 1441944fbc3SSuanming Mou int rte_pmd_mlx5_external_tx_queue_id_map(uint16_t port_id, uint16_t dpdk_idx, 1451944fbc3SSuanming Mou uint32_t hw_idx); 1461944fbc3SSuanming Mou 1471944fbc3SSuanming Mou /** 1481944fbc3SSuanming Mou * Remove mapping between rte_flow Tx queue index (16 bits) and HW queue index (32 1491944fbc3SSuanming Mou * bits) for TxQs which is created outside the PMD. 1501944fbc3SSuanming Mou * 1511944fbc3SSuanming Mou * @param[in] port_id 1521944fbc3SSuanming Mou * The port identifier of the Ethernet device. 1531944fbc3SSuanming Mou * @param[in] dpdk_idx 1541944fbc3SSuanming Mou * Queue index in rte_flow. 1551944fbc3SSuanming Mou * 1561944fbc3SSuanming Mou * @return 1571944fbc3SSuanming Mou * 0 on success, a negative errno value otherwise and rte_errno is set. 1581944fbc3SSuanming Mou * Possible values for rte_errno: 1591944fbc3SSuanming Mou * - EINVAL - invalid index, out of range, still referenced or doesn't exist. 1601944fbc3SSuanming Mou * - ENODEV - there is no Ethernet device for this port id. 1611944fbc3SSuanming Mou * - ENOTSUP - the port doesn't support external TxQ. 1621944fbc3SSuanming Mou */ 1631944fbc3SSuanming Mou __rte_experimental 1641944fbc3SSuanming Mou int rte_pmd_mlx5_external_tx_queue_id_unmap(uint16_t port_id, 1651944fbc3SSuanming Mou uint16_t dpdk_idx); 1661944fbc3SSuanming Mou 1671944fbc3SSuanming Mou /** 1682235fcdaSSpike Du * The rate of the host port shaper will be updated directly at the next 1692235fcdaSSpike Du * available descriptor threshold event to the rate that comes with this flag set; 1702235fcdaSSpike Du * set rate 0 to disable this rate update. 1712235fcdaSSpike Du * Unset this flag to update the rate of the host port shaper directly in 1722235fcdaSSpike Du * the API call; use rate 0 to disable the current shaper. 1732235fcdaSSpike Du */ 17486647d46SThomas Monjalon #define RTE_PMD_MLX5_HOST_SHAPER_FLAG_AVAIL_THRESH_TRIGGERED 0 1752235fcdaSSpike Du 1762235fcdaSSpike Du /** 1772235fcdaSSpike Du * Configure a HW shaper to limit Tx rate for a host port. 1782235fcdaSSpike Du * The configuration will affect all the ethdev ports belonging to 1792235fcdaSSpike Du * the same rte_device. 1802235fcdaSSpike Du * 1812235fcdaSSpike Du * @param[in] port_id 1822235fcdaSSpike Du * The port identifier of the Ethernet device. 1832235fcdaSSpike Du * @param[in] rate 1842235fcdaSSpike Du * Unit is 100Mbps, setting the rate to 0 disables the shaper. 1852235fcdaSSpike Du * @param[in] flags 18686647d46SThomas Monjalon * Host shaper flags (see RTE_PMD_MLX5_HOST_SHAPER_FLAG_*). 1872235fcdaSSpike Du * @return 1882235fcdaSSpike Du * 0 : operation success. 1892235fcdaSSpike Du * Otherwise: 1902235fcdaSSpike Du * - ENOENT - no ibdev interface. 1912235fcdaSSpike Du * - EBUSY - the register access unit is busy. 1922235fcdaSSpike Du * - EIO - the register access command meets IO error. 1932235fcdaSSpike Du */ 1942235fcdaSSpike Du __rte_experimental 1952235fcdaSSpike Du int rte_pmd_mlx5_host_shaper_config(int port_id, uint8_t rate, uint32_t flags); 1962235fcdaSSpike Du 19726e1eaf2SDariusz Sosnowski /** 19826e1eaf2SDariusz Sosnowski * Enable traffic for external SQ. 19926e1eaf2SDariusz Sosnowski * 20026e1eaf2SDariusz Sosnowski * @param[in] port_id 20126e1eaf2SDariusz Sosnowski * The port identifier of the Ethernet device. 20226e1eaf2SDariusz Sosnowski * @param[in] sq_num 20326e1eaf2SDariusz Sosnowski * SQ HW number. 20426e1eaf2SDariusz Sosnowski * 20526e1eaf2SDariusz Sosnowski * @return 20626e1eaf2SDariusz Sosnowski * 0 on success, a negative errno value otherwise and rte_errno is set. 20726e1eaf2SDariusz Sosnowski * Possible values for rte_errno: 20826e1eaf2SDariusz Sosnowski * - EINVAL - invalid sq_number or port type. 20926e1eaf2SDariusz Sosnowski * - ENODEV - there is no Ethernet device for this port id. 21026e1eaf2SDariusz Sosnowski */ 21126e1eaf2SDariusz Sosnowski __rte_experimental 21226e1eaf2SDariusz Sosnowski int rte_pmd_mlx5_external_sq_enable(uint16_t port_id, uint32_t sq_num); 21326e1eaf2SDariusz Sosnowski 2142eece379SRongwei Liu /* MLX5 flow engine mode definition for live migration. */ 21586647d46SThomas Monjalon enum rte_pmd_mlx5_flow_engine_mode { 21686647d46SThomas Monjalon RTE_PMD_MLX5_FLOW_ENGINE_MODE_ACTIVE, /* active means high priority, effective in HW. */ 21786647d46SThomas Monjalon RTE_PMD_MLX5_FLOW_ENGINE_MODE_STANDBY, /* standby mode with lower priority flow rules. */ 2182eece379SRongwei Liu }; 2192eece379SRongwei Liu 2202eece379SRongwei Liu /** 2212eece379SRongwei Liu * When set on the flow engine of a standby process, ingress flow rules will be effective 2222eece379SRongwei Liu * in active and standby processes, so the ingress traffic may be duplicated. 2232eece379SRongwei Liu */ 22486647d46SThomas Monjalon #define RTE_PMD_MLX5_FLOW_ENGINE_FLAG_STANDBY_DUP_INGRESS RTE_BIT32(0) 2252eece379SRongwei Liu 2262eece379SRongwei Liu /** 2272eece379SRongwei Liu * @warning 2282eece379SRongwei Liu * @b EXPERIMENTAL: this API may change without prior notice 2292eece379SRongwei Liu * 2302eece379SRongwei Liu * Set the flow engine mode of the process to active or standby, 2312eece379SRongwei Liu * affecting network traffic handling. 2322eece379SRongwei Liu * 2332eece379SRongwei Liu * If one device does not support this operation or fails, 2342eece379SRongwei Liu * the whole operation is failed and rolled back. 2352eece379SRongwei Liu * 2362eece379SRongwei Liu * It is forbidden to have multiple flow engines with the same mode 2372eece379SRongwei Liu * unless only one of them is configured to handle the traffic. 2382eece379SRongwei Liu * 2392eece379SRongwei Liu * The application's flow engine is active by default. 2402eece379SRongwei Liu * The configuration from the active flow engine is effective immediately 2412eece379SRongwei Liu * while the configuration from the standby flow engine is queued by hardware. 2422eece379SRongwei Liu * When configuring the device from a standby flow engine, 2432eece379SRongwei Liu * it has no effect except for below situations: 2442eece379SRongwei Liu * - traffic not handled by the active flow engine configuration 2452eece379SRongwei Liu * - no active flow engine 2462eece379SRongwei Liu * 2472eece379SRongwei Liu * When flow engine of a process is changed from a standby to an active mode, 2482eece379SRongwei Liu * all preceding configurations that are queued by hardware 2492eece379SRongwei Liu * should become effective immediately. 2502eece379SRongwei Liu * Before mode transition, all the traffic handling configurations 2512eece379SRongwei Liu * set by the active flow engine should be flushed first. 2522eece379SRongwei Liu * 2532eece379SRongwei Liu * In summary, the operations are expected to happen in this order 2542eece379SRongwei Liu * in "old" and "new" applications: 2552eece379SRongwei Liu * device: already configured by the old application 2562eece379SRongwei Liu * new: start as active 2572eece379SRongwei Liu * new: probe the same device 2582eece379SRongwei Liu * new: set as standby 2592eece379SRongwei Liu * new: configure the device 2602eece379SRongwei Liu * device: has configurations from old and new applications 2612eece379SRongwei Liu * old: clear its device configuration 2622eece379SRongwei Liu * device: has only 1 configuration from new application 2632eece379SRongwei Liu * new: set as active 2642eece379SRongwei Liu * device: downtime for connecting all to the new application 2652eece379SRongwei Liu * old: shutdown 2662eece379SRongwei Liu * 2672eece379SRongwei Liu * @param mode 26886647d46SThomas Monjalon * The desired mode (see rte_pmd_mlx5_flow_engine_mode). 2692eece379SRongwei Liu * @param flags 27086647d46SThomas Monjalon * Mode specific flags (see RTE_PMD_MLX5_FLOW_ENGINE_FLAG_*). 2712eece379SRongwei Liu * @return 2722eece379SRongwei Liu * Positive value on success, -rte_errno value on error: 2732eece379SRongwei Liu * - (> 0) Number of switched devices. 2742eece379SRongwei Liu * - (-EINVAL) if error happen and rollback internally. 2752eece379SRongwei Liu * - (-EPERM) if operation failed and can't recover. 2762eece379SRongwei Liu */ 2772eece379SRongwei Liu __rte_experimental 27886647d46SThomas Monjalon int rte_pmd_mlx5_flow_engine_set_mode(enum rte_pmd_mlx5_flow_engine_mode mode, uint32_t flags); 2792eece379SRongwei Liu 280f5177bdcSMichael Baum /** 281f5177bdcSMichael Baum * User configuration structure using to create parser for single GENEVE TLV option. 282f5177bdcSMichael Baum */ 283f5177bdcSMichael Baum struct rte_pmd_mlx5_geneve_tlv { 284f5177bdcSMichael Baum /** 285f5177bdcSMichael Baum * The class of the GENEVE TLV option. 286f5177bdcSMichael Baum * Relevant only when 'match_on_class_mode' is 1. 287f5177bdcSMichael Baum */ 288f5177bdcSMichael Baum rte_be16_t option_class; 289f5177bdcSMichael Baum /** 290f5177bdcSMichael Baum * The type of the GENEVE TLV option. 291f5177bdcSMichael Baum * This field is the identifier of the option. 292f5177bdcSMichael Baum */ 293f5177bdcSMichael Baum uint8_t option_type; 294f5177bdcSMichael Baum /** 295f5177bdcSMichael Baum * The length of the GENEVE TLV option data excluding the option header 296f5177bdcSMichael Baum * in DW granularity. 297f5177bdcSMichael Baum */ 298f5177bdcSMichael Baum uint8_t option_len; 299f5177bdcSMichael Baum /** 300f5177bdcSMichael Baum * Indicator about class field role in this option: 301f5177bdcSMichael Baum * 0 - class is ignored. 302f5177bdcSMichael Baum * 1 - class is fixed (the class defines the option along with the type). 303f5177bdcSMichael Baum * 2 - class matching per flow. 304f5177bdcSMichael Baum */ 305f5177bdcSMichael Baum uint8_t match_on_class_mode; 306f5177bdcSMichael Baum /** 307f5177bdcSMichael Baum * The offset of the first sample in DW granularity. 308f5177bdcSMichael Baum * This offset is relative to first of option data. 309f5177bdcSMichael Baum * The 'match_data_mask' corresponds to option data since this offset. 310f5177bdcSMichael Baum */ 311f5177bdcSMichael Baum uint8_t offset; 312f5177bdcSMichael Baum /** 313f5177bdcSMichael Baum * The number of DW to sample. 314f5177bdcSMichael Baum * This field describes the length of 'match_data_mask' in DW 315f5177bdcSMichael Baum * granularity. 316f5177bdcSMichael Baum */ 317f5177bdcSMichael Baum uint8_t sample_len; 318f5177bdcSMichael Baum /** 319f5177bdcSMichael Baum * Array of DWs which each bit marks if this bit should be sampled. 320f5177bdcSMichael Baum * Each nonzero DW consumes one DW from maximum 7 DW in total. 321f5177bdcSMichael Baum */ 322f5177bdcSMichael Baum rte_be32_t *match_data_mask; 323f5177bdcSMichael Baum }; 324f5177bdcSMichael Baum 325f5177bdcSMichael Baum /** 326f5177bdcSMichael Baum * Creates GENEVE TLV parser for the selected port. 327f5177bdcSMichael Baum * This function must be called before first use of GENEVE option. 328f5177bdcSMichael Baum * 329f5177bdcSMichael Baum * This API is port oriented, but the configuration is done once for all ports 330f5177bdcSMichael Baum * under the same physical device. Each port should call this API before using 331f5177bdcSMichael Baum * GENEVE OPT item, but it must use the same options in the same order inside 332f5177bdcSMichael Baum * the list. 333f5177bdcSMichael Baum * 334f5177bdcSMichael Baum * Each physical device has 7 DWs for GENEVE TLV options. Each nonzero element 335f5177bdcSMichael Baum * in 'match_data_mask' array consumes one DW, and choosing matchable mode for 336f5177bdcSMichael Baum * class consumes additional one. 337f5177bdcSMichael Baum * Calling this API for second port under same physical device doesn't consume 338f5177bdcSMichael Baum * more DW, it uses same configuration. 339f5177bdcSMichael Baum * 340f5177bdcSMichael Baum * @param[in] port_id 341f5177bdcSMichael Baum * The port identifier of the Ethernet device. 342f5177bdcSMichael Baum * @param[in] tlv_list 343f5177bdcSMichael Baum * A list of GENEVE TLV options to create parser for them. 344f5177bdcSMichael Baum * @param[in] nb_options 345f5177bdcSMichael Baum * The number of options in TLV list. 346f5177bdcSMichael Baum * 347f5177bdcSMichael Baum * @return 348f5177bdcSMichael Baum * A pointer to TLV handle on success, NULL otherwise and rte_errno is set. 349f5177bdcSMichael Baum * Possible values for rte_errno: 350f5177bdcSMichael Baum * - ENOMEM - not enough memory to create GENEVE TLV parser. 351f5177bdcSMichael Baum * - EEXIST - this port already has GENEVE TLV parser or another port under 352f5177bdcSMichael Baum * same physical device has already prepared a different parser. 353f5177bdcSMichael Baum * - EINVAL - invalid GENEVE TLV requested. 354f5177bdcSMichael Baum * - ENODEV - there is no Ethernet device for this port id. 355f5177bdcSMichael Baum * - ENOTSUP - the port doesn't support GENEVE TLV parsing. 356f5177bdcSMichael Baum */ 357f5177bdcSMichael Baum __rte_experimental 358f5177bdcSMichael Baum void * 359f5177bdcSMichael Baum rte_pmd_mlx5_create_geneve_tlv_parser(uint16_t port_id, 360f5177bdcSMichael Baum const struct rte_pmd_mlx5_geneve_tlv tlv_list[], 361f5177bdcSMichael Baum uint8_t nb_options); 362f5177bdcSMichael Baum 363f5177bdcSMichael Baum /** 364f5177bdcSMichael Baum * Destroy GENEVE TLV parser for the selected port. 365f5177bdcSMichael Baum * This function must be called after last use of GENEVE option and before port 366f5177bdcSMichael Baum * closing. 367f5177bdcSMichael Baum * 368f5177bdcSMichael Baum * @param[in] handle 369f5177bdcSMichael Baum * Handle for the GENEVE TLV parser object to be destroyed. 370f5177bdcSMichael Baum * 371f5177bdcSMichael Baum * @return 372f5177bdcSMichael Baum * 0 on success, a negative errno value otherwise and rte_errno is set. 373f5177bdcSMichael Baum * Possible values for rte_errno: 374f5177bdcSMichael Baum * - EINVAL - invalid handle. 375f5177bdcSMichael Baum * - ENOENT - there is no valid GENEVE TLV parser in this handle. 376f5177bdcSMichael Baum * - EBUSY - one of options is in used by template table. 377f5177bdcSMichael Baum */ 378f5177bdcSMichael Baum __rte_experimental 379f5177bdcSMichael Baum int 380f5177bdcSMichael Baum rte_pmd_mlx5_destroy_geneve_tlv_parser(void *handle); 381f5177bdcSMichael Baum 382*3dfa7877SKiran Vedere /** 383*3dfa7877SKiran Vedere * Dump Rx Queue Context for a given port/queue 384*3dfa7877SKiran Vedere * 385*3dfa7877SKiran Vedere * @param[in] port_id 386*3dfa7877SKiran Vedere * Port ID 387*3dfa7877SKiran Vedere * @param[in] queue_id 388*3dfa7877SKiran Vedere * Queue ID 389*3dfa7877SKiran Vedere * @param[in] filename 390*3dfa7877SKiran Vedere * Name of file to dump the Rx Queue Context 391*3dfa7877SKiran Vedere * 392*3dfa7877SKiran Vedere * @return 393*3dfa7877SKiran Vedere * 0 for success, non-zero value depending on failure type 394*3dfa7877SKiran Vedere */ 395*3dfa7877SKiran Vedere 396*3dfa7877SKiran Vedere __rte_experimental 397*3dfa7877SKiran Vedere int 398*3dfa7877SKiran Vedere rte_pmd_mlx5_rxq_dump_contexts(uint16_t port_id, uint16_t queue_id, const char *filename); 399*3dfa7877SKiran Vedere 400*3dfa7877SKiran Vedere /** 401*3dfa7877SKiran Vedere * Dump Tx Queue Context for a given port/queue 402*3dfa7877SKiran Vedere * 403*3dfa7877SKiran Vedere * @param[in] port_id 404*3dfa7877SKiran Vedere * Port ID 405*3dfa7877SKiran Vedere * @param[in] queue_id 406*3dfa7877SKiran Vedere * Queue ID 407*3dfa7877SKiran Vedere * @param[in] filename 408*3dfa7877SKiran Vedere * Name of file to dump the Tx Queue Context 409*3dfa7877SKiran Vedere * 410*3dfa7877SKiran Vedere * @return 411*3dfa7877SKiran Vedere * 0 for success, non-zero value depending on failure type 412*3dfa7877SKiran Vedere */ 413*3dfa7877SKiran Vedere 414*3dfa7877SKiran Vedere __rte_experimental 415*3dfa7877SKiran Vedere int 416*3dfa7877SKiran Vedere rte_pmd_mlx5_txq_dump_contexts(uint16_t port_id, uint16_t queue_id, const char *filename); 417*3dfa7877SKiran Vedere 4188e83ba28SElena Agostini #ifdef __cplusplus 4198e83ba28SElena Agostini } 4208e83ba28SElena Agostini #endif 4218e83ba28SElena Agostini 42280f872eeSMichael Baum #endif /* RTE_PMD_PRIVATE_MLX5_H_ */ 423