From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0362CC2D0E4 for ; Fri, 27 Nov 2020 15:57:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC7E3208D5 for ; Fri, 27 Nov 2020 15:57:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730537AbgK0P4p (ORCPT ); Fri, 27 Nov 2020 10:56:45 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:52942 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727281AbgK0P4p (ORCPT ); Fri, 27 Nov 2020 10:56:45 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kig6v-0099LG-C4; Fri, 27 Nov 2020 16:56:37 +0100 Date: Fri, 27 Nov 2020 16:56:37 +0100 From: Andrew Lunn To: Moshe Shemesh Cc: Jakub Kicinski , Moshe Shemesh , "David S. Miller" , Adrian Pop , Michal Kubecek , netdev@vger.kernel.org, Vladyslav Tarasiuk , Maxim Mikityanskiy Subject: Re: [PATCH net-next v2 0/2] Add support for DSFP transceiver type Message-ID: <20201127155637.GS2073444@lunn.ch> References: <1606123198-6230-1-git-send-email-moshe@mellanox.com> <20201124011459.GD2031446@lunn.ch> <20201124131608.1b884063@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <98319caa-de5f-6f5e-9c9e-ee680e5abdc0@nvidia.com> <20201125141822.GI2075216@lunn.ch> <20201126152113.GM2073444@lunn.ch> <6a9bbcb0-c0c4-92fe-f3c1-581408d1e7da@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a9bbcb0-c0c4-92fe-f3c1-581408d1e7da@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > OK, but if the caching system is checking one time netlink and one time > ioctl, it means this cache should be in user space, or did you mean to have > this cache in kernel ? This is all in userspace, in the ethtool code. > > > What about the global offset that we currently got when user doesn't specify > > > a page, do you mean that this global offset goes through the optional and > > > non optional pages that exist and skip the ones that are missing according > > > to the specific EEPROM ? > > ethtool -m|--dump-module-eeprom|--module-info devname [raw on|off] [hex on|off] [offset N] [length N] > > > > So you mean [offset N] [length N]. > > > Yes, that's the current options and we can either try coding new > implementation for that or just call the current ioctl implementation. The > new code can be triggered once options [bank N] and [Page N] are used. You cannot rely on the ioctl being available. New drivers won't implement it, if they have the netlink code. Drivers will convert from get_module_info to whatever new ndo call you add for netlink. > OK, if I got it right on current API [offset N] [length N] just call ioctl > current implementation, while using the option [raw on] will call new > implementation for new SFPs (CMIS 4). Also using [bank N] and [page N] will > call new implementation for new SFPs. Not just CMIS. All SFPs. Andrew