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>
This commit is contained in:
Tal Gilboa 2019-01-31 16:44:48 +02:00 committed by Saeed Mahameed
parent e5b6ab02d7
commit 8960b38932
15 changed files with 73 additions and 75 deletions

View file

@ -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 */