Lines Matching refs:reprs
22 return rcu_dereference_protected(set->reprs[id], in nfp_repr_get_locked()
456 void nfp_reprs_clean_and_free(struct nfp_app *app, struct nfp_reprs *reprs) in nfp_reprs_clean_and_free() argument
461 for (i = 0; i < reprs->num_reprs; i++) { in nfp_reprs_clean_and_free()
462 netdev = nfp_repr_get_locked(app, reprs, i); in nfp_reprs_clean_and_free()
467 kfree(reprs); in nfp_reprs_clean_and_free()
474 struct nfp_reprs *reprs; in nfp_reprs_clean_and_free_by_type() local
477 reprs = rcu_dereference_protected(app->reprs[type], in nfp_reprs_clean_and_free_by_type()
479 if (!reprs) in nfp_reprs_clean_and_free_by_type()
485 for (i = 0; i < reprs->num_reprs; i++) { in nfp_reprs_clean_and_free_by_type()
486 netdev = nfp_repr_get_locked(app, reprs, i); in nfp_reprs_clean_and_free_by_type()
491 reprs = nfp_app_reprs_set(app, type, NULL); in nfp_reprs_clean_and_free_by_type()
494 nfp_reprs_clean_and_free(app, reprs); in nfp_reprs_clean_and_free_by_type()
499 struct nfp_reprs *reprs; in nfp_reprs_alloc() local
501 reprs = kzalloc(sizeof(*reprs) + in nfp_reprs_alloc()
503 if (!reprs) in nfp_reprs_alloc()
505 reprs->num_reprs = num_reprs; in nfp_reprs_alloc()
507 return reprs; in nfp_reprs_alloc()
513 struct nfp_reprs *reprs; in nfp_reprs_resync_phys_ports() local
517 reprs = nfp_reprs_get_locked(app, NFP_REPR_TYPE_PHYS_PORT); in nfp_reprs_resync_phys_ports()
518 if (!reprs) in nfp_reprs_resync_phys_ports()
521 for (i = 0; i < reprs->num_reprs; i++) { in nfp_reprs_resync_phys_ports()
522 netdev = nfp_repr_get_locked(app, reprs, i); in nfp_reprs_resync_phys_ports()
532 rcu_assign_pointer(reprs->reprs[i], NULL); in nfp_reprs_resync_phys_ports()