2018-09-02 23:51:29

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the net-next tree

Hi all,

After merging the net-next tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from drivers/net/ethernet/intel/i40e/i40e_ethtool.c:9:
drivers/net/ethernet/intel/i40e/i40e_ethtool.c: In function '__i40e_add_stat_strings':
drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h:193:20: error: function '__i40e_add_stat_strings' can never be inlined because it uses variable argument lists
static inline void __i40e_add_stat_strings(u8 **p, const struct i40e_stats stats[],
^~~~~~~~~~~~~~~~~~~~~~~

Caused by commit

8fd75c58a09a ("i40e: move ethtool stats boiler plate code to i40e_ethtool_stats.h")

It is not clear this patch has any value anyway as the moved functions
are only used in the file they were moved from.

I reverted that commit for today.

The same problem would exist in drivers/net/ethernet/intel/i40evf (where
a lot of code is duplicated from drivers/net/ethernet/intel/i40e) except
that this function is not declared inline there.
Luckily, i40e_ethtool_stats.h is only included my one file
drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c, otherwise there
would be multiple copies of __i40e_add_stat_strings().

Surely there is some scope for factoring out some common code between
these two drivers?
--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2018-09-07 00:23:33

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the net-next tree

Hi all,

On Mon, 3 Sep 2018 09:47:02 +1000 Stephen Rothwell <[email protected]> wrote:
>
> After merging the net-next tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> In file included from drivers/net/ethernet/intel/i40e/i40e_ethtool.c:9:
> drivers/net/ethernet/intel/i40e/i40e_ethtool.c: In function '__i40e_add_stat_strings':
> drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h:193:20: error: function '__i40e_add_stat_strings' can never be inlined because it uses variable argument lists
> static inline void __i40e_add_stat_strings(u8 **p, const struct i40e_stats stats[],
> ^~~~~~~~~~~~~~~~~~~~~~~
>
> Caused by commit
>
> 8fd75c58a09a ("i40e: move ethtool stats boiler plate code to i40e_ethtool_stats.h")
>
> It is not clear this patch has any value anyway as the moved functions
> are only used in the file they were moved from.
>
> I reverted that commit for today.
>
> The same problem would exist in drivers/net/ethernet/intel/i40evf (where
> a lot of code is duplicated from drivers/net/ethernet/intel/i40e) except
> that this function is not declared inline there.
> Luckily, i40e_ethtool_stats.h is only included my one file
> drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c, otherwise there
> would be multiple copies of __i40e_add_stat_strings().
>
> Surely there is some scope for factoring out some common code between
> these two drivers?

Ping?

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2018-09-07 15:55:19

by Jacob Keller

[permalink] [raw]
Subject: RE: linux-next: build failure after merge of the net-next tree

> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Stephen Rothwell
> Sent: Thursday, September 06, 2018 5:21 PM
> To: David Miller <[email protected]>; Networking
> <[email protected]>
> Cc: Linux-Next Mailing List <[email protected]>; Linux Kernel Mailing
> List <[email protected]>; Keller, Jacob E <[email protected]>;
> Kirsher, Jeffrey T <[email protected]>; Bowers, AndrewX
> <[email protected]>
> Subject: Re: linux-next: build failure after merge of the net-next tree
>
> Hi all,
>
> On Mon, 3 Sep 2018 09:47:02 +1000 Stephen Rothwell <[email protected]>
> wrote:
> >
> > After merging the net-next tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> >
> > In file included from drivers/net/ethernet/intel/i40e/i40e_ethtool.c:9:
> > drivers/net/ethernet/intel/i40e/i40e_ethtool.c: In function
> '__i40e_add_stat_strings':
> > drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h:193:20: error: function
> '__i40e_add_stat_strings' can never be inlined because it uses variable argument
> lists
> > static inline void __i40e_add_stat_strings(u8 **p, const struct i40e_stats
> stats[],
> > ^~~~~~~~~~~~~~~~~~~~~~~
> >
> > Caused by commit
> >
> > 8fd75c58a09a ("i40e: move ethtool stats boiler plate code to
> i40e_ethtool_stats.h")
> >
> > It is not clear this patch has any value anyway as the moved functions
> > are only used in the file they were moved from.
> >
> > I reverted that commit for today.
> >
> > The same problem would exist in drivers/net/ethernet/intel/i40evf (where
> > a lot of code is duplicated from drivers/net/ethernet/intel/i40e) except
> > that this function is not declared inline there.
> > Luckily, i40e_ethtool_stats.h is only included my one file
> > drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c, otherwise there
> > would be multiple copies of __i40e_add_stat_strings().
> >
> > Surely there is some scope for factoring out some common code between
> > these two drivers?
>
> Ping?
>
> --
> Cheers,
> Stephen Rothwell

There's some discussion about this going on in the intel-wired-lan mailing list.

Thanks,
Jake

2018-09-07 17:33:07

by David Miller

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the net-next tree

From: "Keller, Jacob E" <[email protected]>
Date: Fri, 7 Sep 2018 15:30:42 +0000

> There's some discussion about this going on in the intel-wired-lan
> mailing list.

I really want to see a pull request in my inbox fixing this by the end
of today or I'll apply a fix directly at my discretion.

2018-09-07 22:04:55

by Jacob Keller

[permalink] [raw]
Subject: RE: linux-next: build failure after merge of the net-next tree

> -----Original Message-----
> From: David Miller [mailto:[email protected]]
> Sent: Friday, September 07, 2018 10:31 AM
> To: Keller, Jacob E <[email protected]>
> Cc: [email protected]; [email protected]; [email protected];
> [email protected]; Kirsher, Jeffrey T <[email protected]>;
> Bowers, AndrewX <[email protected]>
> Subject: Re: linux-next: build failure after merge of the net-next tree
>
> From: "Keller, Jacob E" <[email protected]>
> Date: Fri, 7 Sep 2018 15:30:42 +0000
>
> > There's some discussion about this going on in the intel-wired-lan
> > mailing list.
>
> I really want to see a pull request in my inbox fixing this by the end
> of today or I'll apply a fix directly at my discretion.

Jeff is out, so I just opted to email a fix to netdev. I hope this is acceptable.

I opted to essentially revert the patch that moved code to i40e_ethtool_stats.h, rather than anything fancier, since it was fast, and correct.

There was a suggestion to only move the one offending function, but I felt that it was better to move everything back into the .c files.

Thanks,
Jake