197f17497SC.J. Collier/*-
297f17497SC.J. Collier *   BSD LICENSE
397f17497SC.J. Collier *
497f17497SC.J. Collier *   Copyright 2015 6WIND S.A.
597f17497SC.J. Collier *   Copyright 2015 Mellanox.
697f17497SC.J. Collier *
797f17497SC.J. Collier *   Redistribution and use in source and binary forms, with or without
897f17497SC.J. Collier *   modification, are permitted provided that the following conditions
997f17497SC.J. Collier *   are met:
1097f17497SC.J. Collier *
1197f17497SC.J. Collier *     * Redistributions of source code must retain the above copyright
1297f17497SC.J. Collier *       notice, this list of conditions and the following disclaimer.
1397f17497SC.J. Collier *     * Redistributions in binary form must reproduce the above copyright
1497f17497SC.J. Collier *       notice, this list of conditions and the following disclaimer in
1597f17497SC.J. Collier *       the documentation and/or other materials provided with the
1697f17497SC.J. Collier *       distribution.
1797f17497SC.J. Collier *     * Neither the name of 6WIND S.A. nor the names of its
1897f17497SC.J. Collier *       contributors may be used to endorse or promote products derived
1997f17497SC.J. Collier *       from this software without specific prior written permission.
2097f17497SC.J. Collier *
2197f17497SC.J. Collier *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2297f17497SC.J. Collier *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2397f17497SC.J. Collier *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2497f17497SC.J. Collier *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2597f17497SC.J. Collier *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2697f17497SC.J. Collier *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2797f17497SC.J. Collier *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2897f17497SC.J. Collier *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2997f17497SC.J. Collier *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3097f17497SC.J. Collier *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3197f17497SC.J. Collier *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3297f17497SC.J. Collier */
3397f17497SC.J. Collier
3497f17497SC.J. Collier#ifndef RTE_PMD_MLX5_RXTX_H_
3597f17497SC.J. Collier#define RTE_PMD_MLX5_RXTX_H_
3697f17497SC.J. Collier
3797f17497SC.J. Collier#include <stddef.h>
3897f17497SC.J. Collier#include <stdint.h>
3997f17497SC.J. Collier
4097f17497SC.J. Collier/* Verbs header. */
4197f17497SC.J. Collier/* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */
4297f17497SC.J. Collier#ifdef PEDANTIC
4332e04ea0SChristian Ehrhardt#pragma GCC diagnostic ignored "-Wpedantic"
4497f17497SC.J. Collier#endif
4597f17497SC.J. Collier#include <infiniband/verbs.h>
468b25d1adSChristian Ehrhardt#include <infiniband/mlx5_hw.h>
4797f17497SC.J. Collier#ifdef PEDANTIC
4832e04ea0SChristian Ehrhardt#pragma GCC diagnostic error "-Wpedantic"
4997f17497SC.J. Collier#endif
5097f17497SC.J. Collier
5197f17497SC.J. Collier/* DPDK headers don't like -pedantic. */
5297f17497SC.J. Collier#ifdef PEDANTIC
5332e04ea0SChristian Ehrhardt#pragma GCC diagnostic ignored "-Wpedantic"
5497f17497SC.J. Collier#endif
5597f17497SC.J. Collier#include <rte_mbuf.h>
5697f17497SC.J. Collier#include <rte_mempool.h>
576b3e017eSChristian Ehrhardt#include <rte_common.h>
5897f17497SC.J. Collier#ifdef PEDANTIC
5932e04ea0SChristian Ehrhardt#pragma GCC diagnostic error "-Wpedantic"
6097f17497SC.J. Collier#endif
6197f17497SC.J. Collier
6297f17497SC.J. Collier#include "mlx5_utils.h"
6397f17497SC.J. Collier#include "mlx5.h"
6497f17497SC.J. Collier#include "mlx5_autoconf.h"
6597f17497SC.J. Collier#include "mlx5_defs.h"
668b25d1adSChristian Ehrhardt#include "mlx5_prm.h"
6797f17497SC.J. Collier
6897f17497SC.J. Collierstruct mlx5_rxq_stats {
6997f17497SC.J. Collier	unsigned int idx; /**< Mapping index. */
7097f17497SC.J. Collier#ifdef MLX5_PMD_SOFT_COUNTERS
7197f17497SC.J. Collier	uint64_t ipackets; /**< Total of successfully received packets. */
7297f17497SC.J. Collier	uint64_t ibytes; /**< Total of successfully received bytes. */
7397f17497SC.J. Collier#endif
7497f17497SC.J. Collier	uint64_t idropped; /**< Total of packets dropped when RX ring full. */
7597f17497SC.J. Collier	uint64_t rx_nombuf; /**< Total of RX mbuf allocation failures. */
7697f17497SC.J. Collier};
7797f17497SC.J. Collier
7897f17497SC.J. Collierstruct mlx5_txq_stats {
7997f17497SC.J. Collier	unsigned int idx; /**< Mapping index. */
8097f17497SC.J. Collier#ifdef MLX5_PMD_SOFT_COUNTERS
8197f17497SC.J. Collier	uint64_t opackets; /**< Total of successfully sent packets. */
8297f17497SC.J. Collier	uint64_t obytes; /**< Total of successfully sent bytes. */
8397f17497SC.J. Collier#endif
8447d9763aSLuca Boccassi	uint64_t oerrors; /**< Total number of failed transmitted packets. */
8597f17497SC.J. Collier};
8697f17497SC.J. Collier
8797f17497SC.J. Collier/* Flow director queue structure. */
8897f17497SC.J. Collierstruct fdir_queue {
8997f17497SC.J. Collier	struct ibv_qp *qp; /* Associated RX QP. */
9097f17497SC.J. Collier	struct ibv_exp_rwq_ind_table *ind_table; /* Indirection table. */
9132e04ea0SChristian Ehrhardt	struct ibv_exp_wq *wq; /* Work queue. */
9232e04ea0SChristian Ehrhardt	struct ibv_cq *cq; /* Completion queue. */
9397f17497SC.J. Collier};
9497f17497SC.J. Collier
9597f17497SC.J. Collierstruct priv;
9697f17497SC.J. Collier
978b25d1adSChristian Ehrhardt/* Compressed CQE context. */
988b25d1adSChristian Ehrhardtstruct rxq_zip {
998b25d1adSChristian Ehrhardt	uint16_t ai; /* Array index. */
1008b25d1adSChristian Ehrhardt	uint16_t ca; /* Current array index. */
1018b25d1adSChristian Ehrhardt	uint16_t na; /* Next array index. */
1028b25d1adSChristian Ehrhardt	uint16_t cq_ci; /* The next CQE. */
1038b25d1adSChristian Ehrhardt	uint32_t cqe_cnt; /* Number of CQEs. */
1048b25d1adSChristian Ehrhardt};
1058b25d1adSChristian Ehrhardt
10697f17497SC.J. Collier/* RX queue descriptor. */
10797f17497SC.J. Collierstruct rxq {
10897f17497SC.J. Collier	unsigned int csum:1; /* Enable checksum offloading. */
10997f17497SC.J. Collier	unsigned int csum_l2tun:1; /* Same for L2 tunnels. */
11097f17497SC.J. Collier	unsigned int vlan_strip:1; /* Enable VLAN stripping. */
11197f17497SC.J. Collier	unsigned int crc_present:1; /* CRC must be subtracted. */
1128b25d1adSChristian Ehrhardt	unsigned int sges_n:2; /* Log 2 of SGEs (max buffers per packet). */
1136b3e017eSChristian Ehrhardt	unsigned int cqe_n:4; /* Log 2 of CQ elements. */
1146b3e017eSChristian Ehrhardt	unsigned int elts_n:4; /* Log 2 of Mbufs. */
1156b3e017eSChristian Ehrhardt	unsigned int port_id:8;
1166b3e017eSChristian Ehrhardt	unsigned int rss_hash:1; /* RSS hash result is enabled. */
1176b3e017eSChristian Ehrhardt	unsigned int :9; /* Remaining bits. */
1186b3e017eSChristian Ehrhardt	volatile uint32_t *rq_db;
1196b3e017eSChristian Ehrhardt	volatile uint32_t *cq_db;
1208b25d1adSChristian Ehrhardt	uint16_t rq_ci;
1218b25d1adSChristian Ehrhardt	uint16_t cq_ci;
1228b25d1adSChristian Ehrhardt	volatile struct mlx5_wqe_data_seg(*wqes)[];
1238b25d1adSChristian Ehrhardt	volatile struct mlx5_cqe(*cqes)[];
1248b25d1adSChristian Ehrhardt	struct rxq_zip zip; /* Compressed context. */
1258b25d1adSChristian Ehrhardt	struct rte_mbuf *(*elts)[];
1268b25d1adSChristian Ehrhardt	struct rte_mempool *mp;
1278b25d1adSChristian Ehrhardt	struct mlx5_rxq_stats stats;
1288b25d1adSChristian Ehrhardt} __rte_cache_aligned;
1298b25d1adSChristian Ehrhardt
1308b25d1adSChristian Ehrhardt/* RX queue control descriptor. */
1318b25d1adSChristian Ehrhardtstruct rxq_ctrl {
1328b25d1adSChristian Ehrhardt	struct priv *priv; /* Back pointer to private data. */
1338b25d1adSChristian Ehrhardt	struct ibv_cq *cq; /* Completion Queue. */
1348b25d1adSChristian Ehrhardt	struct ibv_exp_wq *wq; /* Work Queue. */
13597f17497SC.J. Collier	struct ibv_exp_res_domain *rd; /* Resource Domain. */
13632e04ea0SChristian Ehrhardt	struct fdir_queue *fdir_queue; /* Flow director queue. */
13797f17497SC.J. Collier	struct ibv_mr *mr; /* Memory Region (for mp). */
13897f17497SC.J. Collier	struct ibv_exp_wq_family *if_wq; /* WQ burst interface. */
13997f17497SC.J. Collier	struct ibv_exp_cq_family_v1 *if_cq; /* CQ interface. */
1408b25d1adSChristian Ehrhardt	unsigned int socket; /* CPU socket ID for allocations. */
1418b25d1adSChristian Ehrhardt	struct rxq rxq; /* Data path structure. */
14297f17497SC.J. Collier};
14397f17497SC.J. Collier
14497f17497SC.J. Collier/* Hash RX queue types. */
14597f17497SC.J. Collierenum hash_rxq_type {
14697f17497SC.J. Collier	HASH_RXQ_TCPV4,
14797f17497SC.J. Collier	HASH_RXQ_UDPV4,
14897f17497SC.J. Collier	HASH_RXQ_IPV4,
14997f17497SC.J. Collier	HASH_RXQ_TCPV6,
15097f17497SC.J. Collier	HASH_RXQ_UDPV6,
15197f17497SC.J. Collier	HASH_RXQ_IPV6,
15297f17497SC.J. Collier	HASH_RXQ_ETH,
15397f17497SC.J. Collier};
15497f17497SC.J. Collier
15597f17497SC.J. Collier/* Flow structure with Ethernet specification. It is packed to prevent padding
15697f17497SC.J. Collier * between attr and spec as this layout is expected by libibverbs. */
15797f17497SC.J. Collierstruct flow_attr_spec_eth {
15897f17497SC.J. Collier	struct ibv_exp_flow_attr attr;
15997f17497SC.J. Collier	struct ibv_exp_flow_spec_eth spec;
16097f17497SC.J. Collier} __attribute__((packed));
16197f17497SC.J. Collier
16297f17497SC.J. Collier/* Define a struct flow_attr_spec_eth object as an array of at least
16397f17497SC.J. Collier * "size" bytes. Room after the first index is normally used to store
16497f17497SC.J. Collier * extra flow specifications. */
16597f17497SC.J. Collier#define FLOW_ATTR_SPEC_ETH(name, size) \
16697f17497SC.J. Collier	struct flow_attr_spec_eth name \
16797f17497SC.J. Collier		[((size) / sizeof(struct flow_attr_spec_eth)) + \
16897f17497SC.J. Collier		 !!((size) % sizeof(struct flow_attr_spec_eth))]
16997f17497SC.J. Collier
17097f17497SC.J. Collier/* Initialization data for hash RX queue. */
17197f17497SC.J. Collierstruct hash_rxq_init {
17297f17497SC.J. Collier	uint64_t hash_fields; /* Fields that participate in the hash. */
17397f17497SC.J. Collier	uint64_t dpdk_rss_hf; /* Matching DPDK RSS hash fields. */
17497f17497SC.J. Collier	unsigned int flow_priority; /* Flow priority to use. */
17597f17497SC.J. Collier	union {
17697f17497SC.J. Collier		struct {
17797f17497SC.J. Collier			enum ibv_exp_flow_spec_type type;
17897f17497SC.J. Collier			uint16_t size;
17997f17497SC.J. Collier		} hdr;
18097f17497SC.J. Collier		struct ibv_exp_flow_spec_tcp_udp tcp_udp;
18197f17497SC.J. Collier		struct ibv_exp_flow_spec_ipv4 ipv4;
18297f17497SC.J. Collier		struct ibv_exp_flow_spec_ipv6 ipv6;
18397f17497SC.J. Collier		struct ibv_exp_flow_spec_eth eth;
18497f17497SC.J. Collier	} flow_spec; /* Flow specification template. */
18597f17497SC.J. Collier	const struct hash_rxq_init *underlayer; /* Pointer to underlayer. */
18697f17497SC.J. Collier};
18797f17497SC.J. Collier
18897f17497SC.J. Collier/* Initialization data for indirection table. */
18997f17497SC.J. Collierstruct ind_table_init {
19097f17497SC.J. Collier	unsigned int max_size; /* Maximum number of WQs. */
19197f17497SC.J. Collier	/* Hash RX queues using this table. */
19297f17497SC.J. Collier	unsigned int hash_types;
19397f17497SC.J. Collier	unsigned int hash_types_n;
19497f17497SC.J. Collier};
19597f17497SC.J. Collier
19697f17497SC.J. Collier/* Initialization data for special flows. */
19797f17497SC.J. Collierstruct special_flow_init {
19897f17497SC.J. Collier	uint8_t dst_mac_val[6];
19997f17497SC.J. Collier	uint8_t dst_mac_mask[6];
20097f17497SC.J. Collier	unsigned int hash_types;
20197f17497SC.J. Collier	unsigned int per_vlan:1;
20297f17497SC.J. Collier};
20397f17497SC.J. Collier
20497f17497SC.J. Collierenum hash_rxq_flow_type {
20597f17497SC.J. Collier	HASH_RXQ_FLOW_TYPE_PROMISC,
20697f17497SC.J. Collier	HASH_RXQ_FLOW_TYPE_ALLMULTI,
20797f17497SC.J. Collier	HASH_RXQ_FLOW_TYPE_BROADCAST,
20897f17497SC.J. Collier	HASH_RXQ_FLOW_TYPE_IPV6MULTI,
20997f17497SC.J. Collier	HASH_RXQ_FLOW_TYPE_MAC,
21097f17497SC.J. Collier};
21197f17497SC.J. Collier
21297f17497SC.J. Collier#ifndef NDEBUG
21397f17497SC.J. Collierstatic inline const char *
21497f17497SC.J. Collierhash_rxq_flow_type_str(enum hash_rxq_flow_type flow_type)
21597f17497SC.J. Collier{
21697f17497SC.J. Collier	switch (flow_type) {
21797f17497SC.J. Collier	case HASH_RXQ_FLOW_TYPE_PROMISC:
21897f17497SC.J. Collier		return "promiscuous";
21997f17497SC.J. Collier	case HASH_RXQ_FLOW_TYPE_ALLMULTI:
22097f17497SC.J. Collier		return "allmulticast";
22197f17497SC.J. Collier	case HASH_RXQ_FLOW_TYPE_BROADCAST:
22297f17497SC.J. Collier		return "broadcast";
22397f17497SC.J. Collier	case HASH_RXQ_FLOW_TYPE_IPV6MULTI:
22497f17497SC.J. Collier		return "IPv6 multicast";
22597f17497SC.J. Collier	case HASH_RXQ_FLOW_TYPE_MAC:
22697f17497SC.J. Collier		return "MAC";
22797f17497SC.J. Collier	}
22897f17497SC.J. Collier	return NULL;
22997f17497SC.J. Collier}
23097f17497SC.J. Collier#endif /* NDEBUG */
23197f17497SC.J. Collier
23297f17497SC.J. Collierstruct hash_rxq {
23397f17497SC.J. Collier	struct priv *priv; /* Back pointer to private data. */
23497f17497SC.J. Collier	struct ibv_qp *qp; /* Hash RX QP. */
23597f17497SC.J. Collier	enum hash_rxq_type type; /* Hash RX queue type. */
23697f17497SC.J. Collier	/* MAC flow steering rules, one per VLAN ID. */
2378b25d1adSChristian Ehrhardt	struct ibv_exp_flow *mac_flow
2388b25d1adSChristian Ehrhardt		[MLX5_MAX_MAC_ADDRESSES][MLX5_MAX_VLAN_IDS];
23997f17497SC.J. Collier	struct ibv_exp_flow *special_flow
24097f17497SC.J. Collier		[MLX5_MAX_SPECIAL_FLOWS][MLX5_MAX_VLAN_IDS];
24197f17497SC.J. Collier};
24297f17497SC.J. Collier
24397f17497SC.J. Collier/* TX queue descriptor. */
2446b3e017eSChristian EhrhardtRTE_STD_C11
24597f17497SC.J. Collierstruct txq {
2468b25d1adSChristian Ehrhardt	uint16_t elts_head; /* Current index in (*elts)[]. */
2478b25d1adSChristian Ehrhardt	uint16_t elts_tail; /* First element awaiting completion. */
2488b25d1adSChristian Ehrhardt	uint16_t elts_comp; /* Counter since last completion request. */
2498b25d1adSChristian Ehrhardt	uint16_t cq_ci; /* Consumer index for completion queue. */
2508b25d1adSChristian Ehrhardt	uint16_t wqe_ci; /* Consumer index for work queue. */
2516b3e017eSChristian Ehrhardt	uint16_t elts_n:4; /* (*elts)[] length (in log2). */
2526b3e017eSChristian Ehrhardt	uint16_t cqe_n:4; /* Number of CQ elements (in log2). */
2536b3e017eSChristian Ehrhardt	uint16_t wqe_n:4; /* Number of of WQ elements (in log2). */
25432e04ea0SChristian Ehrhardt	uint16_t max_inline; /* Multiple of RTE_CACHE_LINE_SIZE to inline. */
2558b25d1adSChristian Ehrhardt	uint32_t qp_num_8s; /* QP number shifted by 8. */
2568b25d1adSChristian Ehrhardt	volatile struct mlx5_cqe (*cqes)[]; /* Completion queue. */
2576b3e017eSChristian Ehrhardt	volatile struct mlx5_wqe64 (*wqes)[]; /* Work queue. */
2588b25d1adSChristian Ehrhardt	volatile uint32_t *qp_db; /* Work queue doorbell. */
2598b25d1adSChristian Ehrhardt	volatile uint32_t *cq_db; /* Completion queue doorbell. */
2608b25d1adSChristian Ehrhardt	volatile void *bf_reg; /* Blueflame register. */
26197f17497SC.J. Collier	struct {
26297f17497SC.J. Collier		const struct rte_mempool *mp; /* Cached Memory Pool. */
26397f17497SC.J. Collier		struct ibv_mr *mr; /* Memory Region (for mp). */
2648b25d1adSChristian Ehrhardt		uint32_t lkey; /* htonl(mr->lkey) */
26597f17497SC.J. Collier	} mp2mr[MLX5_PMD_TX_MP_CACHE]; /* MP to MR translation table. */
2668b25d1adSChristian Ehrhardt	struct rte_mbuf *(*elts)[]; /* TX elements. */
26797f17497SC.J. Collier	struct mlx5_txq_stats stats; /* TX queue counters. */
2688b25d1adSChristian Ehrhardt} __rte_cache_aligned;
2698b25d1adSChristian Ehrhardt
2708b25d1adSChristian Ehrhardt/* TX queue control descriptor. */
2718b25d1adSChristian Ehrhardtstruct txq_ctrl {
2728b25d1adSChristian Ehrhardt	struct priv *priv; /* Back pointer to private data. */
2738b25d1adSChristian Ehrhardt	struct ibv_cq *cq; /* Completion Queue. */
2748b25d1adSChristian Ehrhardt	struct ibv_qp *qp; /* Queue Pair. */
27597f17497SC.J. Collier	struct ibv_exp_qp_burst_family *if_qp; /* QP burst interface. */
27697f17497SC.J. Collier	struct ibv_exp_cq_family *if_cq; /* CQ interface. */
27797f17497SC.J. Collier	struct ibv_exp_res_domain *rd; /* Resource Domain. */
27897f17497SC.J. Collier	unsigned int socket; /* CPU socket ID for allocations. */
2798b25d1adSChristian Ehrhardt	struct txq txq; /* Data path structure. */
28097f17497SC.J. Collier};
28197f17497SC.J. Collier
28297f17497SC.J. Collier/* mlx5_rxq.c */
28397f17497SC.J. Collier
28497f17497SC.J. Collierextern const struct hash_rxq_init hash_rxq_init[];
28597f17497SC.J. Collierextern const unsigned int hash_rxq_init_n;
28697f17497SC.J. Collier
28797f17497SC.J. Collierextern uint8_t rss_hash_default_key[];
28897f17497SC.J. Collierextern const size_t rss_hash_default_key_len;
28997f17497SC.J. Collier
29097f17497SC.J. Colliersize_t priv_flow_attr(struct priv *, struct ibv_exp_flow_attr *,
29197f17497SC.J. Collier		      size_t, enum hash_rxq_type);
29297f17497SC.J. Collierint priv_create_hash_rxqs(struct priv *);
29397f17497SC.J. Colliervoid priv_destroy_hash_rxqs(struct priv *);
29497f17497SC.J. Collierint priv_allow_flow_type(struct priv *, enum hash_rxq_flow_type);
29597f17497SC.J. Collierint priv_rehash_flows(struct priv *);
2968b25d1adSChristian Ehrhardtvoid rxq_cleanup(struct rxq_ctrl *);
2978b25d1adSChristian Ehrhardtint rxq_rehash(struct rte_eth_dev *, struct rxq_ctrl *);
2988b25d1adSChristian Ehrhardtint rxq_ctrl_setup(struct rte_eth_dev *, struct rxq_ctrl *, uint16_t,
2998b25d1adSChristian Ehrhardt		   unsigned int, const struct rte_eth_rxconf *,
3008b25d1adSChristian Ehrhardt		   struct rte_mempool *);
30197f17497SC.J. Collierint mlx5_rx_queue_setup(struct rte_eth_dev *, uint16_t, uint16_t, unsigned int,
30297f17497SC.J. Collier			const struct rte_eth_rxconf *, struct rte_mempool *);
30397f17497SC.J. Colliervoid mlx5_rx_queue_release(void *);
3048b25d1adSChristian Ehrhardtuint16_t mlx5_rx_burst_secondary_setup(void *, struct rte_mbuf **, uint16_t);
30597f17497SC.J. Collier
30697f17497SC.J. Collier/* mlx5_txq.c */
30797f17497SC.J. Collier
3088b25d1adSChristian Ehrhardtvoid txq_cleanup(struct txq_ctrl *);
3098b25d1adSChristian Ehrhardtint txq_ctrl_setup(struct rte_eth_dev *, struct txq_ctrl *, uint16_t,
3108b25d1adSChristian Ehrhardt		   unsigned int, const struct rte_eth_txconf *);
31197f17497SC.J. Collierint mlx5_tx_queue_setup(struct rte_eth_dev *, uint16_t, uint16_t, unsigned int,
31297f17497SC.J. Collier			const struct rte_eth_txconf *);
31397f17497SC.J. Colliervoid mlx5_tx_queue_release(void *);
3148b25d1adSChristian Ehrhardtuint16_t mlx5_tx_burst_secondary_setup(void *, struct rte_mbuf **, uint16_t);
31597f17497SC.J. Collier
31697f17497SC.J. Collier/* mlx5_rxtx.c */
31797f17497SC.J. Collier
31897f17497SC.J. Collieruint16_t mlx5_tx_burst(void *, struct rte_mbuf **, uint16_t);
3198b25d1adSChristian Ehrhardtuint16_t mlx5_tx_burst_mpw(void *, struct rte_mbuf **, uint16_t);
3208b25d1adSChristian Ehrhardtuint16_t mlx5_tx_burst_mpw_inline(void *, struct rte_mbuf **, uint16_t);
32197f17497SC.J. Collieruint16_t mlx5_rx_burst(void *, struct rte_mbuf **, uint16_t);
32297f17497SC.J. Collieruint16_t removed_tx_burst(void *, struct rte_mbuf **, uint16_t);
32397f17497SC.J. Collieruint16_t removed_rx_burst(void *, struct rte_mbuf **, uint16_t);
32497f17497SC.J. Collier
3258b25d1adSChristian Ehrhardt/* mlx5_mr.c */
3268b25d1adSChristian Ehrhardt
3278b25d1adSChristian Ehrhardtstruct ibv_mr *mlx5_mp2mr(struct ibv_pd *, struct rte_mempool *);
3288b25d1adSChristian Ehrhardtvoid txq_mp2mr_iter(struct rte_mempool *, void *);
3298b25d1adSChristian Ehrhardtuint32_t txq_mp2mr_reg(struct txq *, struct rte_mempool *, unsigned int);
3308b25d1adSChristian Ehrhardt
33197f17497SC.J. Collier#endif /* RTE_PMD_MLX5_RXTX_H_ */
332