net/i40e: remove redundant VSI check in Tx queue setup
authorChengwen Feng <fengchengwen@huawei.com>
Wed, 21 Apr 2021 02:33:14 +0000 (10:33 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Fri, 23 Apr 2021 08:59:40 +0000 (10:59 +0200)
The VSI pointer is always valid, so there is no need to judge its
validity.

Fixes: b6583ee40265 ("i40e: full VMDQ pools support")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/i40e/i40e_rxtx.c

index 86a9eae..02cf5e7 100644 (file)
@@ -2253,8 +2253,6 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,
        if (hw->mac.type == I40E_MAC_VF || hw->mac.type == I40E_MAC_X722_VF) {
                vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
                vsi = &vf->vsi;
-               if (!vsi)
-                       return -EINVAL;
                reg_idx = queue_idx;
        } else {
                pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);