aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/netmap/netmap_mem2.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/netmap/netmap_mem2.h')
-rw-r--r--sys/dev/netmap/netmap_mem2.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/sys/dev/netmap/netmap_mem2.h b/sys/dev/netmap/netmap_mem2.h
index f0bee7a33fd53..977bf622862a0 100644
--- a/sys/dev/netmap/netmap_mem2.h
+++ b/sys/dev/netmap/netmap_mem2.h
@@ -137,12 +137,12 @@ void netmap_mem_if_delete(struct netmap_adapter *, struct netmap_if *);
int netmap_mem_rings_create(struct netmap_adapter *);
void netmap_mem_rings_delete(struct netmap_adapter *);
int netmap_mem_deref(struct netmap_mem_d *, struct netmap_adapter *);
-int netmap_mem2_get_pool_info(struct netmap_mem_d *, u_int, u_int *, u_int *);
-int netmap_mem_get_info(struct netmap_mem_d *, uint64_t *size, u_int *memflags, uint16_t *id);
+int netmap_mem2_get_pool_info(struct netmap_mem_d *, u_int, u_int *, u_int *);
+int netmap_mem_get_info(struct netmap_mem_d *, uint64_t *size,
+ u_int *memflags, nm_memid_t *id);
ssize_t netmap_mem_if_offset(struct netmap_mem_d *, const void *vaddr);
struct netmap_mem_d* netmap_mem_private_new( u_int txr, u_int txd, u_int rxr, u_int rxd,
u_int extra_bufs, u_int npipes, int* error);
-void netmap_mem_delete(struct netmap_mem_d *);
#define netmap_mem_get(d) __netmap_mem_get(d, __FUNCTION__, __LINE__)
#define netmap_mem_put(d) __netmap_mem_put(d, __FUNCTION__, __LINE__)
@@ -152,7 +152,7 @@ struct netmap_mem_d* netmap_mem_find(nm_memid_t);
unsigned netmap_mem_bufsize(struct netmap_mem_d *nmd);
#ifdef WITH_EXTMEM
-struct netmap_mem_d* netmap_mem_ext_create(struct nmreq *, int *);
+struct netmap_mem_d* netmap_mem_ext_create(uint64_t, struct nmreq_pools_info *, int *);
#else /* !WITH_EXTMEM */
#define netmap_mem_ext_create(nmr, _perr) \
({ int *perr = _perr; if (perr) *(perr) = EOPNOTSUPP; NULL; })
@@ -167,7 +167,8 @@ struct netmap_mem_d* netmap_mem_pt_guest_attach(struct ptnetmap_memdev *, uint16
int netmap_mem_pt_guest_ifp_del(struct netmap_mem_d *, struct ifnet *);
#endif /* WITH_PTNETMAP_GUEST */
-int netmap_mem_pools_info_get(struct nmreq *, struct netmap_mem_d *);
+int netmap_mem_pools_info_get(struct nmreq_pools_info *,
+ struct netmap_mem_d *);
#define NETMAP_MEM_PRIVATE 0x2 /* allocator uses private address space */
#define NETMAP_MEM_IO 0x4 /* the underlying memory is mmapped I/O */
@@ -175,4 +176,14 @@ int netmap_mem_pools_info_get(struct nmreq *, struct netmap_mem_d *);
uint32_t netmap_extra_alloc(struct netmap_adapter *, uint32_t *, uint32_t n);
+#ifdef WITH_EXTMEM
+#include <net/netmap_virt.h>
+struct nm_os_extmem; /* opaque */
+struct nm_os_extmem *nm_os_extmem_create(unsigned long, struct nmreq_pools_info *, int *perror);
+char *nm_os_extmem_nextpage(struct nm_os_extmem *);
+int nm_os_extmem_nr_pages(struct nm_os_extmem *);
+int nm_os_extmem_isequal(struct nm_os_extmem *, struct nm_os_extmem *);
+void nm_os_extmem_delete(struct nm_os_extmem *);
+#endif /* WITH_EXTMEM */
+
#endif