Lines Matching refs:alink

77 nfp_abm_spawn_repr(struct nfp_app *app, struct nfp_abm_link *alink,  in nfp_abm_spawn_repr()  argument
93 txqs = alink->vnic->max_rx_rings; in nfp_abm_spawn_repr()
100 repr->app_priv = alink; in nfp_abm_spawn_repr()
110 err = nfp_port_init_phy_port(app->pf, app, port, alink->id); in nfp_abm_spawn_repr()
114 port->pf_id = alink->abm->pf_id; in nfp_abm_spawn_repr()
116 port->pf_split_id = alink->id; in nfp_abm_spawn_repr()
117 port->vnic = alink->vnic->dp.ctrl_bar; in nfp_abm_spawn_repr()
120 SET_NETDEV_DEV(netdev, &alink->vnic->pdev->dev); in nfp_abm_spawn_repr()
123 err = nfp_repr_init(app, netdev, nfp_abm_portid(rtype, alink->id), in nfp_abm_spawn_repr()
124 port, alink->vnic->dp.netdev); in nfp_abm_spawn_repr()
129 WARN(nfp_repr_get_locked(app, reprs, alink->id), "duplicate repr"); in nfp_abm_spawn_repr()
131 rcu_assign_pointer(reprs->reprs[alink->id], netdev); in nfp_abm_spawn_repr()
136 alink->id, netdev->name); in nfp_abm_spawn_repr()
148 nfp_abm_kill_repr(struct nfp_app *app, struct nfp_abm_link *alink, in nfp_abm_kill_repr() argument
155 netdev = nfp_repr_get_locked(app, reprs, alink->id); in nfp_abm_kill_repr()
159 rcu_assign_pointer(reprs->reprs[alink->id], NULL); in nfp_abm_kill_repr()
167 nfp_abm_kill_reprs(struct nfp_abm *abm, struct nfp_abm_link *alink) in nfp_abm_kill_reprs() argument
169 nfp_abm_kill_repr(abm->app, alink, NFP_REPR_TYPE_PF); in nfp_abm_kill_reprs()
170 nfp_abm_kill_repr(abm->app, alink, NFP_REPR_TYPE_PHYS_PORT); in nfp_abm_kill_reprs()
219 struct nfp_abm_link *alink = nn->app_priv; in nfp_abm_eswitch_set_switchdev() local
221 err = nfp_abm_spawn_repr(app, alink, NFP_PORT_PHYS_PORT); in nfp_abm_eswitch_set_switchdev()
225 err = nfp_abm_spawn_repr(app, alink, NFP_PORT_PF_PORT); in nfp_abm_eswitch_set_switchdev()
317 struct nfp_abm_link *alink; in nfp_abm_vnic_alloc() local
320 alink = kzalloc(sizeof(*alink), GFP_KERNEL); in nfp_abm_vnic_alloc()
321 if (!alink) in nfp_abm_vnic_alloc()
323 nn->app_priv = alink; in nfp_abm_vnic_alloc()
324 alink->abm = abm; in nfp_abm_vnic_alloc()
325 alink->vnic = nn; in nfp_abm_vnic_alloc()
326 alink->id = id; in nfp_abm_vnic_alloc()
327 alink->total_queues = alink->vnic->max_rx_rings; in nfp_abm_vnic_alloc()
329 INIT_LIST_HEAD(&alink->dscp_map); in nfp_abm_vnic_alloc()
331 err = nfp_abm_ctrl_read_params(alink); in nfp_abm_vnic_alloc()
335 alink->prio_map = kzalloc(abm->prio_map_len, GFP_KERNEL); in nfp_abm_vnic_alloc()
336 if (!alink->prio_map) { in nfp_abm_vnic_alloc()
351 INIT_RADIX_TREE(&alink->qdiscs, GFP_KERNEL); in nfp_abm_vnic_alloc()
356 kfree(alink->prio_map); in nfp_abm_vnic_alloc()
358 kfree(alink); in nfp_abm_vnic_alloc()
364 struct nfp_abm_link *alink = nn->app_priv; in nfp_abm_vnic_free() local
366 nfp_abm_kill_reprs(alink->abm, alink); in nfp_abm_vnic_free()
367 WARN(!radix_tree_empty(&alink->qdiscs), "left over qdiscs\n"); in nfp_abm_vnic_free()
368 kfree(alink->prio_map); in nfp_abm_vnic_free()
369 kfree(alink); in nfp_abm_vnic_free()
374 struct nfp_abm_link *alink = nn->app_priv; in nfp_abm_vnic_init() local
376 if (nfp_abm_has_prio(alink->abm)) in nfp_abm_vnic_init()
377 return nfp_abm_ctrl_prio_map_update(alink, alink->prio_map); in nfp_abm_vnic_init()
385 struct nfp_abm_link *alink; in nfp_abm_port_get_stats() local
390 alink = repr->app_priv; in nfp_abm_port_get_stats()
391 for (i = 0; i < alink->vnic->dp.num_r_vecs; i++) { in nfp_abm_port_get_stats()
392 *data++ = nfp_abm_ctrl_stat_non_sto(alink, i); in nfp_abm_port_get_stats()
393 *data++ = nfp_abm_ctrl_stat_sto(alink, i); in nfp_abm_port_get_stats()
402 struct nfp_abm_link *alink; in nfp_abm_port_get_stats_count() local
406 alink = repr->app_priv; in nfp_abm_port_get_stats_count()
407 return alink->vnic->dp.num_r_vecs * 2; in nfp_abm_port_get_stats_count()
415 struct nfp_abm_link *alink; in nfp_abm_port_get_stats_strings() local
420 alink = repr->app_priv; in nfp_abm_port_get_stats_strings()
421 for (i = 0; i < alink->vnic->dp.num_r_vecs; i++) { in nfp_abm_port_get_stats_strings()