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 20211A0501; Fri, 8 Apr 2022 13:20:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1289840E5A; Fri, 8 Apr 2022 13:20:30 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 18F1D4003F for ; Fri, 8 Apr 2022 13:20:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649416828; x=1680952828; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=V9yryMqf7PeKsbgdRiJCDuY+067NpmC6UCp/RSpx+ks=; b=YwkosbE/N30ZRyrFLeMcZqKL1K10ksmtytQ0zspBKaiMyE37HUp5l4UG v6CcgMBxRZN6BGkH540qvX4JC9D49+8VSZ1ObxGztukayMafFRtUIBBrz VxJF4FcS1++pSJWkVKoE/6Rv8HrQP7I5gbhHj9M7OimICppMBCCXOHIT0 eBTml85dxivGhmh1lmmbKMAith4lPr018QHpERIvAShRAZvQM+xavX9qZ PtE20IeHZwXimY2VbOXVYf7aI47x2sgq69GFblaM2vhrD9WVi7EeBrctJ 8GsGrJQT5GdKSFBJjgly7fPPWKrUrHw20hYASJrMKmtqFKIyCqydsyA5f w==; X-IronPort-AV: E=McAfee;i="6400,9594,10310"; a="324732166" X-IronPort-AV: E=Sophos;i="5.90,244,1643702400"; d="scan'208";a="324732166" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2022 04:20:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,244,1643702400"; d="scan'208";a="589188395" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga001.jf.intel.com with ESMTP; 08 Apr 2022 04:20:27 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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 04:20:26 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) 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 04:20:26 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.101) by edgegateway.intel.com (192.55.55.68) 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 04:20:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WlBHQOFCa0mgtxStijEpCED74HVksHQ0i9VBURJcl6J3L7J+t++6dyRkppQ+8RAbFpUyRq7AwtojKld0xvGu3aF3nICxt2dSe6dCDVd3L1uIR5IUHruBOldbRRvKg9JQxV46IVgkppuTEc+BFyZsmkFOUQlzv/W5ijvwaiqrvIPRGFlCZHCEk+TVv5gYSYok/K4KaBakK1MeWt2Dv9i706WbpprS/BkuD+8jNXJDAYfrUhZdXFBRBU2/lKo/kDaed7jUcxzBUwBKszPhCPm6NNfEODG6STLUO7cWsqC5cze3vPIE7CcpXDl14RqXCdOe8TZ6Nc17OBF2rTl3wNecUw== 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=UC/ER3JCxITJIPJ3R4mEv66Hh3sq5u9REGonB9wXHwY=; b=eH2uT6GtE/oZu+7Zq6IVMKxNEulbAIEGfkDvyUw6yAeZ5nmZ0dPs16aJjvDxgOjmWvh9RW/8IFKlBlzK+gpbE/1DBYb/l9OXjvYKrGHh+z6G7epwJ8A7J/lSyYcihbB7Wvtjbpr2tCOlLCiO5ogVo3ty1ClGgtulBOqko5rBhv8n8DCrvo5nK36ljwO66EzrFX/vAVgT8yQ6977oVqGHjBZuRrqjS3FKWHj7LBCDpIrMK+2ZoYrVdaj9VHA679Yj72gAASwFnWScYSnNVcgzF1JBOzB/Q1pACBXps/nCjn1Y6+3twcixzeQ9ANY9syPeDVrTT1X47kx4Bp5FKlOldA== 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 MW3PR11MB4634.namprd11.prod.outlook.com (2603:10b6:303:54::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.26; Fri, 8 Apr 2022 11:20:23 +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 11:20:23 +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+UCAAASxgIAAAHOw Date: Fri, 8 Apr 2022 11:20:23 +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: a748eb37-b90e-495b-938d-08da1951c64c x-ms-traffictypediagnostic: MW3PR11MB4634: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: OPXMNFIImzSms8pZM6SnGB8NXnxm2PgGTnPTQ8bAAhJR61EGfvyLNivJeDsUIjXBfRlHc6K9FuJIvgbfcckGlP74iDBrqEjzzjEw1whzZKbfVdLlaIiEmMeCVn3rZByx2W4ZxaGJ0MyczEKjj7CdlGpeJko0yFsANPJ0uYXbLfsuiwYoSPFDm+58MkEUMBLHSgvThaSuzk6YkhBKrIruyzYON9x7KPVUydaG7Y5VCgkIEcag8AzGd79aOvteXJsqrySGEenQwveBr5QbSxEn15+agernMu1RIiqLXtKYipW40M6z6kVj3ZM+ln7YlcJhMLyZ0yDBEzBH9dWeIOF5SPeMoqtQLL9azYGA5PF9W/A80gc5zJB27ItKFRyS1PzNHWf07NCXU1POOfvixiCBAO+A41gY4m9zj2QEwhX22uAND70TvuAY6cOTE6fY51HZqAYL4otf0PvkrKhsMSdk5KdWzL9hciHQC/MupjN1WrIVt5RzAMoEAurIwuUha6ODNHhvxiOmGwTYVwPTHmbYwGHXHHDbsohkZocu71pz/xzp7kjX2MjbYKXTw/jyTXVOo1/R1rf11mfze6ssp6+s26CY1iYjnusxv6Po6F56pJWMwqxd+SAjiZi9DCI5oShHGZ5768N6bGrI66dHBYeu8WD5sZohrbOpgmhyGjfVq3RUraJ4DExx3fG7BEuYdVEzz9SfEtKUzJBysnNAkzQShw== 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)(186003)(26005)(55016003)(508600001)(33656002)(83380400001)(7696005)(6506007)(53546011)(2906002)(52536014)(8676002)(6862004)(4326008)(8936002)(9686003)(122000001)(38070700005)(316002)(82960400001)(5660300002)(86362001)(66556008)(66446008)(64756008)(76116006)(66946007)(66476007)(54906003)(6636002)(38100700002)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?U682XgsoVXssCzBjMG42QrbB5nfzzhszsw8gaOeDm+fli3JTJvHCrq6AOMDB?= =?us-ascii?Q?EJHGAV8A0ixoOUTAf9Sq7xEQ3qde5m2E/ChcdH63B+Td7sPIZI59PbyNVC3K?= =?us-ascii?Q?E9PrvtZTT2V1EHZGuxFWhu58WsrQ6kz4cP9wCVt8erdX/SfeUF+9gfHoL1IY?= =?us-ascii?Q?Epi+IQEdtOALACBPQc7JrjFbcPFdY5Zyuew+dMXFizHRH+xGnkJVWcp8MpuT?= =?us-ascii?Q?kKliiRLjZA38qCfv3pqrMxQ4LcmdpRH0U8dwmUzzFk80b2NGaSDi/pJqBTlV?= =?us-ascii?Q?tC+bZdCbR0i0sEnapKo9drVuHhr4bnDgme5AnVKlLOSuL1+W8vYxrKN7a71c?= =?us-ascii?Q?/WGTU/9JB6a6VQfvuVi16LBOk8nqW5UaW8D2jL0Fa/YmRMCso45MmwOsUHPJ?= =?us-ascii?Q?bXN/5Gzyfx9+jzrS8z2YxSFqhZw5Z+KCEPXBbJyjiOZDpcXPXCtj51cL88mK?= =?us-ascii?Q?yhZnKx5/R2MdhKGidt1lUArNJHPCSQrpCuCxlgw3kH+rRZWfgi0azcn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MvdEnKzbd+UpIGtf0TjPapZEfklktxMEsU/s0i?= =?us-ascii?Q?uAitqS5kIualmk3Ozs4pW7K2GdP6v457PyCb/bIDHUWlBKP3d3hlCFKNz2oz?= =?us-ascii?Q?4hDhkQdnKJdNCFPuS/1TVCuzs3IayXO93/iTCtj78tChKzxY1QAWiVi81yrn?= =?us-ascii?Q?vQHpD/lN2XYu7y1oHqS7lMVxlzdJEkZbaV4d2Ion7Orng4GXozS/pZeaaXjJ?= =?us-ascii?Q?PON7hj3DOc9KaYY+4dyyBn9WYtz3exqPpS3TjvCBh3H2TNbxRslUQkYv5XNm?= =?us-ascii?Q?liaDA4P7UpkaQcVZt6eCfjyhSa76FC9Dn4PxcQDp+zCEYDi6ml++/AoK+wr6?= =?us-ascii?Q?3ROiuugKkg=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: a748eb37-b90e-495b-938d-08da1951c64c X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2022 11:20:23.4112 (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: kYDDWeU9k5cA+0ewwVXErGkmy17VtN8X9vRcN4LyjbuiDtJyTtCOLaaAyDmOz6FEMUEzrbPl1wc6xGNte/bonA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4634 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 7:01 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 11:55:07AM +0100, Zhang, RobinX wrote: > > 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 > > > > > > 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 forma= ted > > > > 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? > > > > > > > I have considered add this function as a new telemetry command of > ethdev (like '/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_8xxx.c) into lib/ethdev? > > If it's OK, I can make V3 patches to change it as a telemetry command o= f > ethdev. > > >=20 > Hi, >=20 > I think some discussion is needed before you go preparing a new version o= f > this patchset. >=20 > Some initial questions: >=20 > 1. Does SFF code apply only to Intel products/NICs or is it multi-vendor? The SFF code apply to multi-vendor.=20 In fact, it's applied to all the NIC driver which implemented dev_ops->get_= module_eeprom. > 2. For the driver approach you previously took, how was the presence of > hardware detected to load the driver? The purpose of put these production code into drivers/common is want to tre= at it as a common function for NIC drivers. It will not related to any presence of hardware. > 3. Does this work on SFPs need to interact with the NIC drivers in any wa= y? >=20 Yes, just like my answer in question 1, the module EEPROM raw data is get f= rom dev_ops->get_module_eeprom. So need the NIC drivers to implement dev_ops->get_module_eeprom. > Thanks, > /Bruce