From e062bdc6cbaef636b68e1cdd2a0aa14eebbdc1c6 Mon Sep 17 00:00:00 2001 From: Shaopeng He Date: Tue, 10 Jul 2018 06:37:27 -0400 Subject: [PATCH] net/i40e: fix Tx queue setup after stop Currently, i40e_dev_tx_queue_setup_runtime checks simple tx and treats mbuf fast free offloading as No-simple, which is classified as simple tx in i40e_set_tx_function_flag. This inconsistent behavior causes tx queue setup fail after queue was stopped. This patch fixes this bug. Fixes: 399421100e08 ("net/i40e: fix missing mbuf fast free offload") Cc: stable@dpdk.org Signed-off-by: Shaopeng He Acked-by: Qi Zhang --- drivers/net/i40e/i40e_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 3be87fe6ac..65518ad90c 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -2096,7 +2096,7 @@ i40e_dev_tx_queue_setup_runtime(struct rte_eth_dev *dev, } /* check simple tx conflict */ if (ad->tx_simple_allowed) { - if (txq->offloads != 0 || + if ((txq->offloads & ~DEV_TX_OFFLOAD_MBUF_FAST_FREE) != 0 || txq->tx_rs_thresh < RTE_PMD_I40E_TX_MAX_BURST) { PMD_DRV_LOG(ERR, "No-simple tx is required."); return -EINVAL; -- 2.20.1