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 D9BD3C433E1 for ; Wed, 24 Mar 2021 12:16:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 90AA661A0B for ; Wed, 24 Mar 2021 12:16:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233333AbhCXMQN (ORCPT ); Wed, 24 Mar 2021 08:16:13 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:44594 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232574AbhCXMQA (ORCPT ); Wed, 24 Mar 2021 08:16:00 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lP2QQ-00Clxp-JU; Wed, 24 Mar 2021 13:15:50 +0100 Date: Wed, 24 Mar 2021 13:15:50 +0100 From: Andrew Lunn To: Moshe Shemesh Cc: Don Bollinger , "'David S. Miller'" , 'Jakub Kicinski' , 'Adrian Pop' , 'Michal Kubecek' , netdev@vger.kernel.org, 'Vladyslav Tarasiuk' Subject: Re: [RFC PATCH V4 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data Message-ID: References: <1616433075-27051-1-git-send-email-moshe@nvidia.com> <1616433075-27051-2-git-send-email-moshe@nvidia.com> <006801d71f47$a61f09b0$f25d1d10$@thebollingers.org> <3e78a1cd-e63d-142a-3b78-511238e48bef@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3e78a1cd-e63d-142a-3b78-511238e48bef@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > OK, so following the comments here, I will ignore backward compatibility of > having global offset and length. Yes, we can do that in userspace. > That means I assume in this KAPI I am asked to get data from specific page. > Should I also require user space to send page number to this KAPI (I mean > make page number mandatory) ? It makes the API more explicit. We always need the page, so if it is not passed you need to default to something. As with addresses, you have no way to pass back what page was actually read. So yes, make it mandatory. And i suppose the next question is, do we make bank mandatory? Once you have a page > 0x10, you need the bank. Either we need to encode the logic of when a bank is needed, and make it mandatory then, or it is always mandatory. Given the general pattern, we make it mandatory. But sometime in the future when we get yet another SFP format, with additional parameters, they will be optional, in order to keep backwards compatibility. Andrew