All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Gospodarek <andy@greyhouse.net>
To: netdev@vger.kernel.org
Cc: mchan@broadcom.com, talgi@mellanox.com, ogerlitz@mellanox.com,
	Andy Gospodarek <gospo@broadcom.com>
Subject: [PATCH net-next v4 04/10] net/mlx5e: Move AM logic enums
Date: Tue,  9 Jan 2018 16:06:15 -0500	[thread overview]
Message-ID: <1515531981-14461-5-git-send-email-andy@greyhouse.net> (raw)
In-Reply-To: <1515531981-14461-1-git-send-email-andy@greyhouse.net>

From: Andy Gospodarek <gospo@broadcom.com>

More movement to help make this code more generic.

Signed-off-by: Andy Gospodarek <gospo@broadcom.com>
Acked-by: Tal Gilboa <talgi@mellanox.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_dim.h   | 26 ++++++++++++++++++++++
 drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c | 25 ---------------------
 2 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dim.h b/drivers/net/ethernet/mellanox/mlx5/core/en_dim.h
index 7d5499a..a1497bab 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_dim.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dim.h
@@ -66,6 +66,32 @@ struct mlx5e_rx_am { /* Adaptive Moderation */
 	u8                                      tired;
 };
 
+/* Adaptive moderation logic */
+enum {
+	MLX5E_AM_START_MEASURE,
+	MLX5E_AM_MEASURE_IN_PROGRESS,
+	MLX5E_AM_APPLY_NEW_PROFILE,
+};
+
+enum {
+	MLX5E_AM_PARKING_ON_TOP,
+	MLX5E_AM_PARKING_TIRED,
+	MLX5E_AM_GOING_RIGHT,
+	MLX5E_AM_GOING_LEFT,
+};
+
+enum {
+	MLX5E_AM_STATS_WORSE,
+	MLX5E_AM_STATS_SAME,
+	MLX5E_AM_STATS_BETTER,
+};
+
+enum {
+	MLX5E_AM_STEPPED,
+	MLX5E_AM_TOO_TIRED,
+	MLX5E_AM_ON_EDGE,
+};
+
 void mlx5e_rx_am(struct mlx5e_rx_am *am,
 		 u16 event_ctr,
 		 u64 packets,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c
index 1630076..337dd60 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c
@@ -82,31 +82,6 @@ struct mlx5e_cq_moder mlx5e_am_get_def_profile(u8 rx_cq_period_mode)
 	return mlx5e_am_get_profile(rx_cq_period_mode, default_profile_ix);
 }
 
-/* Adaptive moderation logic */
-enum {
-	MLX5E_AM_START_MEASURE,
-	MLX5E_AM_MEASURE_IN_PROGRESS,
-	MLX5E_AM_APPLY_NEW_PROFILE,
-};
-
-enum {
-	MLX5E_AM_PARKING_ON_TOP,
-	MLX5E_AM_PARKING_TIRED,
-	MLX5E_AM_GOING_RIGHT,
-	MLX5E_AM_GOING_LEFT,
-};
-
-enum {
-	MLX5E_AM_STATS_WORSE,
-	MLX5E_AM_STATS_SAME,
-	MLX5E_AM_STATS_BETTER,
-};
-
-enum {
-	MLX5E_AM_STEPPED,
-	MLX5E_AM_TOO_TIRED,
-	MLX5E_AM_ON_EDGE,
-};
 
 static bool mlx5e_am_on_top(struct mlx5e_rx_am *am)
 {
-- 
2.7.4

  parent reply	other threads:[~2018-01-09 21:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09 21:06 [PATCH net-next v4 00/10] net: create dynamic software irq moderation library Andy Gospodarek
2018-01-09 21:06 ` [PATCH net-next v4 01/10] net/mlx5e: Move interrupt moderation structs to new file Andy Gospodarek
2018-01-09 21:06 ` [PATCH net-next v4 02/10] net/mlx5e: Move interrupt moderation forward declarations Andy Gospodarek
2018-01-09 21:06 ` [PATCH net-next v4 03/10] net/mlx5e: Remove rq references in mlx5e_rx_am Andy Gospodarek
2018-01-09 21:06 ` Andy Gospodarek [this message]
2018-01-09 21:06 ` [PATCH net-next v4 05/10] net/mlx5e: Move generic functions to new file Andy Gospodarek
2018-01-09 21:06 ` [PATCH net-next v4 06/10] net/mlx5e: Change Mellanox references in DIM code Andy Gospodarek
2018-01-09 21:06 ` [PATCH net-next v4 07/10] net/mlx5e: Move dynamic interrupt coalescing code to include/linux Andy Gospodarek
2018-01-09 21:06 ` [PATCH net-next v4 08/10] net/dim: use struct net_dim_sample as arg to net_dim Andy Gospodarek
2018-01-09 21:06 ` [PATCH net-next v4 09/10] bnxt_en: add support for software dynamic interrupt moderation Andy Gospodarek
2018-01-09 21:06 ` [PATCH net-next v4 10/10] MAINTAINERS: add entry for Dynamic Interrupt Moderation Andy Gospodarek
2018-01-09 21:55 ` [PATCH net-next v4 00/10] net: create dynamic software irq moderation library Tal Gilboa
2018-01-09 22:46 ` Florian Fainelli
2018-01-09 22:49   ` Tal Gilboa
2018-01-09 22:55     ` Andy Gospodarek
2018-01-10 20:28 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1515531981-14461-5-git-send-email-andy@greyhouse.net \
    --to=andy@greyhouse.net \
    --cc=gospo@broadcom.com \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=talgi@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.