Skip to contentSkip to conversation

Fix broken build of mlx5

PATCH In review Jes Sorensen 3 participants 11 messages Jun 25, 2019 – Jul 2, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover Fix broken build of mlx5

From: Jes Sorensen <[email protected]>

This fixes an obvious build error that could have been caught by simply building the code before pushing out the patch.

Cheers,
Jes

Jes Sorensen (1):
mlx5: Fix build when CONFIG_MLX5_EN_RXNFC is disabled

 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/1 mlx5: Fix build when CONFIG_MLX5_EN_RXNFC is disabled

From: Jes Sorensen <[email protected]>

The previous patch broke the build with a static declaration for a public function.

Fixes 8f0916c6dc5c (net/mlx5e: Fix ethtool rxfh commands when CONFIG_MLX5_EN_RXNFC is disabled)
---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +2 -1
index dd764e0471f2..776040d91bd4 100644
@@ -1905,7 +1905,8 @@ static int mlx5e_flash_device(struct net_device *dev,
 /* When CONFIG_MLX5_EN_RXNFC=n we only support ETHTOOL_GRXRINGS
  * otherwise this function will be defined from en_fs_ethtool.c
  */
-static int mlx5e_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info, u32 *rule_locs)
+int mlx5e_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
+		    u32 *rule_locs)
 {
 	struct mlx5e_priv *priv = netdev_priv(dev);
 
Signature · 1 line
2.21.0
#2 lore raw

Re: [PATCH 1/1] mlx5: Fix build when CONFIG_MLX5_EN_RXNFC is disabled

Quoted 18 lines · Jes Sorensen

From: Jes Sorensen <[email protected]>

The previous patch broke the build with a static declaration for a public function.

Fixes 8f0916c6dc5c (net/mlx5e: Fix ethtool rxfh commands when

CONFIG_MLX5_EN_RXNFC is disabled)

---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +0 -0
index dd764e0471f2..776040d91bd4 100644

drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c static int mlx5e_flash_device(struct net_device · line 1908

Quoted 4 lines
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +0 -0
@@ -1905,7 +1905,8 @@ static int mlx5e_flash_device(struct net_device
 *dev,
 /* When CONFIG_MLX5_EN_RXNFC=n we only support ETHTOOL_GRXRINGS
  * otherwise this function will be defined from en_fs_ethtool.c
  */

As the above comment states, when CONFIG_MLX5_EN_RXNFC is disabled, mlx5e_get_rxnfc is only defined, declared and used in this file, so it must be static. Otherwise it will be defined in another file which provides much much more functionality for ethtool flow steering.

can you please provide more information of what went wrong on your build machine ?

Quoted 8 lines
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +2 -1
-static int mlx5e_get_rxnfc(struct net_device *dev, struct
 ethtool_rxnfc *info, u32 *rule_locs)
+int mlx5e_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc
 *info,
+		    u32 *rule_locs)

{
struct mlx5e_priv *priv = netdev_priv(dev);

#3 lore raw

Re: [PATCH 1/1] mlx5: Fix build when CONFIG_MLX5_EN_RXNFC is disabled

Quoted 29 lines · Saeed Mahameed
Quoted 18 lines · Jes Sorensen

From: Jes Sorensen <[email protected]>

The previous patch broke the build with a static declaration for a public function.

Fixes 8f0916c6dc5c (net/mlx5e: Fix ethtool rxfh commands when

CONFIG_MLX5_EN_RXNFC is disabled)

---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +0 -0
index dd764e0471f2..776040d91bd4 100644

drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c static int mlx5e_flash_device(struct net_device · line 1908

Quoted 4 lines
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +0 -0
@@ -1905,7 +1905,8 @@ static int mlx5e_flash_device(struct net_device
 *dev,
 /* When CONFIG_MLX5_EN_RXNFC=n we only support ETHTOOL_GRXRINGS
  * otherwise this function will be defined from en_fs_ethtool.c
  */

As the above comment states, when CONFIG_MLX5_EN_RXNFC is disabled, mlx5e_get_rxnfc is only defined, declared and used in this file, so it must be static. Otherwise it will be defined in another file which provides much much more functionality for ethtool flow steering.

Quoted 2 lines

can you please provide more information of what went wrong on your build machine ?

Sorry was swamped here!

Looks like you're right, it only triggers in our build due to some patches we don't have from upstream. I did the patch against upstream and applied it to our tree, so should have checked further there.

Cheers,
Jes

maintainer
#4 lore raw

Re: [PATCH 1/1] mlx5: Fix build when CONFIG_MLX5_EN_RXNFC is disabled

In reply to Jes Sorensen

From: Jes Sorensen <[email protected]>
Date: Tue, 25 Jun 2019 11:27:08 -0400

Quoted 7 lines

From: Jes Sorensen <[email protected]>

The previous patch broke the build with a static declaration for a public function.

Fixes 8f0916c6dc5c (net/mlx5e: Fix ethtool rxfh commands when CONFIG_MLX5_EN_RXNFC is disabled)

Saeed, I'm assuming I will get this via your next pull request once things are sorted.

Thanks.

#5 lore raw

Re: [PATCH 1/1] mlx5: Fix build when CONFIG_MLX5_EN_RXNFC is disabled

Quoted 8 lines · David Miller

From: Jes Sorensen <[email protected]>
Date: Tue, 25 Jun 2019 11:27:08 -0400

Quoted 5 lines

From: Jes Sorensen <[email protected]>

The previous patch broke the build with a static declaration for a public function.

Quoted 8 lines
Quoted 3 lines
Fixes 8f0916c6dc5c (net/mlx5e: Fix ethtool rxfh commands when

CONFIG_MLX5_EN_RXNFC is disabled)

Saeed, I'm assuming I will get this via your next pull request once things
are sorted.

Well, i think there is no issue in upstream, but yes basically you can delegate this to me.

BTW is there a way to clear up "Awaiting Upstream" clutter [1] for mlx5 patches that are already pulled ?

[1]
https://patchwork.ozlabs.org/project/netdev/list/?series=&submitter=&state=8&q=mlx5&archive=&delegate=

Quoted 1 line

Thanks.

maintainer
#6 lore raw

Re: [PATCH 1/1] mlx5: Fix build when CONFIG_MLX5_EN_RXNFC is disabled

From: Saeed Mahameed <[email protected]>
Date: Tue, 25 Jun 2019 21:01:58 +0000

Quoted 5 lines

BTW is there a way to clear up "Awaiting Upstream" clutter [1] for mlx5 patches that are already pulled ?

[1]
https://patchwork.ozlabs.org/project/netdev/list/?series=&submitter=&state=8&q=mlx5&archive=&delegate=

I don't understand what the problem is. Everything there is in the appropriate state.

When something hits netdev that doesn't go directly to my tree, that's the approprate state forever.

#7 lore raw

Re: [PATCH 1/1] mlx5: Fix build when CONFIG_MLX5_EN_RXNFC is disabled

Quoted 10 lines · David Miller

From: Saeed Mahameed <[email protected]>
Date: Tue, 25 Jun 2019 21:01:58 +0000

Quoted 6 lines

BTW is there a way to clear up "Awaiting Upstream" clutter [1] for mlx5
patches that are already pulled ?

[1]
https://patchwork.ozlabs.org/project/netdev/list/?series=&submitter=&state=8&q=mlx5&archive=&delegate=

Quoted 7 lines

I don't understand what the problem is. Everything there is in the appropriate state.

When something hits netdev that doesn't go directly to my tree, that's
the approprate state forever.

I see, Thanks for clarifying.

#8 lore raw
In reply to Jes Sorensen
Quoted 5 lines · Jes Sorensen

From: Jes Sorensen <[email protected]>

This fixes an obvious build error that could have been caught by simply building the code before pushing out the patch.

Hi Jes,

Just tested again, as I have tested before submitting the blamed patch, and as we test on every single new patch in our build automation.

both combinations CONFIG_MLX5_EN_RXNFC=y/n work on latest net-next, what am i missing ?

Quoted 10 lines

Cheers,
Jes

Jes Sorensen (1):
mlx5: Fix build when CONFIG_MLX5_EN_RXNFC is disabled

 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
#9 lore raw
Quoted 7 lines · Saeed Mahameed
Quoted 5 lines · Jes Sorensen

From: Jes Sorensen <[email protected]>

This fixes an obvious build error that could have been caught by simply building the code before pushing out the patch.

Quoted 7 lines

Hi Jes,

Just tested again, as I have tested before submitting the blamed patch, and as we test on every single new patch in our build automation.

both combinations CONFIG_MLX5_EN_RXNFC=y/n work on latest net-next, what am i missing ?

Linus' tree:

[jes@xpeas linux.git]$ grep mlx5e_get_rxnfc drivers/net/ethernet/mellanox/mlx5/core/*.c drivers/net/ethernet/mellanox/mlx5/core/en/*.h drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:static int mlx5e_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info, u32 *rule_locs)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c: .get_rxnfc
= mlx5e_get_rxnfc, drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c:int mlx5e_get_rxnfc(struct net_device *dev, drivers/net/ethernet/mellanox/mlx5/core/en/fs.h:int mlx5e_get_rxnfc(struct net_device *dev,

static vs non static functions, with a prototype that is non static.

Jes

#10 lore raw
Quoted 33 lines · Jes Sorensen
Quoted 7 lines · Saeed Mahameed
Quoted 5 lines · Jes Sorensen

From: Jes Sorensen <[email protected]>

This fixes an obvious build error that could have been caught by simply building the code before pushing out the patch.

Quoted 8 lines

Hi Jes,

Just tested again, as I have tested before submitting the blamed patch,
and as we test on every single new patch in our build automation.

both combinations CONFIG_MLX5_EN_RXNFC=y/n work on latest net-next, what am i missing ?

Linus' tree:

[jes@xpeas linux.git]$ grep mlx5e_get_rxnfc drivers/net/ethernet/mellanox/mlx5/core/*.c drivers/net/ethernet/mellanox/mlx5/core/en/*.h drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:static int mlx5e_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info, u32
*rule_locs)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c: .get_rxnfc
= mlx5e_get_rxnfc, drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c:int mlx5e_get_rxnfc(struct net_device *dev, drivers/net/ethernet/mellanox/mlx5/core/en/fs.h:int mlx5e_get_rxnfc(struct net_device *dev,

Quoted 1 line

static vs non static functions, with a prototype that is non static.

But only one prototype can be selected and it is according CONFIG_MLX5_EN_RXNFC

when CONFIG_MLX5_EN_RXNFC=n then the static prototype will be selected and the other one will be compiled out.

when CONFIG_MLX5_EN_RXNFC=y the non static prototype will be selected and the static one will be compiled out.

So no issue here.

Quoted 2 lines

Jes