b8bc1241d1
TX queue elements (struct txq_elt) contain WR and SGE structures required by ibv_post_send(). This commit replaces them with a single pointer to the related TX mbuf considering that: - There is no need to keep these structures around forever since the hardware doesn't access them after ibv_post_send() and send_pending*() have returned. - The TX queue index stored in the WR ID field is not used for completions anymore since they use a separate counter (elts_comp_cd). - The WR structure itself was only useful for ibv_post_send(), it is currently only used to store the mbuf data address and an offset to the mbuf structure in the WR ID field. send_pending*() callbacks only require SGEs or buffer pointers. Therefore for single segment mbufs, send_pending() or send_pending_inline() can be used directly without involving SGEs. For scattered mbufs, SGEs are allocated on the stack and passed to send_pending_sg_list(). Signed-off-by: Alex Rosenbaum <alexr@mellanox.com> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>