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 C34C0A0544; Wed, 25 May 2022 05:20:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B4D8040150; Wed, 25 May 2022 05:20:42 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id B6D6B400D6 for ; Wed, 25 May 2022 05:20: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=1653448840; x=1684984840; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UZzcbQqgRMeyBDYczsJN10fu9EHu+6xJZXfCGVyL3Nk=; b=VXMhCjUxyYLYUZxv9wOACPtnx6Vfz6sMzDa8tZBjeBFD3ElOoN8p1Ltt ZUl7CnJfNFA0aQoWq/WEnH0lg54KUMSsyBXQgVblohvOyemQZoLN0en+A vBxm0h1f+2WQPfWqDx3cwlTEGetTtEJwRaHnzAZFSSWEvyhaBBQmXZGH6 hLfZhMFnc43/RMQsstbY8R1fwHsGOyIRwxZBJKF3cvOoea47olGcWyqa6 0w5UNt8ZobwFWi7tZg3lRThOtFPbs4aW8LnelyOEKZAnIG/OGvGJZSKHI cwz7+WhDqbijcTWOQSb0cJJ0F6ixlF9N0t/P3mIWx9IQpWyxDfcpgbF2A A==; X-IronPort-AV: E=McAfee;i="6400,9594,10357"; a="299033854" X-IronPort-AV: E=Sophos;i="5.91,250,1647327600"; d="scan'208";a="299033854" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2022 20:20:39 -0700 X-IronPort-AV: E=Sophos;i="5.91,250,1647327600"; d="scan'208";a="601623535" Received: from intel-cd-odc-robin.cd.intel.com ([10.240.178.200]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2022 20:20:37 -0700 From: Robin Zhang To: dev@dpdk.org Cc: thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru, kevinx.liu@intel.com, Robin Zhang Subject: [PATCH v8 0/5] add telemetry command for show module EEPROM Date: Wed, 25 May 2022 03:14:41 +0000 Message-Id: <20220525031446.72578-1-robinx.zhang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220524062442.194809-1-robinx.zhang@intel.com> References: <20220524062442.194809-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. 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: 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 | 149 ++++++ lib/ethdev/ethdev_sff_telemetry.h | 27 ++ lib/ethdev/meson.build | 5 + lib/ethdev/rte_ethdev.c | 3 + lib/ethdev/sff_8079.c | 406 ++++++++++++++++ lib/ethdev/sff_8472.c | 286 ++++++++++++ lib/ethdev/sff_8636.c | 750 ++++++++++++++++++++++++++++++ lib/ethdev/sff_8636.h | 611 ++++++++++++++++++++++++ lib/ethdev/sff_common.c | 326 +++++++++++++ lib/ethdev/sff_common.h | 174 +++++++ 10 files changed, 2737 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