From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BC2DCA055F; Fri, 27 May 2022 08:02:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 57EFC40E50; Fri, 27 May 2022 08:02:45 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id CDE9840E25 for ; Fri, 27 May 2022 08:02:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653631364; x=1685167364; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=uZnttz0w2W5SGEc2b4rRPgy1InyUhJ88CYo6q3Bi23o=; b=VE1WIm7FuvEzN9067GQA+SO6Oomby/W8/uK1uSIj8s8Z7JZWcqeHjSUn McZfbAbSpWhsOjZi9Jj4q7C/5k2itLz1zAKJpvFMi9UjyemWYn25pKGd0 GG/FKTH/jIUtEHSzQtBO9fspwcOKcM5AxFc469ZFbVWCp+nLIJwFSLw0Q ykFfM1B6g/YAl7Gn5F8adKwcCJSNaBclcqwjFePSSzyiz6Tip5Sq0c8gG 44nzjG8HDsD+Eqio5xKzX1B+JhJhqbJpOZTNvFqQ6f54KpB7ScoTRlWAM fDZnUTK8j1l7J/Kl8aznKk2jsBILZpROr4lLoU5xiWGKI1T+3O8gOrXRl w==; X-IronPort-AV: E=McAfee;i="6400,9594,10359"; a="271963185" X-IronPort-AV: E=Sophos;i="5.91,254,1647327600"; d="scan'208";a="271963185" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2022 23:02:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,254,1647327600"; d="scan'208";a="603676198" Received: from npg-wuwenjun-dpdk-01.sh.intel.com ([10.67.110.181]) by orsmga008.jf.intel.com with ESMTP; 26 May 2022 23:02:39 -0700 From: Wenjun Wu To: dev@dpdk.org, jingjing.wu@intel.com, beilei.xing@intel.com, qi.z.zhang@intel.com Cc: weiyuanx.li@intel.com, Wenjun Wu Subject: [PATCH v1] net/iavf: fix error message in default initialization process Date: Fri, 27 May 2022 13:38:51 +0800 Message-Id: <20220527053851.3632714-1-wenjun1.wu@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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