summaryrefslogtreecommitdiff
path: root/include/linux/dim.h
diff options
context:
space:
mode:
authorTal Gilboa <talgi@mellanox.com>2019-01-31 16:44:48 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2019-06-25 13:46:39 -0700
commit8960b38932bee8db0bc9c4d8c135f21df6cdd297 (patch)
tree411faabad103240faad36000dd42362b7d8a3f91 /include/linux/dim.h
parente5b6ab02d7aa4118c9a36491633812dcc442acbe (diff)
linux/dim: Rename externally used net_dim members
Removed 'net' prefix from functions and structs used by external drivers. Signed-off-by: Tal Gilboa <talgi@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'include/linux/dim.h')
-rw-r--r--include/linux/dim.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/include/linux/dim.h b/include/linux/dim.h
index f0f20ed25497..60e5074a7cc0 100644
--- a/include/linux/dim.h
+++ b/include/linux/dim.h
@@ -14,13 +14,13 @@
#define BIT_GAP(bits, end, start) ((((end) - (start)) + BIT_ULL(bits)) \
& (BIT_ULL(bits) - 1))
-struct net_dim_cq_moder {
+struct dim_cq_moder {
u16 usec;
u16 pkts;
u8 cq_period_mode;
};
-struct net_dim_sample {
+struct dim_sample {
ktime_t time;
u32 pkt_ctr;
u32 byte_ctr;
@@ -33,10 +33,10 @@ struct dim_stats {
int epms; /* events per msec */
};
-struct net_dim { /* Dynamic Interrupt Moderation */
+struct dim { /* Dynamic Interrupt Moderation */
u8 state;
struct dim_stats prev_stats;
- struct net_dim_sample start_sample;
+ struct dim_sample start_sample;
struct work_struct work;
u8 profile_ix;
u8 mode;
@@ -77,7 +77,7 @@ enum {
DIM_ON_EDGE,
};
-static inline bool dim_on_top(struct net_dim *dim)
+static inline bool dim_on_top(struct dim *dim)
{
switch (dim->tune_state) {
case DIM_PARKING_ON_TOP:
@@ -90,7 +90,7 @@ static inline bool dim_on_top(struct net_dim *dim)
}
}
-static inline void dim_turn(struct net_dim *dim)
+static inline void dim_turn(struct dim *dim)
{
switch (dim->tune_state) {
case DIM_PARKING_ON_TOP:
@@ -107,7 +107,7 @@ static inline void dim_turn(struct net_dim *dim)
}
}
-static inline void dim_park_on_top(struct net_dim *dim)
+static inline void dim_park_on_top(struct dim *dim)
{
dim->steps_right = 0;
dim->steps_left = 0;
@@ -115,7 +115,7 @@ static inline void dim_park_on_top(struct net_dim *dim)
dim->tune_state = DIM_PARKING_ON_TOP;
}
-static inline void dim_park_tired(struct net_dim *dim)
+static inline void dim_park_tired(struct dim *dim)
{
dim->steps_right = 0;
dim->steps_left = 0;
@@ -123,8 +123,7 @@ static inline void dim_park_tired(struct net_dim *dim)
}
static inline void
-net_dim_update_sample(u16 event_ctr, u64 packets, u64 bytes,
- struct net_dim_sample *s)
+dim_update_sample(u16 event_ctr, u64 packets, u64 bytes, struct dim_sample *s)
{
s->time = ktime_get();
s->pkt_ctr = packets;
@@ -133,7 +132,7 @@ net_dim_update_sample(u16 event_ctr, u64 packets, u64 bytes,
}
static inline void
-dim_calc_stats(struct net_dim_sample *start, struct net_dim_sample *end,
+dim_calc_stats(struct dim_sample *start, struct dim_sample *end,
struct dim_stats *curr_stats)
{
/* u32 holds up to 71 minutes, should be enough */