Skip to contentSkip to conversation

net/iavf: fix error message in default initialization process

PATCH Applied Wenjun Wu 2 participants 2 messages May 27, 2022 – May 29, 2022 Network drivers

lore
Share & tools
lore

Wenjun Wu

author
#0 lore raw

PATCH 1/1 net/iavf: fix error message in default initialization process

When kernel driver does not support quanta size configuration, it will return error. We do not expect it to occur in default initialization process.

Fixes b14e8a57b9fe ("net/iavf: support quanta size configuration")
---
 drivers/net/iavf/iavf_ethdev.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/net/iavf/iavf_ethdev.c +3 -5
index e85ae0ed0e..7df0bf8118 100644
@@ -2224,11 +2224,9 @@ static int iavf_parse_devargs(struct rte_eth_dev *dev)
 	if (ret)
 		goto bail;
 
-	if (ad->devargs.quanta_size == 0)
-		ad->devargs.quanta_size = 1024;
-
-	if (ad->devargs.quanta_size < 256 || ad->devargs.quanta_size > 4096 ||
-	    ad->devargs.quanta_size & 0x40) {
+	if (ad->devargs.quanta_size != 0 &&
+	    (ad->devargs.quanta_size < 256 || ad->devargs.quanta_size > 4096 ||
+	     ad->devargs.quanta_size & 0x40)) {
 		PMD_INIT_LOG(ERR, "invalid quanta size\n");
 		ret = -EINVAL;
 		goto bail;
Signature · 1 line
2.25.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 11 lines

-----Original Message-----
From: Wu, Wenjun1 <[email protected]>
Sent: Friday, May 27, 2022 1:39 PM
To: [email protected]; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: Li, WeiyuanX <[email protected]>; Wu, Wenjun1 <[email protected]>
Subject: [PATCH v1] net/iavf: fix error message in default initialization process

Rename to "fix initialization process with quanta configuration"

Quoted 7 lines

When kernel driver does not support quanta size configuration, it will return error. We do not expect it to occur in default initialization process.

Fixes b14e8a57b9fe ("net/iavf: support quanta size configuration")

Applied to dpdk-next-net-intel.

Thanks
Qi