Re: [RFC net-next v1 2/5] net: phy: remove MACSEC guard
From: Andrew Lunn
Date: Mon Aug 14 2023 - 11:51:33 EST
On Mon, Aug 14, 2023 at 05:35:33PM +0200, Sabrina Dubroca wrote:
> 2023-08-11, 18:59:57 +0200, Andrew Lunn wrote:
> > On Fri, Aug 11, 2023 at 06:32:46PM +0300, Radu Pirea (NXP OSS) wrote:
> > > Allow the phy driver to build the MACSEC support even if
> > > CONFIG_MACSEC=N.
> >
> > What is missing from this commit message is an answer to the question
> > 'Why?'
>
> The same question applies to patch #1. Why would we need a dummy
> implementation of macsec_pn_wrapped when !CONFIG_MACSEC?
>
> I guess it's to avoid conditional compilation of
> drivers/net/phy/nxp-c45-tja11xx-macsec.c and a few ifdefs in the main
> driver.
Which is that the mscc driver does.
Implementing MACSEC is a lot of code, and makes the resulting binary a
lot bigger. So it does seem reasonable to leave it out if MACSEC is
not needed.
So i suggest you follow what mscc does.
Andrew