Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1734231pxf; Fri, 26 Mar 2021 13:39:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBJVPf/ny2hOOuy3dhGhBrTTexO/IZuqByAP/dd5Uhvb5GLMRpZKuHxgnfFNKdiDHZTLHr X-Received: by 2002:aa7:db95:: with SMTP id u21mr17138321edt.152.1616791159514; Fri, 26 Mar 2021 13:39:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616791159; cv=none; d=google.com; s=arc-20160816; b=k+LZ/9hP4S2hPg2o4UDKKyG+OKCrf0NvFpaMrkG/ffxwU2ioa5MeFdDinXHgV/szyI sUY9rYsrGXtX5cYB6rOXHpf1qnLlWFky8uUkGBkYpYtLkSzJlqv6YD2ZqfDsi7TL5yWu gnHc4VXrXepi8UD6UTVaDY+7Kcp/WaGUB2FXJ3Q9NHJnB1DPFGtLEa19HIGXJCuuR4Qu Ks8UBuG+OejMKHbROn6+zjhydBoCHUa4a0UQaaf6epAQDMtoZKPBMQbMwmNd3FFUwe1G uUyzjhrEs5N2/NSBxABqBFtveRtiQtDt1GRXSZxcI0xm1h87tbaV4wCRrV7tXqF4MPyf FAZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=/mLxuM4X/phSRBGN1m60f13DxsE0ISem8owoX1kBYUA=; b=keAnpxMC0yWd4M1Ai/yeN9bzuREIRdBxPXfpMHsIqJhqgHF56N4EpXK+c0CvhjlV7A /1FzARztLIGu3yoi6TEvRTvdgLBbfHa5/Dlboo2WO2Neuq8GMYyxhokJD4R184/EjBzg Y6RBnOr3w0E2XVlApncbQL/HfDRMjlUpjiV3tnc+3Rzmp5pfMAIrQ3icH70SQxv/fioS 9iChdvnm6CZXG5OA7d+n6gCTVxbgLbzwAC17MkmmptzWJBT3VG+tngaRm1mCJgYcxHAK b7tlc2vAOjQ3pqYJ/wDtZmFXmR/5+nM/NGa7aOmLOwMk70dRJ1w4uWOe2bEWThkoDYYe fC0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z19si9550908edi.325.2021.03.26.13.38.57; Fri, 26 Mar 2021 13:39:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230210AbhCZUhv (ORCPT + 99 others); Fri, 26 Mar 2021 16:37:51 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:50250 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230026AbhCZUhc (ORCPT ); Fri, 26 Mar 2021 16:37:32 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lPtCt-00DCeR-2R; Fri, 26 Mar 2021 21:37:23 +0100 Date: Fri, 26 Mar 2021 21:37:23 +0100 From: Andrew Lunn To: Don Bollinger Cc: 'Jakub Kicinski' , arndb@arndb.de, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, brandon_chuang@edge-core.com, wally_wang@accton.com, aken_liu@edge-core.com, gulv@microsoft.com, jolevequ@microsoft.com, xinxliu@microsoft.com, 'netdev' , 'Moshe Shemesh' Subject: Re: [PATCH v2] eeprom/optoe: driver to read/write SFP/QSFP/CMIS EEPROMS Message-ID: References: <01ae01d71850$db4f5a20$91ee0e60$@thebollingers.org> <20210315103950.65fedf2c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <001201d719c6$6ac826c0$40587440$@thebollingers.org> <009601d72023$b73dbde0$25b939a0$@thebollingers.org> <011301d7226f$dc2426f0$946c74d0$@thebollingers.org> <011901d7227c$e00015b0$a0004110$@thebollingers.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <011901d7227c$e00015b0$a0004110$@thebollingers.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 26, 2021 at 01:16:14PM -0700, Don Bollinger wrote: > > > In my community, the SFP/QSFP/CMIS devices (32 to 128 of them per > > > switch) often cost more than the switch itself. Consumers (both > > > vendors and > > > customers) extensively test these devices to ensure correct and > > > reliable operation. Then they buy them literally by the millions. > > > Quirks lead to quick rejection in favor of reliable parts from > > > reliable vendors. In this environment, for completely different > > > reasons, optoe does not need to handle quirks. > > > > Well, if optoe were to be merged, it would not be just for your community. > It > > has to work for everybody who wants to use the Linux kernel with an SFP. > > You cannot decide to add a KAPI which just supports a subset of SFPs. It > > needs to support as many as possible, warts and all. > > > > So how would you handle these SFPs with the optoe KAPI? > > Just like they are handled now. Folks who use your stack would filter > through sfp.c, with all the quirk handling, and eventually call optoe for > the actual device access. Folks who don't use kernel networking would call > optoe directly and limit themselves to well behaved SFPs, or would handle > quirks in user space. You think that's dumb, but there is clearly a market > for that approach. It is working, at scale, today. > > BTW, why can't we have a driver You keep missing the point. I always refer to the KAPI. The driver we can rework and rework, throw away and reimplement, as much as we want. The KAPI cannot be changed, it is ABI. It is pretty much frozen the day the code is first committed. The optoe KAPI needs to handle these 'interesting' SFP modules. The KAPI design needs to be flexible enough that the driver underneath it can be extended to support these SFPs. The code does not need to be there, but the KAPI design needs to allow it. And i personally cannot see how the optoe KAPI can efficiently support these SFPs. Andrew