diff mbox series

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

Message ID 20190625152708.23729-2-Jes.Sorensen@gmail.com
State Awaiting Upstream
Delegated to: David Miller
Headers show
Series Fix broken build of mlx5 | expand

Commit Message

Jes Sorensen June 25, 2019, 3:27 p.m. UTC
From: Jes Sorensen <jsorensen@fb.com>

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 <jsorensen@fb.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Saeed Mahameed June 25, 2019, 6 p.m. UTC | #1
On Tue, 2019-06-25 at 11:27 -0400, Jes Sorensen wrote:
> From: Jes Sorensen <jsorensen@fb.com>
> 
> 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 <jsorensen@fb.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> index dd764e0471f2..776040d91bd4 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> @@ -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 ?

> -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);
>
David Miller June 25, 2019, 8:34 p.m. UTC | #2
From: Jes Sorensen <jes.sorensen@gmail.com>
Date: Tue, 25 Jun 2019 11:27:08 -0400

> From: Jes Sorensen <jsorensen@fb.com>
> 
> 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 <jsorensen@fb.com>

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

Thanks.
Saeed Mahameed June 25, 2019, 9:01 p.m. UTC | #3
On Tue, 2019-06-25 at 13:34 -0700, David Miller wrote:
> From: Jes Sorensen <jes.sorensen@gmail.com>
> Date: Tue, 25 Jun 2019 11:27:08 -0400
> 
> > From: Jes Sorensen <jsorensen@fb.com>
> > 
> > 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 <jsorensen@fb.com>
> 
> 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=

> Thanks.
David Miller June 25, 2019, 9:08 p.m. UTC | #4
From: Saeed Mahameed <saeedm@mellanox.com>
Date: Tue, 25 Jun 2019 21:01:58 +0000

> 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.
Saeed Mahameed June 26, 2019, 7:08 p.m. UTC | #5
On Tue, 2019-06-25 at 14:08 -0700, David Miller wrote:
> From: Saeed Mahameed <saeedm@mellanox.com>
> Date: Tue, 25 Jun 2019 21:01:58 +0000
> 
> > 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.
> 

I see, Thanks for clarifying.
Jes Sorensen July 2, 2019, 3 p.m. UTC | #6
On 6/25/19 2:00 PM, Saeed Mahameed wrote:
> On Tue, 2019-06-25 at 11:27 -0400, Jes Sorensen wrote:
>> From: Jes Sorensen <jsorensen@fb.com>
>>
>> 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 <jsorensen@fb.com>
>> ---
>>  drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
>> b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
>> index dd764e0471f2..776040d91bd4 100644
>> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
>> @@ -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 ?

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
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index dd764e0471f2..776040d91bd4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -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);