Lines Matching refs:alink

48 nfp_abm_ctrl_stat(struct nfp_abm_link *alink, const struct nfp_rtsym *sym,  in nfp_abm_ctrl_stat()  argument
52 struct nfp_cpp *cpp = alink->abm->app->cpp; in nfp_abm_ctrl_stat()
58 qid = band * NFP_NET_MAX_RX_RINGS + alink->queue_base + queue; in nfp_abm_ctrl_stat()
67 alink->id, band, queue, alink->queue_base); in nfp_abm_ctrl_stat()
98 int nfp_abm_ctrl_set_q_lvl(struct nfp_abm_link *alink, unsigned int band, in nfp_abm_ctrl_set_q_lvl() argument
103 threshold = band * NFP_NET_MAX_RX_RINGS + alink->queue_base + queue; in nfp_abm_ctrl_set_q_lvl()
105 return __nfp_abm_ctrl_set_q_lvl(alink->abm, threshold, val); in nfp_abm_ctrl_set_q_lvl()
131 int nfp_abm_ctrl_set_q_act(struct nfp_abm_link *alink, unsigned int band, in nfp_abm_ctrl_set_q_act() argument
136 qid = band * NFP_NET_MAX_RX_RINGS + alink->queue_base + queue; in nfp_abm_ctrl_set_q_act()
138 return __nfp_abm_ctrl_set_q_act(alink->abm, qid, act); in nfp_abm_ctrl_set_q_act()
141 u64 nfp_abm_ctrl_stat_non_sto(struct nfp_abm_link *alink, unsigned int queue) in nfp_abm_ctrl_stat_non_sto() argument
146 for (band = 0; band < alink->abm->num_bands; band++) { in nfp_abm_ctrl_stat_non_sto()
147 if (nfp_abm_ctrl_stat(alink, alink->abm->qm_stats, in nfp_abm_ctrl_stat_non_sto()
157 u64 nfp_abm_ctrl_stat_sto(struct nfp_abm_link *alink, unsigned int queue) in nfp_abm_ctrl_stat_sto() argument
162 for (band = 0; band < alink->abm->num_bands; band++) { in nfp_abm_ctrl_stat_sto()
163 if (nfp_abm_ctrl_stat(alink, alink->abm->qm_stats, in nfp_abm_ctrl_stat_sto()
174 nfp_abm_ctrl_stat_basic(struct nfp_abm_link *alink, unsigned int band, in nfp_abm_ctrl_stat_basic() argument
177 if (!nfp_abm_has_prio(alink->abm)) { in nfp_abm_ctrl_stat_basic()
179 unsigned int id = alink->queue_base + queue; in nfp_abm_ctrl_stat_basic()
181 *val = nn_readq(alink->vnic, in nfp_abm_ctrl_stat_basic()
189 return nfp_abm_ctrl_stat(alink, alink->abm->q_stats, in nfp_abm_ctrl_stat_basic()
195 int nfp_abm_ctrl_read_q_stats(struct nfp_abm_link *alink, unsigned int band, in nfp_abm_ctrl_read_q_stats() argument
200 err = nfp_abm_ctrl_stat_basic(alink, band, queue, NFP_Q_STAT_PKTS, in nfp_abm_ctrl_read_q_stats()
205 err = nfp_abm_ctrl_stat_basic(alink, band, queue, NFP_Q_STAT_BYTES, in nfp_abm_ctrl_read_q_stats()
210 err = nfp_abm_ctrl_stat(alink, alink->abm->q_lvls, NFP_QLVL_STRIDE, in nfp_abm_ctrl_read_q_stats()
216 err = nfp_abm_ctrl_stat(alink, alink->abm->q_lvls, in nfp_abm_ctrl_read_q_stats()
222 err = nfp_abm_ctrl_stat(alink, alink->abm->qm_stats, in nfp_abm_ctrl_read_q_stats()
228 return nfp_abm_ctrl_stat(alink, alink->abm->qm_stats, in nfp_abm_ctrl_read_q_stats()
233 int nfp_abm_ctrl_read_q_xstats(struct nfp_abm_link *alink, in nfp_abm_ctrl_read_q_xstats() argument
239 err = nfp_abm_ctrl_stat(alink, alink->abm->qm_stats, in nfp_abm_ctrl_read_q_xstats()
245 return nfp_abm_ctrl_stat(alink, alink->abm->qm_stats, in nfp_abm_ctrl_read_q_xstats()
262 int nfp_abm_ctrl_prio_map_update(struct nfp_abm_link *alink, u32 *packed) in nfp_abm_ctrl_prio_map_update() argument
265 struct nfp_net *nn = alink->vnic; in nfp_abm_ctrl_prio_map_update()
269 err = nfp_net_mbox_lock(nn, alink->abm->prio_map_len); in nfp_abm_ctrl_prio_map_update()
275 alink->abm->prio_map_len); in nfp_abm_ctrl_prio_map_update()
277 for (i = 0; i < alink->abm->prio_map_len; i += sizeof(u32)) in nfp_abm_ctrl_prio_map_update()
283 nfp_err(alink->abm->app->cpp, in nfp_abm_ctrl_prio_map_update()
288 static int nfp_abm_ctrl_prio_check_params(struct nfp_abm_link *alink) in nfp_abm_ctrl_prio_check_params() argument
290 struct nfp_abm *abm = alink->abm; in nfp_abm_ctrl_prio_check_params()
291 struct nfp_net *nn = alink->vnic; in nfp_abm_ctrl_prio_check_params()
294 if (!nfp_abm_has_prio(alink->abm)) in nfp_abm_ctrl_prio_check_params()
297 min_mbox_sz = NFP_NET_ABM_MBOX_DATA + alink->abm->prio_map_len; in nfp_abm_ctrl_prio_check_params()
307 int nfp_abm_ctrl_read_params(struct nfp_abm_link *alink) in nfp_abm_ctrl_read_params() argument
309 alink->queue_base = nn_readl(alink->vnic, NFP_NET_CFG_START_RXQ); in nfp_abm_ctrl_read_params()
310 alink->queue_base /= alink->vnic->stride_rx; in nfp_abm_ctrl_read_params()
312 return nfp_abm_ctrl_prio_check_params(alink); in nfp_abm_ctrl_read_params()