[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aMmCx1Eu0pDAxWJ9@shell.armlinux.org.uk>
Date: Tue, 16 Sep 2025 16:31:19 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>
Cc: Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
Paolo Abeni <pabeni@...hat.com>,
Richard Cochran <richardcochran@...il.com>
Subject: Re: [PATCH net-next 5/5] net: dsa: mv88e6xxx: move
mv88e6xxx_hwtstamp_work() prototype
On Tue, Sep 16, 2025 at 02:46:05PM +0200, Andrew Lunn wrote:
> > This leaves the shim definition (for when CONFIG_NET_DSA_MV88E6XXX_PTP
> > is not defined) in ptp.h. It creates an inconsistency and potential
> > problem - the same header should provide all definitions of the same
> > function.
>
> How big is the PTP code? We have added a lot of code to this driver
> since PTP was added. I suspect the PTP code is now small compared to
> the rest of the driver, so does it still make sense to have it
> optional? Also once the PTP code gets moved into a library and shared
> by the Marvell PHY driver and other Marvell MAC drivers, won't we have
> an overall code shrink even when it is enabled in DSA?
>
> Maybe it is time for CONFIG_NET_DSA_MV88E6XXX_PTP to go away?
Unmodified:
wc -l:
611 drivers/net/dsa/mv88e6xxx/hwtstamp.c
180 drivers/net/dsa/mv88e6xxx/hwtstamp.h
564 drivers/net/dsa/mv88e6xxx/ptp.c
176 drivers/net/dsa/mv88e6xxx/ptp.h
size:
text data bss dec hex filename
4004 0 16 4020 fb4 drivers/net/dsa/mv88e6xxx/hwtstamp.o
130360 3505 224 134089 20bc9 drivers/net/dsa/mv88e6xxx/mv88e6xxx.ko
3917 0 64 3981 f8d drivers/net/dsa/mv88e6xxx/ptp.o
Current post-conversion:
wc -l:
459 drivers/net/dsa/mv88e6xxx/hwtstamp.c
169 drivers/net/dsa/mv88e6xxx/hwtstamp.h
418 drivers/net/dsa/mv88e6xxx/ptp.c
83 drivers/net/dsa/mv88e6xxx/ptp.h
size:
text data bss dec hex filename
3988 0 0 3988 f94 drivers/net/dsa/mv88e6xxx/hwtstamp.o
129312 3505 144 132961 20761 drivers/net/dsa/mv88e6xxx/mv88e6xxx.ko
2709 0 0 2709 a95 drivers/net/dsa/mv88e6xxx/ptp.o
With a bit more effort to avoid the repeated chip->info->ops->foo
dereferecing chains in ptp.c, I can get this down to:
text data bss dec hex filename
2677 0 0 2677 a75 drivers/net/dsa/mv88e6xxx/ptp.o
So that reduces the PTP .text size by between 31 and 32%.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists