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 7A8A1A00BE; Wed, 20 Apr 2022 09:05:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6AB784068E; Wed, 20 Apr 2022 09:05:27 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 284FE40687 for ; Wed, 20 Apr 2022 09:05:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650438326; x=1681974326; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/elk5Oc5YvzjqK1EumYQUXyXSYPwycoaAqfujnmLdyQ=; b=A+a2AfExyEuRajPLX3j6ghwqAzRM6Fzh2cJ/RpQaLjfXeD/4eouvYNHC xXGYbxkuxopph4pIooEF3Fk7erIVorm0/WkhQUU1mGThiayxWcHhT30/w qzvpMDupIMj2sjQyZElKBQu4+T8I/14maWp1TZIwBqVj7WAVutae7Zi/j 8s//yv4Myz7jBGEL+ujDWq3cIdGtysvc1cx9RoIhg0eWSfV/48fd1Ev1j LyIS9cmmCh3Sdosqn9rqs8vaK25slKku1DusjKxHM/2x0chsapjMzbW1O wLvhxtcgcKOS/uryfu+UCAMDE6+gZUIMU6VZGknH9KoA/TcodbYcJ0l8T Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10322"; a="262815230" X-IronPort-AV: E=Sophos;i="5.90,274,1643702400"; d="scan'208";a="262815230" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2022 00:05:24 -0700 X-IronPort-AV: E=Sophos;i="5.90,274,1643702400"; d="scan'208";a="529631790" Received: from intel-cd-odc-robin.cd.intel.com ([10.240.178.191]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2022 00:05:20 -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 v3 0/5] add telemetry command for show module EEPROM Date: Wed, 20 Apr 2022 07:00:12 +0000 Message-Id: <20220420070017.119739-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, both primary application and telemetry client will show the module EEPROM information. For primary application, we keep the same format with Linux utility ethtool, refer to command 'ethtool -m' of ethtool v5.4. For telemetry client, we record the key value pairs of each item, then show them in telemetry client dictionary. 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 | 135 ++++ lib/ethdev/ethdev_sff_telemetry.h | 42 ++ lib/ethdev/meson.build | 5 + lib/ethdev/rte_ethdev.c | 3 + lib/ethdev/sff_8079.c | 672 +++++++++++++++++++ lib/ethdev/sff_8472.c | 301 +++++++++ lib/ethdev/sff_8636.c | 1004 +++++++++++++++++++++++++++++ lib/ethdev/sff_8636.h | 592 +++++++++++++++++ lib/ethdev/sff_common.c | 414 ++++++++++++ lib/ethdev/sff_common.h | 191 ++++++ 10 files changed, 3359 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