* [PATCH iwl-net] i40e: Include types.h to some headers
@ 2024-01-11 0:39 Tony Nguyen
2024-01-11 13:11 ` Simon Horman
2024-01-17 12:32 ` [Intel-wired-lan] " Arland, ArpanaX
0 siblings, 2 replies; 5+ messages in thread
From: Tony Nguyen @ 2024-01-11 0:39 UTC (permalink / raw)
To: intel-wired-lan
Cc: Tony Nguyen, ivecera, netdev, Martin Zaharinov, Jesse Brandeburg
Commit 56df345917c0 ("i40e: Remove circular header dependencies and fix
headers") redistributed a number of includes from one large header file
to the locations they were needed. In some environments, types.h is not
included and causing compile issues. The driver should not rely on
implicit inclusion from other locations; explicitly include it to these
files.
Snippet of issue. Entire log can be seen through the Closes: link.
In file included from drivers/net/ethernet/intel/i40e/i40e_diag.h:7,
from drivers/net/ethernet/intel/i40e/i40e_diag.c:4:
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:33:9: error: unknown type name '__le16'
33 | __le16 flags;
| ^~~~~~
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:34:9: error: unknown type name '__le16'
34 | __le16 opcode;
| ^~~~~~
...
drivers/net/ethernet/intel/i40e/i40e_diag.h:22:9: error: unknown type name 'u32'
22 | u32 elements; /* number of elements if array */
| ^~~
drivers/net/ethernet/intel/i40e/i40e_diag.h:23:9: error: unknown type name 'u32'
23 | u32 stride; /* bytes between each element */
Reported-by: Martin Zaharinov <micron10@gmail.com>
Closes: https://lore.kernel.org/netdev/21BBD62A-F874-4E42-B347-93087EEA8126@gmail.com/
Fixes: 56df345917c0 ("i40e: Remove circular header dependencies and fix headers")
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 1 +
drivers/net/ethernet/intel/i40e/i40e_diag.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
index 18a1c3b6d72c..c8f35d4de271 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
@@ -5,6 +5,7 @@
#define _I40E_ADMINQ_CMD_H_
#include <linux/bits.h>
+#include <linux/types.h>
/* This header file defines the i40e Admin Queue commands and is shared between
* i40e Firmware and Software.
diff --git a/drivers/net/ethernet/intel/i40e/i40e_diag.h b/drivers/net/ethernet/intel/i40e/i40e_diag.h
index ece3a6b9a5c6..ab20202a3da3 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_diag.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_diag.h
@@ -4,6 +4,7 @@
#ifndef _I40E_DIAG_H_
#define _I40E_DIAG_H_
+#include <linux/types.h>
#include "i40e_adminq_cmd.h"
/* forward-declare the HW struct for the compiler */
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH iwl-net] i40e: Include types.h to some headers
2024-01-11 0:39 [PATCH iwl-net] i40e: Include types.h to some headers Tony Nguyen
@ 2024-01-11 13:11 ` Simon Horman
2024-01-11 17:00 ` Tony Nguyen
2024-01-17 12:32 ` [Intel-wired-lan] " Arland, ArpanaX
1 sibling, 1 reply; 5+ messages in thread
From: Simon Horman @ 2024-01-11 13:11 UTC (permalink / raw)
To: Tony Nguyen
Cc: intel-wired-lan, ivecera, netdev, Martin Zaharinov,
Jesse Brandeburg
On Wed, Jan 10, 2024 at 04:39:25PM -0800, Tony Nguyen wrote:
> Commit 56df345917c0 ("i40e: Remove circular header dependencies and fix
> headers") redistributed a number of includes from one large header file
> to the locations they were needed. In some environments, types.h is not
> included and causing compile issues. The driver should not rely on
> implicit inclusion from other locations; explicitly include it to these
> files.
>
> Snippet of issue. Entire log can be seen through the Closes: link.
>
> In file included from drivers/net/ethernet/intel/i40e/i40e_diag.h:7,
> from drivers/net/ethernet/intel/i40e/i40e_diag.c:4:
> drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:33:9: error: unknown type name '__le16'
> 33 | __le16 flags;
> | ^~~~~~
> drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:34:9: error: unknown type name '__le16'
> 34 | __le16 opcode;
> | ^~~~~~
> ...
> drivers/net/ethernet/intel/i40e/i40e_diag.h:22:9: error: unknown type name 'u32'
> 22 | u32 elements; /* number of elements if array */
> | ^~~
> drivers/net/ethernet/intel/i40e/i40e_diag.h:23:9: error: unknown type name 'u32'
> 23 | u32 stride; /* bytes between each element */
>
> Reported-by: Martin Zaharinov <micron10@gmail.com>
> Closes: https://lore.kernel.org/netdev/21BBD62A-F874-4E42-B347-93087EEA8126@gmail.com/
> Fixes: 56df345917c0 ("i40e: Remove circular header dependencies and fix headers")
> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Hi Tony,
I agree this is a good change to make.
But I am curious to know if you were able to reproduce
the problem reported at the link above.
Or perhaps more to the point, do you have a config that breaks
without this patch?
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH iwl-net] i40e: Include types.h to some headers
2024-01-11 13:11 ` Simon Horman
@ 2024-01-11 17:00 ` Tony Nguyen
2024-01-12 19:27 ` Simon Horman
0 siblings, 1 reply; 5+ messages in thread
From: Tony Nguyen @ 2024-01-11 17:00 UTC (permalink / raw)
To: Simon Horman
Cc: intel-wired-lan, ivecera, netdev, Martin Zaharinov,
Jesse Brandeburg
On 1/11/2024 5:11 AM, Simon Horman wrote:
> On Wed, Jan 10, 2024 at 04:39:25PM -0800, Tony Nguyen wrote:
>> Commit 56df345917c0 ("i40e: Remove circular header dependencies and fix
>> headers") redistributed a number of includes from one large header file
>> to the locations they were needed. In some environments, types.h is not
>> included and causing compile issues. The driver should not rely on
>> implicit inclusion from other locations; explicitly include it to these
>> files.
>>
>> Snippet of issue. Entire log can be seen through the Closes: link.
>>
>> In file included from drivers/net/ethernet/intel/i40e/i40e_diag.h:7,
>> from drivers/net/ethernet/intel/i40e/i40e_diag.c:4:
>> drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:33:9: error: unknown type name '__le16'
>> 33 | __le16 flags;
>> | ^~~~~~
>> drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:34:9: error: unknown type name '__le16'
>> 34 | __le16 opcode;
>> | ^~~~~~
>> ...
>> drivers/net/ethernet/intel/i40e/i40e_diag.h:22:9: error: unknown type name 'u32'
>> 22 | u32 elements; /* number of elements if array */
>> | ^~~
>> drivers/net/ethernet/intel/i40e/i40e_diag.h:23:9: error: unknown type name 'u32'
>> 23 | u32 stride; /* bytes between each element */
>>
>> Reported-by: Martin Zaharinov <micron10@gmail.com>
>> Closes: https://lore.kernel.org/netdev/21BBD62A-F874-4E42-B347-93087EEA8126@gmail.com/
>> Fixes: 56df345917c0 ("i40e: Remove circular header dependencies and fix headers")
>> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
>> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
>
> Hi Tony,
>
> I agree this is a good change to make.
> But I am curious to know if you were able to reproduce
> the problem reported at the link above.
> Or perhaps more to the point, do you have a config that breaks
> without this patch?
Hi Simon,
Unfortunately, I was not able to reproduce the problem. Since it was
fairly straightforward on what was happening, I made the patch and
Martin confirmed it resolved his issue.
Thanks,
Tony
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH iwl-net] i40e: Include types.h to some headers
2024-01-11 17:00 ` Tony Nguyen
@ 2024-01-12 19:27 ` Simon Horman
0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2024-01-12 19:27 UTC (permalink / raw)
To: Tony Nguyen
Cc: intel-wired-lan, ivecera, netdev, Martin Zaharinov,
Jesse Brandeburg
On Thu, Jan 11, 2024 at 09:00:30AM -0800, Tony Nguyen wrote:
>
>
> On 1/11/2024 5:11 AM, Simon Horman wrote:
> > On Wed, Jan 10, 2024 at 04:39:25PM -0800, Tony Nguyen wrote:
> > > Commit 56df345917c0 ("i40e: Remove circular header dependencies and fix
> > > headers") redistributed a number of includes from one large header file
> > > to the locations they were needed. In some environments, types.h is not
> > > included and causing compile issues. The driver should not rely on
> > > implicit inclusion from other locations; explicitly include it to these
> > > files.
> > >
> > > Snippet of issue. Entire log can be seen through the Closes: link.
> > >
> > > In file included from drivers/net/ethernet/intel/i40e/i40e_diag.h:7,
> > > from drivers/net/ethernet/intel/i40e/i40e_diag.c:4:
> > > drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:33:9: error: unknown type name '__le16'
> > > 33 | __le16 flags;
> > > | ^~~~~~
> > > drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:34:9: error: unknown type name '__le16'
> > > 34 | __le16 opcode;
> > > | ^~~~~~
> > > ...
> > > drivers/net/ethernet/intel/i40e/i40e_diag.h:22:9: error: unknown type name 'u32'
> > > 22 | u32 elements; /* number of elements if array */
> > > | ^~~
> > > drivers/net/ethernet/intel/i40e/i40e_diag.h:23:9: error: unknown type name 'u32'
> > > 23 | u32 stride; /* bytes between each element */
> > >
> > > Reported-by: Martin Zaharinov <micron10@gmail.com>
> > > Closes: https://lore.kernel.org/netdev/21BBD62A-F874-4E42-B347-93087EEA8126@gmail.com/
> > > Fixes: 56df345917c0 ("i40e: Remove circular header dependencies and fix headers")
> > > Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> > > Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> >
> > Hi Tony,
> >
> > I agree this is a good change to make.
> > But I am curious to know if you were able to reproduce
> > the problem reported at the link above.
> > Or perhaps more to the point, do you have a config that breaks
> > without this patch?
>
> Hi Simon,
>
> Unfortunately, I was not able to reproduce the problem. Since it was
> fairly straightforward on what was happening, I made the patch and Martin
> confirmed it resolved his issue.
Thanks, I agree this seems straightforward.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Intel-wired-lan] [PATCH iwl-net] i40e: Include types.h to some headers
2024-01-11 0:39 [PATCH iwl-net] i40e: Include types.h to some headers Tony Nguyen
2024-01-11 13:11 ` Simon Horman
@ 2024-01-17 12:32 ` Arland, ArpanaX
1 sibling, 0 replies; 5+ messages in thread
From: Arland, ArpanaX @ 2024-01-17 12:32 UTC (permalink / raw)
To: Nguyen, Anthony L, intel-wired-lan@lists.osuosl.org
Cc: ivecera, netdev@vger.kernel.org, Nguyen, Anthony L,
Martin Zaharinov, Brandeburg, Jesse
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Tony Nguyen
> Sent: Thursday, January 11, 2024 6:09 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: ivecera <ivecera@redhat.com>; netdev@vger.kernel.org; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Martin Zaharinov <micron10@gmail.com>; Brandeburg, Jesse <jesse.brandeburg@intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net] i40e: Include types.h to some headers
>
> Commit 56df345917c0 ("i40e: Remove circular header dependencies and fix
headers") redistributed a number of includes from one large header file to the locations they were needed. In some environments, types.h is not included and causing compile issues. The driver should not rely on implicit inclusion from other locations; explicitly include it to these files.
>
> Snippet of issue. Entire log can be seen through the Closes: link.
>
> In file included from drivers/net/ethernet/intel/i40e/i40e_diag.h:7,
> from drivers/net/ethernet/intel/i40e/i40e_diag.c:4:
> drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:33:9: error: unknown type name '__le16'
> 33 | __le16 flags;
> | ^~~~~~
> drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:34:9: error: unknown type name '__le16'
> 34 | __le16 opcode;
> | ^~~~~~
> ...
> drivers/net/ethernet/intel/i40e/i40e_diag.h:22:9: error: unknown type name 'u32'
> 22 | u32 elements; /* number of elements if array */
> | ^~~
> drivers/net/ethernet/intel/i40e/i40e_diag.h:23:9: error: unknown type name 'u32'
> 23 | u32 stride; /* bytes between each element */
>
> Reported-by: Martin Zaharinov <micron10@gmail.com>
> Closes: https://lore.kernel.org/netdev/21BBD62A-F874-4E42-B347-93087EEA8126@gmail.com/
> Fixes: 56df345917c0 ("i40e: Remove circular header dependencies and fix headers")
> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 1 +
> drivers/net/ethernet/intel/i40e/i40e_diag.h | 1 +
> 2 files changed, 2 insertions(+)
>
Tested-by: Arpana Arland <arpanax.arland@intel.com> (A Contingent worker at Intel)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-17 12:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-11 0:39 [PATCH iwl-net] i40e: Include types.h to some headers Tony Nguyen
2024-01-11 13:11 ` Simon Horman
2024-01-11 17:00 ` Tony Nguyen
2024-01-12 19:27 ` Simon Horman
2024-01-17 12:32 ` [Intel-wired-lan] " Arland, ArpanaX
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).