Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: aelior@marvell.com, manishc@marvell.com, netdev@vger.kernel.org,
	Pawel Chmielewski <pawel.chmielewski@intel.com>,
	intel-wired-lan@lists.osuosl.org, "Greenwalt,
	Paul" <paul.greenwalt@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2 2/9] ethtool: Add forced speed to supported link modes maps
Date: Fri, 25 Aug 2023 15:57:08 +0200	[thread overview]
Message-ID: <576c5261-6fef-5f94-b8d8-549cbe55fc79@intel.com> (raw)
In-Reply-To: <51ee86d8-5baa-4419-9419-bcf737229868@lunn.ch>

From: Andrew Lunn <andrew@lunn.ch>
Date: Fri, 25 Aug 2023 15:47:20 +0200

>> Let me think how we could do that.
>> Andrew's idea is good. But most high-speed NICs, which have a standalone
>> management firmware for PHY, don't use phylib/phylink.
>> So in order to be able to unify all that, they should have ->supported
>> bitmap somewhere else. Not sure struct net_device is the best place...
> 
> I would probably keep it in the driver priv structure, and just pass
> it as needed. So long as you only need one or two values, i don't see
> the need for a shared structure.
> 
>> If I recall Phylink logics correctly (it's been a while since I last
>> time was working with my embedded project),
>>
>> 1) in the NIC (MAC) driver, you initialize ->supported with *speeds* and
>>    stuff like duplex, no link modes;
>> 2) Phylink core sets the corresponding link mode bits;
>> 3) phylib core then clears the bits unsupported by the PHY IIRC
> 
> No, not really.
> 
> All i think you need is a low level helper. So don't worry too much
> about how phylink works, just implement that low level helper passing
> in values as needed, not phylib or phylink structure.
> 
> What i don't want is a second infrastructure to be built for those MAC
> drivers which don't use Linux to control the PHY. Either share a few
> helpers, or swap to phylink.

I'd love those drivers to be swapped to phylink, but I doubt that will
happen :D

> 
>> The third step in case with those NICs with FW-managed PHYs should be
>> done manually in the MAC driver somewhere. Like "I am qede and I don't
>> support mode XX at 50Gbps, but support the rest, so I clear that one bit".
> 
> I don't think that will work. New bits keep getting added, more speeds
> added. So 'support the rest' is not well defined. You need an explicit

Ah, correct.

> list of link modes the driver needs. We already have code to convert
> an array of link mode bits into an actual mask, e.g:
> 
>         linkmode_set_bit_array(phy_basic_t1_features_array,
>                                ARRAY_SIZE(phy_basic_t1_features_array),
>                                phy_basic_t1_features);

Now I got lost a bit in what we do really want to share now, as less
sharing was indirectly rejected by "you can share more, let PHY/whatever
take care of this" and now wider sharing was indirectly rejected by
"that won't work" :D
From what I understood, all we want now is the stuff introduced by the
original patch from that thread, but without "generic" speed arrays
definitions?

> 
> 	Andrew			       

Thanks,
Olek
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

  reply	other threads:[~2023-08-25 13:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-19  9:39 [Intel-wired-lan] [PATCH iwl-next v2 2/9] ethtool: Add forced speed to supported link modes maps Paul Greenwalt
2023-08-20 14:45 ` Simon Horman
2023-08-20 17:29   ` Greenwalt, Paul
2023-08-20 18:54 ` Andrew Lunn
2023-08-20 19:20   ` Greenwalt, Paul
2023-08-23 17:56     ` Pawel Chmielewski
2023-08-23 18:09       ` Jacob Keller
2023-08-23 20:58         ` Andrew Lunn
2023-08-25 13:19       ` Alexander Lobakin
2023-08-25 13:47         ` Andrew Lunn
2023-08-25 13:57           ` Alexander Lobakin [this message]
2023-08-31 13:08           ` Pawel Chmielewski
2023-09-03 14:00             ` Andrew Lunn
2023-09-04 15:27               ` Pawel Chmielewski
2023-09-14 14:27               ` Pawel Chmielewski
2023-09-15 13:41                 ` Alexander Lobakin
2023-09-15 13:58                   ` Andrew Lunn
2023-09-15 13:53                 ` Andrew Lunn
2023-08-21 13:00 ` Alexander Lobakin
2023-08-24 10:18 ` kernel test robot

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=576c5261-6fef-5f94-b8d8-549cbe55fc79@intel.com \
    --to=aleksander.lobakin@intel.com \
    --cc=aelior@marvell.com \
    --cc=andrew@lunn.ch \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=manishc@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=paul.greenwalt@intel.com \
    --cc=pawel.chmielewski@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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