public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn•ch>
To: Moshe Shemesh <moshe@nvidia•com>
Cc: Jakub Kicinski <kuba@kernel•org>,
	Moshe Shemesh <moshe@mellanox•com>,
	"David S. Miller" <davem@davemloft•net>,
	Adrian Pop <pop.adrian61@gmail•com>,
	Michal Kubecek <mkubecek@suse•cz>,
	netdev@vger•kernel.org,
	Vladyslav Tarasiuk <vladyslavt@nvidia•com>
Subject: Re: [PATCH net-next v2 0/2] Add support for DSFP transceiver type
Date: Wed, 25 Nov 2020 15:18:22 +0100	[thread overview]
Message-ID: <20201125141822.GI2075216@lunn.ch> (raw)
In-Reply-To: <98319caa-de5f-6f5e-9c9e-ee680e5abdc0@nvidia.com>

> OK, we will add API options to select bank and page to read any specific
> page the user selects. So advanced user will use it get the optional pages
> he needs, but what about non advanced user who wants to use the current API
> with a current script for DSFP EEPROM. Isn't it better that he will get the
> 5 mandatory pages then keep it not supported ?

Users using ethtool will not see a difference. They get a dump of what
ethtool knows how to decode. It should try the netlink API first, and
then fall back to the old ioctl interface.

If i was implementing the ethtool side of it, i would probably do some
sort of caching system. We know page 0 should always exist, so
pre-load that into the cache. Try the netlink API first. If that
fails, use the ioctl interface. If the ioctl is used, put everything
returned into the cache. The decoder can then start decoding, see what
bits are set indicating other pages should be available. Ask for them
from the cache. The netlink API can go fetch them and load them into
the cache. If they cannot be loaded return ENODEV, and the decoder has
to skip what it wanted to decode. If you do it correctly, the decoder
should not care about ioctl vs netlink.

I can do a follow up patch for the generic SFP code in
drivers/net/phy, once you have done the first implementation. But i
only have a limited number of SFPs and most are 1G only. Russell King
can hopefully test with his collection.

     Andrew

  reply	other threads:[~2020-11-25 14:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23  9:19 [PATCH net-next v2 0/2] Add support for DSFP transceiver type Moshe Shemesh
2020-11-23  9:19 ` [PATCH net-next v2 1/2] ethtool: Add CMIS 4.0 module type to UAPI Moshe Shemesh
2020-11-23 22:40   ` Jesse Brandeburg
2020-11-25 10:41     ` Moshe Shemesh
2020-11-23  9:19 ` [PATCH net-next v2 2/2] net/mlx5e: Add DSFP EEPROM dump support to ethtool Moshe Shemesh
2020-11-24  1:14 ` [PATCH net-next v2 0/2] Add support for DSFP transceiver type Andrew Lunn
2020-11-24 21:16   ` Jakub Kicinski
2020-11-25 10:40     ` Moshe Shemesh
2020-11-25 14:18       ` Andrew Lunn [this message]
2020-11-26 14:23         ` Moshe Shemesh
2020-11-26 15:21           ` Andrew Lunn
2020-11-27 15:12             ` Moshe Shemesh
2020-11-27 15:56               ` Andrew Lunn
2020-12-29 10:23                 ` Vladyslav Tarasiuk
2020-12-29 16:25                   ` Andrew Lunn
2020-12-30 13:55                     ` Vladyslav Tarasiuk
2020-12-30 15:36                       ` Andrew Lunn
2021-01-04 15:24                         ` Vladyslav Tarasiuk
2021-01-04 15:48                           ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201125141822.GI2075216@lunn.ch \
    --to=andrew@lunn$(echo .)ch \
    --cc=davem@davemloft$(echo .)net \
    --cc=kuba@kernel$(echo .)org \
    --cc=mkubecek@suse$(echo .)cz \
    --cc=moshe@mellanox$(echo .)com \
    --cc=moshe@nvidia$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pop.adrian61@gmail$(echo .)com \
    --cc=vladyslavt@nvidia$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox