net/mlx5: use buffer address for LKEY search
[dpdk.git] / drivers / net / mlx5 / mlx5_rxtx.h
index 450a569..d0f508e 100644 (file)
@@ -240,10 +240,10 @@ struct hash_rxq {
 };
 
 /* TX queue descriptor. */
-RTE_STD_C11
+__extension__
 struct txq {
-       uint16_t elts_head; /* Current index in (*elts)[]. */
-       uint16_t elts_tail; /* First element awaiting completion. */
+       uint16_t elts_head; /* Current counter in (*elts)[]. */
+       uint16_t elts_tail; /* Counter of first element awaiting completion. */
        uint16_t elts_comp; /* Counter since last completion request. */
        uint16_t mpw_comp; /* WQ index since last completion request. */
        uint16_t cq_ci; /* Consumer index for completion queue. */
@@ -267,10 +267,12 @@ struct txq {
        volatile uint32_t *cq_db; /* Completion queue doorbell. */
        volatile void *bf_reg; /* Blueflame register. */
        struct {
-               const struct rte_mempool *mp; /* Cached Memory Pool. */
+               uintptr_t start; /* Start address of MR */
+               uintptr_t end; /* End address of MR */
                struct ibv_mr *mr; /* Memory Region (for mp). */
                uint32_t lkey; /* htonl(mr->lkey) */
        } mp2mr[MLX5_PMD_TX_MP_CACHE]; /* MP to MR translation table. */
+       uint16_t mr_cache_idx; /* Index of last hit entry. */
        struct rte_mbuf *(*elts)[]; /* TX elements. */
        struct mlx5_txq_stats stats; /* TX queue counters. */
 } __rte_cache_aligned;