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 994E5A00C3; Tue, 19 Apr 2022 09:48:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 842E741611; Tue, 19 Apr 2022 09:48:15 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id A98444280F for ; Tue, 19 Apr 2022 09:48:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650354493; x=1681890493; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ga7uM44Cx/J6r0OEB/X0zwa1Rj/1PxD/ja3mnjizCQI=; b=ifgTddmhlDsGfG/U0BxCgcUM2FTqdBD376XdDuv3UmajdZw/HAP7ySUG rxgKrQ2Lp5wCZCjPj7KCtB+jQwjmEuZKhv5H2R5UPfQ5a7qPfhrBHEkyX qqkYdFapfMDx1DgsaQtvNYo5RV+1+UGWyS1e2W59APT3oUrimrg6gTsC/ sW1Rl6hM1kqAMNZn/uYnKSuANay+9lG5bmhPrHzhJC41RB0x+qUxo7AWf mXwolOS9zgVLgG4apYqHAmdOyCrWj3Um4VSwNtNov00apeWTRGrTaifD1 Dn0qPOrrsKyqDdw0/oQNPJJ5MpQIc/EA3ls/j0/wD35W5akvYGTraRhhx g==; X-IronPort-AV: E=McAfee;i="6400,9594,10321"; a="244288701" X-IronPort-AV: E=Sophos;i="5.90,272,1643702400"; d="scan'208";a="244288701" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2022 00:48:13 -0700 X-IronPort-AV: E=Sophos;i="5.90,272,1643702400"; d="scan'208";a="575971861" Received: from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2022 00:48:09 -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 v4 13/23] net/ice: treat unknown package as OS default package Date: Tue, 19 Apr 2022 15:46:04 +0000 Message-Id: <20220419154614.476154-14-kevinx.liu@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220419154614.476154-1-kevinx.liu@intel.com> References: <20220413171030.2231163-1-kevinx.liu@intel.com> <20220419154614.476154-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 8bb34b874b..f868d12d7c 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