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 0D987A0093; Tue, 26 Apr 2022 04:48:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F3B37406A2; Tue, 26 Apr 2022 04:48:41 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id A7FE340691 for ; Tue, 26 Apr 2022 04:48:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650941320; x=1682477320; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Q/ISgXUU/QYlBOjEo2SEB1UtaQBWboNxbDxRnEAdXCg=; b=UowRY3XKTDjIGuS8zYTWH5pjEDqEtICDyj8Kxvsx6fcfSmtRuQGW04V3 Q04GfJeiIi0S9THDQJvrrmPLs7a3iVxGJWmoRn2/rpwcLeJ+ZNDrYcKZg jJx9FWbHqv5UXmoOUJBJzdpJ37EzLHbgZXoaxcG73bJHtxdcFCq+YLkLt sdns1dCSy4Bg/M6Yg4AOw32OpSnGGaJiXnvA6IOgo5oOPqkT6dCc9gZbA avU/Qp2fYT+RQLyGW/tHUrtYxxMtOD6n3gjY+csc+Xr5mQW9wPBGbEVKB mRTsCh4UxO1cPLb2CIILXRfhDeYYeBbeSs6A8vnd4WEEzJ2lIlGsR7src Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10328"; a="252801975" X-IronPort-AV: E=Sophos;i="5.90,290,1643702400"; d="scan'208";a="252801975" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2022 19:48:39 -0700 X-IronPort-AV: E=Sophos;i="5.90,290,1643702400"; d="scan'208";a="579631280" Received: from intel-cd-odc-robin.cd.intel.com ([10.240.178.191]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2022 19:48:36 -0700 From: Robin Zhang To: dev@dpdk.org Cc: qiming.yang@intel.com, qi.z.zhang@intel.com, stevex.yang@intel.com, thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru, bruce.richardson@intel.com, david.marchand@redhat.com, Robin Zhang Subject: [PATCH v5 0/5] add telemetry command for show module EEPROM Date: Tue, 26 Apr 2022 02:43:44 +0000 Message-Id: <20220426024349.1081666-1-robinx.zhang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220215101853.919735-1-robinx.zhang@intel.com> References: <20220215101853.919735-1-robinx.zhang@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 Introduce a new telemetry command /ethdev/module_eeprom to show module EEPROM for each port. The format of module EEPROM information follows the SFF(Small Form Factor) Committee specifications. Current the format support SFP(Small Formfactor Pluggable)/SFP+/ QSFP+(Quad Small Formfactor Pluggable)/QSFP28 with specs SFF-8079/ SFF-8472/SFF-8024/SFF-8636. Afther run the /ethdev/module_eeprom command, telemetry client will show the module EEPROM information. We keep the same information content compare with Linux utility ethtool, refer to command 'ethtool -m' of ethtool v5.4. v5: - fix CI robot compile fail issue v4: - remove all printf in primary application, only show information in tememetry client - refine codes v3: - split up codes into several patches for better reivew Robin Zhang (5): ethdev: add telemetry command for module EEPROM ethdev: common utilities for different SFF specs ethdev: format module EEPROM for SFF-8079 ethdev: format module EEPROM for SFF-8472 ethdev: format module EEPROM for SFF-8636 lib/ethdev/ethdev_sff_telemetry.c | 142 ++++++ lib/ethdev/ethdev_sff_telemetry.h | 37 ++ lib/ethdev/meson.build | 5 + lib/ethdev/rte_ethdev.c | 3 + lib/ethdev/sff_8079.c | 407 ++++++++++++++++ lib/ethdev/sff_8472.c | 287 +++++++++++ lib/ethdev/sff_8636.c | 775 ++++++++++++++++++++++++++++++ lib/ethdev/sff_8636.h | 592 +++++++++++++++++++++++ lib/ethdev/sff_common.c | 326 +++++++++++++ lib/ethdev/sff_common.h | 174 +++++++ 10 files changed, 2748 insertions(+) create mode 100644 lib/ethdev/ethdev_sff_telemetry.c create mode 100644 lib/ethdev/ethdev_sff_telemetry.h create mode 100644 lib/ethdev/sff_8079.c create mode 100644 lib/ethdev/sff_8472.c create mode 100644 lib/ethdev/sff_8636.c create mode 100644 lib/ethdev/sff_8636.h create mode 100644 lib/ethdev/sff_common.c create mode 100644 lib/ethdev/sff_common.h -- 2.25.1