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 04B04A00BE; Mon, 25 Apr 2022 07:39:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F09C642804; Mon, 25 Apr 2022 07:39:29 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id EAA7D410E6 for ; Mon, 25 Apr 2022 07:39:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650865169; x=1682401169; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Rb/fL2EibRLOEbLJEp/dhr5xqDK92QLuFyiC7fs1yeg=; b=IRkqfibPIauXvUB+IufrHY2J5E9tO0cJ6v+oD7i/9XfInmCTiATYsXBv LlUZ+mt1L4sOF9yhULvPRULfst7PGydIyeeGZvB6QdtzpmEeAZBcx94wf deqTZXtAzca29/xZhUKpfzwyW35qf74+vYfBE63fmYDdkNZvHarpoiO77 mKnZhT9545sLPUYfKwUgNTq8CRvpNNPvYJ6kJabwP/sEPTrWsMAIE7MCf 6qT20jUn1RdzM2lE4USxaDqLjpF26Sok81D+eJBDXt7AnzMcRHD+5myjf 3DwwwMTDrZpy52K01l3ElijdYQcisI+H4QHOSOgnwW1kLAY2z57XDSJtN Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10327"; a="247070436" X-IronPort-AV: E=Sophos;i="5.90,287,1643702400"; d="scan'208";a="247070436" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2022 22:39:27 -0700 X-IronPort-AV: E=Sophos;i="5.90,287,1643702400"; d="scan'208";a="579087180" 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; 24 Apr 2022 22:39:24 -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 v4 0/5] add telemetry command for show module EEPROM Date: Mon, 25 Apr 2022 05:34:41 +0000 Message-Id: <20220425053446.921528-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. 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 | 140 ++++++ lib/ethdev/ethdev_sff_telemetry.h | 39 ++ 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