Re: tech questions and development priorities for bhyve

2013-08-12 Thread Aryeh Friedman
>> 3. Non-virtio pass through (specifically USB)

>  Not quite sure what you mean by 3 - is that PCI pass-through ? Note there
> is a GSoC project for USB emulation in bhyve.

A user story might help here one of the motivating factors for us
getting involved with virtualization was we have a web based app that
uses an automatic upload from flash drive via java web start
program the auto upload only works if you run it on windows and
all other OS's get a file chooser... my preferred OS for almost all
work is FreeBSD (and has been since almost 2.0.5) and we have very
limited space for new computers (or the money) so we decided to try
virtual box and found that it couldn't be used to test auto upload
because the insertion of a flash drive into the host did not get
passed along to the guest... we tried qemu and even tried some
openstack based solutions (finding out how ungodly awful openstack is
the other main motivating factor for our virtualization work) and none
of them passed the USB along to the guest... about this time we got a
contract to do some openstack work (that was later canceled) so we
ended up buying 2 machines (long story but win 32 and win 64 do not
live well on the same machine) one for openstack and one for doing
multibooting of different win32's (the win64's where handled by my
desktop)... so when the openstack project was canceled we had learned
enough about cloud computing to see a better solution and decided to
base it around bhyve... and since we already had the ears of the bhyve
community why not ask about the usb pass through issue
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: RFC: carp(4): improved VIMAGE support

2013-08-12 Thread Mikolaj Golub
On Mon, Aug 12, 2013 at 02:16:15PM +0400, Gleb Smirnoff wrote:
> On Sun, Aug 11, 2013 at 11:08:35PM +0300, Mikolaj Golub wrote:
> M> Hi,
> M> 
> M> I would like to virtualize carp(4) variables to have per vnet control.
> M> 
> M> Any comments, objections?
> 
> No objections!

Andrey pointed out (on irc) that carpstats was missing virtualization
too. Here is an updated patch.

-- 
Mikolaj Golub
commit ac71429a70862ca75a614bb798dcfb62e67faca3
Author: Mikolaj Golub 
Date:   Tue Aug 6 23:47:31 2013 +0300

Virtualize carp(4) variables to have per vnet control.

diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 9228a8f..436385d 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -187,48 +187,59 @@ static int proto_reg[] = {-1, -1};
  *   dereferencing our function pointers.
  */
 
-static int carp_allow = 1;		/* Accept incoming CARP packets. */
-static int carp_preempt = 0;		/* Preempt slower nodes. */
-static int carp_log = 1;		/* Log level. */
-static int carp_demotion = 0;		/* Global advskew demotion. */
-static int carp_senderr_adj = CARP_MAXSKEW;	/* Send error demotion factor */
-static int carp_ifdown_adj = CARP_MAXSKEW;	/* Iface down demotion factor */
+/* Accept incoming CARP packets. */
+static VNET_DEFINE(int, carp_allow) = 1;
+#define	V_carp_allow	VNET(carp_allow)
+
+/* Preempt slower nodes. */
+static VNET_DEFINE(int, carp_preempt) = 0;
+#define	V_carp_preempt	VNET(carp_preempt)
+
+/* Log level. */
+static VNET_DEFINE(int, carp_log) = 1;
+#define	V_carp_log	VNET(carp_log)
+
+/* Global advskew demotion. */
+static VNET_DEFINE(int, carp_demotion) = 0;
+#define	V_carp_demotion	VNET(carp_demotion)
+
+/* Send error demotion factor. */
+static VNET_DEFINE(int, carp_senderr_adj) = CARP_MAXSKEW;
+#define	V_carp_senderr_adj	VNET(carp_senderr_adj)
+
+/* Iface down demotion factor. */
+static VNET_DEFINE(int, carp_ifdown_adj) = CARP_MAXSKEW;
+#define	V_carp_ifdown_adj	VNET(carp_ifdown_adj)
+
 static int carp_demote_adj_sysctl(SYSCTL_HANDLER_ARGS);
 
 SYSCTL_NODE(_net_inet, IPPROTO_CARP,	carp,	CTLFLAG_RW, 0,	"CARP");
-SYSCTL_INT(_net_inet_carp, OID_AUTO, allow, CTLFLAG_RW, &carp_allow, 0,
-"Accept incoming CARP packets");
-SYSCTL_INT(_net_inet_carp, OID_AUTO, preempt, CTLFLAG_RW, &carp_preempt, 0,
-"High-priority backup preemption mode");
-SYSCTL_INT(_net_inet_carp, OID_AUTO, log, CTLFLAG_RW, &carp_log, 0,
-"CARP log level");
-SYSCTL_PROC(_net_inet_carp, OID_AUTO, demotion, CTLTYPE_INT|CTLFLAG_RW,
+SYSCTL_VNET_INT(_net_inet_carp, OID_AUTO, allow, CTLFLAG_RW,
+&VNET_NAME(carp_allow), 0, "Accept incoming CARP packets");
+SYSCTL_VNET_INT(_net_inet_carp, OID_AUTO, preempt, CTLFLAG_RW,
+&VNET_NAME(carp_preempt), 0, "High-priority backup preemption mode");
+SYSCTL_VNET_INT(_net_inet_carp, OID_AUTO, log, CTLFLAG_RW,
+&VNET_NAME(carp_log), 0, "CARP log level");
+SYSCTL_VNET_PROC(_net_inet_carp, OID_AUTO, demotion, CTLTYPE_INT|CTLFLAG_RW,
 0, 0, carp_demote_adj_sysctl, "I",
 "Adjust demotion factor (skew of advskew)");
-SYSCTL_INT(_net_inet_carp, OID_AUTO, senderr_demotion_factor, CTLFLAG_RW,
-&carp_senderr_adj, 0, "Send error demotion factor adjustment");
-SYSCTL_INT(_net_inet_carp, OID_AUTO, ifdown_demotion_factor, CTLFLAG_RW,
-&carp_ifdown_adj, 0, "Interface down demotion factor adjustment");
+SYSCTL_VNET_INT(_net_inet_carp, OID_AUTO, senderr_demotion_factor, CTLFLAG_RW,
+&VNET_NAME(carp_senderr_adj), 0, "Send error demotion factor adjustment");
+SYSCTL_VNET_INT(_net_inet_carp, OID_AUTO, ifdown_demotion_factor, CTLFLAG_RW,
+&VNET_NAME(carp_ifdown_adj), 0,
+"Interface down demotion factor adjustment");
+
+VNET_PCPUSTAT_DEFINE(struct carpstats, carpstats);
+VNET_PCPUSTAT_SYSINIT(carpstats);
+VNET_PCPUSTAT_SYSUNINIT(carpstats);
 
-static counter_u64_t carpstats[sizeof(struct carpstats) / sizeof(uint64_t)];
 #define	CARPSTATS_ADD(name, val)	\
-counter_u64_add(carpstats[offsetof(struct carpstats, name) / \
+counter_u64_add(VNET(carpstats)[offsetof(struct carpstats, name) / \
 	sizeof(uint64_t)], (val))
 #define	CARPSTATS_INC(name)		CARPSTATS_ADD(name, 1)
 
-static int
-carpstats_sysctl(SYSCTL_HANDLER_ARGS)
-{
-	struct carpstats s;
-
-	COUNTER_ARRAY_COPY(carpstats, &s, sizeof(s) / sizeof(uint64_t));
-	if (req->newptr)
-		COUNTER_ARRAY_ZERO(carpstats, sizeof(s) / sizeof(uint64_t));
-	return (SYSCTL_OUT(req, &s, sizeof(s)));
-}
-SYSCTL_PROC(_net_inet_carp, OID_AUTO, stats, CTLTYPE_OPAQUE | CTLFLAG_RW,
-NULL, 0, carpstats_sysctl, "I",
-"CARP statistics (struct carpstats, netinet/ip_carp.h)");
+SYSCTL_VNET_PCPUSTAT(_net_inet_carp, OID_AUTO, stats, struct carpstats,
+carpstats, "CARP statistics (struct carpstats, netinet/ip_carp.h)");
 
 #define	CARP_LOCK_INIT(sc)	mtx_init(&(sc)->sc_mtx, "carp_softc",   \
 	NULL, MTX_DEF)
@@ -251,12 +262,12 @@ SYSCTL_PROC(_net_inet_carp, OID_AUTO, stats, CTLTYPE_OPAQUE | CTLFLAG_RW,
 } while (0)
 
 #define	CARP_LOG(...)	do {\
-	if (carp_log > 0)\
+	if (V_carp_log > 0)\
 		log(LOG_

Current problem reports assigned to freebsd-virtualization@FreeBSD.org

2013-08-12 Thread FreeBSD bugmaster
Note: to view an individual PR, use:
  http://www.freebsd.org/cgi/query-pr.cgi?pr=(number).

The following is a listing of current problems submitted by FreeBSD users.
These represent problem reports covering all versions including
experimental development code and obsolete releases.


S Tracker  Resp.  Description

o kern/165252  virtualization[vimage] [pf] [panic] kernel panics with VIMAGE 
and PF
o kern/161094  virtualization[vimage] [pf] [panic] kernel panic with pf + 
VIMAGE wh
o kern/160541  virtualization[vimage][pf][patch] panic: userret: Returning on 
td 0x
o kern/160496  virtualization[vimage] [pf] [patch] kernel panic with pf + VIMAGE
o kern/148155  virtualization[vimage] [pf] Kernel panic with PF + VIMAGE kernel 
opt
a kern/147950  virtualization[vimage] [carp] VIMAGE + CARP = kernel crash
s kern/143808  virtualization[pf] pf does not work inside jail

7 problems total.

___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: RFC: carp(4): improved VIMAGE support

2013-08-12 Thread Gleb Smirnoff
On Sun, Aug 11, 2013 at 11:08:35PM +0300, Mikolaj Golub wrote:
M> Hi,
M> 
M> I would like to virtualize carp(4) variables to have per vnet control.
M> 
M> Any comments, objections?

No objections!


-- 
Totus tuus, Glebius.
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"