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 47694A0501; Fri, 8 Apr 2022 12:55:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4E864067E; Fri, 8 Apr 2022 12:55:19 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id D718E4003F for ; Fri, 8 Apr 2022 12:55:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649415318; x=1680951318; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=VGcd+1Fh88WC9duvc04DxxEozSwg6oIU12iLKX5fBwk=; b=JOAHgvC4+GUPc1vJZq+wETzFjHlhQZWGhzWpzcLq0rdVKa47r9QdD1Qu NnXBGFbm2DicspDTXpbzXoQtgaME9UeqAQzArb9fyK4Emyj8jR9uHZFye OyIebIw8k/2ksiS172UAmOsGaDicRD203X7xrrythVCAqo+KCn9f9VQTh gWlVeWBuXDVGcssKFuU+fKbWzLgqaVMVKVBLfuk1kNyPpmDHDc0zkDyDk UiGoSNWGznV3GtELQgYNSgV3JMwd4Gikx6VOLvYWc0R7vxF0vIjE+Y3ut WGMU4oZki0GGpq5i32HpJzKO0lDr92sbF3hyGySWUZxYxWcNWw6PmTq03 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10310"; a="322254447" X-IronPort-AV: E=Sophos;i="5.90,244,1643702400"; d="scan'208";a="322254447" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2022 03:55:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,244,1643702400"; d="scan'208";a="852031436" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga005.fm.intel.com with ESMTP; 08 Apr 2022 03:55:16 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Fri, 8 Apr 2022 03:55:16 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Fri, 8 Apr 2022 03:55:16 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Fri, 8 Apr 2022 03:55:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N5/Aqb9TdAuUzUNY2irWrZzGhvkh6OswyfKdkTgsVvNvtOPfGtv4HmcRSC+UDa0oi2yN3lli/5kxzY/Dn83mx19b5c/Q9ACloM8PiVUbAPSna0bnrbhZu1HZfl0mXEg8o+t2BzN+c+HSgKPhtK4Jb0ucsg7X5g4V/ElryDy9G9MowEVAMqEfspeFz1FU6WcFJD/NS59eOYtZ4AlkxBV05sMo16EEs6AFy+vMOvMR5rB3AMq/38aOuVYe+ejRzvh4ZdAwDH9p52Vf5bkFw67MGwnvINB/YczsvtA0ynxqVD3IhFwu+1BkNVNuJVT5CxxAOKKLWkFSycnf2I7sz1fSgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UemxvS2eWPxSBJTi2XY0U2PcLeJsxoxmu+O3gFM2bxo=; b=RZOapRziY94uMeBTiVVq48w7TXvoWdti+nqSus3NLA0P3+394I4+/6Cuv2Q5ZoH0nlQSz+lgBBb2RDAtBn3cRWUZDvjdefV5U8gjaicO/zVhColkN07PBOdmMkV8MXbYauv9qefmL2dH0AVLeTXUPrjOhwn8QikW9/LfSQh5uP7241SCdlDvav17Q86x2wJSimAqjlg+nmviZbp0QR5yk3oJrwYrL1hoBpi0LLM1wzd+k27aeOzRCqMGoCwKcCbrXGUkxBCVcjhss+S8C9AiDzWp2Ln4V5IBe2pV3Nu0MA7BAn5SQxjK4BZShd+uxuw05SgKNoYZ7tnXfukQWZBq0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BN9PR11MB5529.namprd11.prod.outlook.com (2603:10b6:408:102::16) by DM6PR11MB4442.namprd11.prod.outlook.com (2603:10b6:5:1d9::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.22; Fri, 8 Apr 2022 10:55:08 +0000 Received: from BN9PR11MB5529.namprd11.prod.outlook.com ([fe80::5052:f83a:10ea:5627]) by BN9PR11MB5529.namprd11.prod.outlook.com ([fe80::5052:f83a:10ea:5627%9]) with mapi id 15.20.5123.031; Fri, 8 Apr 2022 10:55:07 +0000 From: "Zhang, RobinX" To: "Richardson, Bruce" CC: "dev@dpdk.org" , "Yang, Qiming" , "Zhang, Qi Z" , "Yang, SteveX" Subject: RE: [PATCH v2] common/sff_module: add telemetry command to dump module EEPROM Thread-Topic: [PATCH v2] common/sff_module: add telemetry command to dump module EEPROM Thread-Index: AQHYSzNR5Gga9td1yEyIf2Ceis0Blqzl0bCAgAAC+UA= Date: Fri, 8 Apr 2022 10:55:07 +0000 Message-ID: References: <20220215101853.919735-1-robinx.zhang@intel.com> <20220408102330.774749-1-robinx.zhang@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5c89be87-d8ca-47f1-f979-08da194e3ec4 x-ms-traffictypediagnostic: DM6PR11MB4442:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: V2LAjx6BENL+1PJijWbhYY8oVvVhsynmjR94ue7fZP0n43zSjKYVOCsNgNJaKjkpHdk2RVRGmU0fGhCcVCHHweVBxCK9PN22wGVXqkMXCPOvCtgVVQSsfL5FUxuqS9QL2WNulLbvuHlS7rrPNP3oZalOo/vBgqRzQVUuDqtQl8DSBAWfx4AnLer9FS1jPvJWFoXChxF1Lz1UaJuFXgQ95VRS9dkVRD9UMSB0BOOjHcz0j2shmom6iQTR5Ul/BcUrqfIujgjFvT+tw+CRtHPTY6iEsJoetyNpK6HxDntGLv58V8zLuZ69vyVOH8KpBOZLi13DVcRLumd28iK+469Uv2xPyZLqI1FXdsxnHjcIgvLXG9mcoA/ubzBWbPoD2FNXQpF129Kvs4Jawft4mxRrJvLNI1OvTEBhE6ZlJGJFhtHslCpQ+iFtRn9lPbCTLwLpTrMDY1s4myUxayG0hQee6wFzzWem8tcj8t7ohm900UgXW+R/QE4Dmw+NaSuM9cFgJdBxGdIfSIosSqHrlWQwA86kO4mJc1lLDC6LBZ56zuJTRhvFn1E1Ya1Qk+pzKyCIajcShn0T+aTNDoE+uhAveDdYUIyLLHKXnBWx6IaT8mGHaCfCcOZRaGbwjBHwlaBy9jI15dMfqeaokuh6cBfL55UdbbDaPBvErW0oK+pHDhIBmScvaTeh+dihHp4Yzj9orZnwTUoWGuENFjc7DqnCVw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN9PR11MB5529.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(107886003)(86362001)(38070700005)(82960400001)(26005)(9686003)(508600001)(38100700002)(55016003)(83380400001)(8936002)(122000001)(6862004)(6636002)(52536014)(33656002)(316002)(186003)(53546011)(7696005)(54906003)(6506007)(4326008)(66946007)(66556008)(66446008)(66476007)(2906002)(5660300002)(71200400001)(64756008)(76116006)(8676002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?UjZSCpEmiBYLQ1youJsGTczSZPBLhwwfAQBz8ZNOCL6K6NBljQerJ/9cep52?= =?us-ascii?Q?CyAEmD/1jso+lB7Ji5f37zXrQSyI4acSmNAiP5hqs92V/9SzXy3RZ2krSf5S?= =?us-ascii?Q?hMU+CipU4TubYq73/mFaq2rg7j+9freji0ftiVRBiEu1ImVhkYyEpmRrtiQC?= =?us-ascii?Q?7zVQLCI8Ir/fucqZos7dNgtNYukF8asA+kKxwWqjpWQpN9VdlM6ob/mslgEL?= =?us-ascii?Q?di1iZt5derF8IIkmkXqb5C7A4t8T8n0azYmplnQcD6zQEsnsa5SFXUbDb310?= =?us-ascii?Q?byu6iltl/+GldiF2g0e6JjszX0P2tMarfYBqmsNHTk7BhQVTzTb/K6UukRGo?= =?us-ascii?Q?4eCzBtVtPkfrTEWYhneIaPMVETV740p7OnisXPdvEpyjwnY3FEh/V5nqcyhM?= =?us-ascii?Q?NiTAyuqGDTj1nUZKjJ/miujUY2JpJ6hIc2JGPYF40fbRLglVitpXwgUR4d32?= =?us-ascii?Q?smyBDefe/XlX9JPcWXITCYh5CVme4For9hbOiR2d4wyerKS2gp99yBY7OqrJ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lRUYbagKV59bjZQc9NHl0c3Td?= =?us-ascii?Q?19FQ+W+vr0x33ja78H6kGBmVDS0wM3dueWjK0gwyhF3F7ZmEoePe44EJJcqD?= =?us-ascii?Q?eHdxyrLsP/iDfvGB8jommMqPAEzMYSidku447Zq35jc3gDB6IIMx7OqQrokg?= =?us-ascii?Q?EfcIiCz1pEcvKTPH4ZhaxEpwiJI7UcPcc3DtgAOOnMs0i86l3HEP59Rlg4c1?= =?us-ascii?Q?/DuI1vIudoqnn81Li+rGj2nrvr43Vyzu4oDqxQJpAAxnLVGSMKejQF7bbdSV?= =?us-ascii?Q?DYbR3MxfoUyBodHs6q7m440HKuncs06/STvbekB0TA8IMa/DA1TESBtQJfM0?= =?us-ascii?Q?klRjrj/AsQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5529.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c89be87-d8ca-47f1-f979-08da194e3ec4 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2022 10:55:07.3524 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: /knNoCYcJc1sqpi9WMuXzNhGtbA6/MOKwF1ysPLfl0rEsEtcxuZvtQudqNuGb7o0/SYqW72ddNrEFbFEQ4MZ4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4442 X-OriginatorOrg: intel.com 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 Hi Bruce, > -----Original Message----- > From: Richardson, Bruce > Sent: Friday, April 8, 2022 6:33 PM > To: Zhang, RobinX > Cc: dev@dpdk.org; Yang, Qiming ; Zhang, Qi Z > ; Yang, SteveX > Subject: Re: [PATCH v2] common/sff_module: add telemetry command to > dump module EEPROM >=20 > On Fri, Apr 08, 2022 at 10:23:30AM +0000, Robin Zhang wrote: > > This patch introduce a new telemetry command '/sff_module/info' > > to dump format module EEPROM information. > > > > The format support for SFP(Small Formfactor Pluggable)/SFP+ > > /QSFP+(Quad Small Formfactor Pluggable)/QSFP28 modules based on > > SFF(Small Form Factor) Committee specifications > > SFF-8079/SFF-8472/SFF-8024/SFF-8636. > > > > Signed-off-by: Robin Zhang > > --- > > > > v2: > > - Redesign the dump function as a telemetry command, so that the > EEPROM > > information can be used by other app. > > > > - The usage like this: > > > > Launch the primary application with telemetry: > > Take testpmd as example: ./app/dpdk-testpmd > > > > Then launch the telemetry client script: > > ./usertools/dpdk-telemetry.py > > > > In telemetry client run command: > > --> /sff_module/info, > > > > Both primary application and telemetry client will show the formated > > module EEPROM information. > > > > drivers/common/meson.build | 1 + > > drivers/common/sff_module/meson.build | 16 + > > drivers/common/sff_module/sff_8079.c | 672 ++++++++++++++ > > drivers/common/sff_module/sff_8472.c | 301 ++++++ > > drivers/common/sff_module/sff_8636.c | 1004 > +++++++++++++++++++++ > > drivers/common/sff_module/sff_8636.h | 592 ++++++++++++ > > drivers/common/sff_module/sff_common.c | 415 +++++++++ > > drivers/common/sff_module/sff_common.h | 192 ++++ > > drivers/common/sff_module/sff_telemetry.c | 142 +++ > > drivers/common/sff_module/sff_telemetry.h | 41 + > > drivers/common/sff_module/version.map | 9 + > > 11 files changed, 3385 insertions(+) > > create mode 100644 drivers/common/sff_module/meson.build > > create mode 100644 drivers/common/sff_module/sff_8079.c > > create mode 100644 drivers/common/sff_module/sff_8472.c > > create mode 100644 drivers/common/sff_module/sff_8636.c > > create mode 100644 drivers/common/sff_module/sff_8636.h > > create mode 100644 drivers/common/sff_module/sff_common.c > > create mode 100644 drivers/common/sff_module/sff_common.h > > create mode 100644 drivers/common/sff_module/sff_telemetry.c > > create mode 100644 drivers/common/sff_module/sff_telemetry.h > > create mode 100644 drivers/common/sff_module/version.map > > > Is this is whole new driver just to provide telemetry dumps of SFP > information? I can understand the problem somewhat - though I am in some > doubt that telemetry is the best way to expose this information - but > creating a new driver seems the wrong approach here. SFPs are for NIC > devices, so why isn't this available in a common API such as ethdev? >=20 I have considered add this function as a new telemetry command of ethdev (l= ike '/ethdev/sff_module_info') to dump these SFP information. But I'm not sure if it's acceptable to add all these production code (sff_8= xxx.c) into lib/ethdev? If it's OK, I can make V3 patches to change it as a telemetry command of et= hdev. > /Bruce