* Re: [RFC PATCH 0/1] net: phy: skip autoneg of ethernet(fec) on network boot
[not found] <1530857230-31124-1-git-send-email-masahiko.kimoto@cybertrust.co.jp>
@ 2018-07-06 18:41 ` Florian Fainelli
2018-07-09 9:29 ` Masahiko KIMOTO
0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2018-07-06 18:41 UTC (permalink / raw)
To: Masahiko Kimoto, Fugang Duan, Andrew Lunn, netdev,
Linux Kernel Mailing List, Hiraku Toyooka
On 07/05/2018 11:07 PM, Masahiko Kimoto wrote:
> Hello,
>
> This patch introduces auto negotiation skipping for Ethernet.
> It is useful to shorten boot time on network boot like the following
> environment;
>
> - target board is NXP i.MX6.
> - NIC is fec.
> - using u-boot as boot loader.
> - boot from kernel and initramfs obtained via TFTP.
> - mount remote file system and switch root to that.
> - thus all file system is on network.
>
> In this case, u-boot and kernel initialize NIC three times,
> once in boot loader, once in device attach and once more in phy attach.
> Each causes link auto negotiation and wait several seconds.
> However link state is stable after reset by boot loader, therefore we
> can skip hardware re-initialization of NIC in kernel.
>
> The patch skips link down in Ethernet(i.MX's fec) driver and initialization
> in PHY layer if kernel option 'anegskip' is supplied.
>
> By this patch boot time becomes 3secs shorter.
>
> I think current patch is dirty hack, because;
> - modification is split into PHY and Ethernet driver.
> - in the case of two or more Ethernet I/F exist, currently there is
> no way to specify whith I/F skips autonego.
>
> I would like to implement such skpping auto negotiation feature in generic
> framework. How should we implement these requirements?
I completely acknowledge and support the use case, but your
implementation is definitively not the way to go. In my experience the
problem is usually that there may be a disagreement on the
Pause/Asym_Pause advertisement bits and that alone is responsible for
triggering a re-negotiation. Can yo check if that is the case here?
Thank you
--
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH 0/1] net: phy: skip autoneg of ethernet(fec) on network boot
2018-07-06 18:41 ` [RFC PATCH 0/1] net: phy: skip autoneg of ethernet(fec) on network boot Florian Fainelli
@ 2018-07-09 9:29 ` Masahiko KIMOTO
2018-07-09 14:41 ` Andrew Lunn
0 siblings, 1 reply; 5+ messages in thread
From: Masahiko KIMOTO @ 2018-07-09 9:29 UTC (permalink / raw)
To: f.fainelli; +Cc: fugang.duan, andrew, netdev, linux-kernel, hiraku.toyooka
Hello Florian,
> I completely acknowledge and support the use case, but your
> implementation is definitively not the way to go. In my experience the
> problem is usually that there may be a disagreement on the
> Pause/Asym_Pause advertisement bits and that alone is responsible for
> triggering a re-negotiation. Can yo check if that is the case here?
Thank you for your support.
Concening the problem about PAUSE/Asym_PAUSE advertisement you pointed out,
I could not understand your consideration.
Would you tell me more detail about it?
From: Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [RFC PATCH 0/1] net: phy: skip autoneg of ethernet(fec) on
network boot
Date: Fri, 6 Jul 2018 11:41:23 -0700
>
>
> On 07/05/2018 11:07 PM, Masahiko Kimoto wrote:
> > Hello,
> >
> > This patch introduces auto negotiation skipping for Ethernet.
> > It is useful to shorten boot time on network boot like the following
> > environment;
> >
> > - target board is NXP i.MX6.
> > - NIC is fec.
> > - using u-boot as boot loader.
> > - boot from kernel and initramfs obtained via TFTP.
> > - mount remote file system and switch root to that.
> > - thus all file system is on network.
> >
> > In this case, u-boot and kernel initialize NIC three times,
> > once in boot loader, once in device attach and once more in phy attach.
> > Each causes link auto negotiation and wait several seconds.
> > However link state is stable after reset by boot loader, therefore we
> > can skip hardware re-initialization of NIC in kernel.
> >
> > The patch skips link down in Ethernet(i.MX's fec) driver and initialization
> > in PHY layer if kernel option 'anegskip' is supplied.
> >
> > By this patch boot time becomes 3secs shorter.
> >
> > I think current patch is dirty hack, because;
> > - modification is split into PHY and Ethernet driver.
> > - in the case of two or more Ethernet I/F exist, currently there is
> > no way to specify whith I/F skips autonego.
> >
> > I would like to implement such skpping auto negotiation feature in generic
> > framework. How should we implement these requirements?
>
> I completely acknowledge and support the use case, but your
> implementation is definitively not the way to go. In my experience the
> problem is usually that there may be a disagreement on the
> Pause/Asym_Pause advertisement bits and that alone is responsible for
> triggering a re-negotiation. Can yo check if that is the case here?
>
> Thank you
> --
> Florian
>
---------------------------------------------------------------------------
Masahiko KIMOTO,Ph.D. / Cybertrust Japan Co., Ltd.
mail: masahiko.kimoto@cybertrust.co.jp
web: https://www.cybertrust.co.jp/ https://www.miraclelinux.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH 0/1] net: phy: skip autoneg of ethernet(fec) on network boot
2018-07-09 9:29 ` Masahiko KIMOTO
@ 2018-07-09 14:41 ` Andrew Lunn
2018-07-10 1:52 ` Masahiko KIMOTO
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2018-07-09 14:41 UTC (permalink / raw)
To: Masahiko KIMOTO
Cc: f.fainelli, fugang.duan, netdev, linux-kernel, hiraku.toyooka
On Mon, Jul 09, 2018 at 06:29:02PM +0900, Masahiko KIMOTO wrote:
> Hello Florian,
>
> > I completely acknowledge and support the use case, but your
> > implementation is definitively not the way to go. In my experience the
> > problem is usually that there may be a disagreement on the
> > Pause/Asym_Pause advertisement bits and that alone is responsible for
> > triggering a re-negotiation. Can yo check if that is the case here?
>
> Thank you for your support.
>
> Concening the problem about PAUSE/Asym_PAUSE advertisement you pointed out,
> I could not understand your consideration.
>
> Would you tell me more detail about it?
Hi Masahiko
You said that the PHY is being configured 3 times, and might be doing
auto-neg three times. Often a phy will not actually perform auto-neg,
or do it much faster, if the advertised bits do not change with each
re-configuration.
So check how u-boot is configuring what is advertised, and look at
what Linux is configuring. In particularly, look at the pause
configuration. If pause is configured different in u-boot and Linux,
try to make it the same. Things might go faster than.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH 0/1] net: phy: skip autoneg of ethernet(fec) on network boot
2018-07-09 14:41 ` Andrew Lunn
@ 2018-07-10 1:52 ` Masahiko KIMOTO
2018-07-17 1:47 ` Masahiko KIMOTO
0 siblings, 1 reply; 5+ messages in thread
From: Masahiko KIMOTO @ 2018-07-10 1:52 UTC (permalink / raw)
To: andrew; +Cc: f.fainelli, fugang.duan, netdev, linux-kernel, hiraku.toyooka
> > > I completely acknowledge and support the use case, but your
> > > implementation is definitively not the way to go. In my experience the
> > > problem is usually that there may be a disagreement on the
> > > Pause/Asym_Pause advertisement bits and that alone is responsible for
> > > triggering a re-negotiation. Can yo check if that is the case here?
> >
> > Thank you for your support.
> >
> > Concening the problem about PAUSE/Asym_PAUSE advertisement you pointed out,
> > I could not understand your consideration.
> >
> > Would you tell me more detail about it?
>
> Hi Masahiko
>
> You said that the PHY is being configured 3 times, and might be doing
> auto-neg three times. Often a phy will not actually perform auto-neg,
> or do it much faster, if the advertised bits do not change with each
> re-configuration.
>
> So check how u-boot is configuring what is advertised, and look at
> what Linux is configuring. In particularly, look at the pause
> configuration. If pause is configured different in u-boot and Linux,
> try to make it the same. Things might go faster than.
Thank you.
I'll try to check out u-boot side by mii command and Linux(server)
side by ethtool.
---------------------------------------------------------------------------
Masahiko KIMOTO,Ph.D. / Cybertrust Japan Co., Ltd.
mail: masahiko.kimoto@cybertrust.co.jp
web: https://www.cybertrust.co.jp/ https://www.miraclelinux.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH 0/1] net: phy: skip autoneg of ethernet(fec) on network boot
2018-07-10 1:52 ` Masahiko KIMOTO
@ 2018-07-17 1:47 ` Masahiko KIMOTO
0 siblings, 0 replies; 5+ messages in thread
From: Masahiko KIMOTO @ 2018-07-17 1:47 UTC (permalink / raw)
To: andrew; +Cc: f.fainelli, fugang.duan, netdev, linux-kernel, hiraku.toyooka
> > You said that the PHY is being configured 3 times, and might be doing
> > auto-neg three times. Often a phy will not actually perform auto-neg,
> > or do it much faster, if the advertised bits do not change with each
> > re-configuration.
> >
> > So check how u-boot is configuring what is advertised, and look at
> > what Linux is configuring. In particularly, look at the pause
> > configuration. If pause is configured different in u-boot and Linux,
> > try to make it the same. Things might go faster than.
>
> Thank you.
>
> I'll try to check out u-boot side by mii command and Linux(server)
> side by ethtool.
PHY setting in u-boot and after booting Linux is as follows;
We may avoid second and third auto-neg if both settings in u-boot and
in linux make same value, right?
---------------------------------------------------------------------------
=> mii dump 1 4
4. (11e1) -- Autonegotiation advertisement register --
(8000:0000) 4.15 = 0 next page able
(4000:0000) 4.14 = 0 (reserved)
(2000:0000) 4.13 = 0 remote fault
(1000:1000) 4.12 = 1 (reserved)
(0800:0000) 4.11 = 0 asymmetric pause
(0400:0000) 4.10 = 0 pause enable
(0200:0000) 4. 9 = 0 100BASE-T4 able
(0100:0100) 4. 8 = 1 100BASE-TX full duplex able
(0080:0080) 4. 7 = 1 100BASE-TX able
(0040:0040) 4. 6 = 1 10BASE-T full duplex able
(0020:0020) 4. 5 = 1 10BASE-T able
(001f:0001) 4. 4- 0 = 1 selector = IEEE 802.3
=> mii dump 1 5
5. (dd01) -- Autonegotiation partner abilities register --
(8000:8000) 5.15 = 1 next page able
(4000:4000) 5.14 = 1 acknowledge
(2000:0000) 5.13 = 0 remote fault
(1000:1000) 5.12 = 1 (reserved)
(0800:0800) 5.11 = 1 asymmetric pause able
(0400:0400) 5.10 = 1 pause able
(0200:0000) 5. 9 = 0 100BASE-T4 able
(0100:0100) 5. 8 = 1 100BASE-X full duplex able
(0080:0000) 5. 7 = 0 100BASE-TX able
(0040:0000) 5. 6 = 0 10BASE-T full duplex able
(0020:0000) 5. 5 = 0 10BASE-T able
(001f:0001) 5. 4- 0 = 1 selector = IEEE 802.3
---------------------------------------------------------------------------
root@imx6qdlsabresd:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Link partner advertised link modes: 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Link detected: yes
root@imx6qdlsabresd:~# ethtool -a eth0
Pause parameters for eth0:
Autonegotiate: on
RX: off
TX: off
RX negotiated: on
TX negotiated: on
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Masahiko KIMOTO,Ph.D. / Cybertrust Japan Co., Ltd.
mail: masahiko.kimoto@cybertrust.co.jp
web: https://www.cybertrust.co.jp/ https://www.miraclelinux.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-07-17 1:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1530857230-31124-1-git-send-email-masahiko.kimoto@cybertrust.co.jp>
2018-07-06 18:41 ` [RFC PATCH 0/1] net: phy: skip autoneg of ethernet(fec) on network boot Florian Fainelli
2018-07-09 9:29 ` Masahiko KIMOTO
2018-07-09 14:41 ` Andrew Lunn
2018-07-10 1:52 ` Masahiko KIMOTO
2018-07-17 1:47 ` Masahiko KIMOTO
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.