diff options
author | np <np@FreeBSD.org> | 2014-08-21 19:42:03 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2014-08-21 19:42:03 +0000 |
commit | c11c6b79511d6994540355e671cd715fba04af23 (patch) | |
tree | 90fe0cc61ebe3bf65b7031199842654bb0ef5d24 /sys/net/netmap.h | |
parent | c4304b5b4af4fba2337dabfc4d6f9cb8e651ff82 (diff) | |
download | FreeBSD-src-c11c6b79511d6994540355e671cd715fba04af23.zip FreeBSD-src-c11c6b79511d6994540355e671cd715fba04af23.tar.gz |
Update a couple of header files that were missed in r270252. This is a
direct commit to stable/10.
Submitted by: luigi
Diffstat (limited to 'sys/net/netmap.h')
-rw-r--r-- | sys/net/netmap.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/sys/net/netmap.h b/sys/net/netmap.h index 15ebf73..1203bfb 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_ */ |