linux/dim: Rename externally exposed macros
[muen/linux.git] / include / linux / net_dim.h
index f89fa4f..e0c97f8 100644 (file)
 }
 
 static const struct net_dim_cq_moder
-rx_profile[NET_DIM_CQ_PERIOD_NUM_MODES][NET_DIM_PARAMS_NUM_PROFILES] = {
+rx_profile[DIM_CQ_PERIOD_NUM_MODES][NET_DIM_PARAMS_NUM_PROFILES] = {
        NET_DIM_RX_EQE_PROFILES,
        NET_DIM_RX_CQE_PROFILES,
 };
 
 static const struct net_dim_cq_moder
-tx_profile[NET_DIM_CQ_PERIOD_NUM_MODES][NET_DIM_PARAMS_NUM_PROFILES] = {
+tx_profile[DIM_CQ_PERIOD_NUM_MODES][NET_DIM_PARAMS_NUM_PROFILES] = {
        NET_DIM_TX_EQE_PROFILES,
        NET_DIM_TX_CQE_PROFILES,
 };
@@ -101,7 +101,7 @@ net_dim_get_rx_moderation(u8 cq_period_mode, int ix)
 static inline struct net_dim_cq_moder
 net_dim_get_def_rx_moderation(u8 cq_period_mode)
 {
-       u8 profile_ix = cq_period_mode == NET_DIM_CQ_PERIOD_MODE_START_FROM_CQE ?
+       u8 profile_ix = cq_period_mode == DIM_CQ_PERIOD_MODE_START_FROM_CQE ?
                        NET_DIM_DEF_PROFILE_CQE : NET_DIM_DEF_PROFILE_EQE;
 
        return net_dim_get_rx_moderation(cq_period_mode, profile_ix);
@@ -119,7 +119,7 @@ net_dim_get_tx_moderation(u8 cq_period_mode, int ix)
 static inline struct net_dim_cq_moder
 net_dim_get_def_tx_moderation(u8 cq_period_mode)
 {
-       u8 profile_ix = cq_period_mode == NET_DIM_CQ_PERIOD_MODE_START_FROM_CQE ?
+       u8 profile_ix = cq_period_mode == DIM_CQ_PERIOD_MODE_START_FROM_CQE ?
                        NET_DIM_DEF_PROFILE_CQE : NET_DIM_DEF_PROFILE_EQE;
 
        return net_dim_get_tx_moderation(cq_period_mode, profile_ix);
@@ -247,7 +247,7 @@ static inline void net_dim(struct net_dim *dim,
        u16 nevents;
 
        switch (dim->state) {
-       case NET_DIM_MEASURE_IN_PROGRESS:
+       case DIM_MEASURE_IN_PROGRESS:
                nevents = BIT_GAP(BITS_PER_TYPE(u16),
                                  end_sample.event_ctr,
                                  dim->start_sample.event_ctr);
@@ -255,17 +255,17 @@ static inline void net_dim(struct net_dim *dim,
                        break;
                dim_calc_stats(&dim->start_sample, &end_sample, &curr_stats);
                if (net_dim_decision(&curr_stats, dim)) {
-                       dim->state = NET_DIM_APPLY_NEW_PROFILE;
+                       dim->state = DIM_APPLY_NEW_PROFILE;
                        schedule_work(&dim->work);
                        break;
                }
                /* fall through */
-       case NET_DIM_START_MEASURE:
+       case DIM_START_MEASURE:
                net_dim_sample(end_sample.event_ctr, end_sample.pkt_ctr, end_sample.byte_ctr,
                               &dim->start_sample);
-               dim->state = NET_DIM_MEASURE_IN_PROGRESS;
+               dim->state = DIM_MEASURE_IN_PROGRESS;
                break;
-       case NET_DIM_APPLY_NEW_PROFILE:
+       case DIM_APPLY_NEW_PROFILE:
                break;
        }
 }