Fix broken build of mlx5
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
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.
--- 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
@@ -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
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_RXNFCis disabled)Signed-off-by Jes Sorensen <[email protected]>--- 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
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){
structmlx5e_priv*priv =netdev_priv(dev);
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_RXNFCis disabled)Signed-off-by Jes Sorensen <[email protected]>--- 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
-0drivers/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_RXNFCis disabled,mlx5e_get_rxnfcis 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
David Miller
maintainerRe: [PATCH 1/1] mlx5: Fix build when CONFIG_MLX5_EN_RXNFC is disabled
In reply to Jes SorensenFrom: 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)Signed-off-by Jes Sorensen <[email protected]>
Saeed, I'm assuming I will get this via your next pull request once things are sorted.
Thanks.
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 -0400Quoted 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_RXNFCis disabled)Signed-off-by Jes Sorensen <[email protected]>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 ?
Quoted 1 line
Thanks.
David Miller
maintainerRe: [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 ?
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.
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 +0000Quoted 6 lines
BTW is there a way to clear up "Awaiting Upstream" clutter [1] for mlx5
patches that are already pulled ?
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.
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,
JesJes Sorensen (1):
mlx5: Fix build whenCONFIG_MLX5_EN_RXNFCis disableddrivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
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/nwork 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
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/nwork on latest net-next, what am i missing ?Linus' tree:
[jes@xpeas linux.git]$ grep
mlx5e_get_rxnfcdrivers/net/ethernet/mellanox/mlx5/core/*.cdrivers/net/ethernet/mellanox/mlx5/core/en/*.hdrivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:static int mlx5e_get_rxnfc(structnet_device*dev, structethtool_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(structnet_device*dev, drivers/net/ethernet/mellanox/mlx5/core/en/fs.h:int mlx5e_get_rxnfc(structnet_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