Skip to contentSkip to conversation

fixes for i40e PMD

PATCH Applied Min Hu (Connor) 2 participants 5 messages Apr 21, 2021 – Apr 22, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

cover fixes for i40e PMD

This patchset contains two fixes for i40e PMD.

Chengwen Feng (2):
net/i40e: fix veb index negative was not checked net/i40e: remove redundant judgment

 drivers/net/i40e/i40e_ethdev.c | 2 ++
 drivers/net/i40e/i40e_rxtx.c   | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/2 net/i40e: fix veb index negative was not checked

From: Chengwen Feng <[email protected]>

This patch adds checking for veb index negative when parsing veb list.

Fixes 79f2248219c0 (net/i40e: add floating VEB option)
---
 drivers/net/i40e/i40e_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/i40e/i40e_ethdev.c +2 -0
index e6206a7..c897c81 100644
@@ -854,6 +854,8 @@ floating_veb_list_handler(__rte_unused const char *key,
 		idx = strtoul(floating_veb_value, &end, 10);
 		if (errno || end == NULL)
 			return -1;
+		if (idx < 0)
+			return -1;
 		while (isblank(*end))
 			end++;
 		if (*end == '-') {
Signature · 1 line
2.7.4
Acked-by on v1 1/2 Applied
#2 lore raw

Re: [dpdk-dev] [PATCH 1/2] net/i40e: fix veb index negative was not checked

Quoted 13 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Min Hu (Connor)
Sent: Wednesday, April 21, 2021 10:33 AM
To: [email protected]
Cc: Yigit, Ferruh <[email protected]>; Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev] [PATCH 1/2] net/i40e: fix veb index negative was not checked

From: Chengwen Feng <[email protected]>

Quoted 7 lines

This patch adds checking for veb index negative when parsing veb list.

Fixes 79f2248219c0 (net/i40e: add floating VEB option)

Applied to dpdk-next-net-intel.

Thanks
Qi

#3 lore raw

PATCH 2/2 net/i40e: remove redundant judgment

In reply to Min Hu (Connor)

From: Chengwen Feng <[email protected]>

The vsi pointer is always valid, so it no need to judge it's validity.

Fixes b6583ee40265 ("i40e: full VMDQ pools support")
---
 drivers/net/i40e/i40e_rxtx.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/i40e/i40e_rxtx.c +0 -2
index 3c7686c..064b765 100644
@@ -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);
Signature · 1 line
2.7.4
Acked-by on v1 2/2 Applied
#4 lore raw

Re: [dpdk-dev] [PATCH 2/2] net/i40e: remove redundant judgment

Quoted 12 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Min Hu (Connor)
Sent: Wednesday, April 21, 2021 10:33 AM
To: [email protected]
Cc: Yigit, Ferruh <[email protected]>; Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>
Subject: [dpdk-dev] [PATCH 2/2] net/i40e: remove redundant judgment

From: Chengwen Feng <[email protected]>

Quoted 7 lines

The vsi pointer is always valid, so it no need to judge it's validity.

Fixes b6583ee40265 ("i40e: full VMDQ pools support")

Applied to dpdk-next-net-intel.

Thanks
Qi