DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <beilei.xing@intel.com>, <jia.guo@intel.com>
Subject: [dpdk-dev] [PATCH 2/2] net/i40e: remove redundant judgment
Date: Wed, 21 Apr 2021 10:33:14 +0800	[thread overview]
Message-ID: <1618972394-14045-3-git-send-email-humin29@huawei.com> (raw)
In-Reply-To: <1618972394-14045-1-git-send-email-humin29@huawei.com>

From: Chengwen Feng <fengchengwen@huawei.com>

The vsi pointer is always valid, so it no need to judge it's 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>
---
 drivers/net/i40e/i40e_rxtx.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 3c7686c..064b765 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2216,8 +2216,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);
-- 
2.7.4


  parent reply	other threads:[~2021-04-21  2:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21  2:33 [dpdk-dev] [PATCH 0/2] fixes for i40e PMD Min Hu (Connor)
2021-04-21  2:33 ` [dpdk-dev] [PATCH 1/2] net/i40e: fix veb index negative was not checked Min Hu (Connor)
2021-04-22 13:17   ` Zhang, Qi Z
2021-04-21  2:33 ` Min Hu (Connor) [this message]
2021-04-22 13:21   ` [dpdk-dev] [PATCH 2/2] net/i40e: remove redundant judgment Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1618972394-14045-3-git-send-email-humin29@huawei.com \
    --to=humin29@huawei.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jia.guo@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).