lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241022133508.GT402847@kernel.org>
Date: Tue, 22 Oct 2024 14:35:08 +0100
From: Simon Horman <horms@...nel.org>
To: Daniel Machon <daniel.machon@...rochip.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	andrew@...n.ch, Lars Povlsen <lars.povlsen@...rochip.com>,
	Steen Hegelund <Steen.Hegelund@...rochip.com>,
	horatiu.vultur@...rochip.com,
	jensemil.schulzostergaard@...rochip.com,
	Parthiban.Veerasooran@...rochip.com, Raju.Lakkaraju@...rochip.com,
	UNGLinuxDriver@...rochip.com,
	Richard Cochran <richardcochran@...il.com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, jacob.e.keller@...el.com,
	ast@...erby.net, maxime.chevallier@...tlin.com,
	netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH net-next 14/15] net: sparx5: add compatible strings for
 lan969x and verify the target

On Tue, Oct 22, 2024 at 12:08:42PM +0000, Daniel Machon wrote:
> Hi Simon,
> 
> > > Add compatible strings for the twelve lan969x SKU's (Stock Keeping Unit)
> > > that we support, and verify that the devicetree target is supported by
> > > the chip target.
> > >
> > > Each SKU supports different bandwidths and features (see [1] for
> > > details). We want to be able to run a SKU with a lower bandwidth and/or
> > > feature set, than what is supported by the actual chip. In order to
> > > accomplish this we:
> > >
> > >     - add new field sparx5->target_dt that reflects the target from the
> > >       devicetree (compatible string).
> > >
> > >     - compare the devicetree target with the actual chip target. If the
> > >       bandwidth and features provided by the devicetree target is
> > >       supported by the chip, we approve - otherwise reject.
> > >
> > >     - set the core clock and features based on the devicetree target
> > >
> > > [1] https://www.microchip.com/en-us/product/lan9698
> > >
> > > Reviewed-by: Steen Hegelund <Steen.Hegelund@...rochip.com>
> > > Signed-off-by: Daniel Machon <daniel.machon@...rochip.com>
> > > ---
> > >  drivers/net/ethernet/microchip/sparx5/Makefile     |   1 +
> > >  .../net/ethernet/microchip/sparx5/sparx5_main.c    | 194 ++++++++++++++++++++-
> > >  .../net/ethernet/microchip/sparx5/sparx5_main.h    |   1 +
> > >  3 files changed, 193 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/net/ethernet/microchip/sparx5/Makefile b/drivers/net/ethernet/microchip/sparx5/Makefile
> > > index 3435ca86dd70..8fe302415563 100644
> > > --- a/drivers/net/ethernet/microchip/sparx5/Makefile
> > > +++ b/drivers/net/ethernet/microchip/sparx5/Makefile
> > > @@ -19,3 +19,4 @@ sparx5-switch-$(CONFIG_DEBUG_FS) += sparx5_vcap_debugfs.o
> > >  # Provide include files
> > >  ccflags-y += -I$(srctree)/drivers/net/ethernet/microchip/vcap
> > >  ccflags-y += -I$(srctree)/drivers/net/ethernet/microchip/fdma
> > > +ccflags-y += -I$(srctree)/drivers/net/ethernet/microchip/lan969x
> > > diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
> > > index 5c986c373b3e..edbe639d98c5 100644
> > > --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
> > > +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
> > > @@ -24,6 +24,8 @@
> > >  #include <linux/types.h>
> > >  #include <linux/reset.h>
> > >
> > > +#include "lan969x.h" /* lan969x_desc */
> > > +
> > 
> > Hi Daniel,
> > 
> > Perhaps this will change when Krzysztof's comment elsewhere in this thread
> > is addressed. But as it stands the construction in the above two hunks
> > appears to cause a build failure.
> > 
> >   CC      drivers/net/ethernet/microchip/sparx5/sparx5_main.o
> > In file included from drivers/net/ethernet/microchip/sparx5/sparx5_main.c:27:
> > ./drivers/net/ethernet/microchip/lan969x/lan969x.h:10:10: fatal error: sparx5_main.h: No such file or directory
> >    10 | #include "sparx5_main.h"
> >       |          ^~~~~~~~~~~~~~~
> > 
> > My preference would be to move away from adding -I directives and, rather,
> > use relative includes as is common practice in Networking drivers (at least).
> > 
> > ...
> > 
> > --
> > pw-bot: changes-requested
> 
> I didn't see this build failure when I ran my tests, nor did the NIPA
> tests reveal it. I can only reproduce it if I point to the microchip
> subdir when building - but maybe that's what you did too?
> 
> Anyway, I will skip the -I includes and resort to relative includes, as
> per your request. Thanks.

Thanks Daniel,

Yes I did see the problem when pointing to the subdir.
But I was also able to see it without doing so when
using a config based on tinyconfigi on x86_64.

I can dig further if you like, or provide that config.
But I did see that relative includes (or an extra -I)
resolved the problem.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ