From owner-freebsd-virtualization@FreeBSD.ORG Sun Jan 9 15:42:41 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23648106566B for ; Sun, 9 Jan 2011 15:42:41 +0000 (UTC) (envelope-from subbsd@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id C0E728FC17 for ; Sun, 9 Jan 2011 15:42:40 +0000 (UTC) Received: by qwj9 with SMTP id 9so18355577qwj.13 for ; Sun, 09 Jan 2011 07:42:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=X/m3BxrL3UvzjhWafoe8dIHoutCfBKuTl6VxMjJSLtE=; b=mcXgx+3zA1aUihRqJgkOFqM6T/EuVFX24t6QxNZv2yAyyGzsDnM1vMGL1nmBieI2MG OBka7+EokPAV3OCI8l7Ac0mPj2EYOo16iSSYNeveaA/qs/28IXg+LsAvuF6FDGH9M4dv 8W9vxyp7DLqw9MSSQRrz2ouFjytu85hTEjwlY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=UIVcqwDfWJ+xmtJZXpLTWJqMzSfx2wqtm8yjh5tEyleP47v3UbdNxjlYwgokiQITDV 5XA2LUF3wsUr5jNuWTHnHfjPftn8CMLaNrCeLTs6ps33g7pbPMqSdcocz+GplUuHvTly xs4JVV8IZggilqih+ikgXpnpC7sEkdVnkcjGo= MIME-Version: 1.0 Received: by 10.229.192.149 with SMTP id dq21mr12989729qcb.57.1294586278289; Sun, 09 Jan 2011 07:17:58 -0800 (PST) Received: by 10.229.100.73 with HTTP; Sun, 9 Jan 2011 07:17:58 -0800 (PST) Date: Sun, 9 Jan 2011 18:17:58 +0300 Message-ID: From: Subbsd To: freebsd-virtualization@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: way for determine VIMAGE feature X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2011 15:42:41 -0000 Hi is there any mechanism to find out from userland is supports the current kernel VIMAGE or not? something like 'sysctl kern.features.vnet=1' ? Thanks From owner-freebsd-virtualization@FreeBSD.ORG Sun Jan 9 17:08:03 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 632271065673 for ; Sun, 9 Jan 2011 17:08:03 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8192B8FC0C for ; Sun, 9 Jan 2011 17:08:02 +0000 (UTC) Received: by wyf19 with SMTP id 19so19086242wyf.13 for ; Sun, 09 Jan 2011 09:08:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=BFgXokITYaOxUsMi0ZDRmXvexagZC2h9joEI8DDRk4w=; b=TiaOCvAnJpxCAcBg7Rdlg64EZjDMS05fqzVIYYe/kGc3RYgRRF++ooa1gWP22XCNvG 0SF6RRMHuWUy69l1fXlPsZ+2a9pZmBWElVvdO4Hymqp4iB/eWhQu+7aO+qDg1ljtU9d+ SNK4kyQ/23ZUismYTy0wX0YV6+EuPdxV3y1jg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=tGHS0tSzKOArBHvFxXvKNWUGtXqBUz3l8Yx+q3mK3fRZGIHgLigWGrQZtWFSCVRneA Fv+/GVK5SGCxV18fyj6gHDOxNUgqOE/2YulX9lerOLdMybHQDcrLc8SdcZcXc5uOLExU Jay2EXusj7fCfnOdS6EHQolLrpdLkXqN5G6uQ= MIME-Version: 1.0 Received: by 10.216.28.8 with SMTP id f8mr14390195wea.48.1294589125974; Sun, 09 Jan 2011 08:05:25 -0800 (PST) Received: by 10.216.36.71 with HTTP; Sun, 9 Jan 2011 08:05:25 -0800 (PST) In-Reply-To: References: Date: Sun, 9 Jan 2011 10:05:25 -0600 Message-ID: From: Brandon Gooch To: Subbsd Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-virtualization@freebsd.org Subject: Re: way for determine VIMAGE feature X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2011 17:08:03 -0000 On Sun, Jan 9, 2011 at 9:17 AM, Subbsd wrote: > Hi > > is there any mechanism to find out from userland =A0is supports the > current kernel VIMAGE or not? something like 'sysctl > kern.features.vnet=3D1' ? > Thanks I've not been able to determine this either, but as it requires kernel re-configuration, I usually just know. In my scripts, I make sure and fail if the call to create a vnet jail fails: sh -c 'TEST=3D$(sudo jail -c vnet name=3Dtest host.hostname=3Dtest path=3D/= ) ; if [ $? =3D "1" ]; then echo "VIMAGE NOT AVAILABLE" ; exit 1 ; fi' ...or something like that. There may be a better way, or perhaps there should be. -Brandon From owner-freebsd-virtualization@FreeBSD.ORG Sun Jan 9 17:25:08 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B70F21065693 for ; Sun, 9 Jan 2011 17:25:08 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 4585A8FC1D for ; Sun, 9 Jan 2011 17:25:08 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 42AB041C7A5; Sun, 9 Jan 2011 18:25:07 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id hO-zbFThTis0; Sun, 9 Jan 2011 18:25:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id E50A141C7A4; Sun, 9 Jan 2011 18:25:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 7CCB44448F3; Sun, 9 Jan 2011 17:20:26 +0000 (UTC) Date: Sun, 9 Jan 2011 17:20:26 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Brandon Gooch In-Reply-To: Message-ID: <20110109171351.I14966@maildrop.int.zabbadoz.net> References: X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1515049787-1294593626=:14966" Cc: FreeBSD virtualization mailing list Subject: Re: way for determine VIMAGE feature X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2011 17:25:08 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1515049787-1294593626=:14966 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sun, 9 Jan 2011, Brandon Gooch wrote: > On Sun, Jan 9, 2011 at 9:17 AM, Subbsd wrote: >> Hi >> >> is there any mechanism to find out from userland =A0is supports the >> current kernel VIMAGE or not? something like 'sysctl >> kern.features.vnet=3D1' ? >> Thanks > > I've not been able to determine this either, but as it requires kernel > re-configuration, I usually just know. In my scripts, I make sure and > fail if the call to create a vnet jail fails: > > sh -c 'TEST=3D$(sudo jail -c vnet name=3Dtest host.hostname=3Dtest path= =3D/) ; > if [ $? =3D "1" ]; then echo "VIMAGE NOT AVAILABLE" ; exit 1 ; fi' I would just go with jail -c vnet command=3D/usr/bin/true or something along these liens for the pure test. Otherwise you might end up with a running jail, that you may not want unless you test it with the complete command line. > ...or something like that. > > There may be a better way, or perhaps there should be. Or there will be if there isn't yet. I remember I added a FEATURE() macro somehere. At least my dev machine already has it... # sysctl -a kern.features kern.features.compat_freebsd7: 1 kern.features.compat_freebsd6: 1 kern.features.compat_freebsd5: 1 kern.features.compat_freebsd4: 1 kern.features.vimage: 1=09=09=09<<< kern.features.posix_shm: 1 kern.features.ipsec_natt: 1 kern.features.ipsec: 1 /bz --=20 Bjoern A. Zeeb You have to have visions! Going to jail sucks -- All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html --0-1515049787-1294593626=:14966-- From owner-freebsd-virtualization@FreeBSD.ORG Sun Jan 9 20:50:08 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E11E010656A9 for ; Sun, 9 Jan 2011 20:50:08 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 5D5EB8FC17 for ; Sun, 9 Jan 2011 20:50:08 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 8C6AC41C7A3; Sun, 9 Jan 2011 21:50:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id hRh3C+dQNL9p; Sun, 9 Jan 2011 21:50:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id DF5B441C7AB; Sun, 9 Jan 2011 21:50:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id D3DB14448F3; Sun, 9 Jan 2011 20:46:44 +0000 (UTC) Date: Sun, 9 Jan 2011 20:46:44 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Brandon Gooch In-Reply-To: <20110109171351.I14966@maildrop.int.zabbadoz.net> Message-ID: <20110109204617.C14966@maildrop.int.zabbadoz.net> References: <20110109171351.I14966@maildrop.int.zabbadoz.net> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1607528239-1294606004=:14966" Cc: FreeBSD virtualization mailing list Subject: Re: way for determine VIMAGE feature X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2011 20:50:09 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1607528239-1294606004=:14966 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sun, 9 Jan 2011, Bjoern A. Zeeb wrote: > On Sun, 9 Jan 2011, Brandon Gooch wrote: > >> On Sun, Jan 9, 2011 at 9:17 AM, Subbsd wrote: >>> Hi >>>=20 >>> is there any mechanism to find out from userland =A0is supports the >>> current kernel VIMAGE or not? something like 'sysctl >>> kern.features.vnet=3D1' ? >>> Thanks >>=20 >> I've not been able to determine this either, but as it requires kernel >> re-configuration, I usually just know. In my scripts, I make sure and >> fail if the call to create a vnet jail fails: >>=20 >> sh -c 'TEST=3D$(sudo jail -c vnet name=3Dtest host.hostname=3Dtest path= =3D/) ; >> if [ $? =3D "1" ]; then echo "VIMAGE NOT AVAILABLE" ; exit 1 ; fi' > > I would just go with jail -c vnet command=3D/usr/bin/true or something > along these liens for the pure test. Otherwise you might end up with > a running jail, that you may not want unless you test it with the > complete command line. > > >> ...or something like that. >>=20 >> There may be a better way, or perhaps there should be. > > Or there will be if there isn't yet. I remember I added a FEATURE() > macro somehere. At least my dev machine already has it... > > # sysctl -a kern.features > kern.features.compat_freebsd7: 1 > kern.features.compat_freebsd6: 1 > kern.features.compat_freebsd5: 1 > kern.features.compat_freebsd4: 1 > kern.features.vimage: 1=09=09=09<<< > kern.features.posix_shm: 1 > kern.features.ipsec_natt: 1 > kern.features.ipsec: 1 ------------------------------------------------------------------------ Author: bz Date: Sun Jan 9 20:40:21 2011 New Revision: 217203 URL: http://svn.freebsd.org/changeset/base/217203 Log: MfP4 CH=3D185246 [1]: Add FEATURE() to announce optional VIMAGE. MFC after: 3 days [1] for the moment put it in vnet.c. Modified: head/sys/net/vnet.c Modified: head/sys/net/vnet.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/net/vnet.c Sun Jan 9 17:40:04 2011 (r217202) +++ head/sys/net/vnet.c Sun Jan 9 20:40:21 2011 (r217203) @@ -80,6 +80,8 @@ __FBSDID("$FreeBSD$"); * stack instance. */ +FEATURE(vimage, "VIMAGE kernel virtualization"); + MALLOC_DEFINE(M_VNET, "vnet", "network stack control block"); /* ------------------------------------------------------------------------ --=20 Bjoern A. Zeeb You have to have visions! Going to jail sucks -- All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html --0-1607528239-1294606004=:14966-- From owner-freebsd-virtualization@FreeBSD.ORG Sun Jan 9 21:05:17 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79D6E106566C for ; Sun, 9 Jan 2011 21:05:17 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 8D43C8FC0C for ; Sun, 9 Jan 2011 21:05:16 +0000 (UTC) Received: by wwf26 with SMTP id 26so18742306wwf.31 for ; Sun, 09 Jan 2011 13:05:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+4QBCDTpDx4OA+NlfjRKAMxG4BSqoK0zFhX918AdrLk=; b=r3A5XHk1HwGBjC0T8g0Sm1o7Id4onoAdL8fKE25hOI2aanVhUBL4RWk0PFKnClmX5k RGb/pqQnkIXrz1Ix0UC97z0Jd4R1q/6L3jFLxuHL6Unv5jfw9DIUjM5sqFea+UPMyAtl sYzmJRymCSTXERg+hbgossOil/zYMmIbFKcaw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=gpCrLqCCuv51rgW8QeqWdcvFp5FA6TZXajwr7m1Z3dKoHrgTeZkANlKFv/QtorKgip fEuXBQCKahOL6dzfFhsa4FH+k4fh+qSZOka0x/U80BJC0wopgA+dbFTn+1bLHezWUC9l SmTyvxfaZGrevzUMtIpf7ECDI08pc3uaMrm0g= MIME-Version: 1.0 Received: by 10.216.154.83 with SMTP id g61mr14831013wek.87.1294606295048; Sun, 09 Jan 2011 12:51:35 -0800 (PST) Received: by 10.216.36.71 with HTTP; Sun, 9 Jan 2011 12:51:35 -0800 (PST) In-Reply-To: References: Date: Sun, 9 Jan 2011 14:51:35 -0600 Message-ID: From: Brandon Gooch To: Subbsd Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "Bjoern A. Zeeb" , freebsd-virtualization@freebsd.org Subject: Re: way for determine VIMAGE feature X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2011 21:05:17 -0000 On Sun, Jan 9, 2011 at 9:17 AM, Subbsd wrote: > Hi > > is there any mechanism to find out from userland =A0is supports the > current kernel VIMAGE or not? something like 'sysctl > kern.features.vnet=3D1' ? > Thanks bz@ just committed a feature announcement for VIMAGE: http://svn.freebsd.org/viewvc/base/head/sys/net/vnet.c?r1=3D217203&r2=3D217= 202&pathrev=3D217203 # sysctl kern.features.vimage Thanks Bjoern! -Brandon From owner-freebsd-virtualization@FreeBSD.ORG Mon Jan 10 11:07:14 2011 Return-Path: Delivered-To: freebsd-virtualization@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B13701065715 for ; Mon, 10 Jan 2011 11:07:14 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9ECFC8FC16 for ; Mon, 10 Jan 2011 11:07:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p0AB7Eqv001933 for ; Mon, 10 Jan 2011 11:07:14 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0AB7EHY001930 for freebsd-virtualization@FreeBSD.org; Mon, 10 Jan 2011 11:07:14 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 10 Jan 2011 11:07:14 GMT Message-Id: <201101101107.p0AB7EHY001930@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-virtualization@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-virtualization@FreeBSD.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jan 2011 11:07:14 -0000 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 -------------------------------------------------------------------------------- a kern/152047 virtualization[vimage] [panic] TUN\TAP under jail with vimage crashe o kern/148155 virtualization[vimage] Kernel panic with PF/IPFilter + VIMAGE kernel a kern/147950 virtualization[vimage] [carp] VIMAGE + CARP = kernel crash s kern/143808 virtualization[pf] pf does not work inside jail a kern/141696 virtualization[rum] [panic] rum(4)+ vimage = kernel panic 5 problems total. From owner-freebsd-virtualization@FreeBSD.ORG Tue Jan 11 19:53:51 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7ADA1065673 for ; Tue, 11 Jan 2011 19:53:51 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 590CA8FC08 for ; Tue, 11 Jan 2011 19:53:50 +0000 (UTC) Received: by bwz12 with SMTP id 12so13079111bwz.13 for ; Tue, 11 Jan 2011 11:53:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :message-id:user-agent:mime-version:content-type; bh=96EJifV0mtTSt5pQ5HjHSYW7Iez43HU1z2Ern1Fcw/k=; b=ZeBl6ob/PyXWsDfAAHD8DF3DB1egnBVs3lLNQoev5yLCIK6Pi01t3uu3jBnHbtlN6r zo9dQZBmeb/S5NjEPp29t+HP4k9jZfxdTw+gYMsN5B2sD22dbxJZZGcETsmmG1QSuudo NloPLdg9BQ0vw1uilfOL04pFXWZP/O6021f6E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; b=t3hl6ulwZ5yf5UMTkQgn1PsPCqiTy4SJGPSj82+BNIMkklgYN4tIyjZ1+eJqc6M2mD BUPOyuEAxV9vEFpjf/p4NwfDhve3kRtJOuRcRU3TagJ1xVi3el4Di4qflUVSBTMkJiZV ipUUUFGTE+T1ip87Dy4j5udREmOVIVK/E8w9s= Received: by 10.204.33.70 with SMTP id g6mr4254535bkd.177.1294774935019; Tue, 11 Jan 2011 11:42:15 -0800 (PST) Received: from localhost ([95.69.174.185]) by mx.google.com with ESMTPS id f20sm14152991bkf.16.2011.01.11.11.42.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 Jan 2011 11:42:13 -0800 (PST) From: Mikolaj Golub To: freebsd-virtualization@FreeBSD.org Date: Tue, 11 Jan 2011 21:42:12 +0200 Message-ID: <86ei8j6xd7.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: Subject: smbfs on VIMAGE kernel X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jan 2011 19:53:51 -0000 --=-=-= Hi, With the attached patch I can mount and use samba fs on current built with VIMAGE option. -- Mikolaj Golub --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=smb_trantcp.c.VNET.patch Index: sys/netsmb/smb_trantcp.c =================================================================== --- sys/netsmb/smb_trantcp.c (revision 217275) +++ sys/netsmb/smb_trantcp.c (working copy) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -79,13 +80,17 @@ static int nb_setsockopt_int(struct socket *so, int level, int name, int val) { struct sockopt sopt; + int error; bzero(&sopt, sizeof(sopt)); sopt.sopt_level = level; sopt.sopt_name = name; sopt.sopt_val = &val; sopt.sopt_valsize = sizeof(val); - return sosetopt(so, &sopt); + CURVNET_SET(so->so_vnet); + error = sosetopt(so, &sopt); + CURVNET_RESTORE(); + return error; } static int @@ -286,8 +291,10 @@ nbssn_recvhdr(struct nbpcb *nbp, int *lenp, auio.uio_offset = 0; auio.uio_resid = sizeof(len); auio.uio_td = td; + CURVNET_SET(so->so_vnet); error = soreceive(so, (struct sockaddr **)NULL, &auio, (struct mbuf **)NULL, (struct mbuf **)NULL, &flags); + CURVNET_RESTORE(); if (error) return error; if (auio.uio_resid > 0) { @@ -371,8 +378,10 @@ nbssn_recv(struct nbpcb *nbp, struct mbuf **mpp, i */ do { rcvflg = MSG_WAITALL; + CURVNET_SET(so->so_vnet); error = soreceive(so, (struct sockaddr **)NULL, &auio, &tm, (struct mbuf **)NULL, &rcvflg); + CURVNET_RESTORE(); } while (error == EWOULDBLOCK || error == EINTR || error == ERESTART); if (error) --=-=-=-- From owner-freebsd-virtualization@FreeBSD.ORG Wed Jan 12 00:19:42 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CB04106567A for ; Wed, 12 Jan 2011 00:19:42 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from out-0.mx.aerioconnect.net (out-0-1.mx.aerioconnect.net [216.240.47.61]) by mx1.freebsd.org (Postfix) with ESMTP id 665D68FC08 for ; Wed, 12 Jan 2011 00:19:42 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id p0C0Jfo5000430; Tue, 11 Jan 2011 16:19:41 -0800 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id 29CF42D6013; Tue, 11 Jan 2011 16:19:41 -0800 (PST) Message-ID: <4D2CF3BB.1080700@freebsd.org> Date: Tue, 11 Jan 2011 16:20:11 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Mikolaj Golub References: <86ei8j6xd7.fsf@kopusha.home.net> In-Reply-To: <86ei8j6xd7.fsf@kopusha.home.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Cc: freebsd-virtualization@freebsd.org Subject: Re: smbfs on VIMAGE kernel X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2011 00:19:42 -0000 On 1/11/11 11:42 AM, Mikolaj Golub wrote: > Hi, > > With the attached patch I can mount and use samba fs on current built with > VIMAGE option. > but what does that actually MEAN? you are in a jail you have your own stack. you mount a filesystem. When someone outside the jail (who can see that point in the filesystem) sees it, who's stack do they use to access it? From owner-freebsd-virtualization@FreeBSD.ORG Wed Jan 12 00:25:11 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 417771065670; Wed, 12 Jan 2011 00:25:11 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id C75098FC0C; Wed, 12 Jan 2011 00:25:10 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 35F3C41C7CF; Wed, 12 Jan 2011 01:25:09 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id 3LdO7Us8g9+w; Wed, 12 Jan 2011 01:25:08 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 3B24141C7CE; Wed, 12 Jan 2011 01:25:08 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 3C4AA4448F3; Wed, 12 Jan 2011 00:23:56 +0000 (UTC) Date: Wed, 12 Jan 2011 00:23:55 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Julian Elischer In-Reply-To: <4D2CF3BB.1080700@freebsd.org> Message-ID: <20110112002201.K14966@maildrop.int.zabbadoz.net> References: <86ei8j6xd7.fsf@kopusha.home.net> <4D2CF3BB.1080700@freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD virtualization mailing list Subject: Re: smbfs on VIMAGE kernel X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2011 00:25:11 -0000 On Tue, 11 Jan 2011, Julian Elischer wrote: > On 1/11/11 11:42 AM, Mikolaj Golub wrote: >> Hi, >> >> With the attached patch I can mount and use samba fs on current built with >> VIMAGE option. >> > but what does that actually MEAN? > > you are in a jail > you have your own stack. > you mount a filesystem. > When someone outside the jail (who can see that point in the filesystem) > sees it, > who's stack do they use to access it? Short answer: you cannot mount any file system inside a jail unless it's marked jail friendly which brings us to ZFS only currently. /bz -- Bjoern A. Zeeb You have to have visions! Going to jail sucks -- All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html From owner-freebsd-virtualization@FreeBSD.ORG Wed Jan 12 06:48:37 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91FDA1065672 for ; Wed, 12 Jan 2011 06:48:37 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1A32B8FC17 for ; Wed, 12 Jan 2011 06:48:36 +0000 (UTC) Received: by bwz12 with SMTP id 12so256111bwz.13 for ; Tue, 11 Jan 2011 22:48:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:organization:references:date :in-reply-to:message-id:user-agent:mime-version:content-type; bh=XBIA9oKYEeFgqv21GOBoAYXmGfSK+L0xCLC0CCDk2jg=; b=qGJFHsjp/wrpg9Qp2o9ymeNvXCglPZmhvIR4AoiYz1EWu50RGSpkRiM5l/Dw4Ag5ez lflYGFd28OxGG1iQH6jnVZJ+5lvyOp/dsJw99tPZ6Arb9r3xPPi3lCixfdiLnACfWvav ffL7Od3Bx+BtDiCEDj9cdJ6hD/xreg2b0a0pI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; b=eRGg1apvxzKN7utZkAh0OqKWar6B1xfpBI9KZmvjdQ7ioNQ3Uk/Pag4Zm6NgCwRQPF odLz2SPb0nQh+icJo+Xw1BO+YCzZsnFJu2shnTLoLDqgzMimNpzMXmW57n50rGsg1d+U kTawJkP4VJk7tDEMyafTGhGzSFBNxhgSlupQ0= Received: by 10.204.82.32 with SMTP id z32mr428857bkk.158.1294814915597; Tue, 11 Jan 2011 22:48:35 -0800 (PST) Received: from localhost (ua1.etadirect.net [91.198.140.16]) by mx.google.com with ESMTPS id x38sm142063bkj.1.2011.01.11.22.48.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 Jan 2011 22:48:34 -0800 (PST) From: Mikolaj Golub To: Julian Elischer Organization: TOA Ukraine References: <86ei8j6xd7.fsf@kopusha.home.net> <4D2CF3BB.1080700@freebsd.org> Date: Wed, 12 Jan 2011 08:48:32 +0200 In-Reply-To: <4D2CF3BB.1080700@freebsd.org> (Julian Elischer's message of "Tue, 11 Jan 2011 16:20:11 -0800") Message-ID: <86ipxulirj.fsf@zhuzha.ua1> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-virtualization@freebsd.org Subject: Re: smbfs on VIMAGE kernel X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2011 06:48:37 -0000 On Tue, 11 Jan 2011 16:20:11 -0800 Julian Elischer wrote: JE> On 1/11/11 11:42 AM, Mikolaj Golub wrote: >> Hi, >> >> With the attached patch I can mount and use samba fs on current built with >> VIMAGE option. >> JE> but what does that actually MEAN? Without the patch when you try to mount samba fs on a system compiled with VIMAGE option it will just panic. I didn't need samba inside jails, I just wanted to mount samba fs on host. -- Mikolaj Golub From owner-freebsd-virtualization@FreeBSD.ORG Thu Jan 13 12:44:00 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25094106566C for ; Thu, 13 Jan 2011 12:44:00 +0000 (UTC) (envelope-from nvass9573@gmx.com) Received: from mailout-eu.gmx.com (mailout-eu.gmx.com [213.165.64.42]) by mx1.freebsd.org (Postfix) with SMTP id 8015F8FC16 for ; Thu, 13 Jan 2011 12:43:59 +0000 (UTC) Received: (qmail invoked by alias); 13 Jan 2011 12:43:57 -0000 Received: from adsl-80.91.140.41.tellas.gr (EHLO [192.168.73.193]) [91.140.41.80] by mail.gmx.com (mp-eu001) with SMTP; 13 Jan 2011 13:43:57 +0100 X-Authenticated: #46156728 X-Provags-ID: V01U2FsdGVkX1/qaw90kObqH78blemVHFyXhIKlAqxc4nQzQUd6m8 QzFRlwL8kaus4G Message-ID: <4D2EF336.5010905@gmx.com> Date: Thu, 13 Jan 2011 14:42:30 +0200 From: Nikos Vassiliadis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: FreeBSD virtualization mailing list Content-Type: multipart/mixed; boundary="------------070506010102070101080107" X-Y-GMX-Trusted: 0 Subject: if_bridge VIMAGE patch X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 12:44:00 -0000 This is a multi-part message in MIME format. --------------070506010102070101080107 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Please, review the attached patch. It is against yesterday's HEAD and it virtualizes if_bridge. You can use the bridgetest script to create quickly a topology with redundant links to test STP. Thanks, Nikos --------------070506010102070101080107 Content-Type: text/plain; name="bridgetest.sh" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bridgetest.sh" #!/bin/sh __macaddress__() ( openssl rand 5 | od -tx1 | sed '1s/0000000/0/; s/ */ /g; s/ *$//; s/ /:/g;q' ) __link__() ( a=$(($# - 1)) for f in `jot $a` do eval p$f=`ifconfig epair create | sed 's@a$@@'` done a=0 center=$1 shift for f in $* do a=$(($a + 1)) pair=`echo '$'p$a` pair=`eval echo $pair` ifconfig ${pair}a vnet $center jexec $center ifconfig ${pair}a description "link to $f" jexec $center ifconfig ${pair}a ether `__macaddress__` ifconfig ${pair}b vnet $f jexec $f ifconfig ${pair}b description "link to $center" jexec $f ifconfig ${pair}b ether `__macaddress__` done ) link() ( if [ $# -ne 2 ]; then echo can link only two nodes return 1 fi __link__ $* ) star() ( if [ $# -lt 3 ]; then echo three nodes at least are needed to form a star return 1 fi __link__ $* ) params=`csh -c 'echo rootbridge{1,2,3,4} bridge{1,2,3,4} pc{1,2,3,4}{1,2,3}'` apply 'jail -c vnet persist name=%1' $params star rootbridge1 rootbridge2 rootbridge3 rootbridge4 star rootbridge2 rootbridge3 rootbridge4 rootbridge1 star rootbridge3 rootbridge4 rootbridge1 rootbridge2 star rootbridge4 rootbridge1 rootbridge2 rootbridge3 star bridge1 rootbridge1 rootbridge2 star bridge2 rootbridge2 rootbridge3 star bridge3 rootbridge3 rootbridge4 star bridge4 rootbridge4 rootbridge1 for f in 1 2 3 4 do link bridge$f pc${f}1 link bridge$f pc${f}2 link bridge$f pc${f}3 done ## patching ends here for f in 1 2 3 4 5 6 7 8 do ifconfig bridge$f create done ifconfig bridge1 vnet rootbridge1 ifconfig bridge2 vnet rootbridge2 ifconfig bridge3 vnet rootbridge3 ifconfig bridge4 vnet rootbridge4 ifconfig bridge5 vnet bridge1 ifconfig bridge6 vnet bridge2 ifconfig bridge7 vnet bridge3 ifconfig bridge8 vnet bridge4 #jexec rootbridge1 ifconfig bridge1 create #jexec rootbridge2 ifconfig bridge2 create #jexec rootbridge3 ifconfig bridge3 create #jexec rootbridge4 ifconfig bridge4 create #jexec bridge1 ifconfig bridge5 create #jexec bridge2 ifconfig bridge6 create #jexec bridge3 ifconfig bridge7 create #jexec bridge4 ifconfig bridge8 create a=0 for f in `csh -c 'echo rootbridge{1,2,3,4} bridge{1,2,3,4}'` do a=$(($a + 1)) jexec $f ifconfig lo0 127.1 apply "jexec $f ifconfig %1 up" `jexec $f ifconfig -l` bridge=`jexec $f ifconfig -l | tr ' ' '\n' | grep bridge` apply "jexec $f ifconfig $bridge addm %1 stp %1" `jexec $f ifconfig -l | tr ' ' '\n' | grep epair` jexec $f ifconfig $bridge 10.16.0.$a done for f in `csh -c 'echo rootbridge{1,2,3,4}'` do bridge=`jexec $f ifconfig -l | tr ' ' '\n' | grep bridge` jexec $f ifconfig $bridge priority 16384 done for f in `csh -c 'echo pc{1,2,3,4}{1,2,3}'` do jexec $f ifconfig lo0 127.1 ip=`echo $f | sed 's/pc/10.255.0./'` jexec $f ifconfig `jexec $f ifconfig -l | tr ' ' '\n' | grep epair` $ip done --------------070506010102070101080107 Content-Type: text/plain; name="bridge.20110113.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bridge.20110113.diff" Index: sys/net/if_bridge.c =================================================================== --- sys/net/if_bridge.c (revision 217337) +++ sys/net/if_bridge.c (working copy) @@ -332,6 +332,9 @@ #endif /* INET6 */ static int bridge_fragment(struct ifnet *, struct mbuf *, struct ether_header *, int, struct llc *); +#ifdef VIMAGE +static void bridge_reassign(struct ifnet *, struct vnet *, char *unused); +#endif /* The default bridge vlan is 1 (IEEE 802.1Q-2003 Table 9-2) */ #define VLANTAGOF(_m) \ @@ -345,30 +348,38 @@ SYSCTL_DECL(_net_link); SYSCTL_NODE(_net_link, IFT_BRIDGE, bridge, CTLFLAG_RW, 0, "Bridge"); -static int pfil_onlyip = 1; /* only pass IP[46] packets when pfil is enabled */ -static int pfil_bridge = 1; /* run pfil hooks on the bridge interface */ -static int pfil_member = 1; /* run pfil hooks on the member interface */ -static int pfil_ipfw = 0; /* layer2 filter with ipfw */ -static int pfil_ipfw_arp = 0; /* layer2 filter with ipfw */ -static int pfil_local_phys = 0; /* run pfil hooks on the physical interface for +static VNET_DEFINE(int, pfil_onlyip) = 1; /* only pass IP[46] packets when pfil is enabled */ +static VNET_DEFINE(int, pfil_bridge) = 1; /* run pfil hooks on the bridge interface */ +static VNET_DEFINE(int, pfil_member) = 1; /* run pfil hooks on the member interface */ +static VNET_DEFINE(int, pfil_ipfw) = 0; /* layer2 filter with ipfw */ +static VNET_DEFINE(int, pfil_ipfw_arp) = 0; /* layer2 filter with ipfw */ +static VNET_DEFINE(int, pfil_local_phys) = 0; /* run pfil hooks on the physical interface for locally destined packets */ -static int log_stp = 0; /* log STP state changes */ -static int bridge_inherit_mac = 0; /* share MAC with first bridge member */ -SYSCTL_INT(_net_link_bridge, OID_AUTO, pfil_onlyip, CTLFLAG_RW, - &pfil_onlyip, 0, "Only pass IP packets when pfil is enabled"); -SYSCTL_INT(_net_link_bridge, OID_AUTO, ipfw_arp, CTLFLAG_RW, - &pfil_ipfw_arp, 0, "Filter ARP packets through IPFW layer2"); -SYSCTL_INT(_net_link_bridge, OID_AUTO, pfil_bridge, CTLFLAG_RW, - &pfil_bridge, 0, "Packet filter on the bridge interface"); -SYSCTL_INT(_net_link_bridge, OID_AUTO, pfil_member, CTLFLAG_RW, - &pfil_member, 0, "Packet filter on the member interface"); -SYSCTL_INT(_net_link_bridge, OID_AUTO, pfil_local_phys, CTLFLAG_RW, - &pfil_local_phys, 0, +static VNET_DEFINE(int, log_stp) = 0; /* log STP state changes */ +static VNET_DEFINE(int, bridge_inherit_mac) = 0; /* share MAC with first bridge member */ +#define V_pfil_onlyip VNET(pfil_onlyip) +#define V_pfil_bridge VNET(pfil_bridge) +#define V_pfil_member VNET(pfil_member) +#define V_pfil_ipfw VNET(pfil_ipfw) +#define V_pfil_ipfw_arp VNET(pfil_ipfw_arp) +#define V_pfil_local_phys VNET(pfil_local_phys) +#define V_log_stp VNET(log_stp) +#define V_bridge_inherit_mac VNET(bridge_inherit_mac) +SYSCTL_VNET_INT(_net_link_bridge, OID_AUTO, pfil_onlyip, CTLFLAG_RW, + &VNET_NAME(pfil_onlyip), 0, "Only pass IP packets when pfil is enabled"); +SYSCTL_VNET_INT(_net_link_bridge, OID_AUTO, ipfw_arp, CTLFLAG_RW, + &VNET_NAME(pfil_ipfw_arp), 0, "Filter ARP packets through IPFW layer2"); +SYSCTL_VNET_INT(_net_link_bridge, OID_AUTO, pfil_bridge, CTLFLAG_RW, + &VNET_NAME(pfil_bridge), 0, "Packet filter on the bridge interface"); +SYSCTL_VNET_INT(_net_link_bridge, OID_AUTO, pfil_member, CTLFLAG_RW, + &VNET_NAME(pfil_member), 0, "Packet filter on the member interface"); +SYSCTL_VNET_INT(_net_link_bridge, OID_AUTO, pfil_local_phys, CTLFLAG_RW, + &VNET_NAME(pfil_local_phys), 0, "Packet filter on the physical interface for locally destined packets"); -SYSCTL_INT(_net_link_bridge, OID_AUTO, log_stp, CTLFLAG_RW, - &log_stp, 0, "Log STP state changes"); -SYSCTL_INT(_net_link_bridge, OID_AUTO, inherit_mac, CTLFLAG_RW, - &bridge_inherit_mac, 0, +SYSCTL_VNET_INT(_net_link_bridge, OID_AUTO, log_stp, CTLFLAG_RW, + &VNET_NAME(log_stp), 0, "Log STP state changes"); +SYSCTL_VNET_INT(_net_link_bridge, OID_AUTO, inherit_mac, CTLFLAG_RW, + &VNET_NAME(bridge_inherit_mac), 0, "Inherit MAC address from the first bridge member"); struct bridge_control { @@ -523,14 +534,14 @@ static int sysctl_pfil_ipfw(SYSCTL_HANDLER_ARGS) { - int enable = pfil_ipfw; + int enable = V_pfil_ipfw; int error; error = sysctl_handle_int(oidp, &enable, 0, req); enable = (enable) ? 1 : 0; - if (enable != pfil_ipfw) { - pfil_ipfw = enable; + if (enable != V_pfil_ipfw) { + V_pfil_ipfw = enable; /* * Disable pfil so that ipfw doesnt run twice, if the user @@ -538,17 +549,17 @@ * pfil_member. Also allow non-ip packets as ipfw can filter by * layer2 type. */ - if (pfil_ipfw) { - pfil_onlyip = 0; - pfil_bridge = 0; - pfil_member = 0; + if (V_pfil_ipfw) { + V_pfil_onlyip = 0; + V_pfil_bridge = 0; + V_pfil_member = 0; } } return (error); } -SYSCTL_PROC(_net_link_bridge, OID_AUTO, ipfw, CTLTYPE_INT|CTLFLAG_RW, - &pfil_ipfw, 0, &sysctl_pfil_ipfw, "I", "Layer2 filter with IPFW"); +SYSCTL_VNET_PROC(_net_link_bridge, OID_AUTO, ipfw, CTLTYPE_INT|CTLFLAG_RW, + &VNET_NAME(pfil_ipfw), 0, &sysctl_pfil_ipfw, "I", "Layer2 filter with IPFW"); /* * bridge_clone_create: @@ -620,6 +631,11 @@ /* Now undo some of the damage... */ ifp->if_baudrate = 0; ifp->if_type = IFT_BRIDGE; +#ifdef VIMAGE + ifp->if_reassign = bridge_reassign; +#else + ifp->if_reassign = NULL; +#endif mtx_lock(&bridge_list_mtx); LIST_INSERT_HEAD(&bridge_list, sc, sc_list); @@ -923,7 +939,7 @@ * the mac address of the bridge to the address of the next member, or * to its default address if no members are left. */ - if (bridge_inherit_mac && sc->sc_ifaddr == ifs) { + if (V_bridge_inherit_mac && sc->sc_ifaddr == ifs) { if (LIST_EMPTY(&sc->sc_iflist)) { bcopy(sc->sc_defaddr, IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); @@ -1046,7 +1062,7 @@ * member and the MAC address of the bridge has not been changed from * the default randomly generated one. */ - if (bridge_inherit_mac && LIST_EMPTY(&sc->sc_iflist) && + if (V_bridge_inherit_mac && LIST_EMPTY(&sc->sc_iflist) && !memcmp(IF_LLADDR(sc->sc_ifp), sc->sc_defaddr, ETHER_ADDR_LEN)) { bcopy(IF_LLADDR(ifs), IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); sc->sc_ifaddr = ifs; @@ -2279,7 +2295,7 @@ ETHER_BPF_MTAP(iface, m); \ iface->if_ipackets++; \ /* Filter on the physical interface. */ \ - if (pfil_local_phys && \ + if (V_pfil_local_phys && \ (PFIL_HOOKED(&V_inet_pfil_hook) \ OR_PFIL_HOOKED_INET6)) { \ if (bridge_pfil(&m, NULL, ifp, \ @@ -2937,9 +2953,11 @@ "discarding" }; - if (log_stp) + CURVNET_SET(ifp->if_vnet); + if (V_log_stp) log(LOG_NOTICE, "%s: state changed to %s on %s\n", sc->sc_ifp->if_xname, stpstates[state], ifp->if_xname); + CURVNET_RESTORE(); } /* @@ -2966,7 +2984,7 @@ KASSERT(M_WRITABLE(*mp), ("%s: modifying a shared mbuf", __func__)); #endif - if (pfil_bridge == 0 && pfil_member == 0 && pfil_ipfw == 0) + if (V_pfil_bridge == 0 && V_pfil_member == 0 && V_pfil_ipfw == 0) return (0); /* filtering is disabled */ i = min((*mp)->m_pkthdr.len, max_protohdr); @@ -3008,7 +3026,7 @@ switch (ether_type) { case ETHERTYPE_ARP: case ETHERTYPE_REVARP: - if (pfil_ipfw_arp == 0) + if (V_pfil_ipfw_arp == 0) return (0); /* Automatically pass */ break; @@ -3023,7 +3041,7 @@ * packets, these will not be checked by pfil(9) and * passed unconditionally so the default is to drop. */ - if (pfil_onlyip) + if (V_pfil_onlyip) goto bad; } @@ -3059,7 +3077,7 @@ /* XXX this section is also in if_ethersubr.c */ // XXX PFIL_OUT or DIR_OUT ? - if (V_ip_fw_chk_ptr && pfil_ipfw != 0 && + if (V_ip_fw_chk_ptr && V_pfil_ipfw != 0 && dir == PFIL_OUT && ifp != NULL) { struct m_tag *mtag; @@ -3136,21 +3154,21 @@ * Keep the order: * in_if -> bridge_if -> out_if */ - if (pfil_bridge && dir == PFIL_OUT && bifp != NULL) + if (V_pfil_bridge && dir == PFIL_OUT && bifp != NULL) error = pfil_run_hooks(&V_inet_pfil_hook, mp, bifp, dir, NULL); if (*mp == NULL || error != 0) /* filter may consume */ break; - if (pfil_member && ifp != NULL) + if (V_pfil_member && ifp != NULL) error = pfil_run_hooks(&V_inet_pfil_hook, mp, ifp, dir, NULL); if (*mp == NULL || error != 0) /* filter may consume */ break; - if (pfil_bridge && dir == PFIL_IN && bifp != NULL) + if (V_pfil_bridge && dir == PFIL_IN && bifp != NULL) error = pfil_run_hooks(&V_inet_pfil_hook, mp, bifp, dir, NULL); @@ -3158,7 +3176,7 @@ break; /* check if we need to fragment the packet */ - if (pfil_member && ifp != NULL && dir == PFIL_OUT) { + if (V_pfil_member && ifp != NULL && dir == PFIL_OUT) { i = (*mp)->m_pkthdr.len; if (i > ifp->if_mtu) { error = bridge_fragment(ifp, *mp, &eh2, snap, @@ -3190,21 +3208,21 @@ break; #ifdef INET6 case ETHERTYPE_IPV6: - if (pfil_bridge && dir == PFIL_OUT && bifp != NULL) + if (V_pfil_bridge && dir == PFIL_OUT && bifp != NULL) error = pfil_run_hooks(&V_inet6_pfil_hook, mp, bifp, dir, NULL); if (*mp == NULL || error != 0) /* filter may consume */ break; - if (pfil_member && ifp != NULL) + if (V_pfil_member && ifp != NULL) error = pfil_run_hooks(&V_inet6_pfil_hook, mp, ifp, dir, NULL); if (*mp == NULL || error != 0) /* filter may consume */ break; - if (pfil_bridge && dir == PFIL_IN && bifp != NULL) + if (V_pfil_bridge && dir == PFIL_IN && bifp != NULL) error = pfil_run_hooks(&V_inet6_pfil_hook, mp, bifp, dir, NULL); break; @@ -3454,3 +3472,26 @@ m_freem(m); return (error); } + +#ifdef VIMAGE +void +bridge_reassign(struct ifnet *ifp, struct vnet *new_vnet, char *unused __unused) +{ + struct bridge_softc *sc = ifp->if_softc; + struct bridge_iflist *bif; + + BRIDGE_LOCK(sc); + + bridge_stop(ifp, 1); + ifp->if_flags &= ~IFF_UP; + + while ((bif = LIST_FIRST(&sc->sc_iflist)) != NULL) + bridge_delete_member(sc, bif, 0); + + while ((bif = LIST_FIRST(&sc->sc_spanlist)) != NULL) { + bridge_delete_span(sc, bif); + } + + BRIDGE_UNLOCK(sc); +} +#endif /* VIMAGE */ Index: sys/net/bridgestp.c =================================================================== --- sys/net/bridgestp.c (revision 217337) +++ sys/net/bridgestp.c (working copy) @@ -1804,12 +1804,19 @@ bzero((char *)&ifmr, sizeof(ifmr)); error = (*ifp->if_ioctl)(ifp, SIOCGIFMEDIA, (caddr_t)&ifmr); - if ((error == 0) && (ifp->if_flags & IFF_UP)) { - if (ifmr.ifm_status & IFM_ACTIVE) { + if (ifp->if_flags & IFF_UP) { + if (ifp->if_link_state == LINK_STATE_UP) { /* A full-duplex link is assumed to be point to point */ if (bp->bp_flags & BSTP_PORT_AUTOPTP) { - bp->bp_ptp_link = - ifmr.ifm_active & IFM_FDX ? 1 : 0; + /* Interfaces that do not support ifmedia, + * are assumed to be full-duplex. if_epair + * and ng_eiface fall into this category. + */ + if (error == 0) + bp->bp_ptp_link = + ifmr.ifm_active & IFM_FDX ? 1 : 0; + else if (error == EINVAL) + bp->bp_ptp_link = 1; } /* Calc the cost if the link was down previously */ --------------070506010102070101080107-- From owner-freebsd-virtualization@FreeBSD.ORG Thu Jan 13 15:33:10 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C863B106564A for ; Thu, 13 Jan 2011 15:33:10 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from out-0.mx.aerioconnect.net (outa.internet-mail-service.net [216.240.47.224]) by mx1.freebsd.org (Postfix) with ESMTP id A87358FC08 for ; Thu, 13 Jan 2011 15:33:10 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id p0DFX9uW027791; Thu, 13 Jan 2011 07:33:09 -0800 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id 8F6A42D6012; Thu, 13 Jan 2011 07:33:08 -0800 (PST) Message-ID: <4D2F1B52.1010802@freebsd.org> Date: Thu, 13 Jan 2011 07:33:38 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Nikos Vassiliadis References: <4D2EF336.5010905@gmx.com> In-Reply-To: <4D2EF336.5010905@gmx.com> X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD virtualization mailing list Subject: Re: if_bridge VIMAGE patch X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 15:33:10 -0000 On 1/13/11 4:42 AM, Nikos Vassiliadis wrote: > Hi, > > Please, review the attached patch. It is against yesterday's HEAD > and it virtualizes if_bridge. without examining every character, it looks ok. The script should go in /usr/share/examples/netgraph Bjoern/Marko, see any problems? > > You can use the bridgetest script to create quickly a topology > with redundant links to test STP. > > Thanks, Nikos > > > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org" From owner-freebsd-virtualization@FreeBSD.ORG Thu Jan 13 15:47:38 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E618D106564A for ; Thu, 13 Jan 2011 15:47:38 +0000 (UTC) (envelope-from nvass9573@gmx.com) Received: from mailout-eu.gmx.com (mailout-eu.gmx.com [213.165.64.42]) by mx1.freebsd.org (Postfix) with SMTP id 3BFED8FC0C for ; Thu, 13 Jan 2011 15:47:38 +0000 (UTC) Received: (qmail invoked by alias); 13 Jan 2011 15:47:36 -0000 Received: from adsl-80.91.140.41.tellas.gr (EHLO [192.168.73.193]) [91.140.41.80] by mail.gmx.com (mp-eu005) with SMTP; 13 Jan 2011 16:47:36 +0100 X-Authenticated: #46156728 X-Provags-ID: V01U2FsdGVkX18EHCMfV2kExFd6w9LIwPiQlB9bWT+BY9q5y5yzRu 0WKbXXLf+sWRR9 Message-ID: <4D2F1E40.1030604@gmx.com> Date: Thu, 13 Jan 2011 17:46:08 +0200 From: Nikos Vassiliadis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Ryan Stone References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: Jack F Vogel , freebsd-virtualization@freebsd.org Subject: Re: Would there be interest in virtualization of the ixgbe driver? X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 15:47:39 -0000 On 1/5/2011 12:50 AM, Ryan Stone wrote: > The way that I envision this working is that you'd run something like > "ifconfig vix0 create parent ix1" to create a new virtual interface > sharing the same physical interface as ix1. From that point on, vix0 > would be a completely different interface from ix1, with its own MAC, > vlan table, IPs, etc. > > Any comments as to whether this would be useful(or useless) would be welcome. Speaking for myself, I would say, yes, it sounds very interesting. Currently the same result can be achieved, by assigning a pseudo-ethernet interface to a vnet and bridging it to a physical ethernet interface. It would be nice to offload some things to the hardware. Yet, I don't know if the number of changes in the infrastructure worth the labor, for just one specific hardware. Is ixgbe the only hardware that support such things? Or maybe it is some trend of the future? As a virtualization user, I find it most useful. Nikos From owner-freebsd-virtualization@FreeBSD.ORG Thu Jan 13 15:56:43 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC4361065674 for ; Thu, 13 Jan 2011 15:56:43 +0000 (UTC) (envelope-from nvass9573@gmx.com) Received: from mailout-eu.gmx.com (mailout-eu.gmx.com [213.165.64.42]) by mx1.freebsd.org (Postfix) with SMTP id 12C278FC1F for ; Thu, 13 Jan 2011 15:56:42 +0000 (UTC) Received: (qmail invoked by alias); 13 Jan 2011 15:56:41 -0000 Received: from adsl-80.91.140.41.tellas.gr (EHLO [192.168.73.193]) [91.140.41.80] by mail.gmx.com (mp-eu001) with SMTP; 13 Jan 2011 16:56:41 +0100 X-Authenticated: #46156728 X-Provags-ID: V01U2FsdGVkX1+zx/MRrCazT8o8pLQcIIMoYKGRCbMJ7dpc06RYrl kIdLaJ7tJQRg1M Message-ID: <4D2F2069.6010705@gmx.com> Date: Thu, 13 Jan 2011 17:55:21 +0200 From: Nikos Vassiliadis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Julian Elischer References: <4D2EF336.5010905@gmx.com> <4D2F1B52.1010802@freebsd.org> In-Reply-To: <4D2F1B52.1010802@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: FreeBSD virtualization mailing list Subject: Re: if_bridge VIMAGE patch X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 15:56:43 -0000 On 1/13/2011 5:33 PM, Julian Elischer wrote: > The script should go in /usr/share/examples/netgraph It's not that well written, I just wrote it to test this complex topology it generates. But, If you find the script useful, feel free to commit it. Thanks for the prompt reply, Nikos From owner-freebsd-virtualization@FreeBSD.ORG Thu Jan 13 16:00:08 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 546101065679; Thu, 13 Jan 2011 16:00:08 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id CAACF8FC1E; Thu, 13 Jan 2011 16:00:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id C8FDB41C7A6; Thu, 13 Jan 2011 17:00:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id hK17wPiQWvY1; Thu, 13 Jan 2011 17:00:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id F29B241C7AF; Thu, 13 Jan 2011 17:00:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 0A6F14448F3; Thu, 13 Jan 2011 15:56:19 +0000 (UTC) Date: Thu, 13 Jan 2011 15:56:19 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Julian Elischer In-Reply-To: <4D2F1B52.1010802@freebsd.org> Message-ID: <20110113155141.I14966@maildrop.int.zabbadoz.net> References: <4D2EF336.5010905@gmx.com> <4D2F1B52.1010802@freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD virtualization mailing list Subject: Re: if_bridge VIMAGE patch X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 16:00:08 -0000 On Thu, 13 Jan 2011, Julian Elischer wrote: > On 1/13/11 4:42 AM, Nikos Vassiliadis wrote: >> Hi, >> >> Please, review the attached patch. It is against yesterday's HEAD >> and it virtualizes if_bridge. > > without examining every character, it looks ok. > The script should go in /usr/share/examples/netgraph > > Bjoern/Marko, see any problems? Despite the fact that the script does not use netgraph? I like the virtualization and I have carp done. It's just that if_cloners shouldn't all be done on their own. I haven't looked at the fact whether this allows bridges per-vnet or just does vmove magic. I would really appreciate if someone would support the move of the general infrastructure from perforce to HEAD (and help so we can get an exp run for the ports which break similarly). That would help interface and other subsystems (people are doing) immendiately. /bz -- Bjoern A. Zeeb You have to have visions! Going to jail sucks -- All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html From owner-freebsd-virtualization@FreeBSD.ORG Thu Jan 13 16:01:59 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D231B106564A for ; Thu, 13 Jan 2011 16:01:59 +0000 (UTC) (envelope-from zec@fer.hr) Received: from munja.zvne.fer.hr (munja.zvne.fer.hr [161.53.66.248]) by mx1.freebsd.org (Postfix) with ESMTP id 67A508FC18 for ; Thu, 13 Jan 2011 16:01:58 +0000 (UTC) Received: from sluga.fer.hr ([161.53.66.244]) by munja.zvne.fer.hr with Microsoft SMTPSVC(6.0.3790.4675); Thu, 13 Jan 2011 16:49:52 +0100 Received: from localhost ([161.53.19.8]) by sluga.fer.hr with Microsoft SMTPSVC(6.0.3790.4675); Thu, 13 Jan 2011 16:49:52 +0100 From: Marko Zec To: freebsd-virtualization@freebsd.org Date: Thu, 13 Jan 2011 16:49:49 +0100 User-Agent: KMail/1.9.10 References: <4D2EF336.5010905@gmx.com> In-Reply-To: <4D2EF336.5010905@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201101131649.50628.zec@fer.hr> X-OriginalArrivalTime: 13 Jan 2011 15:49:52.0505 (UTC) FILETIME=[8457DE90:01CBB339] Cc: Subject: Re: if_bridge VIMAGE patch X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 16:01:59 -0000 On Thursday 13 January 2011 13:42:30 Nikos Vassiliadis wrote: > Hi, > > Please, review the attached patch. It is against yesterday's HEAD > and it virtualizes if_bridge. > > You can use the bridgetest script to create quickly a topology > with redundant links to test STP. Looks good to me, though I'm wondering is there any particular reason why you prefer to create bridge instances in the "root" vnet first, and then move them to other vnets, instead of creating bridge instances directly in target vnets? In other words: ifconfig bridge1 create ifconfig bridge1 vnet x vs jexec x ifconfig bridge1 create In a near future, each vnet will have its own list of cloning ifnets (currently only lo and vlan cloners are per-vnet, while other cloning ifnet types use global cloners), so maybe it might be a good practice to attempt to avoid having ifnet with its cloner attached in one vnet while being loaned to another (though in some cases this is unavoidable, such as with epair ifnets). Cheers, Marko From owner-freebsd-virtualization@FreeBSD.ORG Thu Jan 13 16:12:03 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DD7B1065670 for ; Thu, 13 Jan 2011 16:12:03 +0000 (UTC) (envelope-from nvass9573@gmx.com) Received: from mailout-eu.gmx.com (mailout-eu.gmx.com [213.165.64.42]) by mx1.freebsd.org (Postfix) with SMTP id 78FFD8FC1B for ; Thu, 13 Jan 2011 16:12:02 +0000 (UTC) Received: (qmail invoked by alias); 13 Jan 2011 16:12:00 -0000 Received: from adsl-80.91.140.41.tellas.gr (EHLO [192.168.73.193]) [91.140.41.80] by mail.gmx.com (mp-eu002) with SMTP; 13 Jan 2011 17:12:00 +0100 X-Authenticated: #46156728 X-Provags-ID: V01U2FsdGVkX18TqzoAb5QTkwzsFMw2Ewa91udVUzbGK82JZItGlH eQhIcIOk2Itr36 Message-ID: <4D2F23FF.9020906@gmx.com> Date: Thu, 13 Jan 2011 18:10:39 +0200 From: Nikos Vassiliadis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Marko Zec References: <4D2EF336.5010905@gmx.com> <201101131649.50628.zec@fer.hr> In-Reply-To: <201101131649.50628.zec@fer.hr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-virtualization@freebsd.org Subject: Re: if_bridge VIMAGE patch X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 16:12:03 -0000 On 1/13/2011 5:49 PM, Marko Zec wrote: > On Thursday 13 January 2011 13:42:30 Nikos Vassiliadis wrote: >> Hi, >> >> Please, review the attached patch. It is against yesterday's HEAD >> and it virtualizes if_bridge. >> >> You can use the bridgetest script to create quickly a topology >> with redundant links to test STP. > > Looks good to me, though I'm wondering is there any particular reason why you > prefer to create bridge instances in the "root" vnet first, and then move > them to other vnets, instead of creating bridge instances directly in target > vnets? > > In other words: > > ifconfig bridge1 create > ifconfig bridge1 vnet x > > vs > > jexec x ifconfig bridge1 create Yes, there is no real reason. The script is just an aid to quickly create the testing topology. It is also known to break in many situations. > In a near future, each vnet will have its own list of cloning ifnets > (currently only lo and vlan cloners are per-vnet, while other cloning ifnet > types use global cloners), so maybe it might be a good practice to attempt to > avoid having ifnet with its cloner attached in one vnet while being loaned to > another (though in some cases this is unavoidable, such as with epair > ifnets). I see. Thanks, Nikos From owner-freebsd-virtualization@FreeBSD.ORG Thu Jan 13 18:55:14 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B0C510656DC for ; Thu, 13 Jan 2011 18:55:14 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0F1798FC1F for ; Thu, 13 Jan 2011 18:55:13 +0000 (UTC) Received: by yxh35 with SMTP id 35so843276yxh.13 for ; Thu, 13 Jan 2011 10:55:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=LGnIMMAMfcThsMy7vgnGf/DI7ksGikWSLpyLOLtP28c=; b=skmehKtv/28YVvpMoswF+B5HQMvfWb2vqBVsybXjIddNo1Bq3ODCSI9DxciFBPphHa Ie0nUM66RIXh7kPvezT6VwDW7EofIpq3Dd6GsqXyO45xih+307wXBWBWvfgO8SFbHeOH tamOQWhO7u0DTTRXkxfB81o5m9DYWb9YEIEUM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=R8+EOFlaZuiovEaIqBC52EyqViOqfuJ/SZE5k6RoBertjTpde4nIFg/x5/6et290jm dXCKFz4IFQ/ktAZ3iqgMwq9y3yrXGQaD4+IAbsk/xGJipSPOdju0FtoFew1mhTthW03l qPwjF4rUeiZVubAi8iGl7pxnAIGu94o8WpEzM= MIME-Version: 1.0 Received: by 10.151.149.13 with SMTP id b13mr36148ybo.16.1294943179083; Thu, 13 Jan 2011 10:26:19 -0800 (PST) Received: by 10.147.182.20 with HTTP; Thu, 13 Jan 2011 10:26:19 -0800 (PST) In-Reply-To: <4D2F1E40.1030604@gmx.com> References: <4D2F1E40.1030604@gmx.com> Date: Thu, 13 Jan 2011 10:26:19 -0800 Message-ID: From: Jack Vogel To: Nikos Vassiliadis X-Mailman-Approved-At: Thu, 13 Jan 2011 19:05:10 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Jack F Vogel , Ryan Stone , freebsd-virtualization@freebsd.org Subject: Re: Would there be interest in virtualization of the ixgbe driver? X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 18:55:14 -0000 While it seems interesting in theory, from what Ryan has told me it would require massive change to the code base, which I do not think is worthwhile without significant demand. This ability could be provided with SRIOV host support, which I would rather see. I'm still willing to look at changes and decide then if Ryan wishes. Jack On Thu, Jan 13, 2011 at 7:46 AM, Nikos Vassiliadis wrote: > On 1/5/2011 12:50 AM, Ryan Stone wrote: > >> The way that I envision this working is that you'd run something like >> "ifconfig vix0 create parent ix1" to create a new virtual interface >> sharing the same physical interface as ix1. From that point on, vix0 >> would be a completely different interface from ix1, with its own MAC, >> vlan table, IPs, etc. >> >> Any comments as to whether this would be useful(or useless) would be >> welcome. >> > > Speaking for myself, I would say, yes, it sounds very interesting. > > Currently the same result can be achieved, by assigning a pseudo-ethernet > interface to a vnet and bridging it to a physical ethernet interface. > It would be nice to offload some things to the hardware. > > Yet, I don't know if the number of changes in the infrastructure worth the > labor, for just one specific hardware. Is ixgbe the only hardware that > support such things? > Or maybe it is some trend of the future? > > As a virtualization user, I find it most useful. > > Nikos > From owner-freebsd-virtualization@FreeBSD.ORG Thu Jan 13 20:07:15 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96F3A10656A3 for ; Thu, 13 Jan 2011 20:07:15 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 280768FC16 for ; Thu, 13 Jan 2011 20:07:14 +0000 (UTC) Received: by eyf6 with SMTP id 6so1085666eyf.13 for ; Thu, 13 Jan 2011 12:07:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=HIZqsKZjPpKZwUWzEdy71UG94WbkW8JsdOJw/YafEgg=; b=R+VAcO8ma2DjYHAlKvRP16ME0Oa7rarOmGdIUfyO3qI+q9cSxiH/Pw7B6oOvoITec1 QhybzV6FxV9h0FE+SHtWayX8kPqTkjVUyZsNFgKz2ik3in39dVlRsmPIcw0T/ihsEVTp K2mreU830RvGd2KZnhQl2+AsLfrTJnThumjSw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=akHoT+sQvEyHQ/TaSi4tMS5z88TDKVT0JqSibJfIY0BK6T8jKRiuNkBYyEdwLbnnXD pY4hdoP5VBBrpOe5lYHfmmwNuVjhBBE5uGG9Fkm9hWTBNdpStFIEUoov7Z0JYyWYOmk6 6L6IPCUR4ZMxLbYTBu2Gco+yy+zXaX8hM+++4= MIME-Version: 1.0 Received: by 10.216.18.194 with SMTP id l44mr1089837wel.87.1294949051617; Thu, 13 Jan 2011 12:04:11 -0800 (PST) Received: by 10.216.36.71 with HTTP; Thu, 13 Jan 2011 12:04:11 -0800 (PST) In-Reply-To: References: Date: Thu, 13 Jan 2011 14:04:11 -0600 Message-ID: From: Brandon Gooch To: Ryan Stone Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Jack F Vogel , freebsd-virtualization@freebsd.org Subject: Re: Would there be interest in virtualization of the ixgbe driver? X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 20:07:15 -0000 On Tue, Jan 4, 2011 at 4:50 PM, Ryan Stone wrote: > At $WORK I've implemented an extension of the ixgbe driver that > provides multiple virtualized ixgbe interfaces. =A0The implementation > uses the 8259[89]'s virtualization features, so the rx and tx paths of > the virtual interfaces are completely independent. =A0From the > perspective of everything above the ixgbe driver, it's as if there are > multiple physical interfaces present. > > The use-case for the feature at $WORK is very specific to our > architecture, but I can imagine that having hardware-based virtual > interfaces could be useful with jails, vnet or when using FreeBSD as > the host OS for something like VirtualBox. =A0I'm really not very > familiar with what people do or want to do with virtualization on > FreeBSD, so I don't have any kind of idea as to whether this feature > could be useful to the community. > > Currently the code is not in a state that could be submitted to jfv@ > for consideration: I disabled certain features like RSS because I > didn't need them in my implementation, and interfaces can only be > created at boot(via tunable). =A0Before I start working on cleaning it > up, I want to know if people think that such a feature would be > worthwhile or useful to them. > > The way that I envision this working is that you'd run something like > "ifconfig vix0 create parent ix1" to create a new virtual interface > sharing the same physical interface as ix1. =A0From that point on, vix0 > would be a completely different interface from ix1, with its own MAC, > vlan table, IPs, etc. It would be nice to split up the hardware for use with vnet jails. The virtualization technique you are describing -- it sounds similar to how network device virtualization is done in the Solaris "Project Crossbow" implementation. Can you comment on this? In other words, would we have the ability to have a vnet jail tied to specific hardware resources (Rx/Tx rings with their own DMA channels and interrupts, etc...). I'm sorry, I don't have a link to the "Project Crossbow" features to which I'm referring. -Brandon From owner-freebsd-virtualization@FreeBSD.ORG Thu Jan 13 21:45:06 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 731CC106566C; Thu, 13 Jan 2011 21:45:06 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 111948FC0A; Thu, 13 Jan 2011 21:45:05 +0000 (UTC) Received: by yxh35 with SMTP id 35so904983yxh.13 for ; Thu, 13 Jan 2011 13:45:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=CWPROxw97NzeLOIl9kqOvWFFtmqLTxfw0rBXKlp3WZE=; b=T072ITr4lE/t5WjvO4AxB14siJ4G3gMhHMRSTgAfIXa2vCDha0+dcnsbKyh33OUjKd ZM8fm3hP4OdkQz+RlXOUE4yCwWSeeYOkDNZ2nog/Cr7CZjIA6KlmnJ9C9kLPoOIc0vkC N9OwwtrndgmlHtmSbD8lxzsMr8BAwZI7o/UMU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=p1ov2uvkYLK6v4I2ciOuyEpodjgkQJyXiO3wr86Qnnmj1uL7hsux2itoS7mB1aUzk6 gNFydHO7ECmN65c72et8QFYEDTuq0F0gAW/Nq6Htu7VW9NUBF6BwSviDg5MW8QnbZ7u6 oJ7KaBEc+I1XxjJPDPUCgtPkkjUMcoS0SWnU8= MIME-Version: 1.0 Received: by 10.150.212.14 with SMTP id k14mr347131ybg.73.1294955105310; Thu, 13 Jan 2011 13:45:05 -0800 (PST) Received: by 10.147.182.20 with HTTP; Thu, 13 Jan 2011 13:45:05 -0800 (PST) In-Reply-To: References: Date: Thu, 13 Jan 2011 13:45:05 -0800 Message-ID: From: Jack Vogel To: Brandon Gooch Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Jack F Vogel , Ryan Stone , freebsd-virtualization@freebsd.org Subject: Re: Would there be interest in virtualization of the ixgbe driver? X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 21:45:06 -0000 Doesn't matter, I have a coworker who handles Solaris, he can probably give me some info :) SRIOV allows you to partition the device at the PCI level and then you can 'assign' to a virtual guest or whatever, its still the most desireable to me. Jack On Thu, Jan 13, 2011 at 12:04 PM, Brandon Gooch wrote: > On Tue, Jan 4, 2011 at 4:50 PM, Ryan Stone wrote: > > At $WORK I've implemented an extension of the ixgbe driver that > > provides multiple virtualized ixgbe interfaces. The implementation > > uses the 8259[89]'s virtualization features, so the rx and tx paths of > > the virtual interfaces are completely independent. From the > > perspective of everything above the ixgbe driver, it's as if there are > > multiple physical interfaces present. > > > > The use-case for the feature at $WORK is very specific to our > > architecture, but I can imagine that having hardware-based virtual > > interfaces could be useful with jails, vnet or when using FreeBSD as > > the host OS for something like VirtualBox. I'm really not very > > familiar with what people do or want to do with virtualization on > > FreeBSD, so I don't have any kind of idea as to whether this feature > > could be useful to the community. > > > > Currently the code is not in a state that could be submitted to jfv@ > > for consideration: I disabled certain features like RSS because I > > didn't need them in my implementation, and interfaces can only be > > created at boot(via tunable). Before I start working on cleaning it > > up, I want to know if people think that such a feature would be > > worthwhile or useful to them. > > > > The way that I envision this working is that you'd run something like > > "ifconfig vix0 create parent ix1" to create a new virtual interface > > sharing the same physical interface as ix1. From that point on, vix0 > > would be a completely different interface from ix1, with its own MAC, > > vlan table, IPs, etc. > > It would be nice to split up the hardware for use with vnet jails. The > virtualization technique you are describing -- it sounds similar to > how network device virtualization is done in the Solaris "Project > Crossbow" implementation. Can you comment on this? > > In other words, would we have the ability to have a vnet jail tied to > specific hardware resources (Rx/Tx rings with their own DMA channels > and interrupts, etc...). > > I'm sorry, I don't have a link to the "Project Crossbow" features to > which I'm referring. > > -Brandon > From owner-freebsd-virtualization@FreeBSD.ORG Fri Jan 14 02:51:49 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26F6A1065670; Fri, 14 Jan 2011 02:51:49 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 889628FC1E; Fri, 14 Jan 2011 02:51:48 +0000 (UTC) Received: by eyf6 with SMTP id 6so1221784eyf.13 for ; Thu, 13 Jan 2011 18:51:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=HW7X4/m+7kqoR4P4Am6QJylt9l0t3Wzbb5ftsnBfr1s=; b=r4Ji5T/8IQRiYMdnyTlhGngFqkYRKr2SGJJ25BTA/Mfb4UAwVkqFA2DydlHvbmWKtu HYPiJ6O99cWEs1rHS0cRwZn+5CElla6ADWf42nj6SNhERfUQ978R0ifIGKCYJVwH6SRo JYlWVju53zW1dFS71evuiGBLJxHGI2hboYPTE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=jWeh6w1BYpJQc89AuSgbeokoVf4go5ZAGsE10BulxZGgyMUD7v0V2M+Vkyxd6886GA RdR6v2r0HLNwFphUtHBbL2vW2pjaTqJ7JSNKChbiFUO//n1QREQt4TDGYC0YRDIqNmqN Q8fPaFDG4jEBYn4PWzO3Xb9Nq/dhPC1Ib/M9I= MIME-Version: 1.0 Received: by 10.213.23.10 with SMTP id p10mr1163573ebb.0.1294973507358; Thu, 13 Jan 2011 18:51:47 -0800 (PST) Received: by 10.213.22.14 with HTTP; Thu, 13 Jan 2011 18:51:47 -0800 (PST) In-Reply-To: References: Date: Thu, 13 Jan 2011 21:51:47 -0500 Message-ID: From: Ryan Stone To: Brandon Gooch Content-Type: text/plain; charset=ISO-8859-1 X-Mailman-Approved-At: Fri, 14 Jan 2011 07:37:13 +0000 Cc: Jack F Vogel , freebsd-virtualization@freebsd.org Subject: Re: Would there be interest in virtualization of the ixgbe driver? X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2011 02:51:49 -0000 On Thu, Jan 13, 2011 at 3:04 PM, Brandon Gooch wrote: > It would be nice to split up the hardware for use with vnet jails. The > virtualization technique you are describing -- it sounds similar to > how network device virtualization is done in the Solaris "Project > Crossbow" implementation. Can you comment on this? It looks like what I've done is implement what they call "L2 virtualization" in Project Crossbow. > In other words, would we have the ability to have a vnet jail tied to > specific hardware resources (Rx/Tx rings with their own DMA channels > and interrupts, etc...). Exactly right. And the rx ring has a unique MAC, so that's how incoming packets are multiplexed across multiple rings(and ultimately vnets). Also, you can use RSS on top of VMDq. To use the terminology used in the 82599's datasheet, each MAC(and vnet) would be associated with a pool of 1 or more rx and tx rings. Packets are multiplexed across the pools by MAC, and then packets are multiplexed across the rx rings in that pool by a hash over the IP addresses and the TCP/UDP ports. All of this, of course, is subject to the limits of the hardware. The 82598 is quite restrictive: something like 16 pools and up to 4 rings per pool. The 82599 has a lot more pools and queues to work with. On Thu, Jan 13, 2011 at 10:46 AM, Nikos Vassiliadis wrote: > Yet, I don't know if the number of changes in the infrastructure worth the > labor, for just one specific hardware. Is ixgbe the only hardware that > support such things? > Or maybe it is some trend of the future? Basically all of the changes are within the ixgbe driver. No infrastructure should have to change to support the feature. Also, Project Crossbow was implemented for a number of different drivers, including ixgbe and igb, so it should be possible to implement similar features for other drivers. However, this will always end up being quite hardware-specific so while it'd probably be possible to use the same concepts across the different drivers, it would have to re-implemented for each driver. The if_cloner used to create the virtual ifnets could be shared but that's probably <1% of the work. From owner-freebsd-virtualization@FreeBSD.ORG Fri Jan 14 12:50:10 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AFAD106566C for ; Fri, 14 Jan 2011 12:50:10 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 6CC918FC15 for ; Fri, 14 Jan 2011 12:50:09 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 1C69741C7A9; Fri, 14 Jan 2011 13:50:07 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id zUeHjX-LB3XV; Fri, 14 Jan 2011 13:50:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id B2B3541C7B7; Fri, 14 Jan 2011 13:50:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 4C2AE4448F3; Fri, 14 Jan 2011 12:48:05 +0000 (UTC) Date: Fri, 14 Jan 2011 12:48:05 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Thierry Herbelot In-Reply-To: <201011182304.06712.thierry.herbelot@free.fr> Message-ID: <20110114124738.F14966@maildrop.int.zabbadoz.net> References: <201011170627.28025.thierry.herbelot@free.fr> <201011182128.44827.thierry.herbelot@free.fr> <20101118203639.K24596@maildrop.int.zabbadoz.net> <201011182304.06712.thierry.herbelot@free.fr> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-453464687-1295009285=:14966" Cc: FreeBSD virtualization mailing list Subject: Re: VIMAGE: Freed UMA keg was not empty X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2011 12:50:10 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-453464687-1295009285=:14966 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 18 Nov 2010, Thierry Herbelot wrote: > "Bjoern A. Zeeb" a =E9crit >> On Thu, 18 Nov 2010, Thierry Herbelot wrote: >>> "Bjoern A. Zeeb" a =E9crit >>> >>>> On Wed, 17 Nov 2010, Thierry Herbelot wrote: >>>>> As promised, here are the full logs (in attachment) >>>>> >>>>> This is a serial console log showing the command loop that triggers t= he >>>>> bug on a debug kernel and ensuing DDB session. >>>>> >>>>> the obvious problem line is : >>>>> routetbl 2684 303890K 3469 >>>>> >>>>> (further tests showed an increase of the routetbl malloc zone by >>>>> 4MBytes for each vnet jail creation/destruction cycle) >>>> >>>> Hmm, I had fixed that (somewhere). I'll see where the patch went. You >>>> are on 8.1-RELEASE or -STABLE? >>> >>> This will be for a -release, thus 8.1 for now, but we will switch to 8.= 2 >>> ASAP >> >> Well wait; I am not sure the changes are in SVN at all. I'll get back >> to you. > > OK for us : we are still in the process of deploying the solution, but st= ill > we will test any patch you can forward ;-) Do you have FLOWTABLE enabled in your kernel config? /bz --=20 Bjoern A. Zeeb You have to have visions! Going to jail sucks -- All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html --0-453464687-1295009285=:14966-- From owner-freebsd-virtualization@FreeBSD.ORG Fri Jan 14 18:11:07 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87685106566C for ; Fri, 14 Jan 2011 18:11:07 +0000 (UTC) (envelope-from thierry.herbelot@free.fr) Received: from smtpfb1-g21.free.fr (smtpfb1-g21.free.fr [212.27.42.9]) by mx1.freebsd.org (Postfix) with ESMTP id 1CEDA8FC15 for ; Fri, 14 Jan 2011 18:11:05 +0000 (UTC) Received: from smtp6-g21.free.fr (smtp6-g21.free.fr [212.27.42.6]) by smtpfb1-g21.free.fr (Postfix) with ESMTP id BC9F22DB10 for ; Fri, 14 Jan 2011 18:52:27 +0100 (CET) Received: from mail.herbelot.nom (unknown [82.227.159.103]) by smtp6-g21.free.fr (Postfix) with ESMTP id 9D99D822FA for ; Fri, 14 Jan 2011 18:52:19 +0100 (CET) Received: from tulipe.herbelot.nom (tulipe.herbelot.nom [192.168.2.5]) by mail.herbelot.nom (8.14.1/8.14.1) with ESMTP id p0EHq59J018325; Fri, 14 Jan 2011 18:52:06 +0100 (CET) From: Thierry Herbelot To: "Bjoern A. Zeeb" Date: Fri, 14 Jan 2011 18:51:59 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.5.5; amd64; ; ) References: <201011170627.28025.thierry.herbelot@free.fr> <201011182304.06712.thierry.herbelot@free.fr> <20110114124738.F14966@maildrop.int.zabbadoz.net> In-Reply-To: <20110114124738.F14966@maildrop.int.zabbadoz.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201101141851.59565.thierry.herbelot@free.fr> Cc: FreeBSD virtualization mailing list Subject: Re: VIMAGE: Freed UMA keg was not empty X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2011 18:11:07 -0000 "Bjoern A. Zeeb" a =E9crit > On Thu, 18 Nov 2010, Thierry Herbelot wrote: > > "Bjoern A. Zeeb" a =E9crit > >=20 > >> On Thu, 18 Nov 2010, Thierry Herbelot wrote: > >>> "Bjoern A. Zeeb" a =E9crit > >>>=20 > >>>> On Wed, 17 Nov 2010, Thierry Herbelot wrote: > >>>>> As promised, here are the full logs (in attachment) > >>>>>=20 > >>>>> This is a serial console log showing the command loop that triggers > >>>>> the bug on a debug kernel and ensuing DDB session. > >>>>>=20 > >>>>> the obvious problem line is : > >>>>> routetbl 2684 303890K 3469 > >>>>>=20 > >>>>> (further tests showed an increase of the routetbl malloc zone by > >>>>> 4MBytes for each vnet jail creation/destruction cycle) > >>>>=20 > >>>> Hmm, I had fixed that (somewhere). I'll see where the patch went. Y= ou > >>>> are on 8.1-RELEASE or -STABLE? > >>>=20 > >>> This will be for a -release, thus 8.1 for now, but we will switch to > >>> 8.2 ASAP > >>=20 > >> Well wait; I am not sure the changes are in SVN at all. I'll get back > >> to you. > >=20 > > OK for us : we are still in the process of deploying the solution, but > > still we will test any patch you can forward ;-) >=20 > Do you have FLOWTABLE enabled in your kernel config? Hello, I will check at work on monday, but I think so, as the kernel configuration= =20 was derived from GENERIC. BTW, the setup we wanted (ie with VIMAGE) is showing good stability (with 8= =2E2- stable) as we have removed the need to start and stop the jails. we will=20 definitely deploy 8.2 with VIMAGE and use it for our test bench. TfH >=20 > /bz From owner-freebsd-virtualization@FreeBSD.ORG Fri Jan 14 19:00:20 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20E1C10656A7 for ; Fri, 14 Jan 2011 19:00:20 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id C834B8FC13 for ; Fri, 14 Jan 2011 19:00:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id C4F6641C7A8; Fri, 14 Jan 2011 20:00:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id lsyp+6K5XXIN; Fri, 14 Jan 2011 20:00:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 335CC41C7A7; Fri, 14 Jan 2011 20:00:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 8E2A74448F3; Fri, 14 Jan 2011 18:56:20 +0000 (UTC) Date: Fri, 14 Jan 2011 18:56:20 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Thierry Herbelot In-Reply-To: <201101141851.59565.thierry.herbelot@free.fr> Message-ID: <20110114185542.R14966@maildrop.int.zabbadoz.net> References: <201011170627.28025.thierry.herbelot@free.fr> <201011182304.06712.thierry.herbelot@free.fr> <20110114124738.F14966@maildrop.int.zabbadoz.net> <201101141851.59565.thierry.herbelot@free.fr> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-564728623-1295031380=:14966" Cc: FreeBSD virtualization mailing list Subject: Re: VIMAGE: Freed UMA keg was not empty X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2011 19:00:20 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-564728623-1295031380=:14966 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Fri, 14 Jan 2011, Thierry Herbelot wrote: > "Bjoern A. Zeeb" a =E9crit >> On Thu, 18 Nov 2010, Thierry Herbelot wrote: >>> "Bjoern A. Zeeb" a =E9crit >>> >>>> On Thu, 18 Nov 2010, Thierry Herbelot wrote: >>>>> "Bjoern A. Zeeb" a =E9crit >>>>> >>>>>> On Wed, 17 Nov 2010, Thierry Herbelot wrote: >>>>>>> As promised, here are the full logs (in attachment) >>>>>>> >>>>>>> This is a serial console log showing the command loop that triggers >>>>>>> the bug on a debug kernel and ensuing DDB session. >>>>>>> >>>>>>> the obvious problem line is : >>>>>>> routetbl 2684 303890K 3469 >>>>>>> >>>>>>> (further tests showed an increase of the routetbl malloc zone by >>>>>>> 4MBytes for each vnet jail creation/destruction cycle) >>>>>> >>>>>> Hmm, I had fixed that (somewhere). I'll see where the patch went. Y= ou >>>>>> are on 8.1-RELEASE or -STABLE? >>>>> >>>>> This will be for a -release, thus 8.1 for now, but we will switch to >>>>> 8.2 ASAP >>>> >>>> Well wait; I am not sure the changes are in SVN at all. I'll get back >>>> to you. >>> >>> OK for us : we are still in the process of deploying the solution, but >>> still we will test any patch you can forward ;-) >> >> Do you have FLOWTABLE enabled in your kernel config? > > Hello, > > I will check at work on monday, but I think so, as the kernel configurati= on > was derived from GENERIC. that would have been the reason for the memory leaks. > BTW, the setup we wanted (ie with VIMAGE) is showing good stability (with= 8.2- > stable) as we have removed the need to start and stop the jails. we will but with that you won't see it anymore. /bz --=20 Bjoern A. Zeeb You have to have visions! Going to jail sucks -- All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html --0-564728623-1295031380=:14966-- From owner-freebsd-virtualization@FreeBSD.ORG Fri Jan 14 21:05:10 2011 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 469BA106566B for ; Fri, 14 Jan 2011 21:05:10 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 92D868FC0C for ; Fri, 14 Jan 2011 21:05:08 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id E8D9841C7A7; Fri, 14 Jan 2011 22:05:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id mSfV4eqtefnG; Fri, 14 Jan 2011 22:05:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 29CC241C735; Fri, 14 Jan 2011 22:05:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id BDD3A4448F3; Fri, 14 Jan 2011 21:04:24 +0000 (UTC) Date: Fri, 14 Jan 2011 21:04:24 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Brandon Gooch In-Reply-To: Message-ID: <20110114210351.Y14966@maildrop.int.zabbadoz.net> References: X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-2132135890-1295039064=:14966" Cc: FreeBSD virtualization mailing list Subject: Re: way for determine VIMAGE feature X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jan 2011 21:05:10 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-2132135890-1295039064=:14966 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sun, 9 Jan 2011, Brandon Gooch wrote: > On Sun, Jan 9, 2011 at 9:17 AM, Subbsd wrote: >> Hi >> >> is there any mechanism to find out from userland =A0is supports the >> current kernel VIMAGE or not? something like 'sysctl >> kern.features.vnet=3D1' ? >> Thanks > > bz@ just committed a feature announcement for VIMAGE: > > http://svn.freebsd.org/viewvc/base/head/sys/net/vnet.c?r1=3D217203&r2=3D2= 17202&pathrev=3D217203 > > # sysctl kern.features.vimage it's been MFCed to stable/8 and will be part of FreeBSD 8.3 (it'll miss 8.2). /bz --=20 Bjoern A. Zeeb You have to have visions! Going to jail sucks -- All my daemons like it! http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html --0-2132135890-1295039064=:14966--