From patchwork Thu Apr 27 06:19:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qiming Yang X-Patchwork-Id: 126584 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DAFAB42A08; Thu, 27 Apr 2023 08:39:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4DF7042FA4; Thu, 27 Apr 2023 08:38:19 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 5D05B42F8A for ; Thu, 27 Apr 2023 08:38:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682577496; x=1714113496; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YsYMWydXYhkbrSfvrDMxrdtCK1lN1/a/OW0Pi/2Taog=; b=XF5d3qTIQLVnqFZvqGbOhHQFmzpfaUr8jdZ9EfdqJXneRU1eYlI9ZGVl QeBXOQXhN4LyvRnzKTZ8bdSVBY4UpRoSVg+2KEFRgEh7YMA676F4Ts2/Y 6mrv1TSkM2cIw0T0MGsYoKw0EL9ZjAJuD8A+s/IsAwBS803R9VwiCkrYV yYvNScruRU7VrgmPcFn5y80RZnZw3m6W5dZ1AbJ+N1IzGZE2Rvf5Dx9oF r+wyBMJxqq5+rU+oJQTW8L3CWd6V4m2IGE0SjIQQjQlY+DP6rkYGoSj6y ZLchC6Wt8+/f6Nj72Txs+hpcb6MW7mU2yeRsFadjHW5roZ9ZmDJfrspaA g==; X-IronPort-AV: E=McAfee;i="6600,9927,10692"; a="375324349" X-IronPort-AV: E=Sophos;i="5.99,230,1677571200"; d="scan'208";a="375324349" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2023 23:38:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10692"; a="805845828" X-IronPort-AV: E=Sophos;i="5.99,230,1677571200"; d="scan'208";a="805845828" Received: from dpdk-qiming3.sh.intel.com ([10.67.111.4]) by fmsmga002.fm.intel.com with ESMTP; 26 Apr 2023 23:38:13 -0700 From: Qiming Yang To: dev@dpdk.org Cc: qi.z.zhang@intel.com, Qiming Yang , Grzegorz Nitka Subject: [PATCH 17/30] net/ice/base: add C825X device support Date: Thu, 27 Apr 2023 06:19:48 +0000 Message-Id: <20230427062001.478032-18-qiming.yang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230427062001.478032-1-qiming.yang@intel.com> References: <20230427062001.478032-1-qiming.yang@intel.com> MIME-Version: 1.0 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 Use ICE_MAC_GENERIC_3K type for C825X devices and fix E825X name to C825X. Signed-off-by: Grzegorz Nitka Signed-off-by: Qiming Yang --- drivers/net/ice/base/ice_common.c | 13 +++++++++---- drivers/net/ice/base/ice_ddp.c | 8 +++++++- drivers/net/ice/base/ice_ddp.h | 1 + drivers/net/ice/base/ice_devids.h | 11 ++++------- drivers/net/ice/base/ice_type.h | 1 + drivers/net/ice/ice_ethdev.c | 3 +-- 6 files changed, 23 insertions(+), 14 deletions(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index ed822afc30..e4b25321db 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -241,13 +241,17 @@ static enum ice_status ice_set_mac_type(struct ice_hw *hw) case ICE_DEV_ID_E823C_QSFP: case ICE_DEV_ID_E823C_SFP: case ICE_DEV_ID_E823C_SGMII: + hw->mac_type = ICE_MAC_GENERIC; + break; case ICE_DEV_ID_E824S: + hw->mac_type = ICE_MAC_GENERIC_3K; + break; case ICE_DEV_ID_E825C_BACKPLANE: case ICE_DEV_ID_E825C_QSFP: case ICE_DEV_ID_E825C_SFP: - case ICE_DEV_ID_E825C_1GBE: - case ICE_DEV_ID_E825X: - hw->mac_type = ICE_MAC_GENERIC; + case ICE_DEV_ID_C825X: + case ICE_DEV_ID_E825C_SGMII: + hw->mac_type = ICE_MAC_GENERIC_3K_E825; break; case ICE_DEV_ID_E830_BACKPLANE: case ICE_DEV_ID_E830_QSFP56: @@ -273,7 +277,8 @@ static enum ice_status ice_set_mac_type(struct ice_hw *hw) bool ice_is_generic_mac(struct ice_hw *hw) { return (hw->mac_type == ICE_MAC_GENERIC || - hw->mac_type == ICE_MAC_GENERIC_3K); + hw->mac_type == ICE_MAC_GENERIC_3K || + hw->mac_type == ICE_MAC_GENERIC_3K_E825); } /** diff --git a/drivers/net/ice/base/ice_ddp.c b/drivers/net/ice/base/ice_ddp.c index e3c1f413dd..e43aab981d 100644 --- a/drivers/net/ice/base/ice_ddp.c +++ b/drivers/net/ice/base/ice_ddp.c @@ -444,6 +444,7 @@ static u32 ice_get_pkg_segment_id(enum ice_mac_type mac_type) break; case ICE_MAC_GENERIC: case ICE_MAC_GENERIC_3K: + case ICE_MAC_GENERIC_3K_E825: default: seg_id = SEGMENT_TYPE_ICE_E810; break; @@ -467,6 +468,9 @@ static u32 ice_get_pkg_sign_type(enum ice_mac_type mac_type) case ICE_MAC_GENERIC_3K: sign_type = SEGMENT_SIGN_TYPE_RSA3K; break; + case ICE_MAC_GENERIC_3K_E825: + sign_type = SEGMENT_SIGN_TYPE_RSA3K_E825; + break; case ICE_MAC_GENERIC: default: sign_type = SEGMENT_SIGN_TYPE_RSA2K; @@ -1632,8 +1636,10 @@ ice_get_sw_fv_list(struct ice_hw *hw, struct ice_prot_lkup_ext *lkups, } } } while (fv); - if (LIST_EMPTY(fv_list)) + if (LIST_EMPTY(fv_list)) { + ice_warn(hw, "Required profiles not found in currently loaded DDP package"); return ICE_ERR_CFG; + } return ICE_SUCCESS; err: diff --git a/drivers/net/ice/base/ice_ddp.h b/drivers/net/ice/base/ice_ddp.h index 57b39c72ca..6c87f11972 100644 --- a/drivers/net/ice/base/ice_ddp.h +++ b/drivers/net/ice/base/ice_ddp.h @@ -99,6 +99,7 @@ struct ice_pkg_hdr { #define SEGMENT_SIGN_TYPE_RSA2K 0x00000001 #define SEGMENT_SIGN_TYPE_RSA3K 0x00000002 #define SEGMENT_SIGN_TYPE_RSA3K_SBB 0x00000003 /* Secure Boot Block */ +#define SEGMENT_SIGN_TYPE_RSA3K_E825 0x00000005 /* generic segment */ struct ice_generic_seg_hdr { diff --git a/drivers/net/ice/base/ice_devids.h b/drivers/net/ice/base/ice_devids.h index 9ea915b967..0e0a20542b 100644 --- a/drivers/net/ice/base/ice_devids.h +++ b/drivers/net/ice/base/ice_devids.h @@ -76,13 +76,10 @@ /* Intel(R) Ethernet Connection E825-C for backplane */ #define ICE_DEV_ID_E825C_BACKPLANE 0x579C /* Intel(R) Ethernet Connection E825-C for QSFP */ -#define ICE_DEV_ID_E825C_QSFP 0x579D +#define ICE_DEV_ID_E825C_QSFP 0x579D /* Intel(R) Ethernet Connection E825-C for SFP */ -#define ICE_DEV_ID_E825C_SFP 0x579E +#define ICE_DEV_ID_E825C_SFP 0x579E /* Intel(R) Ethernet Connection E825-C 1GbE */ -#define ICE_DEV_ID_E825C_1GBE 0x579F -/* Intel(R) Ethernet Connection E825-X */ -#define ICE_DEV_ID_E825X 0x0DCD - - +#define ICE_DEV_ID_E825C_SGMII 0x579F +#define ICE_DEV_ID_C825X 0x0DCD #endif /* _ICE_DEVIDS_H_ */ diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h index d072b0bfe2..9651720470 100644 --- a/drivers/net/ice/base/ice_type.h +++ b/drivers/net/ice/base/ice_type.h @@ -225,6 +225,7 @@ enum ice_mac_type { ICE_MAC_E830, ICE_MAC_GENERIC, ICE_MAC_GENERIC_3K, + ICE_MAC_GENERIC_3K_E825, }; /* Media Types */ diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index a5bf8317a7..2a4073c4d1 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -196,8 +196,7 @@ static const struct rte_pci_id pci_id_ice_map[] = { { RTE_PCI_DEVICE(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E825C_BACKPLANE) }, { RTE_PCI_DEVICE(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E825C_QSFP) }, { RTE_PCI_DEVICE(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E825C_SFP) }, - { RTE_PCI_DEVICE(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E825C_1GBE) }, - { RTE_PCI_DEVICE(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E825X) }, + { RTE_PCI_DEVICE(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_C825X) }, { .vendor_id = 0, /* sentinel */ }, };