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 E4FD0A0508; Wed, 13 Apr 2022 10:13:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E9E4042849; Wed, 13 Apr 2022 10:11:43 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id DAA8642849 for ; Wed, 13 Apr 2022 10:11:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649837502; x=1681373502; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EX5z1L9Py0aRxNU4gUXbHDsejPvnhgFet+y7t9iFhk4=; b=Pa6lXsgFLxv2ZNsnCzNfuW1gvMWi7VPkQeLuOJmDgEOQTiiBHpg/Gwej IcSv9K9AlZ+G0dAg+ppTS+dH4Fiwi0JfdmAahAHSOhzbz2a4oQHAB5U1N ZbT8mNRSgsiX9eE91PYKUlhqGEJDvwzPAXuRclGFbjmj78HWsNsA+EgX4 2RmHKzF5q+AjReCe3MhoNpw0ppF4CB6u6JeUQvlOqRhw9Cf552z7otbFI Ax+HPwPb+qJ+4Wc1MQh7Iy29j2Jzg/u1VaQVvUFLwTBu+m9DXTwRqxTh7 9ld0i5tE7frLo7Rut0/TIvI4mWKNvKJmN6j6EngCoLNLbnM1IWIl5FWHv g==; X-IronPort-AV: E=McAfee;i="6400,9594,10315"; a="287630080" X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="287630080" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 01:11:41 -0700 X-IronPort-AV: E=Sophos;i="5.90,256,1643702400"; d="scan'208";a="526847824" Received: from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 01:11:39 -0700 From: Kevin Liu To: dev@dpdk.org Cc: qiming.yang@intel.com, qi.z.zhang@intel.com, stevex.yang@intel.com, Alvin Zhang , Kevin Liu Subject: [PATCH v2 22/33] net/ice: treat unknown package as OS default package Date: Wed, 13 Apr 2022 16:09:21 +0000 Message-Id: <20220413160932.2074781-23-kevinx.liu@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220413160932.2074781-1-kevinx.liu@intel.com> References: <20220407105706.18889-1-kevinx.liu@intel.com> <20220413160932.2074781-1-kevinx.liu@intel.com> 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 From: Alvin Zhang In order to use custom package, unknown package should be treated as OS default package. Signed-off-by: Alvin Zhang Signed-off-by: Kevin Liu --- drivers/net/ice/ice_ethdev.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 73e550f5fb..ad9b09d081 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -1710,13 +1710,16 @@ ice_load_pkg_type(struct ice_hw *hw) /* store the activated package type (OS default or Comms) */ if (!strncmp((char *)hw->active_pkg_name, ICE_OS_DEFAULT_PKG_NAME, - ICE_PKG_NAME_SIZE)) + ICE_PKG_NAME_SIZE)) { package_type = ICE_PKG_TYPE_OS_DEFAULT; - else if (!strncmp((char *)hw->active_pkg_name, ICE_COMMS_PKG_NAME, - ICE_PKG_NAME_SIZE)) + } else if (!strncmp((char *)hw->active_pkg_name, ICE_COMMS_PKG_NAME, + ICE_PKG_NAME_SIZE)) { package_type = ICE_PKG_TYPE_COMMS; - else - package_type = ICE_PKG_TYPE_UNKNOWN; + } else { + PMD_INIT_LOG(WARNING, + "The package type is not identified, treaded as OS default type"); + package_type = ICE_PKG_TYPE_OS_DEFAULT; + } PMD_INIT_LOG(NOTICE, "Active package is: %d.%d.%d.%d, %s (%s VLAN mode)", hw->active_pkg_ver.major, hw->active_pkg_ver.minor, -- 2.33.1