All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net/mlx5e: Move mlx5e_priv_flags into en_ethtool.c
@ 2018-07-15 19:06 Kamal Heib
  2018-07-17 15:00 ` Saeed Mahameed
  2018-07-26 18:51 ` Saeed Mahameed
  0 siblings, 2 replies; 6+ messages in thread
From: Kamal Heib @ 2018-07-15 19:06 UTC (permalink / raw)
  To: David S . Miller, Saeed Mahameed; +Cc: netdev, Kamal Heib

Move the definition of mlx5e_priv_flags into en_ethtool.c because it's
only used there.

Fixes: 4e59e2888139 ("net/mlx5e: Introduce net device priv flags infrastructure")
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en.h         | 7 -------
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index eb9eb7aa953a..84e6a5b42286 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -208,13 +208,6 @@ struct mlx5e_umr_wqe {
 
 extern const char mlx5e_self_tests[][ETH_GSTRING_LEN];
 
-static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {
-	"rx_cqe_moder",
-	"tx_cqe_moder",
-	"rx_cqe_compress",
-	"rx_striding_rq",
-};
-
 enum mlx5e_priv_flag {
 	MLX5E_PFLAG_RX_CQE_BASED_MODER = (1 << 0),
 	MLX5E_PFLAG_TX_CQE_BASED_MODER = (1 << 1),
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index fffe514ba855..2a1c35d82c2e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -33,6 +33,13 @@
 #include "en.h"
 #include "en/port.h"
 
+static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {
+	"rx_cqe_moder",
+	"tx_cqe_moder",
+	"rx_cqe_compress",
+	"rx_striding_rq",
+};
+
 void mlx5e_ethtool_get_drvinfo(struct mlx5e_priv *priv,
 			       struct ethtool_drvinfo *drvinfo)
 {
-- 
2.14.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net] net/mlx5e: Move mlx5e_priv_flags into en_ethtool.c
  2018-07-15 19:06 [PATCH net] net/mlx5e: Move mlx5e_priv_flags into en_ethtool.c Kamal Heib
@ 2018-07-17 15:00 ` Saeed Mahameed
  2018-07-17 18:44   ` Kamal Heib
  2018-07-26 18:51 ` Saeed Mahameed
  1 sibling, 1 reply; 6+ messages in thread
From: Saeed Mahameed @ 2018-07-17 15:00 UTC (permalink / raw)
  To: Kamal Heib; +Cc: David S . Miller, Saeed Mahameed, Linux Netdev List

On Sun, Jul 15, 2018 at 12:06 PM, Kamal Heib <kamalheib1@gmail.com> wrote:
> Move the definition of mlx5e_priv_flags into en_ethtool.c because it's
> only used there.
>
> Fixes: 4e59e2888139 ("net/mlx5e: Introduce net device priv flags infrastructure")
> Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> ---


LGTM, but why to net ?
this patch should go to net-next.

>  drivers/net/ethernet/mellanox/mlx5/core/en.h         | 7 -------
>  drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 +++++++
>  2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
> index eb9eb7aa953a..84e6a5b42286 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
> @@ -208,13 +208,6 @@ struct mlx5e_umr_wqe {
>
>  extern const char mlx5e_self_tests[][ETH_GSTRING_LEN];
>
> -static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {
> -       "rx_cqe_moder",
> -       "tx_cqe_moder",
> -       "rx_cqe_compress",
> -       "rx_striding_rq",
> -};
> -
>  enum mlx5e_priv_flag {
>         MLX5E_PFLAG_RX_CQE_BASED_MODER = (1 << 0),
>         MLX5E_PFLAG_TX_CQE_BASED_MODER = (1 << 1),
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> index fffe514ba855..2a1c35d82c2e 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> @@ -33,6 +33,13 @@
>  #include "en.h"
>  #include "en/port.h"
>
> +static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {
> +       "rx_cqe_moder",
> +       "tx_cqe_moder",
> +       "rx_cqe_compress",
> +       "rx_striding_rq",
> +};
> +
>  void mlx5e_ethtool_get_drvinfo(struct mlx5e_priv *priv,
>                                struct ethtool_drvinfo *drvinfo)
>  {
> --
> 2.14.4
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net] net/mlx5e: Move mlx5e_priv_flags into en_ethtool.c
  2018-07-17 15:00 ` Saeed Mahameed
@ 2018-07-17 18:44   ` Kamal Heib
  0 siblings, 0 replies; 6+ messages in thread
From: Kamal Heib @ 2018-07-17 18:44 UTC (permalink / raw)
  To: Saeed Mahameed; +Cc: David S . Miller, Saeed Mahameed, Linux Netdev List

On Tue, Jul 17, 2018 at 08:00:58AM -0700, Saeed Mahameed wrote:
> On Sun, Jul 15, 2018 at 12:06 PM, Kamal Heib <kamalheib1@gmail.com> wrote:
> > Move the definition of mlx5e_priv_flags into en_ethtool.c because it's
> > only used there.
> >
> > Fixes: 4e59e2888139 ("net/mlx5e: Introduce net device priv flags infrastructure")
> > Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> > ---
> 
> 
> LGTM, but why to net ?
> this patch should go to net-next.
>
It was sent to net because it fixes an existing commit, but I'm fine
with net-next too.

Thanks,
Kamal

> >  drivers/net/ethernet/mellanox/mlx5/core/en.h         | 7 -------
> >  drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 +++++++
> >  2 files changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
> > index eb9eb7aa953a..84e6a5b42286 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
> > @@ -208,13 +208,6 @@ struct mlx5e_umr_wqe {
> >
> >  extern const char mlx5e_self_tests[][ETH_GSTRING_LEN];
> >
> > -static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {
> > -       "rx_cqe_moder",
> > -       "tx_cqe_moder",
> > -       "rx_cqe_compress",
> > -       "rx_striding_rq",
> > -};
> > -
> >  enum mlx5e_priv_flag {
> >         MLX5E_PFLAG_RX_CQE_BASED_MODER = (1 << 0),
> >         MLX5E_PFLAG_TX_CQE_BASED_MODER = (1 << 1),
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> > index fffe514ba855..2a1c35d82c2e 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> > @@ -33,6 +33,13 @@
> >  #include "en.h"
> >  #include "en/port.h"
> >
> > +static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {
> > +       "rx_cqe_moder",
> > +       "tx_cqe_moder",
> > +       "rx_cqe_compress",
> > +       "rx_striding_rq",
> > +};
> > +
> >  void mlx5e_ethtool_get_drvinfo(struct mlx5e_priv *priv,
> >                                struct ethtool_drvinfo *drvinfo)
> >  {
> > --
> > 2.14.4
> >

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net] net/mlx5e: Move mlx5e_priv_flags into en_ethtool.c
  2018-07-15 19:06 [PATCH net] net/mlx5e: Move mlx5e_priv_flags into en_ethtool.c Kamal Heib
  2018-07-17 15:00 ` Saeed Mahameed
@ 2018-07-26 18:51 ` Saeed Mahameed
  2018-07-27 15:59   ` Kamal Heib
  1 sibling, 1 reply; 6+ messages in thread
From: Saeed Mahameed @ 2018-07-26 18:51 UTC (permalink / raw)
  To: Kamal Heib; +Cc: David S . Miller, Saeed Mahameed, Linux Netdev List

On Sun, Jul 15, 2018 at 12:06 PM, Kamal Heib <kamalheib1@gmail.com> wrote:
> Move the definition of mlx5e_priv_flags into en_ethtool.c because it's
> only used there.
>
> Fixes: 4e59e2888139 ("net/mlx5e: Introduce net device priv flags infrastructure")
> Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en.h         | 7 -------
>  drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 +++++++
>  2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
> index eb9eb7aa953a..84e6a5b42286 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
> @@ -208,13 +208,6 @@ struct mlx5e_umr_wqe {
>
>  extern const char mlx5e_self_tests[][ETH_GSTRING_LEN];
>
> -static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {
> -       "rx_cqe_moder",
> -       "tx_cqe_moder",
> -       "rx_cqe_compress",
> -       "rx_striding_rq",
> -};
> -

Hi Kamal, on a second thought, i would like to drop this change and
keep mlx5e_priv_flags close/local to the below mlx5e_priv_flag.

Please let me know.

>  enum mlx5e_priv_flag {
>         MLX5E_PFLAG_RX_CQE_BASED_MODER = (1 << 0),
>         MLX5E_PFLAG_TX_CQE_BASED_MODER = (1 << 1),
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> index fffe514ba855..2a1c35d82c2e 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> @@ -33,6 +33,13 @@
>  #include "en.h"
>  #include "en/port.h"
>
> +static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {
> +       "rx_cqe_moder",
> +       "tx_cqe_moder",
> +       "rx_cqe_compress",
> +       "rx_striding_rq",
> +};
> +
>  void mlx5e_ethtool_get_drvinfo(struct mlx5e_priv *priv,
>                                struct ethtool_drvinfo *drvinfo)
>  {
> --
> 2.14.4
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net] net/mlx5e: Move mlx5e_priv_flags into en_ethtool.c
  2018-07-26 18:51 ` Saeed Mahameed
@ 2018-07-27 15:59   ` Kamal Heib
  2018-07-27 21:17     ` Saeed Mahameed
  0 siblings, 1 reply; 6+ messages in thread
From: Kamal Heib @ 2018-07-27 15:59 UTC (permalink / raw)
  To: Saeed Mahameed; +Cc: David S . Miller, Saeed Mahameed, Linux Netdev List

On Thu, Jul 26, 2018 at 11:51:49AM -0700, Saeed Mahameed wrote:
> On Sun, Jul 15, 2018 at 12:06 PM, Kamal Heib <kamalheib1@gmail.com> wrote:
> > Move the definition of mlx5e_priv_flags into en_ethtool.c because it's
> > only used there.
> >
> > Fixes: 4e59e2888139 ("net/mlx5e: Introduce net device priv flags infrastructure")
> > Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> > ---
> >  drivers/net/ethernet/mellanox/mlx5/core/en.h         | 7 -------
> >  drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 +++++++
> >  2 files changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
> > index eb9eb7aa953a..84e6a5b42286 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
> > @@ -208,13 +208,6 @@ struct mlx5e_umr_wqe {
> >
> >  extern const char mlx5e_self_tests[][ETH_GSTRING_LEN];
> >
> > -static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {
> > -       "rx_cqe_moder",
> > -       "tx_cqe_moder",
> > -       "rx_cqe_compress",
> > -       "rx_striding_rq",
> > -};
> > -
> 
> Hi Kamal, on a second thought, i would like to drop this change and
> keep mlx5e_priv_flags close/local to the below mlx5e_priv_flag.
> 
> Please let me know.
>

Hi,

Basically this change came to avoid the following warning when compiling
the mlx5 driver with "W=1" flag and this error will appear for each
file that include the "en.h". 

So, I suggest not drop this change.

In file included from drivers/net/ethernet/mellanox/mlx5/core//en_main.c:40:0:
drivers/net/ethernet/mellanox/mlx5/core//en.h:206:19: warning: ‘mlx5e_priv_flags’ defined but not used [-Wunused-const-variable=]
 static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {

Thanks,
Kamal

> >  enum mlx5e_priv_flag {
> >         MLX5E_PFLAG_RX_CQE_BASED_MODER = (1 << 0),
> >         MLX5E_PFLAG_TX_CQE_BASED_MODER = (1 << 1),
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> > index fffe514ba855..2a1c35d82c2e 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> > @@ -33,6 +33,13 @@
> >  #include "en.h"
> >  #include "en/port.h"
> >
> > +static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {
> > +       "rx_cqe_moder",
> > +       "tx_cqe_moder",
> > +       "rx_cqe_compress",
> > +       "rx_striding_rq",
> > +};
> > +
> >  void mlx5e_ethtool_get_drvinfo(struct mlx5e_priv *priv,
> >                                struct ethtool_drvinfo *drvinfo)
> >  {
> > --
> > 2.14.4
> >

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net] net/mlx5e: Move mlx5e_priv_flags into en_ethtool.c
  2018-07-27 15:59   ` Kamal Heib
@ 2018-07-27 21:17     ` Saeed Mahameed
  0 siblings, 0 replies; 6+ messages in thread
From: Saeed Mahameed @ 2018-07-27 21:17 UTC (permalink / raw)
  To: Kamal Heib; +Cc: David S . Miller, Saeed Mahameed, Linux Netdev List

On Fri, Jul 27, 2018 at 8:59 AM, Kamal Heib <kamalheib1@gmail.com> wrote:
> On Thu, Jul 26, 2018 at 11:51:49AM -0700, Saeed Mahameed wrote:
>> On Sun, Jul 15, 2018 at 12:06 PM, Kamal Heib <kamalheib1@gmail.com> wrote:
>> > Move the definition of mlx5e_priv_flags into en_ethtool.c because it's
>> > only used there.
>> >
>> > Fixes: 4e59e2888139 ("net/mlx5e: Introduce net device priv flags infrastructure")
>> > Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
>> > ---
>> >  drivers/net/ethernet/mellanox/mlx5/core/en.h         | 7 -------
>> >  drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 +++++++
>> >  2 files changed, 7 insertions(+), 7 deletions(-)
>> >
>> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
>> > index eb9eb7aa953a..84e6a5b42286 100644
>> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
>> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
>> > @@ -208,13 +208,6 @@ struct mlx5e_umr_wqe {
>> >
>> >  extern const char mlx5e_self_tests[][ETH_GSTRING_LEN];
>> >
>> > -static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {
>> > -       "rx_cqe_moder",
>> > -       "tx_cqe_moder",
>> > -       "rx_cqe_compress",
>> > -       "rx_striding_rq",
>> > -};
>> > -
>>
>> Hi Kamal, on a second thought, i would like to drop this change and
>> keep mlx5e_priv_flags close/local to the below mlx5e_priv_flag.
>>
>> Please let me know.
>>
>
> Hi,
>
> Basically this change came to avoid the following warning when compiling
> the mlx5 driver with "W=1" flag and this error will appear for each
> file that include the "en.h".
>
> So, I suggest not drop this change.
>
> In file included from drivers/net/ethernet/mellanox/mlx5/core//en_main.c:40:0:
> drivers/net/ethernet/mellanox/mlx5/core//en.h:206:19: warning: ‘mlx5e_priv_flags’ defined but not used [-Wunused-const-variable=]
>  static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {
>

Ok Kamal,
Patch applied to net-next-mlx5.

Thank you !

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-07-27 22:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-15 19:06 [PATCH net] net/mlx5e: Move mlx5e_priv_flags into en_ethtool.c Kamal Heib
2018-07-17 15:00 ` Saeed Mahameed
2018-07-17 18:44   ` Kamal Heib
2018-07-26 18:51 ` Saeed Mahameed
2018-07-27 15:59   ` Kamal Heib
2018-07-27 21:17     ` Saeed Mahameed

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.