alink             108 drivers/net/ethernet/netronome/nfp/abm/cls.c nfp_abm_find_band_for_prio(struct nfp_abm_link *alink, unsigned int prio)
alink             112 drivers/net/ethernet/netronome/nfp/abm/cls.c 	list_for_each_entry(iter, &alink->dscp_map, list)
alink             116 drivers/net/ethernet/netronome/nfp/abm/cls.c 	return alink->def_band;
alink             119 drivers/net/ethernet/netronome/nfp/abm/cls.c static int nfp_abm_update_band_map(struct nfp_abm_link *alink)
alink             122 drivers/net/ethernet/netronome/nfp/abm/cls.c 	struct nfp_abm *abm = alink->abm;
alink             125 drivers/net/ethernet/netronome/nfp/abm/cls.c 	alink->has_prio = !list_empty(&alink->dscp_map);
alink             139 drivers/net/ethernet/netronome/nfp/abm/cls.c 		word = &alink->prio_map[i / prios_per_word];
alink             142 drivers/net/ethernet/netronome/nfp/abm/cls.c 		band = nfp_abm_find_band_for_prio(alink, i << base_shift);
alink             149 drivers/net/ethernet/netronome/nfp/abm/cls.c 	nfp_abm_qdisc_offload_update(alink);
alink             151 drivers/net/ethernet/netronome/nfp/abm/cls.c 	return nfp_abm_ctrl_prio_map_update(alink, alink->prio_map);
alink             155 drivers/net/ethernet/netronome/nfp/abm/cls.c nfp_abm_u32_knode_delete(struct nfp_abm_link *alink,
alink             160 drivers/net/ethernet/netronome/nfp/abm/cls.c 	list_for_each_entry(iter, &alink->dscp_map, list)
alink             164 drivers/net/ethernet/netronome/nfp/abm/cls.c 			nfp_abm_update_band_map(alink);
alink             170 drivers/net/ethernet/netronome/nfp/abm/cls.c nfp_abm_u32_knode_replace(struct nfp_abm_link *alink,
alink             179 drivers/net/ethernet/netronome/nfp/abm/cls.c 	if (!nfp_abm_u32_check_knode(alink->abm, knode, proto, extack))
alink             189 drivers/net/ethernet/netronome/nfp/abm/cls.c 	list_for_each_entry(iter, &alink->dscp_map, list) {
alink             209 drivers/net/ethernet/netronome/nfp/abm/cls.c 		list_add(&match->list, &alink->dscp_map);
alink             216 drivers/net/ethernet/netronome/nfp/abm/cls.c 	err = nfp_abm_update_band_map(alink);
alink             223 drivers/net/ethernet/netronome/nfp/abm/cls.c 	nfp_abm_u32_knode_delete(alink, knode);
alink             232 drivers/net/ethernet/netronome/nfp/abm/cls.c 	struct nfp_abm_link *alink;
alink             234 drivers/net/ethernet/netronome/nfp/abm/cls.c 	alink = repr->app_priv;
alink             254 drivers/net/ethernet/netronome/nfp/abm/cls.c 		return nfp_abm_u32_knode_replace(alink, &cls_u32->knode,
alink             258 drivers/net/ethernet/netronome/nfp/abm/cls.c 		nfp_abm_u32_knode_delete(alink, &cls_u32->knode);
alink              48 drivers/net/ethernet/netronome/nfp/abm/ctrl.c nfp_abm_ctrl_stat(struct nfp_abm_link *alink, const struct nfp_rtsym *sym,
alink              52 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	struct nfp_cpp *cpp = alink->abm->app->cpp;
alink              58 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	qid = band * NFP_NET_MAX_RX_RINGS + alink->queue_base + queue;
alink              67 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 			alink->id, band, queue, alink->queue_base);
alink              98 drivers/net/ethernet/netronome/nfp/abm/ctrl.c int nfp_abm_ctrl_set_q_lvl(struct nfp_abm_link *alink, unsigned int band,
alink             103 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	threshold = band * NFP_NET_MAX_RX_RINGS + alink->queue_base + queue;
alink             105 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	return __nfp_abm_ctrl_set_q_lvl(alink->abm, threshold, val);
alink             131 drivers/net/ethernet/netronome/nfp/abm/ctrl.c int nfp_abm_ctrl_set_q_act(struct nfp_abm_link *alink, unsigned int band,
alink             136 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	qid = band * NFP_NET_MAX_RX_RINGS + alink->queue_base + queue;
alink             138 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	return __nfp_abm_ctrl_set_q_act(alink->abm, qid, act);
alink             141 drivers/net/ethernet/netronome/nfp/abm/ctrl.c u64 nfp_abm_ctrl_stat_non_sto(struct nfp_abm_link *alink, unsigned int queue)
alink             146 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	for (band = 0; band < alink->abm->num_bands; band++) {
alink             147 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 		if (nfp_abm_ctrl_stat(alink, alink->abm->qm_stats,
alink             157 drivers/net/ethernet/netronome/nfp/abm/ctrl.c u64 nfp_abm_ctrl_stat_sto(struct nfp_abm_link *alink, unsigned int queue)
alink             162 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	for (band = 0; band < alink->abm->num_bands; band++) {
alink             163 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 		if (nfp_abm_ctrl_stat(alink, alink->abm->qm_stats,
alink             174 drivers/net/ethernet/netronome/nfp/abm/ctrl.c nfp_abm_ctrl_stat_basic(struct nfp_abm_link *alink, unsigned int band,
alink             177 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	if (!nfp_abm_has_prio(alink->abm)) {
alink             179 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 			unsigned int id = alink->queue_base + queue;
alink             181 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 			*val = nn_readq(alink->vnic,
alink             189 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 		return nfp_abm_ctrl_stat(alink, alink->abm->q_stats,
alink             195 drivers/net/ethernet/netronome/nfp/abm/ctrl.c int nfp_abm_ctrl_read_q_stats(struct nfp_abm_link *alink, unsigned int band,
alink             200 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	err = nfp_abm_ctrl_stat_basic(alink, band, queue, NFP_Q_STAT_PKTS,
alink             205 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	err = nfp_abm_ctrl_stat_basic(alink, band, queue, NFP_Q_STAT_BYTES,
alink             210 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	err = nfp_abm_ctrl_stat(alink, alink->abm->q_lvls, NFP_QLVL_STRIDE,
alink             216 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	err = nfp_abm_ctrl_stat(alink, alink->abm->q_lvls,
alink             222 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	err = nfp_abm_ctrl_stat(alink, alink->abm->qm_stats,
alink             228 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	return nfp_abm_ctrl_stat(alink, alink->abm->qm_stats,
alink             233 drivers/net/ethernet/netronome/nfp/abm/ctrl.c int nfp_abm_ctrl_read_q_xstats(struct nfp_abm_link *alink,
alink             239 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	err = nfp_abm_ctrl_stat(alink, alink->abm->qm_stats,
alink             245 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	return nfp_abm_ctrl_stat(alink, alink->abm->qm_stats,
alink             262 drivers/net/ethernet/netronome/nfp/abm/ctrl.c int nfp_abm_ctrl_prio_map_update(struct nfp_abm_link *alink, u32 *packed)
alink             265 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	struct nfp_net *nn = alink->vnic;
alink             269 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	err = nfp_net_mbox_lock(nn, alink->abm->prio_map_len);
alink             275 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 		  alink->abm->prio_map_len);
alink             277 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	for (i = 0; i < alink->abm->prio_map_len; i += sizeof(u32))
alink             283 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 		nfp_err(alink->abm->app->cpp,
alink             288 drivers/net/ethernet/netronome/nfp/abm/ctrl.c static int nfp_abm_ctrl_prio_check_params(struct nfp_abm_link *alink)
alink             290 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	struct nfp_abm *abm = alink->abm;
alink             291 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	struct nfp_net *nn = alink->vnic;
alink             294 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	if (!nfp_abm_has_prio(alink->abm))
alink             297 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	min_mbox_sz = NFP_NET_ABM_MBOX_DATA + alink->abm->prio_map_len;
alink             307 drivers/net/ethernet/netronome/nfp/abm/ctrl.c int nfp_abm_ctrl_read_params(struct nfp_abm_link *alink)
alink             309 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	alink->queue_base = nn_readl(alink->vnic, NFP_NET_CFG_START_RXQ);
alink             310 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	alink->queue_base /= alink->vnic->stride_rx;
alink             312 drivers/net/ethernet/netronome/nfp/abm/ctrl.c 	return nfp_abm_ctrl_prio_check_params(alink);
alink              77 drivers/net/ethernet/netronome/nfp/abm/main.c nfp_abm_spawn_repr(struct nfp_app *app, struct nfp_abm_link *alink,
alink              93 drivers/net/ethernet/netronome/nfp/abm/main.c 		txqs = alink->vnic->max_rx_rings;
alink             100 drivers/net/ethernet/netronome/nfp/abm/main.c 	repr->app_priv = alink;
alink             110 drivers/net/ethernet/netronome/nfp/abm/main.c 		err = nfp_port_init_phy_port(app->pf, app, port, alink->id);
alink             114 drivers/net/ethernet/netronome/nfp/abm/main.c 		port->pf_id = alink->abm->pf_id;
alink             116 drivers/net/ethernet/netronome/nfp/abm/main.c 		port->pf_split_id = alink->id;
alink             117 drivers/net/ethernet/netronome/nfp/abm/main.c 		port->vnic = alink->vnic->dp.ctrl_bar;
alink             120 drivers/net/ethernet/netronome/nfp/abm/main.c 	SET_NETDEV_DEV(netdev, &alink->vnic->pdev->dev);
alink             123 drivers/net/ethernet/netronome/nfp/abm/main.c 	err = nfp_repr_init(app, netdev, nfp_abm_portid(rtype, alink->id),
alink             124 drivers/net/ethernet/netronome/nfp/abm/main.c 			    port, alink->vnic->dp.netdev);
alink             129 drivers/net/ethernet/netronome/nfp/abm/main.c 	WARN(nfp_repr_get_locked(app, reprs, alink->id), "duplicate repr");
alink             131 drivers/net/ethernet/netronome/nfp/abm/main.c 	rcu_assign_pointer(reprs->reprs[alink->id], netdev);
alink             136 drivers/net/ethernet/netronome/nfp/abm/main.c 		 alink->id, netdev->name);
alink             148 drivers/net/ethernet/netronome/nfp/abm/main.c nfp_abm_kill_repr(struct nfp_app *app, struct nfp_abm_link *alink,
alink             155 drivers/net/ethernet/netronome/nfp/abm/main.c 	netdev = nfp_repr_get_locked(app, reprs, alink->id);
alink             159 drivers/net/ethernet/netronome/nfp/abm/main.c 	rcu_assign_pointer(reprs->reprs[alink->id], NULL);
alink             167 drivers/net/ethernet/netronome/nfp/abm/main.c nfp_abm_kill_reprs(struct nfp_abm *abm, struct nfp_abm_link *alink)
alink             169 drivers/net/ethernet/netronome/nfp/abm/main.c 	nfp_abm_kill_repr(abm->app, alink, NFP_REPR_TYPE_PF);
alink             170 drivers/net/ethernet/netronome/nfp/abm/main.c 	nfp_abm_kill_repr(abm->app, alink, NFP_REPR_TYPE_PHYS_PORT);
alink             219 drivers/net/ethernet/netronome/nfp/abm/main.c 		struct nfp_abm_link *alink = nn->app_priv;
alink             221 drivers/net/ethernet/netronome/nfp/abm/main.c 		err = nfp_abm_spawn_repr(app, alink, NFP_PORT_PHYS_PORT);
alink             225 drivers/net/ethernet/netronome/nfp/abm/main.c 		err = nfp_abm_spawn_repr(app, alink, NFP_PORT_PF_PORT);
alink             317 drivers/net/ethernet/netronome/nfp/abm/main.c 	struct nfp_abm_link *alink;
alink             320 drivers/net/ethernet/netronome/nfp/abm/main.c 	alink = kzalloc(sizeof(*alink), GFP_KERNEL);
alink             321 drivers/net/ethernet/netronome/nfp/abm/main.c 	if (!alink)
alink             323 drivers/net/ethernet/netronome/nfp/abm/main.c 	nn->app_priv = alink;
alink             324 drivers/net/ethernet/netronome/nfp/abm/main.c 	alink->abm = abm;
alink             325 drivers/net/ethernet/netronome/nfp/abm/main.c 	alink->vnic = nn;
alink             326 drivers/net/ethernet/netronome/nfp/abm/main.c 	alink->id = id;
alink             327 drivers/net/ethernet/netronome/nfp/abm/main.c 	alink->total_queues = alink->vnic->max_rx_rings;
alink             329 drivers/net/ethernet/netronome/nfp/abm/main.c 	INIT_LIST_HEAD(&alink->dscp_map);
alink             331 drivers/net/ethernet/netronome/nfp/abm/main.c 	err = nfp_abm_ctrl_read_params(alink);
alink             335 drivers/net/ethernet/netronome/nfp/abm/main.c 	alink->prio_map = kzalloc(abm->prio_map_len, GFP_KERNEL);
alink             336 drivers/net/ethernet/netronome/nfp/abm/main.c 	if (!alink->prio_map) {
alink             351 drivers/net/ethernet/netronome/nfp/abm/main.c 	INIT_RADIX_TREE(&alink->qdiscs, GFP_KERNEL);
alink             356 drivers/net/ethernet/netronome/nfp/abm/main.c 	kfree(alink->prio_map);
alink             358 drivers/net/ethernet/netronome/nfp/abm/main.c 	kfree(alink);
alink             364 drivers/net/ethernet/netronome/nfp/abm/main.c 	struct nfp_abm_link *alink = nn->app_priv;
alink             366 drivers/net/ethernet/netronome/nfp/abm/main.c 	nfp_abm_kill_reprs(alink->abm, alink);
alink             367 drivers/net/ethernet/netronome/nfp/abm/main.c 	WARN(!radix_tree_empty(&alink->qdiscs), "left over qdiscs\n");
alink             368 drivers/net/ethernet/netronome/nfp/abm/main.c 	kfree(alink->prio_map);
alink             369 drivers/net/ethernet/netronome/nfp/abm/main.c 	kfree(alink);
alink             374 drivers/net/ethernet/netronome/nfp/abm/main.c 	struct nfp_abm_link *alink = nn->app_priv;
alink             376 drivers/net/ethernet/netronome/nfp/abm/main.c 	if (nfp_abm_has_prio(alink->abm))
alink             377 drivers/net/ethernet/netronome/nfp/abm/main.c 		return nfp_abm_ctrl_prio_map_update(alink, alink->prio_map);
alink             385 drivers/net/ethernet/netronome/nfp/abm/main.c 	struct nfp_abm_link *alink;
alink             390 drivers/net/ethernet/netronome/nfp/abm/main.c 	alink = repr->app_priv;
alink             391 drivers/net/ethernet/netronome/nfp/abm/main.c 	for (i = 0; i < alink->vnic->dp.num_r_vecs; i++) {
alink             392 drivers/net/ethernet/netronome/nfp/abm/main.c 		*data++ = nfp_abm_ctrl_stat_non_sto(alink, i);
alink             393 drivers/net/ethernet/netronome/nfp/abm/main.c 		*data++ = nfp_abm_ctrl_stat_sto(alink, i);
alink             402 drivers/net/ethernet/netronome/nfp/abm/main.c 	struct nfp_abm_link *alink;
alink             406 drivers/net/ethernet/netronome/nfp/abm/main.c 	alink = repr->app_priv;
alink             407 drivers/net/ethernet/netronome/nfp/abm/main.c 	return alink->vnic->dp.num_r_vecs * 2;
alink             415 drivers/net/ethernet/netronome/nfp/abm/main.c 	struct nfp_abm_link *alink;
alink             420 drivers/net/ethernet/netronome/nfp/abm/main.c 	alink = repr->app_priv;
alink             421 drivers/net/ethernet/netronome/nfp/abm/main.c 	for (i = 0; i < alink->vnic->dp.num_r_vecs; i++) {
alink             240 drivers/net/ethernet/netronome/nfp/abm/main.h void nfp_abm_qdisc_offload_update(struct nfp_abm_link *alink);
alink             241 drivers/net/ethernet/netronome/nfp/abm/main.h int nfp_abm_setup_root(struct net_device *netdev, struct nfp_abm_link *alink,
alink             243 drivers/net/ethernet/netronome/nfp/abm/main.h int nfp_abm_setup_tc_red(struct net_device *netdev, struct nfp_abm_link *alink,
alink             245 drivers/net/ethernet/netronome/nfp/abm/main.h int nfp_abm_setup_tc_mq(struct net_device *netdev, struct nfp_abm_link *alink,
alink             247 drivers/net/ethernet/netronome/nfp/abm/main.h int nfp_abm_setup_tc_gred(struct net_device *netdev, struct nfp_abm_link *alink,
alink             252 drivers/net/ethernet/netronome/nfp/abm/main.h int nfp_abm_ctrl_read_params(struct nfp_abm_link *alink);
alink             255 drivers/net/ethernet/netronome/nfp/abm/main.h int nfp_abm_ctrl_set_q_lvl(struct nfp_abm_link *alink, unsigned int band,
alink             259 drivers/net/ethernet/netronome/nfp/abm/main.h int nfp_abm_ctrl_set_q_act(struct nfp_abm_link *alink, unsigned int band,
alink             261 drivers/net/ethernet/netronome/nfp/abm/main.h int nfp_abm_ctrl_read_q_stats(struct nfp_abm_link *alink,
alink             264 drivers/net/ethernet/netronome/nfp/abm/main.h int nfp_abm_ctrl_read_q_xstats(struct nfp_abm_link *alink,
alink             267 drivers/net/ethernet/netronome/nfp/abm/main.h u64 nfp_abm_ctrl_stat_non_sto(struct nfp_abm_link *alink, unsigned int i);
alink             268 drivers/net/ethernet/netronome/nfp/abm/main.h u64 nfp_abm_ctrl_stat_sto(struct nfp_abm_link *alink, unsigned int i);
alink             272 drivers/net/ethernet/netronome/nfp/abm/main.h int nfp_abm_ctrl_prio_map_update(struct nfp_abm_link *alink, u32 *packed);
alink              45 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_stats_update_red(struct nfp_abm_link *alink, struct nfp_qdisc *qdisc,
alink              48 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	struct nfp_cpp *cpp = alink->abm->app->cpp;
alink              56 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		err = nfp_abm_ctrl_read_q_stats(alink, i, queue,
alink              62 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		err = nfp_abm_ctrl_read_q_xstats(alink, i, queue,
alink              71 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_stats_update_mq(struct nfp_abm_link *alink, struct nfp_qdisc *qdisc)
alink              78 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	for (i = 0; i < alink->total_queues; i++)
alink              80 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 			nfp_abm_stats_update_red(alink, qdisc->children[i], i);
alink              83 drivers/net/ethernet/netronome/nfp/abm/qdisc.c static void __nfp_abm_stats_update(struct nfp_abm_link *alink, u64 time_now)
alink              85 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	alink->last_stats_update = time_now;
alink              86 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	if (alink->root_qdisc)
alink              87 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		nfp_abm_stats_update_mq(alink, alink->root_qdisc);
alink              90 drivers/net/ethernet/netronome/nfp/abm/qdisc.c static void nfp_abm_stats_update(struct nfp_abm_link *alink)
alink              99 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	if (now - alink->last_stats_update < NFP_ABM_STATS_REFRESH_IVAL)
alink             102 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	__nfp_abm_stats_update(alink, now);
alink             119 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_qdisc_offload_stop(struct nfp_abm_link *alink, struct nfp_qdisc *qdisc)
alink             125 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		nfp_warn(alink->abm->app->cpp, "Offload of '%08x' stopped\n",
alink             138 drivers/net/ethernet/netronome/nfp/abm/qdisc.c __nfp_abm_stats_init(struct nfp_abm_link *alink, unsigned int band,
alink             151 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	err = nfp_abm_ctrl_read_q_stats(alink, band, queue, prev_stats);
alink             153 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		nfp_err(alink->abm->app->cpp,
alink             159 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	err = nfp_abm_ctrl_read_q_xstats(alink, band, queue, prev_xstats);
alink             161 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		nfp_err(alink->abm->app->cpp,
alink             173 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_stats_init(struct nfp_abm_link *alink, struct nfp_qdisc *qdisc,
alink             180 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		err = __nfp_abm_stats_init(alink, i, queue,
alink             191 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_offload_compile_red(struct nfp_abm_link *alink, struct nfp_qdisc *qdisc,
alink             200 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		   !alink->has_prio &&
alink             209 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		if (nfp_abm_stats_init(alink, qdisc, queue))
alink             215 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	for (i = 0; i < alink->abm->num_bands; i++) {
alink             218 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		nfp_abm_ctrl_set_q_lvl(alink, i, queue,
alink             222 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		nfp_abm_ctrl_set_q_act(alink, i, queue, act);
alink             227 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_offload_compile_mq(struct nfp_abm_link *alink, struct nfp_qdisc *qdisc)
alink             235 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	for (i = 0; i < alink->total_queues; i++) {
alink             241 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		nfp_abm_offload_compile_red(alink, child, i);
alink             245 drivers/net/ethernet/netronome/nfp/abm/qdisc.c void nfp_abm_qdisc_offload_update(struct nfp_abm_link *alink)
alink             247 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	struct nfp_abm *abm = alink->abm;
alink             256 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 			     i * NFP_NET_MAX_RX_RINGS + alink->queue_base,
alink             257 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 			     alink->total_queues);
alink             260 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	radix_tree_for_each_slot(slot, &alink->qdiscs, &iter, 0) {
alink             265 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	if (alink->root_qdisc)
alink             266 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		nfp_abm_offload_compile_mq(alink, alink->root_qdisc);
alink             269 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	radix_tree_for_each_slot(slot, &alink->qdiscs, &iter, 0) {
alink             272 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 			nfp_abm_qdisc_offload_stop(alink, qdisc);
alink             281 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	__nfp_abm_stats_update(alink, ktime_get());
alink             285 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_qdisc_clear_mq(struct net_device *netdev, struct nfp_abm_link *alink,
alink             298 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	    qdisc == alink->root_qdisc &&
alink             303 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	radix_tree_for_each_slot(slot, &alink->qdiscs, &iter, 0) {
alink             321 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_qdisc_free(struct net_device *netdev, struct nfp_abm_link *alink,
alink             328 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	nfp_abm_qdisc_clear_mq(netdev, alink, qdisc);
alink             329 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	WARN_ON(radix_tree_delete(&alink->qdiscs,
alink             339 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_qdisc_alloc(struct net_device *netdev, struct nfp_abm_link *alink,
alink             363 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	err = radix_tree_insert(&alink->qdiscs, TC_H_MAJ(qdisc->handle), qdisc);
alink             365 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		nfp_err(alink->abm->app->cpp,
alink             381 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_qdisc_find(struct nfp_abm_link *alink, u32 handle)
alink             383 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	return radix_tree_lookup(&alink->qdiscs, TC_H_MAJ(handle));
alink             387 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_qdisc_replace(struct net_device *netdev, struct nfp_abm_link *alink,
alink             391 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	*qdisc = nfp_abm_qdisc_find(alink, handle);
alink             398 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	*qdisc = nfp_abm_qdisc_alloc(netdev, alink, type, parent_handle, handle,
alink             404 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_qdisc_destroy(struct net_device *netdev, struct nfp_abm_link *alink,
alink             409 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	qdisc = nfp_abm_qdisc_find(alink, handle);
alink             414 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	if (alink->root_qdisc == qdisc)
alink             418 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	nfp_abm_qdisc_free(netdev, alink, qdisc);
alink             420 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	if (alink->root_qdisc == qdisc) {
alink             421 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		alink->root_qdisc = NULL;
alink             425 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		nfp_abm_qdisc_offload_update(alink);
alink             430 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_qdisc_graft(struct nfp_abm_link *alink, u32 handle, u32 child_handle,
alink             435 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	parent = nfp_abm_qdisc_find(alink, handle);
alink             446 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	child = nfp_abm_qdisc_find(alink, child_handle);
alink             453 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	nfp_abm_qdisc_offload_update(alink);
alink             482 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_gred_stats(struct nfp_abm_link *alink, u32 handle,
alink             488 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	nfp_abm_stats_update(alink);
alink             490 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	qdisc = nfp_abm_qdisc_find(alink, handle);
alink             516 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_gred_check_params(struct nfp_abm_link *alink,
alink             519 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	struct nfp_cpp *cpp = alink->abm->app->cpp;
alink             520 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	struct nfp_abm *abm = alink->abm;
alink             528 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	if (opt->set.dp_def != alink->def_band) {
alink             530 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 			 alink->def_band, opt->parent, opt->handle);
alink             576 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_gred_replace(struct net_device *netdev, struct nfp_abm_link *alink,
alink             583 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	ret = nfp_abm_qdisc_replace(netdev, alink, NFP_QDISC_GRED, opt->parent,
alink             588 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	qdisc->params_ok = nfp_abm_gred_check_params(alink, opt);
alink             598 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		nfp_abm_qdisc_offload_update(alink);
alink             603 drivers/net/ethernet/netronome/nfp/abm/qdisc.c int nfp_abm_setup_tc_gred(struct net_device *netdev, struct nfp_abm_link *alink,
alink             608 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		return nfp_abm_gred_replace(netdev, alink, opt);
alink             610 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		nfp_abm_qdisc_destroy(netdev, alink, opt->handle);
alink             613 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		return nfp_abm_gred_stats(alink, opt->handle, &opt->stats);
alink             620 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_red_xstats(struct nfp_abm_link *alink, struct tc_red_qopt_offload *opt)
alink             624 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	nfp_abm_stats_update(alink);
alink             626 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	qdisc = nfp_abm_qdisc_find(alink, opt->handle);
alink             638 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_red_stats(struct nfp_abm_link *alink, u32 handle,
alink             643 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	nfp_abm_stats_update(alink);
alink             645 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	qdisc = nfp_abm_qdisc_find(alink, handle);
alink             661 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_red_check_params(struct nfp_abm_link *alink,
alink             664 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	struct nfp_cpp *cpp = alink->abm->app->cpp;
alink             665 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	struct nfp_abm *abm = alink->abm;
alink             698 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_red_replace(struct net_device *netdev, struct nfp_abm_link *alink,
alink             704 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	ret = nfp_abm_qdisc_replace(netdev, alink, NFP_QDISC_RED, opt->parent,
alink             722 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	qdisc->params_ok = nfp_abm_red_check_params(alink, opt);
alink             730 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		nfp_abm_qdisc_offload_update(alink);
alink             735 drivers/net/ethernet/netronome/nfp/abm/qdisc.c int nfp_abm_setup_tc_red(struct net_device *netdev, struct nfp_abm_link *alink,
alink             740 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		return nfp_abm_red_replace(netdev, alink, opt);
alink             742 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		nfp_abm_qdisc_destroy(netdev, alink, opt->handle);
alink             745 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		return nfp_abm_red_stats(alink, opt->handle, &opt->stats);
alink             747 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		return nfp_abm_red_xstats(alink, opt);
alink             749 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		return nfp_abm_qdisc_graft(alink, opt->handle,
alink             757 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_mq_create(struct net_device *netdev, struct nfp_abm_link *alink,
alink             763 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	ret = nfp_abm_qdisc_replace(netdev, alink, NFP_QDISC_MQ,
alink             764 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 				    TC_H_ROOT, opt->handle, alink->total_queues,
alink             771 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	nfp_abm_qdisc_offload_update(alink);
alink             776 drivers/net/ethernet/netronome/nfp/abm/qdisc.c nfp_abm_mq_stats(struct nfp_abm_link *alink, u32 handle,
alink             782 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	qdisc = nfp_abm_qdisc_find(alink, handle);
alink             786 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	nfp_abm_stats_update(alink);
alink             816 drivers/net/ethernet/netronome/nfp/abm/qdisc.c int nfp_abm_setup_tc_mq(struct net_device *netdev, struct nfp_abm_link *alink,
alink             821 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		return nfp_abm_mq_create(netdev, alink, opt);
alink             823 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		nfp_abm_qdisc_destroy(netdev, alink, opt->handle);
alink             826 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		return nfp_abm_mq_stats(alink, opt->handle, &opt->stats);
alink             828 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		return nfp_abm_qdisc_graft(alink, opt->handle,
alink             836 drivers/net/ethernet/netronome/nfp/abm/qdisc.c int nfp_abm_setup_root(struct net_device *netdev, struct nfp_abm_link *alink,
alink             841 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	if (alink->root_qdisc)
alink             842 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		alink->root_qdisc->use_cnt--;
alink             843 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	alink->root_qdisc = nfp_abm_qdisc_find(alink, opt->handle);
alink             844 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	if (alink->root_qdisc)
alink             845 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 		alink->root_qdisc->use_cnt++;
alink             847 drivers/net/ethernet/netronome/nfp/abm/qdisc.c 	nfp_abm_qdisc_offload_update(alink);