aboutsummaryrefslogtreecommitdiff
path: root/sys/net/netmap.h
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2014-08-16 15:00:01 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2014-08-16 15:00:01 +0000
commit4bf50f18eb272037afaa212738f3d82d4098e782 (patch)
treeb8905a8b2a1b9580e15423ac4c896941707cd692 /sys/net/netmap.h
parent1b31334c642989da54f30f5647080d51cd7c81c2 (diff)
downloadsrc-4bf50f18eb272037afaa212738f3d82d4098e782.tar.gz
src-4bf50f18eb272037afaa212738f3d82d4098e782.zip
Notes
Diffstat (limited to 'sys/net/netmap.h')
-rw-r--r--sys/net/netmap.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/sys/net/netmap.h b/sys/net/netmap.h
index 15ebf7372d33..1203bfb37fff 100644
--- a/sys/net/netmap.h
+++ b/sys/net/netmap.h
@@ -445,6 +445,13 @@ struct netmap_if {
* Set the virtio-net header length used by the client
* of a VALE switch port.
*
+ * NETMAP_BDG_NEWIF
+ * create a persistent VALE port with name nr_name.
+ * Used by vale-ctl -n ...
+ *
+ * NETMAP_BDG_DELIF
+ * delete a persistent VALE port. Used by vale-ctl -d ...
+ *
* nr_arg1, nr_arg2, nr_arg3 (in/out) command specific
*
*
@@ -478,11 +485,12 @@ struct nmreq {
uint16_t nr_cmd;
#define NETMAP_BDG_ATTACH 1 /* attach the NIC */
#define NETMAP_BDG_DETACH 2 /* detach the NIC */
-#define NETMAP_BDG_LOOKUP_REG 3 /* register lookup function */
+#define NETMAP_BDG_REGOPS 3 /* register bridge callbacks */
#define NETMAP_BDG_LIST 4 /* get bridge's info */
#define NETMAP_BDG_VNET_HDR 5 /* set the port virtio-net-hdr length */
#define NETMAP_BDG_OFFSET NETMAP_BDG_VNET_HDR /* deprecated alias */
-
+#define NETMAP_BDG_NEWIF 6 /* create a virtual port */
+#define NETMAP_BDG_DELIF 7 /* destroy a virtual port */
uint16_t nr_arg1; /* reserve extra rings in NIOCREGIF */
#define NETMAP_BDG_HOST 1 /* attach the host stack on ATTACH */
@@ -517,6 +525,7 @@ enum { NR_REG_DEFAULT = 0, /* backward compat, should not be used. */
#define NIOCREGIF _IOWR('i', 146, struct nmreq) /* interface register */
#define NIOCTXSYNC _IO('i', 148) /* sync tx queues */
#define NIOCRXSYNC _IO('i', 149) /* sync rx queues */
+#define NIOCCONFIG _IOWR('i',150, struct nm_ifreq) /* for ext. modules */
#endif /* !NIOCREGIF */
@@ -533,4 +542,15 @@ nm_ring_empty(struct netmap_ring *ring)
return (ring->cur == ring->tail);
}
+/*
+ * Opaque structure that is passed to an external kernel
+ * module via ioctl(fd, NIOCCONFIG, req) for a user-owned
+ * bridge port (at this point ephemeral VALE interface).
+ */
+#define NM_IFRDATA_LEN 256
+struct nm_ifreq {
+ char nifr_name[IFNAMSIZ];
+ char data[NM_IFRDATA_LEN];
+};
+
#endif /* _NET_NETMAP_H_ */