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 33814A04FF; Tue, 24 May 2022 08:30:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28CD540E78; Tue, 24 May 2022 08:30:57 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id E0C0A400D6 for ; Tue, 24 May 2022 08:30:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653373855; x=1684909855; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=T0ZvdcjXpIUlb9sFgmRbCpxouTDZ7oTbmYkGfXsJt2g=; b=Zts4yOW0Gp3WCA7c2pmeAew8DolRVFJKj/IcMkSpdwFczu8WWmISShOZ 2gfoV+5tVRJgewSUCJXgbrq3SoszwYTk3HPJg1y374fXpehzi9ZqlHF7A Tpb55MdXjPCNDBj010kPxe1oHpjzr/aYNawqvj3zg6Pwi3tRVGSGBAUWz CaSqCFFT1qCPdESv78DZdAcoN4usT8WOSRwlSa8at/Cm1BCsE8wRL9LA8 Vw8zYqAyBhyTsUQsk4NXuDPP8oFRRGa4x7R5U7CLQxzpE0P9keHPv3xk0 1pc+y7STNuy05ukvWWKaMBr6cTUu7gB0/hX/kjDXPNB0BspofejSBhHog g==; X-IronPort-AV: E=McAfee;i="6400,9594,10356"; a="253319424" X-IronPort-AV: E=Sophos;i="5.91,248,1647327600"; d="scan'208";a="253319424" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2022 23:30:53 -0700 X-IronPort-AV: E=Sophos;i="5.91,248,1647327600"; d="scan'208";a="572480124" Received: from intel-cd-odc-robin.cd.intel.com ([10.240.178.200]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2022 23:30:51 -0700 From: Robin Zhang To: dev@dpdk.org Cc: thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru, kevinx.liu@intel.com, Robin Zhang Subject: [PATCH v7 0/5] add telemetry command for show module EEPROM Date: Tue, 24 May 2022 06:24:37 +0000 Message-Id: <20220524062442.194809-1-robinx.zhang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220511021442.811950-1-robinx.zhang@intel.com> References: <20220511021442.811950-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. 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 | 775 ++++++++++++++++++++++++++++++ lib/ethdev/sff_8636.h | 592 +++++++++++++++++++++++ lib/ethdev/sff_common.c | 326 +++++++++++++ lib/ethdev/sff_common.h | 174 +++++++ 10 files changed, 2743 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