net/mlx5: change indexing for Tx SW ring
authorYongseok Koh <yskoh@mellanox.com>
Thu, 6 Jul 2017 18:41:06 +0000 (11:41 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 7 Jul 2017 09:50:02 +0000 (11:50 +0200)
commit8c819a6926c1f4914c8095599e874d6845ddf512
tree2a02b2d5079e46493187d4ec2df6c4e1e877f5de
parentc009c6b142107a960b58ed2cc8aa81b55b452c66
net/mlx5: change indexing for Tx SW ring

For Tx SW ring (txq->elts[]), indexes are kept and used in
txq->elts_head/tail. Because of this, one entry must always be left unused
and it also makes code complex. Changed to store counters instead of
indexes in order to make the code simpler and to reduce a few calculations.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
drivers/net/mlx5/mlx5_rxtx.c
drivers/net/mlx5/mlx5_rxtx.h
drivers/net/mlx5/mlx5_txq.c