summaryrefslogtreecommitdiff
path: root/drivers/net/i40e
diff options
context:
space:
mode:
authorZhirun Yan <zhirun.yan@intel.com>2018-12-13 12:49:28 +0000
committerThomas Monjalon <thomas@monjalon.net>2018-12-13 23:06:37 +0100
commitef8b7c505f10897621c0801d8ef3e961385246f8 (patch)
tree3aa17e77e04832990c3bf840d0e3da1677091481 /drivers/net/i40e
parente51da4bbaf3584e16cbd0ea0b1b85343b777134f (diff)
downloaddpdk-next-eventdev-ef8b7c505f10897621c0801d8ef3e961385246f8.zip
dpdk-next-eventdev-ef8b7c505f10897621c0801d8ef3e961385246f8.tar.gz
dpdk-next-eventdev-ef8b7c505f10897621c0801d8ef3e961385246f8.tar.xz
net/i40e: remove redundant reset of queue number
Before this patch, there are two functions will call i40e_dev_free_queues to free queues. For rte_eth_dev_close(), its redundant because of duplication. For rte_eth_dev_reset() its redundant because of not necessary, since following dev_configure is required after dev_reset and it will be updated correctly. This patch removes redundant code in i40e_dev_free_queues(). Fixes: 6b4537128394 ("i40e: free queue memory when closing") Cc: stable@dpdk.org Signed-off-by: Zhirun Yan <zhirun.yan@intel.com> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Diffstat (limited to 'drivers/net/i40e')
-rw-r--r--drivers/net/i40e/i40e_rxtx.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index ab74a48..82a1709 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2753,7 +2753,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
i40e_dev_rx_queue_release(dev->data->rx_queues[i]);
dev->data->rx_queues[i] = NULL;
}
- dev->data->nb_rx_queues = 0;
for (i = 0; i < dev->data->nb_tx_queues; i++) {
if (!dev->data->tx_queues[i])
@@ -2761,7 +2760,6 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
i40e_dev_tx_queue_release(dev->data->tx_queues[i]);
dev->data->tx_queues[i] = NULL;
}
- dev->data->nb_tx_queues = 0;
}
#define I40E_FDIR_NUM_TX_DESC I40E_MIN_RING_DESC