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

Reply via email to