0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #include <linux/dim.h>
0011 #include "bnxt_hsi.h"
0012 #include "bnxt.h"
0013
0014 void bnxt_dim_work(struct work_struct *work)
0015 {
0016 struct dim *dim = container_of(work, struct dim, work);
0017 struct bnxt_cp_ring_info *cpr = container_of(dim,
0018 struct bnxt_cp_ring_info,
0019 dim);
0020 struct bnxt_napi *bnapi = container_of(cpr,
0021 struct bnxt_napi,
0022 cp_ring);
0023 struct dim_cq_moder cur_moder =
0024 net_dim_get_rx_moderation(dim->mode, dim->profile_ix);
0025
0026 cpr->rx_ring_coal.coal_ticks = cur_moder.usec;
0027 cpr->rx_ring_coal.coal_bufs = cur_moder.pkts;
0028
0029 bnxt_hwrm_set_ring_coal(bnapi->bp, bnapi);
0030 dim->state = DIM_START_MEASURE;
0031 }