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 E1D61A050A; Thu, 14 Apr 2022 09:41:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7EA7740687; Thu, 14 Apr 2022 09:41:39 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 767D14003F for ; Thu, 14 Apr 2022 09:41:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649922098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+r0NtmCcPobzvnVfFwA3A+defBFFqGNsxtoXvTsbP5w=; b=chJkSdymFc5l/39Msl8M9KksOnOZvV/s6zASzeWd2L8uph0S9ZWG3FW4DFwDfP6Af8/z/M fnWiRLwjGx9/vUdzRP8IN3cAaQkJ6zgc5+Sqy5AHeJZ9EIl0gBwSo2+52clhysmFkUGBGo uTfx11Iw22nXuul2i3TlBVbI1DXfuzA= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-388-W5N5EQhfPxuQ8XbRVIPPSg-1; Thu, 14 Apr 2022 03:41:36 -0400 X-MC-Unique: W5N5EQhfPxuQ8XbRVIPPSg-1 Received: by mail-lj1-f199.google.com with SMTP id z4-20020a2e3504000000b0024c87adf6e1so798089ljz.13 for ; Thu, 14 Apr 2022 00:41:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+r0NtmCcPobzvnVfFwA3A+defBFFqGNsxtoXvTsbP5w=; b=6ZzD4X29NCAGgBSvyApAVlRGDm+CvjnCAp0RAGEXTZtxJ80C8jPCHanWYqTbXetAgV aWtqpY9cZHvLcfwcS/4BmlYkG/jAabkY657ke7CVBjBwskbdVhlmbuePJq3QhYEud2Xi xNEQ97oeoqFmcEE+9iKMA+qXoRcSFqDcyQ9HkrM0xZ6n9qVJlGWWpf6F5XU1BZQaFSUt e0UTz+KjADye70QOLQnN/UP0Z8lCxsikV0bTIn76xisGtL7VPcq7mpuTn63bmil5JwIP gms/3RxD0jZsu2IwZLXslkRho3KcDg1pmjYrzS93OCUnYKcdyqthO5ho25C6PG/ZRb2+ MwNg== X-Gm-Message-State: AOAM530BvEOgMpZR2N0UxaoW9ZkyEN7QJKdWdvIOGPVMtL7o4kD1rTRi fR6kEM0qiqrwG+ovYoNi7y9QEh7K4wlPFs3wrqOCDP5135Nkp+BU+lR4uJYdKvP4zqhBVLDjPNm bFPfcCRjJPNujKPZ9Xb8= X-Received: by 2002:a05:6512:3f8c:b0:45d:cb2a:8779 with SMTP id x12-20020a0565123f8c00b0045dcb2a8779mr1141410lfa.499.1649922094975; Thu, 14 Apr 2022 00:41:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGqN5yM+iQ2dXrY1IQVJ9ap+7ByxjJERk77G/q7uZetbzbfd8lDETaRP7p/O9AdJF5wzZnhOcNyWcBV3GTyDE= X-Received: by 2002:a05:6512:3f8c:b0:45d:cb2a:8779 with SMTP id x12-20020a0565123f8c00b0045dcb2a8779mr1141404lfa.499.1649922094780; Thu, 14 Apr 2022 00:41:34 -0700 (PDT) MIME-Version: 1.0 References: <20220215101853.919735-1-robinx.zhang@intel.com> <3156254.N7aMVyhfb1@thomas> In-Reply-To: <3156254.N7aMVyhfb1@thomas> From: David Marchand Date: Thu, 14 Apr 2022 09:41:23 +0200 Message-ID: Subject: Re: [PATCH v2] common/sff_module: add telemetry command to dump module EEPROM To: Thomas Monjalon Cc: "Zhang, RobinX" , Bruce Richardson , "dev@dpdk.org" , "Yang, Qiming" , "Zhang, Qi Z" , "Yang, SteveX" , Andrew Rybchenko Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 On Wed, Apr 13, 2022 at 2:13 PM Thomas Monjalon wrote: > > > Let me explain in more detail. > > > > > > This patch actually include two parts: > > > 1. Module EEPROM raw data parser code > > > Files: sff_common.h, sff_common.c, sff_8xxx.* > > > 2. Add new telemetry command > > > Files: sff_telemetry.h, sff_telemetry.c > > > > > > Part 1 will only parsing the module EEPROM raw data base on different module type. > > > Now DPDK support 4 types that defined in rte_dev_info.h with macro RTE_ETH_MODULE_SFF_8xxx. > > > > > > Part 2 will call rte_eth_dev_get_module_info and rte_eth_dev_get_module_eeprom to get the module EEPROM raw data, then pass the raw data to Part 1 parser code. Finally, Part 1 parser code will print formatted information. > > > > > > So, these codes are more likely a common tool than a common driver, because it will only read the module EEPROM raw data from NIC PMD driver. > > > For those NIC drivers who has not implemented get_module_info and get_module_eeprom dev_ops, we will simply return not support. > > > > > Thanks for the additional explanation. Adding more folks on CC who may have > > more thoughts on the best way to handle this. > > That's ethdev and/or net driver code. > If I understand well, SFF are standards and no tight to any HW, right? That's my understanding too. > In this case, I think the common code can be in ethdev library. +1 -- David Marchand