From: Andy Gospodarek <andy@greyhouse.net>
To: netdev@vger.kernel.org
Cc: mchan@broadcom.com, saeedm@mellanox.com,
Andy Gospodarek <gospo@broadcom.com>
Subject: [RFC 4/9] mlx5_en: move AM logic enums
Date: Mon, 6 Nov 2017 00:44:52 -0500 [thread overview]
Message-ID: <1509947098-10148-7-git-send-email-andy@greyhouse.net> (raw)
In-Reply-To: <1509947098-10148-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>
---
drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c | 25 ---------------------
drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.h | 26 ++++++++++++++++++++++
2 files changed, 26 insertions(+), 25 deletions(-)
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 845dbb8..02d4f80 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c
@@ -78,31 +78,6 @@ struct mlx5e_cq_moder mlx5e_am_get_def_profile(u8 rx_cq_period_mode)
return 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)
{
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.h b/drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.h
index 90e4913..efbee99 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.h
@@ -71,6 +71,32 @@ enum {
MLX5_CQ_PERIOD_NUM_MODES
};
+/* 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,
--
2.7.4
next prev parent reply other threads:[~2017-11-06 5:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-06 5:44 [RFC 0/9] net: create adaptive software irq moderation library Andy Gospodarek
2017-11-06 5:44 ` Andy Gospodarek
2017-11-06 5:44 ` [RFC 1/9] mlx5_en: move interrupt moderation structs to new file Andy Gospodarek
2017-11-06 5:44 ` [RFC 2/9] mlx5_en: move interrupt moderation forward declarations Andy Gospodarek
2017-11-06 5:44 ` [RFC 2/9] mlx5_en: move interrupt moderation forward delcarations Andy Gospodarek
2017-11-06 5:44 ` [RFC 3/9] mlx5_en: remove rq references in mlx5e_rx_am Andy Gospodarek
2017-11-06 5:44 ` Andy Gospodarek [this message]
2017-11-06 5:44 ` [RFC 5/9] mlx5_en: move generic functions to new file Andy Gospodarek
2017-11-06 5:44 ` [RFC 6/9] mlx5_en: rename en_rx_am.h to net_rx_am.h Andy Gospodarek
2017-11-06 5:44 ` [RFC 7/9] mlx5_en: remove Mellanox references in AM code Andy Gospodarek
2017-11-06 5:44 ` [RFC 8/9] net: move adaptive interrupt coalescing code to lib/ Andy Gospodarek
2017-11-06 5:44 ` [RFC 8/9] net: move adaptive interrpt " Andy Gospodarek
2017-11-06 5:44 ` [RFC 9/9] bnxt_en: add support for software adaptive interrupt moderation Andy Gospodarek
2017-11-06 21:26 ` Michael Chan
2017-11-07 1:05 ` [RFC 0/9] net: create adaptive software irq moderation library Saeed Mahameed
2017-11-24 12:05 ` Saeed Mahameed
2017-11-24 12:20 ` Saeed Mahameed
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=1509947098-10148-7-git-send-email-andy@greyhouse.net \
--to=andy@greyhouse.net \
--cc=gospo@broadcom.com \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).