DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1] net/iavf: fix error message in default initialization process
@ 2022-05-27  5:38 Wenjun Wu
  2022-05-29 22:37 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Wenjun Wu @ 2022-05-27  5:38 UTC (permalink / raw)
  To: dev, jingjing.wu, beilei.xing, qi.z.zhang; +Cc: weiyuanx.li, Wenjun Wu

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(-)

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;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-29 22:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-27  5:38 [PATCH v1] net/iavf: fix error message in default initialization process Wenjun Wu
2022-05-29 22:37 ` Zhang, Qi Z

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).