summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_rxtx.c
diff options
context:
space:
mode:
authorNĂ©lio Laranjeiro <nelio.laranjeiro@6wind.com>2017-11-23 10:22:36 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2018-01-16 18:47:49 +0100
commit27a6b2d69485621cdfd3eae0f715fcfb4916773e (patch)
tree7680086fc47c4aaef5f337f8a59e1e1b75bc51a1 /drivers/net/mlx5/mlx5_rxtx.c
parent3bbae1ebd6cee93b63445f781acbede0a0003d92 (diff)
downloaddpdk-27a6b2d69485621cdfd3eae0f715fcfb4916773e.zip
dpdk-27a6b2d69485621cdfd3eae0f715fcfb4916773e.tar.gz
dpdk-27a6b2d69485621cdfd3eae0f715fcfb4916773e.tar.xz
net/mlx5: remove redundant inline variable
A non max_inline 0 means an inline is requested, there is no need to duplicate this information. Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_rxtx.c')
-rw-r--r--drivers/net/mlx5/mlx5_rxtx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 03c8ea7..93bf944 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -348,6 +348,7 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
unsigned int comp;
volatile struct mlx5_wqe_ctrl *last_wqe = NULL;
unsigned int segs_n = 0;
+ const unsigned int max_inline = txq->max_inline;
if (unlikely(!pkts_n))
return 0;
@@ -360,8 +361,6 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
if (unlikely(!max_wqe))
return 0;
do {
- unsigned int max_inline = txq->max_inline;
- const unsigned int inline_en = !!max_inline && txq->inline_en;
struct rte_mbuf *buf = NULL;
uint8_t *raw;
volatile struct mlx5_wqe_v *wqe = NULL;
@@ -532,7 +531,7 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
}
}
/* Inline if enough room. */
- if (inline_en || tso) {
+ if (max_inline || tso) {
uint32_t inl;
uintptr_t end = (uintptr_t)
(((uintptr_t)txq->wqes) +