aboutsummaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorVincenzo Maffione <vmaffione@FreeBSD.org>2019-09-01 14:47:41 +0000
committerVincenzo Maffione <vmaffione@FreeBSD.org>2019-09-01 14:47:41 +0000
commit253b2ec199b831cacc022b58cb38c3e3c29c1a8f (patch)
treec135a1f2b47032fdbc8876cb2a6534b8563eeb5f /sys/net
parent2796c209b03972bfbe3b1a1bd8ea3309f9cfca4e (diff)
downloadsrc-253b2ec199b831cacc022b58cb38c3e3c29c1a8f.tar.gz
src-253b2ec199b831cacc022b58cb38c3e3c29c1a8f.zip
Notes
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/netmap.h4
-rw-r--r--sys/net/netmap_user.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/net/netmap.h b/sys/net/netmap.h
index dd68953ff36c..b3a94bc0d9c3 100644
--- a/sys/net/netmap.h
+++ b/sys/net/netmap.h
@@ -562,6 +562,10 @@ enum {
* This requires the 'ioeventfd' fields to be valid (cannot be < 0).
*/
NETMAP_REQ_OPT_SYNC_KLOOP_MODE,
+
+ /* This is a marker to count the number of available options.
+ * New options must be added above it. */
+ NETMAP_REQ_OPT_MAX,
};
/*
diff --git a/sys/net/netmap_user.h b/sys/net/netmap_user.h
index 0ed785158c09..bf50afcbcdbb 100644
--- a/sys/net/netmap_user.h
+++ b/sys/net/netmap_user.h
@@ -117,7 +117,7 @@
(nifp)->ni_host_tx_rings] )
#define NETMAP_BUF(ring, index) \
- ((char *)(ring) + (ring)->buf_ofs + ((index)*(ring)->nr_buf_size))
+ ((char *)(ring) + (ring)->buf_ofs + ((size_t)(index)*(ring)->nr_buf_size))
#define NETMAP_BUF_IDX(ring, buf) \
( ((char *)(buf) - ((char *)(ring) + (ring)->buf_ofs) ) / \
@@ -254,7 +254,7 @@ struct nm_desc {
struct nm_desc *self; /* point to self if netmap. */
int fd;
void *mem;
- uint32_t memsize;
+ size_t memsize;
int done_mmap; /* set if mem is the result of mmap */
struct netmap_if * const nifp;
uint16_t first_tx_ring, last_tx_ring, cur_tx_ring;