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 D74A3A0557; Thu, 26 May 2022 09:39:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 785C340E64; Thu, 26 May 2022 09:39:32 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id C8F9440E64 for ; Thu, 26 May 2022 09:39:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653550771; x=1685086771; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=H2MtOh2u4vmVvJJoOO33FrJsMvmiaQodJxL5BtgPb9Y=; b=GhiHCczxrP9XMsjzTZkDVfpGAicWkq4JtEIQ9rVqdbbNnfExfrjs4QTC QD2qxdw/B83D3ciiOAu0uEKRPBLSRNRaFzCRB/EaIWEgRTof5trMOY3oE 8HrO870fh6P7hc6gtcMgJIyB2x34jPpesd4omuAUki34/zm7d+tJB88rx DSVCVhxK57jm3y1COFfQfODhE1mnFPU+ujqW8xP7vA3fjqwAOqO8CSCdL +usMi+hog8KRStJrIAnsi0MQX0OeJvbaFr4mKzk861UiYxrVrPkyFHeLF a3bryuX31SpR7qs+GJehrI5u6xHduwgbOT8UMqbZm8QSLvIROLw5bwN4E Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10358"; a="272885314" X-IronPort-AV: E=Sophos;i="5.91,252,1647327600"; d="scan'208";a="272885314" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2022 00:39:21 -0700 X-IronPort-AV: E=Sophos;i="5.91,252,1647327600"; d="scan'208";a="549441827" Received: from intel-cd-odc-robin.cd.intel.com ([10.240.178.142]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2022 00:39:19 -0700 From: Robin Zhang To: dev@dpdk.org Cc: thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru, kevinx.liu@intel.com, Robin Zhang Subject: [PATCH v9 0/5] add telemetry command for show module EEPROM Date: Thu, 26 May 2022 07:32:10 +0000 Message-Id: <20220526073215.428410-1-robinx.zhang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220525031446.72578-1-robinx.zhang@intel.com> References: <20220525031446.72578-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. v9: - Optimize code format and commit log v8: - refine code v7: - remove "#include " in lib/ethdev/sff_8472.c v6: - refine code 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: add common code for different SFF specs ethdev: support SFF-8079 module information telemetry ethdev: support SFF-8472 module information telemetry ethdev: support SFF-8636 module information telemetry devtools/words-case.txt | 1 + lib/ethdev/meson.build | 5 + lib/ethdev/rte_ethdev.c | 3 + lib/ethdev/sff_8079.c | 401 +++++++++++++++++++ lib/ethdev/sff_8472.c | 280 ++++++++++++++ lib/ethdev/sff_8636.c | 764 +++++++++++++++++++++++++++++++++++++ lib/ethdev/sff_8636.h | 590 ++++++++++++++++++++++++++++ lib/ethdev/sff_common.c | 319 ++++++++++++++++ lib/ethdev/sff_common.h | 173 +++++++++ lib/ethdev/sff_telemetry.c | 150 ++++++++ lib/ethdev/sff_telemetry.h | 27 ++ 11 files changed, 2713 insertions(+) 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 create mode 100644 lib/ethdev/sff_telemetry.c create mode 100644 lib/ethdev/sff_telemetry.h -- 2.25.1