diff mbox series

[v1] net/iavf: fix error message in default initialization process

Message ID 20220527053851.3632714-1-wenjun1.wu@intel.com (mailing list archive)
State Accepted
Delegated to: Qi Zhang
Headers show
Series [v1] net/iavf: fix error message in default initialization process | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-testing warning apply patch failure
ci/checkpatch success coding style OK

Commit Message

Wenjun Wu May 27, 2022, 5:38 a.m. UTC
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")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Zhang, Qi Z May 29, 2022, 10:37 p.m. UTC | #1
> -----Original Message-----
> From: Wu, Wenjun1 <wenjun1.wu@intel.com>
> Sent: Friday, May 27, 2022 1:39 PM
> To: dev@dpdk.org; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: Li, WeiyuanX <weiyuanx.li@intel.com>; Wu, Wenjun1
> <wenjun1.wu@intel.com>
> Subject: [PATCH v1] net/iavf: fix error message in default initialization
> process

Rename to "fix initialization process with quanta configuration"

> 
> 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")
> 
> Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
diff mbox series

Patch

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index e85ae0ed0e..7df0bf8118 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -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;