Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/netmap/netmap_mem2.c
Show First 20 Lines • Show All 306 Lines • ▼ Show 20 Lines | netmap_mem_rings_delete(struct netmap_adapter *na) | ||||
NMA_LOCK(nmd); | NMA_LOCK(nmd); | ||||
nmd->ops->nmd_rings_delete(nmd, na); | nmd->ops->nmd_rings_delete(nmd, na); | ||||
NMA_UNLOCK(nmd); | NMA_UNLOCK(nmd); | ||||
} | } | ||||
static int netmap_mem_map(struct netmap_obj_pool *, struct netmap_adapter *); | static int netmap_mem_map(struct netmap_obj_pool *, struct netmap_adapter *); | ||||
static int netmap_mem_unmap(struct netmap_obj_pool *, struct netmap_adapter *); | static int netmap_mem_unmap(struct netmap_obj_pool *, struct netmap_adapter *); | ||||
static int nm_mem_check_group(struct netmap_mem_d *, struct device *); | static int nm_mem_check_group(struct netmap_mem_d *, device_t); | ||||
static void nm_mem_release_id(struct netmap_mem_d *); | static void nm_mem_release_id(struct netmap_mem_d *); | ||||
nm_memid_t | nm_memid_t | ||||
netmap_mem_get_id(struct netmap_mem_d *nmd) | netmap_mem_get_id(struct netmap_mem_d *nmd) | ||||
{ | { | ||||
return nmd->nm_id; | return nmd->nm_id; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 401 Lines • ▼ Show 20 Lines | do { | ||||
} | } | ||||
nmd = nmd->next; | nmd = nmd->next; | ||||
} while (nmd != netmap_last_mem_d); | } while (nmd != netmap_last_mem_d); | ||||
NM_MTX_UNLOCK(nm_mem_list_lock); | NM_MTX_UNLOCK(nm_mem_list_lock); | ||||
return NULL; | return NULL; | ||||
} | } | ||||
static int | static int | ||||
nm_mem_check_group(struct netmap_mem_d *nmd, struct device *dev) | nm_mem_check_group(struct netmap_mem_d *nmd, device_t dev) | ||||
{ | { | ||||
int err = 0, id; | int err = 0, id; | ||||
/* Skip not hw adapters. | /* Skip not hw adapters. | ||||
* Vale port can use particular allocator through vale-ctl -m option | * Vale port can use particular allocator through vale-ctl -m option | ||||
*/ | */ | ||||
if (!dev) | if (!dev) | ||||
return 0; | return 0; | ||||
▲ Show 20 Lines • Show All 2,229 Lines • Show Last 20 Lines |