Message ID | 20220420070017.119739-1-robinx.zhang@intel.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> 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 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 <dev@dpdk.org>; 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 <robinx.zhang@intel.com> 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 <robinx.zhang@intel.com> 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 <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
add telemetry command for show module EEPROM
|
|
Message
Robin Zhang
April 20, 2022, 7 a.m. UTC
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
Comments
> From: Robin Zhang [mailto:robinx.zhang@intel.com] > Sent: Wednesday, 20 April 2022 09.00 > > 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. This patch uses printf() a lot. It should only collect the data and give the data to the telemetry library, not printf() anything. It is up to the application (which asked the telemetry library for the data) to determine how the data should be presented to the end user. E.g. the application could present the data in an SNMP packet, as the response to an SNMP request received by the application's SNMP agent. The separation of data and presentation is a key point of the telemetry library. -Morten